@foldkit/devtools-mcp 0.16.1 → 0.17.0-canary.7dae0fe605fc

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 +1278 -691
  2. package/package.json +5 -5
package/dist/server.js CHANGED
@@ -1208,8 +1208,8 @@ var require_util = __commonJS({
1208
1208
  })(Type || (exports.Type = Type = {}));
1209
1209
  function getErrorPath(dataProp, dataPropType, jsPropertySyntax) {
1210
1210
  if (dataProp instanceof codegen_1.Name) {
1211
- const isNumber2 = dataPropType === Type.Num;
1212
- return jsPropertySyntax ? isNumber2 ? (0, codegen_1._)`"[" + ${dataProp} + "]"` : (0, codegen_1._)`"['" + ${dataProp} + "']"` : isNumber2 ? (0, codegen_1._)`"/" + ${dataProp}` : (0, codegen_1._)`"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`;
1211
+ const isNumber3 = dataPropType === Type.Num;
1212
+ return jsPropertySyntax ? isNumber3 ? (0, codegen_1._)`"[" + ${dataProp} + "]"` : (0, codegen_1._)`"['" + ${dataProp} + "']"` : isNumber3 ? (0, codegen_1._)`"/" + ${dataProp}` : (0, codegen_1._)`"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`;
1213
1213
  }
1214
1214
  return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp);
1215
1215
  }
@@ -2991,7 +2991,7 @@ var require_compile = __commonJS({
2991
2991
  const schOrFunc = root.refs[ref];
2992
2992
  if (schOrFunc)
2993
2993
  return schOrFunc;
2994
- let _sch = resolve2.call(this, root, ref);
2994
+ let _sch = resolve3.call(this, root, ref);
2995
2995
  if (_sch === void 0) {
2996
2996
  const schema = (_a2 = root.localRefs) === null || _a2 === void 0 ? void 0 : _a2[ref];
2997
2997
  const { schemaId } = this.opts;
@@ -3018,7 +3018,7 @@ var require_compile = __commonJS({
3018
3018
  function sameSchemaEnv(s1, s2) {
3019
3019
  return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
3020
3020
  }
3021
- function resolve2(root, ref) {
3021
+ function resolve3(root, ref) {
3022
3022
  let sch;
3023
3023
  while (typeof (sch = this.refs[ref]) == "string")
3024
3024
  ref = sch;
@@ -3649,7 +3649,7 @@ var require_fast_uri = __commonJS({
3649
3649
  }
3650
3650
  return uri;
3651
3651
  }
3652
- function resolve2(baseURI, relativeURI, options) {
3652
+ function resolve3(baseURI, relativeURI, options) {
3653
3653
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
3654
3654
  const resolved = resolveComponent(parse4(baseURI, schemelessOptions), parse4(relativeURI, schemelessOptions), schemelessOptions, true);
3655
3655
  schemelessOptions.skipEscape = true;
@@ -3907,7 +3907,7 @@ var require_fast_uri = __commonJS({
3907
3907
  var fastUri = {
3908
3908
  SCHEMES,
3909
3909
  normalize: normalize2,
3910
- resolve: resolve2,
3910
+ resolve: resolve3,
3911
3911
  resolveComponent,
3912
3912
  equal,
3913
3913
  serialize,
@@ -9315,7 +9315,7 @@ var require_websocket = __commonJS({
9315
9315
  * not to skip UTF-8 validation for text and close messages
9316
9316
  * @private
9317
9317
  */
9318
- setSocket(socket, head2, options) {
9318
+ setSocket(socket, head4, options) {
9319
9319
  const receiver = new Receiver2({
9320
9320
  allowSynchronousEvents: options.allowSynchronousEvents,
9321
9321
  binaryType: this.binaryType,
@@ -9342,7 +9342,7 @@ var require_websocket = __commonJS({
9342
9342
  sender.onerror = senderOnError;
9343
9343
  if (socket.setTimeout) socket.setTimeout(0);
9344
9344
  if (socket.setNoDelay) socket.setNoDelay();
9345
- if (head2.length > 0) socket.unshift(head2);
9345
+ if (head4.length > 0) socket.unshift(head4);
9346
9346
  socket.on("close", socketOnClose);
9347
9347
  socket.on("data", socketOnData);
9348
9348
  socket.on("end", socketOnEnd);
@@ -9803,7 +9803,7 @@ var require_websocket = __commonJS({
9803
9803
  );
9804
9804
  }
9805
9805
  });
9806
- req.on("upgrade", (res, socket, head2) => {
9806
+ req.on("upgrade", (res, socket, head4) => {
9807
9807
  websocket.emit("upgrade", res);
9808
9808
  if (websocket.readyState !== WebSocket2.CONNECTING) return;
9809
9809
  req = websocket._req = null;
@@ -9863,7 +9863,7 @@ var require_websocket = __commonJS({
9863
9863
  }
9864
9864
  websocket._extensions[PerMessageDeflate2.extensionName] = perMessageDeflate;
9865
9865
  }
9866
- websocket.setSocket(socket, head2, {
9866
+ websocket.setSocket(socket, head4, {
9867
9867
  allowSynchronousEvents: opts.allowSynchronousEvents,
9868
9868
  generateMask: opts.generateMask,
9869
9869
  maxBufferedChunks: opts.maxBufferedChunks,
@@ -10282,8 +10282,8 @@ var require_websocket_server = __commonJS({
10282
10282
  this._removeListeners = addListeners(this._server, {
10283
10283
  listening: this.emit.bind(this, "listening"),
10284
10284
  error: this.emit.bind(this, "error"),
10285
- upgrade: (req, socket, head2) => {
10286
- this.handleUpgrade(req, socket, head2, emitConnection);
10285
+ upgrade: (req, socket, head4) => {
10286
+ this.handleUpgrade(req, socket, head4, emitConnection);
10287
10287
  }
10288
10288
  });
10289
10289
  }
@@ -10378,7 +10378,7 @@ var require_websocket_server = __commonJS({
10378
10378
  * @param {Function} cb Callback
10379
10379
  * @public
10380
10380
  */
10381
- handleUpgrade(req, socket, head2, cb) {
10381
+ handleUpgrade(req, socket, head4, cb) {
10382
10382
  socket.on("error", socketOnError);
10383
10383
  const key = req.headers["sec-websocket-key"];
10384
10384
  const upgrade = req.headers.upgrade;
@@ -10457,7 +10457,7 @@ var require_websocket_server = __commonJS({
10457
10457
  protocols,
10458
10458
  req,
10459
10459
  socket,
10460
- head2,
10460
+ head4,
10461
10461
  cb
10462
10462
  );
10463
10463
  });
@@ -10465,7 +10465,7 @@ var require_websocket_server = __commonJS({
10465
10465
  }
10466
10466
  if (!this.options.verifyClient(info2)) return abortHandshake(socket, 401);
10467
10467
  }
10468
- this.completeUpgrade(extensions, key, protocols, req, socket, head2, cb);
10468
+ this.completeUpgrade(extensions, key, protocols, req, socket, head4, cb);
10469
10469
  }
10470
10470
  /**
10471
10471
  * Upgrade the connection to WebSocket.
@@ -10480,7 +10480,7 @@ var require_websocket_server = __commonJS({
10480
10480
  * @throws {Error} If called more than once with the same socket
10481
10481
  * @private
10482
10482
  */
10483
- completeUpgrade(extensions, key, protocols, req, socket, head2, cb) {
10483
+ completeUpgrade(extensions, key, protocols, req, socket, head4, cb) {
10484
10484
  if (!socket.readable || !socket.writable) return socket.destroy();
10485
10485
  if (socket[kWebSocket]) {
10486
10486
  throw new Error(
@@ -10514,7 +10514,7 @@ var require_websocket_server = __commonJS({
10514
10514
  this.emit("headers", headers, req);
10515
10515
  socket.write(headers.concat("\r\n").join("\r\n"));
10516
10516
  socket.removeListener("error", socketOnError);
10517
- ws.setSocket(socket, head2, {
10517
+ ws.setSocket(socket, head4, {
10518
10518
  allowSynchronousEvents: this.options.allowSynchronousEvents,
10519
10519
  maxBufferedChunks: this.options.maxBufferedChunks,
10520
10520
  maxFragments: this.options.maxFragments,
@@ -10575,7 +10575,7 @@ var require_websocket_server = __commonJS({
10575
10575
  }
10576
10576
  });
10577
10577
 
10578
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Pipeable.js
10578
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/Function.js
10622
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/Array.js
10695
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/internal/equal.js
10833
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/Predicate.js
10856
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/Hash.js
10914
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Hash.js
10915
10915
  var symbol = "~effect/interfaces/Hash";
10916
10916
  var hash = (self) => {
10917
10917
  switch (typeof self) {
@@ -11025,17 +11025,17 @@ var hashSet = /* @__PURE__ */ iterableWith(/* @__PURE__ */ string("Set"), hash);
11025
11025
  var randomHashCache = /* @__PURE__ */ new WeakMap();
11026
11026
  var hashCache = /* @__PURE__ */ new WeakMap();
11027
11027
  var visitedObjects = /* @__PURE__ */ new WeakSet();
11028
- function withVisitedTracking(obj, fn3) {
11028
+ function withVisitedTracking(obj, fn5) {
11029
11029
  if (visitedObjects.has(obj)) {
11030
11030
  return string("[Circular]");
11031
11031
  }
11032
11032
  visitedObjects.add(obj);
11033
- const result5 = fn3();
11033
+ const result5 = fn5();
11034
11034
  visitedObjects.delete(obj);
11035
11035
  return result5;
11036
11036
  }
11037
11037
 
11038
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Equal.js
11038
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Equal.js
11039
11039
  var symbol2 = "~effect/interfaces/Equal";
11040
11040
  function equals() {
11041
11041
  if (arguments.length === 1) {
@@ -11061,7 +11061,7 @@ function compareBoth(self, that) {
11061
11061
  }
11062
11062
  return withCache(self, that, compareObjects);
11063
11063
  }
11064
- function withVisitedTracking2(self, that, fn3) {
11064
+ function withVisitedTracking2(self, that, fn5) {
11065
11065
  const hasLeft = visitedLeft.has(self);
11066
11066
  const hasRight = visitedRight.has(that);
11067
11067
  if (hasLeft && hasRight) {
@@ -11072,7 +11072,7 @@ function withVisitedTracking2(self, that, fn3) {
11072
11072
  }
11073
11073
  visitedLeft.add(self);
11074
11074
  visitedRight.add(that);
11075
- const result5 = fn3();
11075
+ const result5 = fn5();
11076
11076
  visitedLeft.delete(self);
11077
11077
  visitedRight.delete(that);
11078
11078
  return result5;
@@ -11232,7 +11232,7 @@ var byReferenceUnsafe = (obj) => {
11232
11232
  return obj;
11233
11233
  };
11234
11234
 
11235
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Reducer.js
11235
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/Equivalence.js
11250
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/internal/array.js
11264
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/internal/doNotation.js
11267
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/internal/record.js
11280
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/Option.js
11302
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/Combiner.js
11367
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/Redactable.js
11380
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/Formatter.js
11402
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/Inspectable.js
11503
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/Utils.js
11570
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/internal/core.js
11630
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/internal/option.js
11991
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/internal/result.js
12057
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/Order.js
12127
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/Option.js
12175
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/Result.js
12353
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/Tuple.js
12410
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Tuple.js
12411
12411
  var make5 = (...elements) => elements;
12412
12412
 
12413
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Iterable.js
12413
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/Record.js
12456
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/Array.js
12476
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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);
@@ -12503,7 +12503,7 @@ var matchRight = /* @__PURE__ */ dual(2, (self, {
12503
12503
  onEmpty,
12504
12504
  onNonEmpty
12505
12505
  }) => isReadonlyArrayNonEmpty(self) ? onNonEmpty(initNonEmpty(self), lastNonEmpty(self)) : onEmpty());
12506
- var prepend = /* @__PURE__ */ dual(2, (self, head2) => [head2, ...self]);
12506
+ var prepend = /* @__PURE__ */ dual(2, (self, head4) => [head4, ...self]);
12507
12507
  var prependAll = /* @__PURE__ */ dual(2, (self, that) => fromIterable2(that).concat(fromIterable2(self)));
12508
12508
  var append = /* @__PURE__ */ dual(2, (self, last2) => [...self, last2]);
12509
12509
  var appendAll = /* @__PURE__ */ dual(2, (self, that) => fromIterable2(self).concat(fromIterable2(that)));
@@ -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.109/node_modules/effect/dist/BigDecimal.js
13181
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/BigDecimal.js
13182
13182
  var FINITE_INT_REGEXP = /^[+-]?\d+$/;
13183
13183
  var TypeId3 = "~effect/BigDecimal";
13184
13184
  var BigDecimalProto = {
@@ -13373,9 +13373,9 @@ var toExponential = (n) => {
13373
13373
  }
13374
13374
  const normalized = normalize(n);
13375
13375
  const digits = `${abs(normalized).value}`;
13376
- const head2 = digits.slice(0, 1);
13376
+ const head4 = digits.slice(0, 1);
13377
13377
  const tail2 = digits.slice(1);
13378
- let output = `${isNegative(normalized) ? "-" : ""}${head2}`;
13378
+ let output = `${isNegative(normalized) ? "-" : ""}${head4}`;
13379
13379
  if (tail2 !== "") {
13380
13380
  output += `.${tail2}`;
13381
13381
  }
@@ -13407,17 +13407,153 @@ 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.109/node_modules/effect/dist/Boolean.js
13410
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/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.109/node_modules/effect/dist/Effectable.js
13414
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/SchemaAST.js
13415
+ var SchemaAST_exports = {};
13416
+ __export(SchemaAST_exports, {
13417
+ Any: () => Any,
13418
+ Arrays: () => Arrays,
13419
+ Base: () => Base2,
13420
+ BigInt: () => BigInt4,
13421
+ Boolean: () => Boolean3,
13422
+ Context: () => Context,
13423
+ Declaration: () => Declaration,
13424
+ Enum: () => Enum,
13425
+ FINITE_PATTERN: () => FINITE_PATTERN,
13426
+ Filter: () => Filter2,
13427
+ FilterGroup: () => FilterGroup,
13428
+ IndexSignature: () => IndexSignature,
13429
+ Json: () => Json,
13430
+ Link: () => Link,
13431
+ Literal: () => Literal,
13432
+ MutableJson: () => MutableJson,
13433
+ Never: () => Never,
13434
+ Null: () => Null,
13435
+ Number: () => Number5,
13436
+ ObjectKeyword: () => ObjectKeyword,
13437
+ Objects: () => Objects,
13438
+ PropertySignature: () => PropertySignature,
13439
+ STRING_PATTERN: () => STRING_PATTERN,
13440
+ String: () => String4,
13441
+ Suspend: () => Suspend,
13442
+ Symbol: () => Symbol2,
13443
+ TemplateLiteral: () => TemplateLiteral,
13444
+ Undefined: () => Undefined,
13445
+ Union: () => Union,
13446
+ UniqueSymbol: () => UniqueSymbol,
13447
+ Unknown: () => Unknown,
13448
+ Void: () => Void,
13449
+ annotate: () => annotate,
13450
+ annotateKey: () => annotateKey,
13451
+ any: () => any,
13452
+ appendChecks: () => appendChecks,
13453
+ applyToLastLink: () => applyToLastLink,
13454
+ applyToSelfOrLastLinkEncoding: () => applyToSelfOrLastLinkEncoding,
13455
+ applyToSelfOrLastLinkEncodingIdempotent: () => applyToSelfOrLastLinkEncodingIdempotent,
13456
+ bigInt: () => bigInt,
13457
+ bigIntString: () => bigIntString,
13458
+ boolean: () => boolean,
13459
+ brand: () => brand,
13460
+ collectIssues: () => collectIssues,
13461
+ collectSentinels: () => collectSentinels,
13462
+ containsUndefined: () => containsUndefined,
13463
+ decodeTo: () => decodeTo,
13464
+ defaultParseOptions: () => defaultParseOptions,
13465
+ enumsToLiterals: () => enumsToLiterals,
13466
+ finite: () => finite,
13467
+ flip: () => flip3,
13468
+ getAST: () => getAST,
13469
+ getCandidates: () => getCandidates,
13470
+ getConstructorDescriptor: () => getConstructorDescriptor,
13471
+ getContextOwner: () => getContextOwner,
13472
+ getIndexSignatureKeys: () => getIndexSignatureKeys,
13473
+ getLastEncoding: () => getLastEncoding,
13474
+ isAST: () => isAST,
13475
+ isAny: () => isAny,
13476
+ isArrays: () => isArrays,
13477
+ isBigInt: () => isBigInt2,
13478
+ isBoolean: () => isBoolean2,
13479
+ isDeclaration: () => isDeclaration,
13480
+ isEnum: () => isEnum,
13481
+ isFinite: () => isFinite2,
13482
+ isJson: () => isJson,
13483
+ isLiteral: () => isLiteral,
13484
+ isMutable: () => isMutable,
13485
+ isNever: () => isNever2,
13486
+ isNull: () => isNull2,
13487
+ isNumber: () => isNumber2,
13488
+ isObjectKeyword: () => isObjectKeyword2,
13489
+ isObjects: () => isObjects,
13490
+ isOptional: () => isOptional,
13491
+ isPattern: () => isPattern,
13492
+ isString: () => isString2,
13493
+ isStringBigInt: () => isStringBigInt,
13494
+ isStringFinite: () => isStringFinite,
13495
+ isStringSymbol: () => isStringSymbol,
13496
+ isStringTree: () => isStringTree,
13497
+ isSuspend: () => isSuspend,
13498
+ isSymbol: () => isSymbol2,
13499
+ isTemplateLiteral: () => isTemplateLiteral,
13500
+ isUndefined: () => isUndefined2,
13501
+ isUnion: () => isUnion,
13502
+ isUniqueSymbol: () => isUniqueSymbol,
13503
+ isUnknown: () => isUnknown2,
13504
+ isVoid: () => isVoid,
13505
+ makeFilter: () => makeFilter,
13506
+ makeFilterByGuard: () => makeFilterByGuard,
13507
+ mapLink: () => mapLink,
13508
+ mapOrSame: () => mapOrSame,
13509
+ memoizeThunk: () => memoizeThunk,
13510
+ middlewareDecoding: () => middlewareDecoding,
13511
+ middlewareEncoding: () => middlewareEncoding,
13512
+ mutableKey: () => mutableKey,
13513
+ never: () => never3,
13514
+ null: () => null_,
13515
+ number: () => number2,
13516
+ objectKeyword: () => objectKeyword,
13517
+ objectKeywordToJson: () => objectKeywordToJson,
13518
+ optional: () => optional,
13519
+ optionalKey: () => optionalKey,
13520
+ parameterFromString: () => parameterFromString,
13521
+ record: () => record,
13522
+ replaceChecks: () => replaceChecks,
13523
+ replaceContext: () => replaceContext,
13524
+ replaceContextLastLink: () => replaceContextLastLink,
13525
+ replaceEncoding: () => replaceEncoding,
13526
+ resolve: () => resolve2,
13527
+ resolveAt: () => resolveAt2,
13528
+ resolveDescription: () => resolveDescription2,
13529
+ resolveIdentifier: () => resolveIdentifier2,
13530
+ resolveTitle: () => resolveTitle2,
13531
+ runChecks: () => runChecks,
13532
+ string: () => string2,
13533
+ struct: () => struct,
13534
+ structWithRest: () => structWithRest,
13535
+ symbol: () => symbol3,
13536
+ symbolString: () => symbolString,
13537
+ toEncoded: () => toEncoded,
13538
+ toType: () => toType,
13539
+ tuple: () => tuple,
13540
+ tupleWithRest: () => tupleWithRest,
13541
+ undefined: () => undefined_3,
13542
+ union: () => union2,
13543
+ unknown: () => unknown,
13544
+ unknownToJson: () => unknownToJson,
13545
+ unknownToStringTree: () => unknownToStringTree,
13546
+ void: () => void_5,
13547
+ withConstructorDefault: () => withConstructorDefault
13548
+ });
13549
+
13550
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Effectable.js
13415
13551
  var Prototype2 = (options) => makePrimitiveProto({
13416
13552
  op: options.label,
13417
13553
  [evaluate]: options.evaluate
13418
13554
  });
13419
13555
 
13420
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Context.js
13556
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Context.js
13421
13557
  var ServiceTypeId = "~effect/Context/Service";
13422
13558
  var Service = function() {
13423
13559
  function KeyClass() {
@@ -13517,13 +13653,13 @@ var lookup = (self, key) => {
13517
13653
  };
13518
13654
  var makeUnsafe = (mapUnsafe) => makeImpl(void 0, mapUnsafe, void 0, 0);
13519
13655
  var Proto = {
13656
+ get mapUnsafe() {
13657
+ return flatten3(this);
13658
+ },
13520
13659
  ...PipeInspectableProto,
13521
13660
  [TypeId4]: {
13522
13661
  _Services: (_) => _
13523
13662
  },
13524
- get mapUnsafe() {
13525
- return flatten3(this);
13526
- },
13527
13663
  toJSON() {
13528
13664
  return {
13529
13665
  _id: "Context",
@@ -13619,7 +13755,7 @@ var mergeAll = (...ctxs) => {
13619
13755
  };
13620
13756
  var Reference = Service;
13621
13757
 
13622
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Duration.js
13758
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Duration.js
13623
13759
  var Duration_exports = {};
13624
13760
  __export(Duration_exports, {
13625
13761
  CombinerMax: () => CombinerMax,
@@ -14207,7 +14343,7 @@ var ReducerSum = /* @__PURE__ */ make(sum2, zero2);
14207
14343
  var CombinerMax = /* @__PURE__ */ max(Order2);
14208
14344
  var CombinerMin = /* @__PURE__ */ min(Order2);
14209
14345
 
14210
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Filter.js
14346
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Filter.js
14211
14347
  var composePassthrough = /* @__PURE__ */ dual(2, (left, right) => (input) => {
14212
14348
  const leftOut = left(input);
14213
14349
  if (isFailure2(leftOut)) return fail2(input);
@@ -14216,7 +14352,7 @@ var composePassthrough = /* @__PURE__ */ dual(2, (left, right) => (input) => {
14216
14352
  return rightOut;
14217
14353
  });
14218
14354
 
14219
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Scheduler.js
14355
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Scheduler.js
14220
14356
  var Scheduler = /* @__PURE__ */ Reference("effect/Scheduler", {
14221
14357
  fiberCached: true,
14222
14358
  defaultValue: () => new MixedScheduler()
@@ -14353,7 +14489,199 @@ var PreventSchedulerYield = /* @__PURE__ */ Reference("effect/Scheduler/PreventS
14353
14489
  defaultValue: () => false
14354
14490
  });
14355
14491
 
14356
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Tracer.js
14492
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Data.js
14493
+ var Class3 = class extends Class {
14494
+ constructor(props) {
14495
+ super();
14496
+ if (props) {
14497
+ assignProperties(this, props);
14498
+ }
14499
+ }
14500
+ };
14501
+ var TaggedError2 = TaggedError;
14502
+
14503
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Encoding.js
14504
+ var EncodingErrorTypeId = "~effect/encoding/EncodingError";
14505
+ var EncodingError = class extends (/* @__PURE__ */ TaggedError2("EncodingError")) {
14506
+ /**
14507
+ * Marks this value as an encoding or decoding error for runtime guards.
14508
+ *
14509
+ * **When to use**
14510
+ *
14511
+ * Use to identify `EncodingError` instances through `isEncodingError`.
14512
+ *
14513
+ * @since 4.0.0
14514
+ */
14515
+ [EncodingErrorTypeId] = EncodingErrorTypeId;
14516
+ };
14517
+ var encodeBase64 = (input) => typeof input === "string" ? base64EncodeUint8Array(encoder.encode(input)) : base64EncodeUint8Array(input);
14518
+ var decodeBase64 = (str) => {
14519
+ const stripped = stripCrlf(str);
14520
+ const length2 = stripped.length;
14521
+ if (length2 % 4 !== 0) {
14522
+ return fail2(new EncodingError({
14523
+ kind: "Decode",
14524
+ module: "Base64",
14525
+ input: stripped,
14526
+ message: `Length must be a multiple of 4, but is ${length2}`
14527
+ }));
14528
+ }
14529
+ const index2 = stripped.indexOf("=");
14530
+ if (index2 !== -1 && (index2 < length2 - 2 || index2 === length2 - 2 && stripped[length2 - 1] !== "=")) {
14531
+ return fail2(new EncodingError({
14532
+ kind: "Decode",
14533
+ module: "Base64",
14534
+ input: stripped,
14535
+ message: `Found a '=' character, but it is not at the end`
14536
+ }));
14537
+ }
14538
+ try {
14539
+ const missingOctets = stripped.endsWith("==") ? 2 : stripped.endsWith("=") ? 1 : 0;
14540
+ const result5 = new Uint8Array(3 * (length2 / 4) - missingOctets);
14541
+ for (let i = 0, j = 0; i < length2; i += 4, j += 3) {
14542
+ const buffer = getBase64Code(stripped.charCodeAt(i)) << 18 | getBase64Code(stripped.charCodeAt(i + 1)) << 12 | getBase64Code(stripped.charCodeAt(i + 2)) << 6 | getBase64Code(stripped.charCodeAt(i + 3));
14543
+ result5[j] = buffer >> 16;
14544
+ result5[j + 1] = buffer >> 8 & 255;
14545
+ result5[j + 2] = buffer & 255;
14546
+ }
14547
+ return succeed2(result5);
14548
+ } catch (e) {
14549
+ return fail2(new EncodingError({
14550
+ kind: "Decode",
14551
+ module: "Base64",
14552
+ input: stripped,
14553
+ message: e instanceof Error ? e.message : "Invalid input"
14554
+ }));
14555
+ }
14556
+ };
14557
+ var decodeBase64String = (str) => map2(decodeBase64(str), (_) => decoder.decode(_));
14558
+ var encodeBase64Url = (input) => typeof input === "string" ? base64UrlEncodeUint8Array(encoder.encode(input)) : base64UrlEncodeUint8Array(input);
14559
+ var decodeBase64Url = (str) => {
14560
+ const stripped = stripCrlf(str);
14561
+ const length2 = stripped.length;
14562
+ if (length2 % 4 === 1) {
14563
+ return fail2(new EncodingError({
14564
+ module: "Base64Url",
14565
+ kind: "Decode",
14566
+ input: stripped,
14567
+ message: `Length should be a multiple of 4, but is ${length2}`
14568
+ }));
14569
+ }
14570
+ if (!/^[-_A-Z0-9]*?={0,2}$/i.test(stripped)) {
14571
+ return fail2(new EncodingError({
14572
+ module: "Base64Url",
14573
+ kind: "Decode",
14574
+ input: stripped,
14575
+ message: "Invalid input"
14576
+ }));
14577
+ }
14578
+ let sanitized = length2 % 4 === 2 ? `${stripped}==` : length2 % 4 === 3 ? `${stripped}=` : stripped;
14579
+ sanitized = sanitized.replace(/-/g, "+").replace(/_/g, "/");
14580
+ return decodeBase64(sanitized);
14581
+ };
14582
+ var decodeBase64UrlString = (str) => map2(decodeBase64Url(str), (_) => decoder.decode(_));
14583
+ var encodeHex = (input) => typeof input === "string" ? hexEncodeUint8Array(encoder.encode(input)) : hexEncodeUint8Array(input);
14584
+ var randomHex = (length2) => {
14585
+ let result5 = "";
14586
+ for (let i = length2 >>> 3; i > 0; i--) {
14587
+ const word = Math.random() * 4294967296 >>> 0;
14588
+ result5 += byteToHex[word >>> 24] + byteToHex[word >>> 16 & 255] + byteToHex[word >>> 8 & 255] + byteToHex[word & 255];
14589
+ }
14590
+ return result5;
14591
+ };
14592
+ var decodeHex = (str) => {
14593
+ const bytes = new TextEncoder().encode(str);
14594
+ if (bytes.length % 2 !== 0) {
14595
+ return fail2(new EncodingError({
14596
+ module: "Hex",
14597
+ kind: "Decode",
14598
+ input: str,
14599
+ message: `Length must be a multiple of 2, but is ${bytes.length}`
14600
+ }));
14601
+ }
14602
+ try {
14603
+ const length2 = bytes.length / 2;
14604
+ const result5 = new Uint8Array(length2);
14605
+ for (let i = 0; i < length2; i++) {
14606
+ const a = fromHexChar(bytes[i * 2]);
14607
+ const b = fromHexChar(bytes[i * 2 + 1]);
14608
+ result5[i] = a << 4 | b;
14609
+ }
14610
+ return succeed2(result5);
14611
+ } catch (e) {
14612
+ return fail2(new EncodingError({
14613
+ module: "Hex",
14614
+ kind: "Decode",
14615
+ input: str,
14616
+ message: e instanceof Error ? e.message : "Invalid input"
14617
+ }));
14618
+ }
14619
+ };
14620
+ var decodeHexString = (str) => map2(decodeHex(str), (_) => decoder.decode(_));
14621
+ var encoder = /* @__PURE__ */ new TextEncoder();
14622
+ var decoder = /* @__PURE__ */ new TextDecoder();
14623
+ var stripCrlf = (str) => str.replace(/[\n\r]/g, "");
14624
+ var base64EncodeUint8Array = (bytes) => {
14625
+ const length2 = bytes.length;
14626
+ let result5 = "";
14627
+ let i;
14628
+ for (i = 2; i < length2; i += 3) {
14629
+ result5 += base64abc[bytes[i - 2] >> 2];
14630
+ result5 += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
14631
+ result5 += base64abc[(bytes[i - 1] & 15) << 2 | bytes[i] >> 6];
14632
+ result5 += base64abc[bytes[i] & 63];
14633
+ }
14634
+ if (i === length2 + 1) {
14635
+ result5 += base64abc[bytes[i - 2] >> 2];
14636
+ result5 += base64abc[(bytes[i - 2] & 3) << 4];
14637
+ result5 += "==";
14638
+ }
14639
+ if (i === length2) {
14640
+ result5 += base64abc[bytes[i - 2] >> 2];
14641
+ result5 += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
14642
+ result5 += base64abc[(bytes[i - 1] & 15) << 2];
14643
+ result5 += "=";
14644
+ }
14645
+ return result5;
14646
+ };
14647
+ function getBase64Code(charCode) {
14648
+ if (charCode >= base64codes.length) {
14649
+ throw new TypeError(`Invalid character ${String.fromCharCode(charCode)}`);
14650
+ }
14651
+ const code = base64codes[charCode];
14652
+ if (code === 255) {
14653
+ throw new TypeError(`Invalid character ${String.fromCharCode(charCode)}`);
14654
+ }
14655
+ return code;
14656
+ }
14657
+ var base64abc = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/"];
14658
+ var base64codes = [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255, 255, 255, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255, 255, 0, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255, 255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51];
14659
+ var base64UrlEncodeUint8Array = (data) => base64EncodeUint8Array(data).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
14660
+ var byteToHex = [];
14661
+ for (let i = 0; i < 256; i++) {
14662
+ byteToHex.push(i.toString(16).padStart(2, "0"));
14663
+ }
14664
+ var hexEncodeUint8Array = (bytes) => {
14665
+ let result5 = "";
14666
+ for (let i = 0; i < bytes.length; i++) {
14667
+ result5 += byteToHex[bytes[i]];
14668
+ }
14669
+ return result5;
14670
+ };
14671
+ var fromHexChar = (byte) => {
14672
+ if (48 <= byte && byte <= 57) {
14673
+ return byte - 48;
14674
+ }
14675
+ if (97 <= byte && byte <= 102) {
14676
+ return byte - 97 + 10;
14677
+ }
14678
+ if (65 <= byte && byte <= 70) {
14679
+ return byte - 65 + 10;
14680
+ }
14681
+ throw new TypeError("Invalid input");
14682
+ };
14683
+
14684
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Tracer.js
14357
14685
  var ParentSpanKey = "effect/Tracer/ParentSpan";
14358
14686
  var ParentSpan = class extends (/* @__PURE__ */ Service()(ParentSpanKey, {
14359
14687
  fiberCached: true
@@ -14403,8 +14731,8 @@ var NativeSpan = class {
14403
14731
  startTime: options.startTime
14404
14732
  };
14405
14733
  this.attributes = /* @__PURE__ */ new Map();
14406
- this.traceId = getOrUndefined(options.parent)?.traceId ?? randomHexString(32);
14407
- this.spanId = randomHexString(16);
14734
+ this.traceId = getOrUndefined(options.parent)?.traceId ?? randomHex(32);
14735
+ this.spanId = randomHex(16);
14408
14736
  }
14409
14737
  end(endTime, exit3) {
14410
14738
  this.status = {
@@ -14424,22 +14752,11 @@ var NativeSpan = class {
14424
14752
  this.links.push(...links);
14425
14753
  }
14426
14754
  };
14427
- var randomHexString = /* @__PURE__ */ (function() {
14428
- const characters = "abcdef0123456789";
14429
- const charactersLength = characters.length;
14430
- return function(length2) {
14431
- let result5 = "";
14432
- for (let i = 0; i < length2; i++) {
14433
- result5 += characters.charAt(Math.floor(Math.random() * charactersLength));
14434
- }
14435
- return result5;
14436
- };
14437
- })();
14438
14755
 
14439
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/metric.js
14756
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/metric.js
14440
14757
  var FiberRuntimeMetricsKey = "effect/observability/Metric/FiberRuntimeMetricsKey";
14441
14758
 
14442
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/references.js
14759
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/references.js
14443
14760
  var CurrentErrorReporters = /* @__PURE__ */ Reference("effect/ErrorReporter/CurrentErrorReporters", {
14444
14761
  defaultValue: () => /* @__PURE__ */ new Set()
14445
14762
  });
@@ -14474,7 +14791,7 @@ var CurrentLogSpans = /* @__PURE__ */ Reference("effect/References/CurrentLogSpa
14474
14791
  defaultValue: () => []
14475
14792
  });
14476
14793
 
14477
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/stackTraceLimit.js
14794
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/stackTraceLimit.js
14478
14795
  var isStackTraceLimitWritable = () => {
14479
14796
  const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
14480
14797
  if (desc === void 0) {
@@ -14491,7 +14808,7 @@ var setStackTraceLimit = (value5) => {
14491
14808
  }
14492
14809
  };
14493
14810
 
14494
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/tracer.js
14811
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/tracer.js
14495
14812
  var addSpanStackTrace = (options) => {
14496
14813
  if (options?.captureStackTrace === false) {
14497
14814
  return options;
@@ -14522,7 +14839,7 @@ var makeStackCleaner = (line) => (stack) => {
14522
14839
  };
14523
14840
  var spanCleaner = /* @__PURE__ */ makeStackCleaner(3);
14524
14841
 
14525
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/effect.js
14842
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/effect.js
14526
14843
  var Interrupt = class extends ReasonBase {
14527
14844
  fiberId;
14528
14845
  constructor(fiberId3, annotations = constEmptyAnnotations) {
@@ -14825,6 +15142,7 @@ var FiberImpl = class {
14825
15142
  }
14826
15143
  this._observers.push(cb);
14827
15144
  return () => {
15145
+ if (this._exit) return;
14828
15146
  const index2 = this._observers.indexOf(cb);
14829
15147
  if (index2 >= 0) {
14830
15148
  this._observers.splice(index2, 1);
@@ -15217,7 +15535,7 @@ var callback = (register) => callbackOptions(register, register.length >= 2);
15217
15535
  var never = /* @__PURE__ */ callback(constVoid);
15218
15536
  var gen2 = (...args2) => suspend(() => fromIteratorUnsafe(args2.length === 1 ? args2[0]() : args2[1].call(args2[0].self)));
15219
15537
  var fnUntraced = (body, ...pipeables) => {
15220
- const fn3 = pipeables.length === 0 ? function() {
15538
+ const fn5 = pipeables.length === 0 ? function() {
15221
15539
  return suspend(() => fromIteratorUnsafe(body.apply(this, arguments)));
15222
15540
  } : function() {
15223
15541
  let effect = suspend(() => fromIteratorUnsafe(body.apply(this, arguments)));
@@ -15226,9 +15544,9 @@ var fnUntraced = (body, ...pipeables) => {
15226
15544
  }
15227
15545
  return effect;
15228
15546
  };
15229
- return defineFunctionLength(body.length, fn3);
15547
+ return defineFunctionLength(body.length, fn5);
15230
15548
  };
15231
- var defineFunctionLength = (length2, fn3) => Object.defineProperty(fn3, "length", {
15549
+ var defineFunctionLength = (length2, fn5) => Object.defineProperty(fn5, "length", {
15232
15550
  value: length2,
15233
15551
  configurable: true
15234
15552
  });
@@ -15247,7 +15565,7 @@ var fn = function() {
15247
15565
  return makeFn(name, arguments[0], defError, Array.prototype.slice.call(arguments, 1), nameFirst, spanOptions);
15248
15566
  };
15249
15567
  var makeFn = (name, bodyOrOptions, defError, pipeables, addSpan, spanOptions) => {
15250
- const body = typeof bodyOrOptions === "function" ? bodyOrOptions : pipeables.pop().bind(bodyOrOptions.self);
15568
+ const body = typeof bodyOrOptions === "function" ? bodyOrOptions : pipeables.shift().bind(bodyOrOptions.self);
15251
15569
  return defineFunctionLength(body.length, function(...args2) {
15252
15570
  let result5 = suspend(() => {
15253
15571
  const iter = body.apply(this, arguments);
@@ -15822,6 +16140,7 @@ var scopeCloseUnsafe = (self, exit_) => {
15822
16140
  }
15823
16141
  return scopeCloseFinalizers(self, finalizers, exit_);
15824
16142
  };
16143
+ var combineFinalizerCause = (exit_, finalizer) => exitIsSuccess(exit_) ? finalizer : catchCause(finalizer, (cause) => failCause(causeCombine(exit_.cause, cause)));
15825
16144
  var scopeCloseFinalizers = /* @__PURE__ */ fnUntraced(function* (self, finalizers, exit_) {
15826
16145
  let exits = [];
15827
16146
  const fibers = [];
@@ -15921,7 +16240,7 @@ var onExitPrimitive = /* @__PURE__ */ makePrimitive({
15921
16240
  [contE](cause, _, exit3) {
15922
16241
  exit3 ??= exitFailCause(cause);
15923
16242
  const eff = this[args][1](exit3);
15924
- return eff ? flatMap4(eff, (_2) => exit3) : exit3;
16243
+ return eff ? flatMap4(combineFinalizerCause(exit3, eff), (_2) => exit3) : exit3;
15925
16244
  }
15926
16245
  });
15927
16246
  var onExit = /* @__PURE__ */ dual(2, onExitPrimitive);
@@ -16137,6 +16456,10 @@ var forEach2 = /* @__PURE__ */ dual((args2) => typeof args2[1] === "function", (
16137
16456
  });
16138
16457
  return eff ? as2(eff, out) : succeed3(out);
16139
16458
  }));
16459
+ var head2 = (self) => flatMap4(self, (elements) => {
16460
+ const result5 = elements[Symbol.iterator]().next();
16461
+ return result5.done ? fail3(new NoSuchElementError()) : succeed3(result5.value);
16462
+ });
16140
16463
  var forEachSequential = (iterable, f, options) => suspend(() => {
16141
16464
  const out = options?.discard ? void 0 : [];
16142
16465
  const iterator = iterable[Symbol.iterator]();
@@ -16456,8 +16779,8 @@ var runPromiseExitWith = (context3) => {
16456
16779
  const runFork3 = runForkWith(context3);
16457
16780
  return (effect, options) => {
16458
16781
  const fiber3 = runFork3(effect, options);
16459
- return new Promise((resolve2) => {
16460
- fiber3.addObserver((exit3) => resolve2(exit3));
16782
+ return new Promise((resolve3) => {
16783
+ fiber3.addObserver((exit3) => resolve3(exit3));
16461
16784
  });
16462
16785
  };
16463
16786
  };
@@ -16625,7 +16948,7 @@ var makeSpanUnsafe = (fiber3, name, options) => {
16625
16948
  const annotationsFromEnv = fiber3.getRef(TracerSpanAnnotations);
16626
16949
  const linksFromEnv = fiber3.getRef(TracerSpanLinks);
16627
16950
  const level = options?.level ?? fiber3.getRef(CurrentTraceLevel);
16628
- const links = options?.links !== void 0 ? [...linksFromEnv, ...options.links] : linksFromEnv.slice();
16951
+ const links = options?.links !== void 0 ? [...linksFromEnv, ...options.links] : linksFromEnv.length === 0 ? [] : linksFromEnv.slice();
16629
16952
  span2 = tracer3.span({
16630
16953
  name,
16631
16954
  parent,
@@ -16636,12 +16959,12 @@ var makeSpanUnsafe = (fiber3, name, options) => {
16636
16959
  root: options?.root ?? isNone2(parent),
16637
16960
  sampled: options?.sampled ?? (isSome2(parent) && parent.value.sampled === false ? false : !isLogLevelGreaterThan(fiber3.getRef(MinimumTraceLevel), level))
16638
16961
  });
16639
- for (const [key, value5] of Object.entries(annotationsFromEnv)) {
16640
- span2.attribute(key, value5);
16962
+ for (const key in annotationsFromEnv) {
16963
+ span2.attribute(key, annotationsFromEnv[key]);
16641
16964
  }
16642
16965
  if (options?.attributes !== void 0) {
16643
- for (const [key, value5] of Object.entries(options.attributes)) {
16644
- span2.attribute(key, value5);
16966
+ for (const key in options.attributes) {
16967
+ span2.attribute(key, options.attributes[key]);
16645
16968
  }
16646
16969
  }
16647
16970
  }
@@ -17083,7 +17406,7 @@ var reportCauseUnsafe = (fiber3, cause, defectsOnly) => {
17083
17406
  reporters.forEach((reporter) => reporter.report(opts));
17084
17407
  };
17085
17408
 
17086
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Cause.js
17409
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Cause.js
17087
17410
  var isCause2 = isCause;
17088
17411
  var isReason = isCauseReason;
17089
17412
  var isFailReason2 = isFailReason;
@@ -17093,13 +17416,12 @@ var makeFailReason = (error3) => new Fail(error3);
17093
17416
  var makeDieReason = (defect) => new Die(defect);
17094
17417
  var makeInterruptReason2 = makeInterruptReason;
17095
17418
  var map6 = causeMap;
17096
- var findError2 = findError;
17097
17419
  var pretty = causePretty;
17098
17420
  var isDone2 = isDone;
17099
17421
  var done2 = done;
17100
17422
  var IllegalArgumentError2 = IllegalArgumentError;
17101
17423
 
17102
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Effect.js
17424
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Effect.js
17103
17425
  var Effect_exports = {};
17104
17426
  __export(Effect_exports, {
17105
17427
  Do: () => Do4,
@@ -17183,6 +17505,7 @@ __export(Effect_exports, {
17183
17505
  fromOption: () => fromOption5,
17184
17506
  fromResult: () => fromResult2,
17185
17507
  gen: () => gen3,
17508
+ head: () => head3,
17186
17509
  ignore: () => ignore2,
17187
17510
  ignoreCause: () => ignoreCause2,
17188
17511
  interrupt: () => interrupt4,
@@ -17331,7 +17654,7 @@ __export(Effect_exports, {
17331
17654
  zipWith: () => zipWith4
17332
17655
  });
17333
17656
 
17334
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Exit.js
17657
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Exit.js
17335
17658
  var Exit_exports = {};
17336
17659
  __export(Exit_exports, {
17337
17660
  asVoid: () => asVoid3,
@@ -17344,7 +17667,7 @@ __export(Exit_exports, {
17344
17667
  filterSuccess: () => filterSuccess,
17345
17668
  filterValue: () => filterValue,
17346
17669
  findDefect: () => findDefect2,
17347
- findError: () => findError3,
17670
+ findError: () => findError2,
17348
17671
  findErrorOption: () => findErrorOption2,
17349
17672
  getCause: () => getCause,
17350
17673
  getSuccess: () => getSuccess3,
@@ -17378,7 +17701,7 @@ var filterSuccess = exitFilterSuccess;
17378
17701
  var filterValue = exitFilterValue;
17379
17702
  var filterFailure = exitFilterFailure;
17380
17703
  var filterCause = exitFilterCause;
17381
- var findError3 = exitFindError;
17704
+ var findError2 = exitFindError;
17382
17705
  var findDefect2 = exitFindDefect;
17383
17706
  var match6 = exitMatch;
17384
17707
  var map7 = exitMap;
@@ -17390,7 +17713,7 @@ var getSuccess3 = exitGetSuccess;
17390
17713
  var getCause = exitGetCause;
17391
17714
  var findErrorOption2 = exitFindErrorOption;
17392
17715
 
17393
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Deferred.js
17716
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Deferred.js
17394
17717
  var Deferred_exports = {};
17395
17718
  __export(Deferred_exports, {
17396
17719
  await: () => _await,
@@ -17467,25 +17790,26 @@ var doneUnsafe = (self, effect) => {
17467
17790
  if (self.effect) return false;
17468
17791
  self.effect = effect;
17469
17792
  if (self.resumes) {
17470
- for (let i = 0; i < self.resumes.length; i++) {
17471
- self.resumes[i](effect);
17472
- }
17793
+ const resumes = self.resumes;
17473
17794
  self.resumes = void 0;
17795
+ for (let i = 0; i < resumes.length; i++) {
17796
+ resumes[i](effect);
17797
+ }
17474
17798
  }
17475
17799
  return true;
17476
17800
  };
17477
17801
  var into = /* @__PURE__ */ dual(2, (self, deferred) => uninterruptibleMask((restore) => flatMap4(exit(restore(self)), (exit3) => done3(deferred, exit3))));
17478
17802
 
17479
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/References.js
17803
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/References.js
17480
17804
  var CurrentLogAnnotations2 = CurrentLogAnnotations;
17481
17805
  var CurrentLogSpans2 = CurrentLogSpans;
17482
17806
 
17483
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Scope.js
17807
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Scope.js
17484
17808
  var makeUnsafe3 = scopeMakeUnsafe;
17485
17809
  var forkUnsafe2 = scopeForkUnsafe;
17486
17810
  var close = scopeClose;
17487
17811
 
17488
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Layer.js
17812
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Layer.js
17489
17813
  var TypeId7 = "~effect/Layer";
17490
17814
  var MemoMapTypeId = "~effect/Layer/MemoMap";
17491
17815
  var memoMapReuse = (entry, scope3) => {
@@ -17580,7 +17904,7 @@ var mergeAll2 = (...layers) => fromBuild((memoMap, scope3) => mergeAllEffect(lay
17580
17904
  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)))));
17581
17905
  var provide2 = /* @__PURE__ */ dual(2, (self, that) => provideWith(self, that, identity));
17582
17906
 
17583
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/ExecutionPlan.js
17907
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/ExecutionPlan.js
17584
17908
  var TypeId8 = "~effect/ExecutionPlan";
17585
17909
  var Proto2 = {
17586
17910
  [TypeId8]: TypeId8,
@@ -17607,7 +17931,7 @@ var CurrentMetadata = /* @__PURE__ */ Reference("effect/ExecutionPlan/CurrentMet
17607
17931
  })
17608
17932
  });
17609
17933
 
17610
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Schedule.js
17934
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Schedule.js
17611
17935
  var Schedule_exports = {};
17612
17936
  __export(Schedule_exports, {
17613
17937
  CurrentMetadata: () => CurrentMetadata2,
@@ -17643,18 +17967,7 @@ __export(Schedule_exports, {
17643
17967
  windowed: () => windowed
17644
17968
  });
17645
17969
 
17646
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Data.js
17647
- var Class3 = class extends Class {
17648
- constructor(props) {
17649
- super();
17650
- if (props) {
17651
- assignProperties(this, props);
17652
- }
17653
- }
17654
- };
17655
- var TaggedError2 = TaggedError;
17656
-
17657
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/dateTime.js
17970
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/dateTime.js
17658
17971
  var TypeId9 = "~effect/time/DateTime";
17659
17972
  var TimeZoneTypeId = "~effect/time/DateTime/TimeZone";
17660
17973
  var Proto3 = {
@@ -18060,7 +18373,7 @@ var formatIsoOffset = (self) => {
18060
18373
  };
18061
18374
  var formatIsoZoned = (self) => self.zone._tag === "Offset" ? formatIsoOffset(self) : `${formatIsoOffset(self)}[${self.zone.id}]`;
18062
18375
 
18063
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Number.js
18376
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Number.js
18064
18377
  var Number3 = globalThis.Number;
18065
18378
  var Order4 = Number2;
18066
18379
  var remainder = /* @__PURE__ */ dual(2, (self, divisor) => {
@@ -18102,13 +18415,13 @@ function toScientificInteger(n) {
18102
18415
  var ReducerMax = /* @__PURE__ */ make((a, b) => Math.max(a, b), -Infinity);
18103
18416
  var ReducerMin = /* @__PURE__ */ make((a, b) => Math.min(a, b), Infinity);
18104
18417
 
18105
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/String.js
18418
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/String.js
18106
18419
  var String2 = globalThis.String;
18107
18420
  var toLowerCase = (self) => self.toLowerCase();
18108
18421
  var trim = (self) => self.trim();
18109
18422
  var isNonEmpty = (self) => self.length > 0;
18110
18423
 
18111
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Cron.js
18424
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Cron.js
18112
18425
  var TypeId10 = "~effect/time/Cron";
18113
18426
  function toPojo(cron2) {
18114
18427
  const out = {
@@ -18627,7 +18940,7 @@ function aliasOrValue(field, aliases) {
18627
18940
  }
18628
18941
  var decimalRegex = /^\d+$/;
18629
18942
 
18630
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/random.js
18943
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/random.js
18631
18944
  var Random = /* @__PURE__ */ Reference("effect/Random", {
18632
18945
  defaultValue: () => ({
18633
18946
  nextIntUnsafe() {
@@ -18639,10 +18952,26 @@ var Random = /* @__PURE__ */ Reference("effect/Random", {
18639
18952
  })
18640
18953
  });
18641
18954
 
18642
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Pull.js
18955
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Pull.js
18643
18956
  var catchDone = /* @__PURE__ */ dual(2, (effect, f) => catchCauseFilter(effect, filterDoneLeftover, (l) => f(l)));
18644
- var filterDone = /* @__PURE__ */ composePassthrough(findError2, (e) => isDone2(e) ? succeed2(e) : fail2(e));
18645
- var filterDoneLeftover = /* @__PURE__ */ composePassthrough(findError2, (e) => isDone2(e) ? succeed2(e.value) : fail2(e));
18957
+ var isDoneFailure = (failure) => failure._tag === "Fail" && isDone2(failure.error);
18958
+ var filterDone = (cause) => {
18959
+ let done4;
18960
+ let hasFailure = false;
18961
+ for (const reason of cause.reasons) {
18962
+ if (isDoneFailure(reason)) {
18963
+ done4 ??= reason.error;
18964
+ } else if (reason._tag !== "Interrupt") {
18965
+ hasFailure = true;
18966
+ }
18967
+ }
18968
+ if (done4 === void 0) return fail2(cause);
18969
+ return hasFailure ? fail2(fromReasons(cause.reasons.filter((reason) => !isDoneFailure(reason)))) : succeed2(done4);
18970
+ };
18971
+ var filterDoneLeftover = (cause) => {
18972
+ const done4 = filterDone(cause);
18973
+ return isFailure2(done4) ? done4 : succeed2(done4.success.value);
18974
+ };
18646
18975
  var matchEffect2 = /* @__PURE__ */ dual(2, (self, options) => matchCauseEffect(self, {
18647
18976
  onSuccess: options.onSuccess,
18648
18977
  onFailure: (cause) => {
@@ -18651,7 +18980,7 @@ var matchEffect2 = /* @__PURE__ */ dual(2, (self, options) => matchCauseEffect(s
18651
18980
  }
18652
18981
  }));
18653
18982
 
18654
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Schedule.js
18983
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Schedule.js
18655
18984
  var TypeId11 = "~effect/Schedule";
18656
18985
  var randomNext = /* @__PURE__ */ Random.useSync((random2) => random2.nextDoubleUnsafe());
18657
18986
  var CurrentMetadata2 = /* @__PURE__ */ Reference("effect/Schedule/CurrentMetadata", {
@@ -18941,11 +19270,11 @@ var constIdentity = /* @__PURE__ */ fromStep(/* @__PURE__ */ succeed3((_now, inp
18941
19270
  var identity_ = () => constIdentity;
18942
19271
  var setInputType = () => (self) => self;
18943
19272
 
18944
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/layer.js
19273
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/layer.js
18945
19274
  var provideLayer = (self, layer, options) => scopedWith((scope3) => flatMap4(options?.local ? buildWithMemoMap(layer, makeMemoMapUnsafe(), scope3) : buildWithScope(layer, scope3), (context3) => provideContext(self, context3)));
18946
19275
  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));
18947
19276
 
18948
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/schedule.js
19277
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schedule.js
18949
19278
  var repeatOrElse = /* @__PURE__ */ dual(3, (self, schedule2, orElse4) => flatMap4(toStepWithMetadata(schedule2), (step) => {
18950
19279
  let meta3 = CurrentMetadata2.defaultValue();
18951
19280
  return catch_(forever(tap2(flatMap4(suspend(() => provideService(self, CurrentMetadata2, meta3)), step), (meta_) => sync(() => {
@@ -19016,7 +19345,7 @@ var buildFromOptions = (options) => {
19016
19345
  return schedule2;
19017
19346
  };
19018
19347
 
19019
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/executionPlan.js
19348
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/executionPlan.js
19020
19349
  var makeEventEmitter = (onEvent, currentMetadata) => {
19021
19350
  let lastStepIndex = -1;
19022
19351
  let stepAttempt = 0;
@@ -19121,7 +19450,7 @@ var scheduleFromStep = (step, first) => {
19121
19450
  };
19122
19451
  var scheduleOnce = /* @__PURE__ */ recurs(1);
19123
19452
 
19124
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Request.js
19453
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Request.js
19125
19454
  var TypeId12 = "~effect/Request";
19126
19455
  var requestVariance = /* @__PURE__ */ byReferenceUnsafe({
19127
19456
  /* c8 ignore next */
@@ -19137,7 +19466,7 @@ var RequestPrototype = {
19137
19466
  };
19138
19467
  var makeEntry = (options) => options;
19139
19468
 
19140
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/request.js
19469
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/request.js
19141
19470
  var request = /* @__PURE__ */ dual(2, (self, resolver) => {
19142
19471
  const withResolver = (resolver2) => callback((resume) => {
19143
19472
  const entry = addEntry(resolver2, self, resume, getCurrentFiber());
@@ -19247,7 +19576,7 @@ function runBatch(batch) {
19247
19576
  return batch.run;
19248
19577
  }
19249
19578
 
19250
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Metric.js
19579
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Metric.js
19251
19580
  var CurrentMetricAttributesKey = "effect/Metric/CurrentMetricAttributes";
19252
19581
  var CurrentMetricAttributes = /* @__PURE__ */ Reference(CurrentMetricAttributesKey, {
19253
19582
  defaultValue: () => ({})
@@ -19347,7 +19676,7 @@ function attributesToRecord(attributes) {
19347
19676
  return attributes;
19348
19677
  }
19349
19678
 
19350
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Effect.js
19679
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Effect.js
19351
19680
  var TypeId14 = EffectTypeId;
19352
19681
  var isEffect2 = isEffect;
19353
19682
  var all4 = all3;
@@ -19357,6 +19686,7 @@ var validate2 = validate;
19357
19686
  var findFirst4 = findFirst3;
19358
19687
  var findFirstFilter2 = findFirstFilter;
19359
19688
  var forEach3 = forEach2;
19689
+ var head3 = head2;
19360
19690
  var whileLoop2 = whileLoop;
19361
19691
  var promise2 = promise;
19362
19692
  var tryPromise2 = tryPromise;
@@ -19680,9 +20010,9 @@ var txRetry = /* @__PURE__ */ flatMap5(Transaction, (state) => {
19680
20010
  state.retry = true;
19681
20011
  return interrupt4;
19682
20012
  });
19683
- var effectify = (fn3, onError3, onSyncError) => (...args2) => callback2((resume) => {
20013
+ var effectify = (fn5, onError3, onSyncError) => (...args2) => callback2((resume) => {
19684
20014
  try {
19685
- fn3(...args2, (err, result5) => {
20015
+ fn5(...args2, (err, result5) => {
19686
20016
  if (err) {
19687
20017
  resume(fail6(onError3 ? onError3(err, args2) : err));
19688
20018
  } else {
@@ -19703,7 +20033,7 @@ var flatMapEager2 = flatMapEager;
19703
20033
  var catchEager2 = catchEager;
19704
20034
  var fnUntracedEager2 = fnUntracedEager;
19705
20035
 
19706
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/schema/annotations.js
20036
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schema/annotations.js
19707
20037
  function resolve(ast) {
19708
20038
  return ast.checks ? ast.checks[ast.checks.length - 1].annotations : ast.annotations;
19709
20039
  }
@@ -19718,6 +20048,7 @@ var jsonSchemaAnnotationKeys = ["title", "description", "default", "examples", "
19718
20048
  var resolveIdentifier = /* @__PURE__ */ resolveAt("identifier");
19719
20049
  var resolveIdentifierFallback = /* @__PURE__ */ resolveAt(IDENTIFIER_FALLBACK_KEY);
19720
20050
  var resolveTitle = /* @__PURE__ */ resolveAt("title");
20051
+ var resolveDescription = /* @__PURE__ */ resolveAt("description");
19721
20052
  var resolveBrands = /* @__PURE__ */ resolveAt("brands");
19722
20053
  var getExpected = /* @__PURE__ */ memoize((ast) => {
19723
20054
  const identifier2 = resolve(ast)?.identifier;
@@ -19726,7 +20057,7 @@ var getExpected = /* @__PURE__ */ memoize((ast) => {
19726
20057
  });
19727
20058
  var annotationExcludedKeys = /* @__PURE__ */ new Set([SENTINELS_ANNOTATION_KEY, STRUCTURAL_ANNOTATION_KEY, "representation", "arbitrary", "brands", "toJsonSchema", "toCode", "toArbitrary", "toEquivalence", "toFormatter", "toCodec", "toCodecJson", "toCodecStringTree", "toCodecIso"]);
19728
20059
 
19729
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/schema/parser.js
20060
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schema/parser.js
19730
20061
  var missing = /* @__PURE__ */ Symbol();
19731
20062
  var succeed7 = succeed4;
19732
20063
  var missingExit = /* @__PURE__ */ succeed7(missing);
@@ -19734,7 +20065,7 @@ var sameExit = /* @__PURE__ */ succeed7(missing);
19734
20065
  var toOption2 = (value5) => value5 === missing ? none2() : some2(value5);
19735
20066
  var fromOptionExit = (option5) => option5._tag === "None" ? missingExit : succeed7(option5.value);
19736
20067
 
19737
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/SchemaIssue.js
20068
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/SchemaIssue.js
19738
20069
  var TypeId15 = "~effect/SchemaIssue/Issue";
19739
20070
  function isIssue(u) {
19740
20071
  return hasProperty(u, TypeId15) && u[TypeId15] === TypeId15;
@@ -20077,7 +20408,7 @@ function findMessage(issue2) {
20077
20408
  if (typeof message === "string") return message;
20078
20409
  }
20079
20410
 
20080
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/schema/cause.js
20411
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schema/cause.js
20081
20412
  function getSchemaIssue(cause) {
20082
20413
  let issue2;
20083
20414
  for (const reason of cause.reasons) {
@@ -20098,7 +20429,7 @@ function getSchemaIssueOrThrow(cause, message) {
20098
20429
  return issue2;
20099
20430
  }
20100
20431
 
20101
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/DateTime.js
20432
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/DateTime.js
20102
20433
  var isDateTime2 = isDateTime;
20103
20434
  var isTimeZone2 = isTimeZone;
20104
20435
  var isTimeZoneOffset2 = isTimeZoneOffset;
@@ -20122,177 +20453,7 @@ var toEpochMillis2 = toEpochMillis;
20122
20453
  var formatIso2 = formatIso;
20123
20454
  var formatIsoZoned2 = formatIsoZoned;
20124
20455
 
20125
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Encoding.js
20126
- var EncodingErrorTypeId = "~effect/encoding/EncodingError";
20127
- var EncodingError = class extends (/* @__PURE__ */ TaggedError2("EncodingError")) {
20128
- /**
20129
- * Marks this value as an encoding or decoding error for runtime guards.
20130
- *
20131
- * **When to use**
20132
- *
20133
- * Use to identify `EncodingError` instances through `isEncodingError`.
20134
- *
20135
- * @since 4.0.0
20136
- */
20137
- [EncodingErrorTypeId] = EncodingErrorTypeId;
20138
- };
20139
- var encodeBase64 = (input) => typeof input === "string" ? base64EncodeUint8Array(encoder.encode(input)) : base64EncodeUint8Array(input);
20140
- var decodeBase64 = (str) => {
20141
- const stripped = stripCrlf(str);
20142
- const length2 = stripped.length;
20143
- if (length2 % 4 !== 0) {
20144
- return fail2(new EncodingError({
20145
- kind: "Decode",
20146
- module: "Base64",
20147
- input: stripped,
20148
- message: `Length must be a multiple of 4, but is ${length2}`
20149
- }));
20150
- }
20151
- const index2 = stripped.indexOf("=");
20152
- if (index2 !== -1 && (index2 < length2 - 2 || index2 === length2 - 2 && stripped[length2 - 1] !== "=")) {
20153
- return fail2(new EncodingError({
20154
- kind: "Decode",
20155
- module: "Base64",
20156
- input: stripped,
20157
- message: `Found a '=' character, but it is not at the end`
20158
- }));
20159
- }
20160
- try {
20161
- const missingOctets = stripped.endsWith("==") ? 2 : stripped.endsWith("=") ? 1 : 0;
20162
- const result5 = new Uint8Array(3 * (length2 / 4) - missingOctets);
20163
- for (let i = 0, j = 0; i < length2; i += 4, j += 3) {
20164
- const buffer = getBase64Code(stripped.charCodeAt(i)) << 18 | getBase64Code(stripped.charCodeAt(i + 1)) << 12 | getBase64Code(stripped.charCodeAt(i + 2)) << 6 | getBase64Code(stripped.charCodeAt(i + 3));
20165
- result5[j] = buffer >> 16;
20166
- result5[j + 1] = buffer >> 8 & 255;
20167
- result5[j + 2] = buffer & 255;
20168
- }
20169
- return succeed2(result5);
20170
- } catch (e) {
20171
- return fail2(new EncodingError({
20172
- kind: "Decode",
20173
- module: "Base64",
20174
- input: stripped,
20175
- message: e instanceof Error ? e.message : "Invalid input"
20176
- }));
20177
- }
20178
- };
20179
- var decodeBase64String = (str) => map2(decodeBase64(str), (_) => decoder.decode(_));
20180
- var encodeBase64Url = (input) => typeof input === "string" ? base64UrlEncodeUint8Array(encoder.encode(input)) : base64UrlEncodeUint8Array(input);
20181
- var decodeBase64Url = (str) => {
20182
- const stripped = stripCrlf(str);
20183
- const length2 = stripped.length;
20184
- if (length2 % 4 === 1) {
20185
- return fail2(new EncodingError({
20186
- module: "Base64Url",
20187
- kind: "Decode",
20188
- input: stripped,
20189
- message: `Length should be a multiple of 4, but is ${length2}`
20190
- }));
20191
- }
20192
- if (!/^[-_A-Z0-9]*?={0,2}$/i.test(stripped)) {
20193
- return fail2(new EncodingError({
20194
- module: "Base64Url",
20195
- kind: "Decode",
20196
- input: stripped,
20197
- message: "Invalid input"
20198
- }));
20199
- }
20200
- let sanitized = length2 % 4 === 2 ? `${stripped}==` : length2 % 4 === 3 ? `${stripped}=` : stripped;
20201
- sanitized = sanitized.replace(/-/g, "+").replace(/_/g, "/");
20202
- return decodeBase64(sanitized);
20203
- };
20204
- var decodeBase64UrlString = (str) => map2(decodeBase64Url(str), (_) => decoder.decode(_));
20205
- var encodeHex = (input) => typeof input === "string" ? hexEncodeUint8Array(encoder.encode(input)) : hexEncodeUint8Array(input);
20206
- var decodeHex = (str) => {
20207
- const bytes = new TextEncoder().encode(str);
20208
- if (bytes.length % 2 !== 0) {
20209
- return fail2(new EncodingError({
20210
- module: "Hex",
20211
- kind: "Decode",
20212
- input: str,
20213
- message: `Length must be a multiple of 2, but is ${bytes.length}`
20214
- }));
20215
- }
20216
- try {
20217
- const length2 = bytes.length / 2;
20218
- const result5 = new Uint8Array(length2);
20219
- for (let i = 0; i < length2; i++) {
20220
- const a = fromHexChar(bytes[i * 2]);
20221
- const b = fromHexChar(bytes[i * 2 + 1]);
20222
- result5[i] = a << 4 | b;
20223
- }
20224
- return succeed2(result5);
20225
- } catch (e) {
20226
- return fail2(new EncodingError({
20227
- module: "Hex",
20228
- kind: "Decode",
20229
- input: str,
20230
- message: e instanceof Error ? e.message : "Invalid input"
20231
- }));
20232
- }
20233
- };
20234
- var decodeHexString = (str) => map2(decodeHex(str), (_) => decoder.decode(_));
20235
- var encoder = /* @__PURE__ */ new TextEncoder();
20236
- var decoder = /* @__PURE__ */ new TextDecoder();
20237
- var stripCrlf = (str) => str.replace(/[\n\r]/g, "");
20238
- var base64EncodeUint8Array = (bytes) => {
20239
- const length2 = bytes.length;
20240
- let result5 = "";
20241
- let i;
20242
- for (i = 2; i < length2; i += 3) {
20243
- result5 += base64abc[bytes[i - 2] >> 2];
20244
- result5 += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
20245
- result5 += base64abc[(bytes[i - 1] & 15) << 2 | bytes[i] >> 6];
20246
- result5 += base64abc[bytes[i] & 63];
20247
- }
20248
- if (i === length2 + 1) {
20249
- result5 += base64abc[bytes[i - 2] >> 2];
20250
- result5 += base64abc[(bytes[i - 2] & 3) << 4];
20251
- result5 += "==";
20252
- }
20253
- if (i === length2) {
20254
- result5 += base64abc[bytes[i - 2] >> 2];
20255
- result5 += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
20256
- result5 += base64abc[(bytes[i - 1] & 15) << 2];
20257
- result5 += "=";
20258
- }
20259
- return result5;
20260
- };
20261
- function getBase64Code(charCode) {
20262
- if (charCode >= base64codes.length) {
20263
- throw new TypeError(`Invalid character ${String.fromCharCode(charCode)}`);
20264
- }
20265
- const code = base64codes[charCode];
20266
- if (code === 255) {
20267
- throw new TypeError(`Invalid character ${String.fromCharCode(charCode)}`);
20268
- }
20269
- return code;
20270
- }
20271
- var base64abc = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/"];
20272
- var base64codes = [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255, 255, 255, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255, 255, 0, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255, 255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51];
20273
- var base64UrlEncodeUint8Array = (data) => base64EncodeUint8Array(data).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
20274
- var hexEncodeUint8Array = (bytes) => {
20275
- let result5 = "";
20276
- for (let i = 0; i < bytes.length; ++i) {
20277
- result5 += bytesToHex[bytes[i]];
20278
- }
20279
- return result5;
20280
- };
20281
- var fromHexChar = (byte) => {
20282
- if (48 <= byte && byte <= 57) {
20283
- return byte - 48;
20284
- }
20285
- if (97 <= byte && byte <= 102) {
20286
- return byte - 97 + 10;
20287
- }
20288
- if (65 <= byte && byte <= 70) {
20289
- return byte - 65 + 10;
20290
- }
20291
- throw new TypeError("Invalid input");
20292
- };
20293
- 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"];
20294
-
20295
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/SchemaGetter.js
20456
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/SchemaGetter.js
20296
20457
  var Getter = class _Getter extends Class {
20297
20458
  run;
20298
20459
  constructor(run2) {
@@ -20579,7 +20740,7 @@ function collectBracketPathEntries(isLeaf) {
20579
20740
  };
20580
20741
  }
20581
20742
 
20582
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/SchemaTransformation.js
20743
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/SchemaTransformation.js
20583
20744
  var Middleware = class _Middleware {
20584
20745
  _tag = "Middleware";
20585
20746
  decode;
@@ -20820,14 +20981,30 @@ var dateTimeZonedFromString = /* @__PURE__ */ transformOrFail2({
20820
20981
  encode: (zoned) => succeed6(formatIsoZoned2(zoned))
20821
20982
  });
20822
20983
 
20823
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/SchemaAST.js
20984
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/SchemaAST.js
20824
20985
  function makeGuard(tag4) {
20825
20986
  return (ast) => ast._tag === tag4;
20826
20987
  }
20988
+ function isAST(u) {
20989
+ return hasProperty(u, TypeId17) && u[TypeId17] === TypeId17;
20990
+ }
20827
20991
  var isDeclaration = /* @__PURE__ */ makeGuard("Declaration");
20992
+ var isNull2 = /* @__PURE__ */ makeGuard("Null");
20993
+ var isUndefined2 = /* @__PURE__ */ makeGuard("Undefined");
20994
+ var isVoid = /* @__PURE__ */ makeGuard("Void");
20828
20995
  var isNever2 = /* @__PURE__ */ makeGuard("Never");
20996
+ var isUnknown2 = /* @__PURE__ */ makeGuard("Unknown");
20997
+ var isAny = /* @__PURE__ */ makeGuard("Any");
20998
+ var isString2 = /* @__PURE__ */ makeGuard("String");
20999
+ var isNumber2 = /* @__PURE__ */ makeGuard("Number");
21000
+ var isBoolean2 = /* @__PURE__ */ makeGuard("Boolean");
21001
+ var isBigInt2 = /* @__PURE__ */ makeGuard("BigInt");
21002
+ var isSymbol2 = /* @__PURE__ */ makeGuard("Symbol");
20829
21003
  var isLiteral = /* @__PURE__ */ makeGuard("Literal");
20830
21004
  var isUniqueSymbol = /* @__PURE__ */ makeGuard("UniqueSymbol");
21005
+ var isObjectKeyword2 = /* @__PURE__ */ makeGuard("ObjectKeyword");
21006
+ var isEnum = /* @__PURE__ */ makeGuard("Enum");
21007
+ var isTemplateLiteral = /* @__PURE__ */ makeGuard("TemplateLiteral");
20831
21008
  var isArrays = /* @__PURE__ */ makeGuard("Arrays");
20832
21009
  var isObjects = /* @__PURE__ */ makeGuard("Objects");
20833
21010
  var isUnion = /* @__PURE__ */ makeGuard("Union");
@@ -21207,7 +21384,7 @@ var Number5 = class extends Base2 {
21207
21384
  if (this.checks && (hasCheck(this.checks, "effect/schema/isFinite") || hasCheck(this.checks, "effect/schema/isInt"))) {
21208
21385
  return this;
21209
21386
  }
21210
- return replaceEncoding(this, [numberToJson(this.checks)]);
21387
+ return replaceEncoding(this, [numberToJson]);
21211
21388
  }
21212
21389
  /** @internal */
21213
21390
  toCodecStringTree() {
@@ -21224,10 +21401,6 @@ var Number5 = class extends Base2 {
21224
21401
  function hasCheck(checks, id2) {
21225
21402
  return checks.some((check3) => check3.annotations?.representation?.id === id2 || check3._tag === "FilterGroup" && hasCheck(check3.checks, id2));
21226
21403
  }
21227
- function numberToJson(checks) {
21228
- const encodedFinite = !checks ? finite : appendChecks(finite, checks);
21229
- return new Link(new Union([encodedFinite, nonFiniteLiterals], "anyOf"), new Transformation(Number4(), transform((n) => globalThis.Number.isFinite(n) ? n : globalThis.String(n))));
21230
- }
21231
21404
  var number2 = /* @__PURE__ */ new Number5();
21232
21405
  var Boolean3 = class extends Base2 {
21233
21406
  _tag = "Boolean";
@@ -22252,6 +22425,7 @@ function isFinite2(annotations) {
22252
22425
  });
22253
22426
  }
22254
22427
  var finite = /* @__PURE__ */ appendChecks(number2, [/* @__PURE__ */ isFinite2()]);
22428
+ var numberToJson = /* @__PURE__ */ new Link(/* @__PURE__ */ new Union([finite, nonFiniteLiterals], "anyOf"), /* @__PURE__ */ new Transformation(/* @__PURE__ */ Number4(), /* @__PURE__ */ transform((n) => globalThis.Number.isFinite(n) ? n : globalThis.String(n))));
22255
22429
  function isPattern(regExp, annotations) {
22256
22430
  const source = regExp.source;
22257
22431
  const pattern = new globalThis.RegExp(source, regExp.flags);
@@ -22354,6 +22528,12 @@ function applyToLastLink(f) {
22354
22528
  function replaceContextLastLink(ast, context3) {
22355
22529
  return applyToLastLink((ast2) => replaceContext(ast2, context3))(ast);
22356
22530
  }
22531
+ function applyToSelfOrLastLinkEncoding(f) {
22532
+ function out(ast) {
22533
+ return ast.encoding ? replaceEncoding(ast, updateLastLink(ast.encoding, out)) : f(ast);
22534
+ }
22535
+ return memoize(out);
22536
+ }
22357
22537
  function applyToSelfOrLastLinkEncodingIdempotent(f, options) {
22358
22538
  function out(ast) {
22359
22539
  if (ast.encoding) {
@@ -22726,6 +22906,11 @@ function getConstructorDescriptor(ast) {
22726
22906
  const getDescriptor = ast.annotations?.[CONSTRUCTOR_ANNOTATION_KEY];
22727
22907
  return isFunction(getDescriptor) ? getDescriptor(ast.typeParameters) : void 0;
22728
22908
  }
22909
+ var resolve2 = resolve;
22910
+ var resolveAt2 = resolveAt;
22911
+ var resolveIdentifier2 = resolveIdentifier;
22912
+ var resolveTitle2 = resolveTitle;
22913
+ var resolveDescription2 = resolveDescription;
22729
22914
  function isJsonLeaf(u) {
22730
22915
  return u === null || typeof u === "string" || typeof u === "boolean" || typeof u === "number" && globalThis.Number.isFinite(u);
22731
22916
  }
@@ -22810,7 +22995,7 @@ var StringTree = /* @__PURE__ */ new Declaration([], () => (input, ast, options)
22810
22995
  });
22811
22996
  var unknownToStringTree = /* @__PURE__ */ new Link(StringTree, /* @__PURE__ */ passthrough3());
22812
22997
 
22813
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Chunk.js
22998
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Chunk.js
22814
22999
  var TypeId18 = "~effect/collections/Chunk";
22815
23000
  function copy2(src, srcPos, dest, destPos, len) {
22816
23001
  for (let i = srcPos; i < Math.min(src.length, srcPos + len); i++) {
@@ -22994,7 +23179,7 @@ var getUnsafe3 = /* @__PURE__ */ dual(2, (self, index2) => {
22994
23179
  });
22995
23180
  var size = (self) => self.length;
22996
23181
 
22997
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Fiber.js
23182
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Fiber.js
22998
23183
  var Fiber_exports = {};
22999
23184
  __export(Fiber_exports, {
23000
23185
  await: () => await_,
@@ -23021,7 +23206,7 @@ var isFiber = (u) => hasProperty(u, FiberTypeId);
23021
23206
  var getCurrent = getCurrentFiber;
23022
23207
  var runIn = fiberRunIn;
23023
23208
 
23024
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/MutableRef.js
23209
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/MutableRef.js
23025
23210
  var TypeId19 = "~effect/MutableRef";
23026
23211
  var MutableRefProto = {
23027
23212
  [TypeId19]: TypeId19,
@@ -23043,7 +23228,7 @@ var set = /* @__PURE__ */ dual(2, (self, value5) => {
23043
23228
  return self;
23044
23229
  });
23045
23230
 
23046
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Schema.js
23231
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Schema.js
23047
23232
  var Schema_exports = {};
23048
23233
  __export(Schema_exports, {
23049
23234
  Any: () => Any2,
@@ -23094,12 +23279,15 @@ __export(Schema_exports, {
23094
23279
  FiniteFromString: () => FiniteFromString,
23095
23280
  FormData: () => FormData2,
23096
23281
  FormDataReviver: () => FormDataReviver,
23282
+ Graph: () => Graph,
23283
+ GraphReviver: () => GraphReviver,
23097
23284
  HashMap: () => HashMap,
23098
23285
  HashMapReviver: () => HashMapReviver,
23099
23286
  HashSet: () => HashSet,
23100
23287
  HashSetReviver: () => HashSetReviver,
23101
23288
  Int: () => Int,
23102
23289
  Json: () => Json2,
23290
+ JsonObject: () => JsonObject,
23103
23291
  JsonReviver: () => JsonReviver,
23104
23292
  Literal: () => Literal2,
23105
23293
  Literals: () => Literals,
@@ -23337,7 +23525,7 @@ __export(Schema_exports, {
23337
23525
  isUppercased: () => isUppercased,
23338
23526
  isUppercasedReviver: () => isUppercasedReviver,
23339
23527
  link: () => link,
23340
- make: () => make24,
23528
+ make: () => make25,
23341
23529
  makeFilter: () => makeFilter2,
23342
23530
  makeFilterGroup: () => makeFilterGroup,
23343
23531
  makeIsBetween: () => makeIsBetween,
@@ -23393,7 +23581,157 @@ __export(Schema_exports, {
23393
23581
  withDecodingDefaultTypeKey: () => withDecodingDefaultTypeKey
23394
23582
  });
23395
23583
 
23396
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/HashMap.js
23584
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/graph.js
23585
+ var TypeId20 = "~effect/collections/Graph";
23586
+ var toImpl = (graph) => graph;
23587
+ 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);
23588
+ var edgeHash = (type3, edge) => type3 === "directed" ? hash(edge) : optimize(hash(edge.data) ^ hash(edge.source) + hash(edge.target));
23589
+ var ProtoGraph = {
23590
+ [TypeId20]: {
23591
+ _N: (_) => _,
23592
+ _E: (_) => _
23593
+ },
23594
+ [Symbol.iterator]() {
23595
+ return this.nodes[Symbol.iterator]();
23596
+ },
23597
+ [NodeInspectSymbol]() {
23598
+ return this.toJSON();
23599
+ },
23600
+ [symbol2](that) {
23601
+ if (hasProperty(that, TypeId20)) {
23602
+ const thatImpl = toImpl(that);
23603
+ if (this.nodes.size !== thatImpl.nodes.size || this.edges.size !== thatImpl.edges.size || this.type !== thatImpl.type) {
23604
+ return false;
23605
+ }
23606
+ for (const [nodeIndex, nodeData] of this.nodes) {
23607
+ if (!thatImpl.nodes.has(nodeIndex) || !equals(nodeData, thatImpl.nodes.get(nodeIndex))) {
23608
+ return false;
23609
+ }
23610
+ }
23611
+ for (const [edgeIndex, edgeData] of this.edges) {
23612
+ const otherEdge = thatImpl.edges.get(edgeIndex);
23613
+ if (otherEdge === void 0 || !edgeEquals(this.type, edgeData, otherEdge)) {
23614
+ return false;
23615
+ }
23616
+ }
23617
+ return true;
23618
+ }
23619
+ return false;
23620
+ },
23621
+ [symbol]() {
23622
+ let hash3 = string("Graph");
23623
+ hash3 = hash3 ^ string(this.type);
23624
+ hash3 = hash3 ^ number(this.nodes.size);
23625
+ hash3 = hash3 ^ number(this.edges.size);
23626
+ for (const [nodeIndex, nodeData] of this.nodes) {
23627
+ hash3 = hash3 ^ hash(nodeIndex) + hash(nodeData);
23628
+ }
23629
+ for (const [edgeIndex, edgeData] of this.edges) {
23630
+ hash3 = hash3 ^ hash(edgeIndex) + edgeHash(this.type, edgeData);
23631
+ }
23632
+ return hash3;
23633
+ },
23634
+ toJSON() {
23635
+ return {
23636
+ _id: "Graph",
23637
+ nodeCount: this.nodes.size,
23638
+ edgeCount: this.edges.size,
23639
+ type: this.type
23640
+ };
23641
+ },
23642
+ toString() {
23643
+ return `Graph(${this.type}, ${this.nodes.size}, ${this.edges.size})`;
23644
+ },
23645
+ pipe() {
23646
+ return pipeArguments(this, arguments);
23647
+ }
23648
+ };
23649
+ var make17 = (type3, mutable2) => {
23650
+ const graph = Object.create(ProtoGraph);
23651
+ graph.type = type3;
23652
+ graph.mutable = mutable2;
23653
+ graph.transforming = false;
23654
+ graph.nodes = /* @__PURE__ */ new Map();
23655
+ graph.edges = /* @__PURE__ */ new Map();
23656
+ graph.adjacency = /* @__PURE__ */ new Map();
23657
+ graph.reverseAdjacency = /* @__PURE__ */ new Map();
23658
+ graph.nextNodeIndex = 0;
23659
+ graph.nextEdgeIndex = 0;
23660
+ graph.acyclic = some2(true);
23661
+ return graph;
23662
+ };
23663
+ var snapshot = (graph) => {
23664
+ const impl = toImpl(graph);
23665
+ return {
23666
+ type: graph.type,
23667
+ nodes: Array.from(impl.nodes, ([index2, data]) => ({
23668
+ index: index2,
23669
+ data
23670
+ })).sort((a, b) => a.index - b.index),
23671
+ edges: Array.from(impl.edges, ([index2, edge]) => ({
23672
+ index: index2,
23673
+ source: edge.source,
23674
+ target: edge.target,
23675
+ data: edge.data
23676
+ })).sort((a, b) => a.index - b.index)
23677
+ };
23678
+ };
23679
+ var hydrate = (snapshot2) => {
23680
+ const graph = make17(snapshot2.type, false);
23681
+ for (const node of snapshot2.nodes) {
23682
+ graph.nodes.set(node.index, node.data);
23683
+ graph.adjacency.set(node.index, []);
23684
+ graph.reverseAdjacency.set(node.index, []);
23685
+ }
23686
+ for (const edge of snapshot2.edges) {
23687
+ graph.edges.set(edge.index, {
23688
+ source: edge.source,
23689
+ target: edge.target,
23690
+ data: edge.data
23691
+ });
23692
+ graph.adjacency.get(edge.source).push(edge.index);
23693
+ graph.reverseAdjacency.get(edge.target).push(edge.index);
23694
+ if (snapshot2.type === "undirected") {
23695
+ graph.adjacency.get(edge.target).push(edge.index);
23696
+ graph.reverseAdjacency.get(edge.source).push(edge.index);
23697
+ }
23698
+ }
23699
+ graph.nextNodeIndex = snapshot2.nodes.length === 0 ? 0 : snapshot2.nodes[snapshot2.nodes.length - 1].index + 1;
23700
+ graph.nextEdgeIndex = snapshot2.edges.length === 0 ? 0 : snapshot2.edges[snapshot2.edges.length - 1].index + 1;
23701
+ graph.acyclic = none2();
23702
+ return graph;
23703
+ };
23704
+
23705
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Graph.js
23706
+ var TypeId21 = TypeId20;
23707
+ var isGraph = (u) => hasProperty(u, TypeId21);
23708
+ var EdgeIdentity = class _EdgeIdentity {
23709
+ type;
23710
+ source;
23711
+ target;
23712
+ identity;
23713
+ constructor(type3, source, target, identity2) {
23714
+ this.type = type3;
23715
+ this.source = source;
23716
+ this.target = target;
23717
+ this.identity = identity2;
23718
+ }
23719
+ [symbol2](that) {
23720
+ if (!(that instanceof _EdgeIdentity) || this.type !== that.type || !equals(this.identity, that.identity)) {
23721
+ return false;
23722
+ }
23723
+ if (this.type === "directed") {
23724
+ return equals(this.source, that.source) && equals(this.target, that.target);
23725
+ }
23726
+ return equals(this.source, that.source) && equals(this.target, that.target) || equals(this.source, that.target) && equals(this.target, that.source);
23727
+ }
23728
+ [symbol]() {
23729
+ const hash3 = hash(this.identity);
23730
+ return this.type === "directed" ? combine(hash(this.target))(combine(hash(this.source))(hash3)) : optimize(hash3 ^ hash(this.source) + hash(this.target));
23731
+ }
23732
+ };
23733
+
23734
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/HashMap.js
23397
23735
  var HashMap_exports = {};
23398
23736
  __export(HashMap_exports, {
23399
23737
  beginMutation: () => beginMutation2,
@@ -23417,7 +23755,7 @@ __export(HashMap_exports, {
23417
23755
  isEmpty: () => isEmpty2,
23418
23756
  isHashMap: () => isHashMap2,
23419
23757
  keys: () => keys3,
23420
- make: () => make18,
23758
+ make: () => make19,
23421
23759
  map: () => map11,
23422
23760
  modify: () => modify3,
23423
23761
  modifyAt: () => modifyAt2,
@@ -23436,7 +23774,7 @@ __export(HashMap_exports, {
23436
23774
  values: () => values2
23437
23775
  });
23438
23776
 
23439
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/hashMap.js
23777
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/hashMap.js
23440
23778
  var HashMapTypeId = "~effect/collections/HashMap";
23441
23779
  var SHIFT = 5;
23442
23780
  var BUCKET_SIZE = 1 << SHIFT;
@@ -23998,7 +24336,7 @@ var HashMapImpl = class {
23998
24336
  var emptyNode = /* @__PURE__ */ new EmptyNode();
23999
24337
  var isHashMap = (u) => hasProperty(u, HashMapTypeId);
24000
24338
  var empty5 = () => new HashMapImpl(false, 0, emptyNode, 0);
24001
- var make17 = (...entries3) => fromIterable4(entries3);
24339
+ var make18 = (...entries3) => fromIterable4(entries3);
24002
24340
  var fromIterable4 = (entries3) => {
24003
24341
  let root = emptyNode;
24004
24342
  let size6 = 0;
@@ -24279,10 +24617,10 @@ var every2 = /* @__PURE__ */ dual(2, (self, predicate) => {
24279
24617
  return true;
24280
24618
  });
24281
24619
 
24282
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/HashMap.js
24620
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/HashMap.js
24283
24621
  var isHashMap2 = isHashMap;
24284
24622
  var empty6 = empty5;
24285
- var make18 = make17;
24623
+ var make19 = make18;
24286
24624
  var fromIterable5 = fromIterable4;
24287
24625
  var isEmpty2 = isEmpty;
24288
24626
  var get4 = get3;
@@ -24319,7 +24657,7 @@ var findFirst6 = findFirst5;
24319
24657
  var some5 = some4;
24320
24658
  var every3 = every2;
24321
24659
 
24322
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/hashSet.js
24660
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/hashSet.js
24323
24661
  var HashSetTypeId = "~effect/collections/HashSet";
24324
24662
  var HashSetProto = {
24325
24663
  [symbol]() {
@@ -24373,12 +24711,12 @@ var every4 = (self, predicate) => {
24373
24711
  return true;
24374
24712
  };
24375
24713
 
24376
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/HashSet.js
24714
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/HashSet.js
24377
24715
  var fromIterable7 = fromIterable6;
24378
24716
  var isHashSet2 = isHashSet;
24379
24717
  var size5 = size4;
24380
24718
 
24381
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/SchemaParser.js
24719
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/SchemaParser.js
24382
24720
  function makeEffect(schema) {
24383
24721
  const parser = runWithCompiler(constructorCompiler, toType(schema.ast));
24384
24722
  return (input, options) => {
@@ -24401,7 +24739,7 @@ function makeOption(schema) {
24401
24739
  return none2();
24402
24740
  };
24403
24741
  }
24404
- function make20(schema) {
24742
+ function make21(schema) {
24405
24743
  const parser = makeEffect(schema);
24406
24744
  return (input, options) => {
24407
24745
  const exit3 = runSyncExit2(parser(input, options));
@@ -24676,8 +25014,8 @@ function makeParser(ast, compile, compileConstructorDefault2, constructorDefault
24676
25014
  };
24677
25015
  }
24678
25016
 
24679
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/schema/schema.js
24680
- var TypeId20 = "~effect/Schema/Schema";
25017
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schema/schema.js
25018
+ var TypeId22 = "~effect/Schema/Schema";
24681
25019
  function makeDeclarationReviver(id2, payloadSchema, revive) {
24682
25020
  return {
24683
25021
  id: id2,
@@ -24693,7 +25031,7 @@ function makeFilterReviver(id2, payloadSchema, revive) {
24693
25031
  };
24694
25032
  }
24695
25033
  var SchemaProto = {
24696
- [TypeId20]: TypeId20,
25034
+ [TypeId22]: TypeId22,
24697
25035
  pipe() {
24698
25036
  return pipeArguments(this, arguments);
24699
25037
  },
@@ -24707,21 +25045,21 @@ var SchemaProto = {
24707
25045
  return this.rebuild(appendChecks(this.ast, checks));
24708
25046
  }
24709
25047
  };
24710
- function make21(ast, options) {
25048
+ function make22(ast, options) {
24711
25049
  function Schema() {
24712
25050
  }
24713
25051
  const self = Object.defineProperties(Object.setPrototypeOf(Schema, SchemaProto), Object.getOwnPropertyDescriptors({
24714
25052
  ...options
24715
25053
  }));
24716
25054
  self.ast = ast;
24717
- self.rebuild = (ast2) => make21(ast2, options);
25055
+ self.rebuild = (ast2) => make22(ast2, options);
24718
25056
  self.makeEffect = makeEffect(self);
24719
- self.make = make20(self);
25057
+ self.make = make21(self);
24720
25058
  self.makeOption = makeOption(self);
24721
25059
  return self;
24722
25060
  }
24723
25061
 
24724
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Struct.js
25062
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Struct.js
24725
25063
  var pick = /* @__PURE__ */ dual(2, (self, keys4) => {
24726
25064
  return buildStruct(self, (k, v) => keys4.includes(k) ? [k, v] : void 0);
24727
25065
  });
@@ -24764,7 +25102,7 @@ function makeCombiner(combiners, options) {
24764
25102
  });
24765
25103
  }
24766
25104
 
24767
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/UndefinedOr.js
25105
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/UndefinedOr.js
24768
25106
  function makeReducer2(combiner2) {
24769
25107
  return make((self, that) => {
24770
25108
  if (self === void 0) return that;
@@ -24773,7 +25111,7 @@ function makeReducer2(combiner2) {
24773
25111
  }, void 0);
24774
25112
  }
24775
25113
 
24776
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/errors.js
25114
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/errors.js
24777
25115
  function errorWithPath(message, path) {
24778
25116
  if (path.length > 0) {
24779
25117
  message += `
@@ -24782,7 +25120,7 @@ function errorWithPath(message, path) {
24782
25120
  return new Error(message);
24783
25121
  }
24784
25122
 
24785
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/schema/toArbitrary.js
25123
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schema/toArbitrary.js
24786
25124
  var arbitraryMemoMap = /* @__PURE__ */ new WeakMap();
24787
25125
  var suspendDepthIdentifierMap = /* @__PURE__ */ new WeakMap();
24788
25126
  var emptyRecursionStack = [];
@@ -25224,10 +25562,10 @@ function base(ast, path) {
25224
25562
  }
25225
25563
  let out = fc.tuple(...elementArbitraries).map(getSomes);
25226
25564
  if (isReadonlyArrayNonEmpty(rest)) {
25227
- const [head2, ...tail2] = rest;
25565
+ const [head4, ...tail2] = rest;
25228
25566
  const restCtx = ast.elements.length === 0 ? ctx : reset;
25229
25567
  const minRestLength = Math.max(0, minLength - length2 - tail2.length);
25230
- const headArbitrary = minRestLength === 0 ? void 0 : head2.arbitrary.terminal(fc, reset, recursionStack);
25568
+ const headArbitrary = minRestLength === 0 ? void 0 : head4.arbitrary.terminal(fc, reset, recursionStack);
25231
25569
  if (minRestLength > 0 && headArbitrary === void 0) {
25232
25570
  return void 0;
25233
25571
  }
@@ -25265,10 +25603,10 @@ function base(ast, path) {
25265
25603
  });
25266
25604
  let out = fc.tuple(...elementArbitraries).map((elements2) => getSomes(takeWhile(elements2, isSome2)));
25267
25605
  if (isReadonlyArrayNonEmpty(rest)) {
25268
- const [head2, ...tail2] = rest.map(({
25606
+ const [head4, ...tail2] = rest.map(({
25269
25607
  arbitrary
25270
25608
  }) => arbitrary(fc, reset, recursionStack));
25271
- const restArbitrary = array2(fc, ast.elements.length === 0 ? ctx : reset, head2);
25609
+ const restArbitrary = array2(fc, ast.elements.length === 0 ? ctx : reset, head4);
25272
25610
  out = appendArray(fc, out, len, restArbitrary);
25273
25611
  if (tail2.length > 0) {
25274
25612
  const t = fc.tuple(...tail2);
@@ -25444,7 +25782,7 @@ function base(ast, path) {
25444
25782
  }
25445
25783
  }
25446
25784
 
25447
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/schema/toEquivalence.js
25785
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schema/toEquivalence.js
25448
25786
  var toEquivalence = /* @__PURE__ */ memoize((ast) => {
25449
25787
  return recur2(ast, []);
25450
25788
  });
@@ -25492,9 +25830,9 @@ function recur2(ast, path) {
25492
25830
  }
25493
25831
  }
25494
25832
  if (rest.length > 0) {
25495
- const [head2, ...tail2] = rest;
25833
+ const [head4, ...tail2] = rest;
25496
25834
  for (; i < len2 - tail2.length; i++) {
25497
- if (!head2(a[i], b[i])) {
25835
+ if (!head4(a[i], b[i])) {
25498
25836
  return false;
25499
25837
  }
25500
25838
  }
@@ -25567,7 +25905,7 @@ function recur2(ast, path) {
25567
25905
  }
25568
25906
  }
25569
25907
 
25570
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/JsonPointer.js
25908
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/JsonPointer.js
25571
25909
  function escapeToken(token) {
25572
25910
  return token.replace(/~/g, "~0").replace(/\//g, "~1");
25573
25911
  }
@@ -25575,7 +25913,7 @@ function unescapeToken(token) {
25575
25913
  return token.replace(/~1/g, "/").replace(/~0/g, "~");
25576
25914
  }
25577
25915
 
25578
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/JsonSchema.js
25916
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/JsonSchema.js
25579
25917
  var RE_DEFS = /^#\/\$defs(?=\/|$)/;
25580
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"]);
25581
25919
  var DRAFT_07_COPY_KEYWORDS = /* @__PURE__ */ new Set([...DRAFT_04_COPY_KEYWORDS, "const", "examples", "readOnly", "writeOnly", "minimum", "maximum", "exclusiveMinimum", "exclusiveMaximum"]);
@@ -25690,15 +26028,12 @@ function mapObject(value5, f) {
25690
26028
  return isObject(value5) ? map3(value5, f) : void 0;
25691
26029
  }
25692
26030
 
25693
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/RegExp.js
26031
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/RegExp.js
25694
26032
  var RegExp2 = globalThis.RegExp;
25695
26033
  var escape2 = (string6) => string6.replace(/[/\\^$*+?.()|[\]{}]/g, "\\$&");
25696
26034
 
25697
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/schema/toJsonSchemaDocument.js
26035
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schema/toJsonSchemaDocument.js
25698
26036
  var jsonSchemaAnnotationExcludedKeys = /* @__PURE__ */ new Set([...annotationExcludedKeys, IDENTIFIER_FALLBACK_KEY, ...jsonSchemaAnnotationKeys]);
25699
- var toRepresentationOptions = {
25700
- isAnonymousReferenceAllowed: (ast) => !isDeclaration(ast)
25701
- };
25702
26037
  function collectJsonSchemaAnnotations(annotations, options) {
25703
26038
  if (annotations === void 0) return void 0;
25704
26039
  const out = {};
@@ -25773,7 +26108,16 @@ function extractJsonSchemaNumberType(schema) {
25773
26108
  function isJsonSchemaNumberEncoding(schema) {
25774
26109
  return Array.isArray(schema.anyOf) && schema.anyOf.length === 4 && schema.anyOf[0]?.type === "number" && schema.anyOf.slice(1).every((member) => member.type === "string");
25775
26110
  }
25776
- function appendJsonSchema(left, right) {
26111
+ var inlineableCheckKeywords = "|type|format|pattern|multipleOf|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength|minItems|maxItems|uniqueItems|minProperties|maxProperties|propertyNames|";
26112
+ function hasOnlyKeywords(schema, allowed) {
26113
+ return Object.keys(schema).every((key) => allowed.includes(`|${key}|`));
26114
+ }
26115
+ function hasNoCollisions(left, rightKeys) {
26116
+ return typeof left.$ref !== "string" && rightKeys.every((key) => !Object.hasOwn(left, key));
26117
+ }
26118
+ var promotableAnnotationKeywords = "|title|description|default|examples|readOnly|writeOnly|";
26119
+ var inlineableAnnotatedCheckKeywords = inlineableCheckKeywords + promotableAnnotationKeywords;
26120
+ function appendJsonSchema(left, right, inlineCheck) {
25777
26121
  if (Object.keys(left).length === 0) return right;
25778
26122
  const rightKeys = Object.keys(right);
25779
26123
  if (rightKeys.length === 0) return left;
@@ -25788,9 +26132,20 @@ function appendJsonSchema(left, right) {
25788
26132
  type: type3
25789
26133
  };
25790
26134
  if (isNumberEncoding) delete base2.anyOf;
25791
- return Object.keys(extracted.schema).length === 0 ? base2 : appendJsonSchema(base2, extracted.schema);
26135
+ const extractedKeys = Object.keys(extracted.schema);
26136
+ if (extractedKeys.length === 0) return base2;
26137
+ return hasOnlyKeywords(extracted.schema, promotableAnnotationKeywords) && hasNoCollisions(base2, extractedKeys) ? {
26138
+ ...base2,
26139
+ ...extracted.schema
26140
+ } : appendJsonSchema(base2, extracted.schema, inlineCheck);
25792
26141
  }
25793
26142
  }
26143
+ if (inlineCheck && hasNoCollisions(left, rightKeys)) {
26144
+ return {
26145
+ ...left,
26146
+ ...right
26147
+ };
26148
+ }
25794
26149
  const members = Array.isArray(right.allOf) && rightKeys.length === 1 ? right.allOf : [right];
25795
26150
  if (Array.isArray(left.allOf)) {
25796
26151
  return {
@@ -25880,21 +26235,24 @@ function compileJsonSchema(representations, rootPaths, references, options) {
25880
26235
  schemas: schemas2
25881
26236
  });
25882
26237
  const ordinary2 = collectJsonSchemaAnnotations(annotations, options);
25883
- return ordinary2 === void 0 ? fragment : {
26238
+ const schema = ordinary2 === void 0 ? fragment : {
25884
26239
  ...fragment,
25885
26240
  ...ordinary2
25886
26241
  };
26242
+ const allowed = ordinary2 === void 0 ? inlineableCheckKeywords : inlineableAnnotatedCheckKeywords;
26243
+ return check3._tag === "Filter" && hasOnlyKeywords(schema, allowed) && (ordinary2 === void 0 || hasOnlyKeywords(ordinary2, promotableAnnotationKeywords)) ? [schema, true] : [schema];
25887
26244
  }
25888
26245
  if (check3._tag === "Filter") return void 0;
25889
26246
  const children = check3.checks.map((child, index2) => compileCheck(child, type3, [...path, "checks", index2])).filter((child) => child !== void 0);
25890
26247
  if (children.length === 0) return void 0;
25891
26248
  const ordinary = collectJsonSchemaAnnotations(annotations, options);
25892
- return ordinary === void 0 ? {
25893
- allOf: children
26249
+ const allOf = children.map(([schema]) => schema);
26250
+ return [ordinary === void 0 ? {
26251
+ allOf
25894
26252
  } : {
25895
- allOf: children,
26253
+ allOf,
25896
26254
  ...ordinary
25897
- };
26255
+ }];
25898
26256
  }
25899
26257
  function recur3(representation, path) {
25900
26258
  if (representation._tag === "Reference") {
@@ -25917,7 +26275,7 @@ function compileJsonSchema(representations, rootPaths, references, options) {
25917
26275
  const type3 = typeof output.type === "string" && isJsonSchemaType(output.type) ? output.type : void 0;
25918
26276
  const check3 = compileCheck(representation.checks[index2], type3, [...path, "checks", index2]);
25919
26277
  if (check3 !== void 0) {
25920
- output = appendJsonSchema(output, check3);
26278
+ output = appendJsonSchema(output, ...check3);
25921
26279
  }
25922
26280
  }
25923
26281
  compiledRepresentations.set(representation, output);
@@ -26077,22 +26435,35 @@ function compileJsonSchema(representations, rootPaths, references, options) {
26077
26435
  }
26078
26436
  if (representation.propertySignatures.length > 0) out.properties = properties;
26079
26437
  if (required3.length > 0) out.required = required3;
26080
- out.additionalProperties = options?.additionalProperties ?? false;
26081
26438
  const patternProperties = {};
26439
+ const additionalProperties = [];
26082
26440
  for (let index2 = 0; index2 < representation.indexSignatures.length; index2++) {
26083
26441
  const signature = representation.indexSignatures[index2];
26084
26442
  let type3 = recur3(signature.type, [...path, "indexSignatures", index2, "type"]);
26085
26443
  if (Object.keys(type3).length === 1 && "not" in type3) type3 = false;
26086
26444
  const patterns = getParameterPatterns(signature.parameter, [...path, "indexSignatures", index2, "parameter"], /* @__PURE__ */ new Set());
26087
26445
  if (patterns.length === 0) {
26088
- out.additionalProperties = type3;
26446
+ additionalProperties.push(type3);
26089
26447
  } else {
26090
- for (const pattern of patterns) assignProperty(patternProperties, pattern, type3);
26448
+ for (const pattern of patterns) {
26449
+ const previous = patternProperties[pattern];
26450
+ assignProperty(patternProperties, pattern, previous === void 0 ? type3 : previous === false || type3 === false ? false : appendJsonSchema(previous, type3));
26451
+ }
26091
26452
  }
26092
26453
  }
26093
- if (Object.keys(patternProperties).length > 0) {
26454
+ const hasPatternProperties = Object.keys(patternProperties).length > 0;
26455
+ if (hasPatternProperties) {
26094
26456
  out.patternProperties = patternProperties;
26095
- delete out.additionalProperties;
26457
+ }
26458
+ if (representation.indexSignatures.length === 0) {
26459
+ out.additionalProperties = options?.additionalProperties ?? false;
26460
+ } else if (additionalProperties.length === 1 && representation.propertySignatures.length === 0 && !hasPatternProperties) {
26461
+ out.additionalProperties = additionalProperties[0];
26462
+ } else if (additionalProperties.length > 0) {
26463
+ out.allOf = additionalProperties.map((type3) => ({
26464
+ type: "object",
26465
+ additionalProperties: type3
26466
+ }));
26096
26467
  }
26097
26468
  if (typeof out.additionalProperties === "object" && out.additionalProperties !== null && Object.keys(out.additionalProperties).length === 0) {
26098
26469
  delete out.additionalProperties;
@@ -26198,7 +26569,15 @@ function toJsonSchemaDocument(document, options) {
26198
26569
  };
26199
26570
  }
26200
26571
 
26201
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/schema/toRepresentation.js
26572
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schema/toRepresentation.js
26573
+ var defaultReferencePolicy = ({
26574
+ identifier: identifier2
26575
+ }) => identifier2;
26576
+ function annotationsField(annotations) {
26577
+ return annotations === void 0 ? void 0 : {
26578
+ annotations
26579
+ };
26580
+ }
26202
26581
  function toRepresentation(ast, options) {
26203
26582
  const {
26204
26583
  references,
@@ -26210,67 +26589,28 @@ function toRepresentation(ast, options) {
26210
26589
  };
26211
26590
  }
26212
26591
  function toRepresentations(asts, options) {
26213
- return fromASTs(asts, options);
26214
- }
26215
- function annotationsField(annotations) {
26216
- return annotations === void 0 ? void 0 : {
26217
- annotations
26218
- };
26219
- }
26220
- function hasShareableStructure(ast, isAnonymousReferenceAllowed) {
26221
- if (isAnonymousReferenceAllowed?.(ast) === false) return false;
26222
- switch (ast._tag) {
26223
- case "Arrays":
26224
- case "Objects":
26225
- case "Suspend":
26226
- return true;
26227
- case "Declaration":
26228
- return true;
26229
- case "Union":
26230
- return ast.types.some((ast2) => hasShareableStructure(ast2, isAnonymousReferenceAllowed));
26231
- default:
26232
- return false;
26233
- }
26234
- }
26235
- function isWorthReferencing(bodyCost, occurrences) {
26236
- return occurrences * bodyCost > bodyCost + occurrences + 1;
26237
- }
26238
- function isAnonymousReferenceEligible(ast, occurrences, isAnonymousReferenceAllowed) {
26239
- if (isAnonymousReferenceAllowed?.(ast) === false) return false;
26240
- if (hasShareableStructure(ast, isAnonymousReferenceAllowed)) return true;
26241
- switch (ast._tag) {
26242
- case "Union":
26243
- return isWorthReferencing(ast.types.length + 1, occurrences);
26244
- case "Enum":
26245
- return isWorthReferencing(ast.enums.length + 1, occurrences);
26246
- case "TemplateLiteral":
26247
- return isWorthReferencing(ast.parts.length + 1, occurrences);
26248
- case "Literal":
26249
- return typeof ast.literal === "string" && isWorthReferencing(ast.literal.length / 32 + 1, occurrences);
26250
- default:
26251
- return false;
26252
- }
26253
- }
26254
- function resolveReferenceIdentifier(input, encoded) {
26255
- const identifier2 = resolveIdentifier(encoded);
26256
- if (identifier2 !== void 0) return {
26257
- identifier: identifier2
26258
- };
26259
- const fallback = (encoded !== input ? resolveIdentifier(input) : void 0) ?? resolveIdentifierFallback(encoded);
26260
- return fallback === void 0 ? void 0 : {
26261
- identifier: `${fallback}Encoded`,
26262
- fallback
26263
- };
26264
- }
26265
- function fromASTs(asts, options) {
26266
26592
  const references = {};
26267
- const anonymousReferences = /* @__PURE__ */ new Map();
26268
26593
  const referenceOwners = /* @__PURE__ */ new Map();
26269
26594
  const buildingReferences = /* @__PURE__ */ new Set();
26270
- const visiting = /* @__PURE__ */ new Set();
26271
- const occurrences = /* @__PURE__ */ new Map();
26272
- const shared = /* @__PURE__ */ new Set();
26595
+ const candidates = /* @__PURE__ */ new Map();
26596
+ const visitingCandidates = /* @__PURE__ */ new Set();
26273
26597
  for (const ast of asts) visit(ast);
26598
+ const referencePolicy = options?.referencePolicy ?? defaultReferencePolicy;
26599
+ for (const candidatesByIdentifier of candidates.values()) {
26600
+ for (const candidate of candidatesByIdentifier.values()) {
26601
+ const requestedReference = referencePolicy({
26602
+ ast: candidate.ast,
26603
+ occurrences: candidate.occurrences,
26604
+ identifier: candidate.identifier
26605
+ });
26606
+ if (requestedReference !== void 0) {
26607
+ const separator = requestedReference === candidate.identifier || !requestedReference.endsWith("_") ? "_" : "";
26608
+ candidate.reference = getReference(requestedReference, candidate, separator);
26609
+ } else if (candidate.isRecursive) {
26610
+ candidate.reference = getReference(`${candidate.ast._tag}_`, candidate, "");
26611
+ }
26612
+ }
26613
+ }
26274
26614
  const representations = map4(asts, (ast) => recur3(ast));
26275
26615
  return {
26276
26616
  representations,
@@ -26286,14 +26626,14 @@ function fromASTs(asts, options) {
26286
26626
  referenceOwners.set(candidate, owner);
26287
26627
  return candidate;
26288
26628
  }
26289
- function annotateReference(ast, referenceIdentifier, reference) {
26290
- const fallback = referenceIdentifier.fallback;
26629
+ function annotateReference(ast, candidate, reference) {
26630
+ const fallback = candidate.fallback;
26291
26631
  if (fallback !== void 0) {
26292
26632
  return resolveIdentifierFallback(ast) === fallback ? ast : annotate(ast, {
26293
26633
  [IDENTIFIER_FALLBACK_KEY]: fallback
26294
26634
  });
26295
26635
  }
26296
- return reference === referenceIdentifier.identifier ? ast : annotate(ast, {
26636
+ return reference === candidate.identifier ? ast : annotate(ast, {
26297
26637
  identifier: reference
26298
26638
  });
26299
26639
  }
@@ -26309,15 +26649,41 @@ function fromASTs(asts, options) {
26309
26649
  $ref: reference
26310
26650
  };
26311
26651
  }
26312
- function visit(input) {
26652
+ function getCandidate(input) {
26313
26653
  const ast = getLastEncoding(input);
26314
26654
  const owner = getContextOwner(ast);
26315
- const count2 = (occurrences.get(owner) ?? 0) + 1;
26316
- occurrences.set(owner, count2);
26317
- if (count2 > 1) {
26318
- if (!shared.has(owner) && isAnonymousReferenceEligible(owner, count2, options?.isAnonymousReferenceAllowed)) shared.add(owner);
26655
+ let identifier2 = resolveIdentifier(ast);
26656
+ const fallback = identifier2 === void 0 ? (ast !== input ? resolveIdentifier(input) : void 0) ?? resolveIdentifierFallback(ast) : void 0;
26657
+ if (fallback !== void 0) identifier2 = `${fallback}Encoded`;
26658
+ let candidatesByIdentifier = candidates.get(owner);
26659
+ if (candidatesByIdentifier === void 0) {
26660
+ candidatesByIdentifier = /* @__PURE__ */ new Map();
26661
+ candidates.set(owner, candidatesByIdentifier);
26662
+ }
26663
+ let candidate = candidatesByIdentifier.get(identifier2);
26664
+ if (candidate === void 0) {
26665
+ candidate = {
26666
+ ast: owner,
26667
+ identifier: identifier2,
26668
+ fallback,
26669
+ occurrences: 0,
26670
+ isRecursive: false,
26671
+ reference: void 0
26672
+ };
26673
+ candidatesByIdentifier.set(identifier2, candidate);
26674
+ }
26675
+ return candidate;
26676
+ }
26677
+ function visit(input) {
26678
+ const candidate = getCandidate(input);
26679
+ const ast = candidate.ast;
26680
+ candidate.occurrences++;
26681
+ if (visitingCandidates.has(candidate)) {
26682
+ candidate.isRecursive = true;
26319
26683
  return;
26320
26684
  }
26685
+ if (candidate.occurrences > 1) return;
26686
+ visitingCandidates.add(candidate);
26321
26687
  visitChecks(ast.checks);
26322
26688
  switch (ast._tag) {
26323
26689
  case "Declaration":
@@ -26336,6 +26702,7 @@ function fromASTs(asts, options) {
26336
26702
  visit(ast.thunk());
26337
26703
  break;
26338
26704
  }
26705
+ visitingCandidates.delete(candidate);
26339
26706
  }
26340
26707
  function visitChecks(checks) {
26341
26708
  checks?.forEach((check3) => {
@@ -26344,41 +26711,14 @@ function fromASTs(asts, options) {
26344
26711
  });
26345
26712
  }
26346
26713
  function recur3(input) {
26347
- const ast = getLastEncoding(input);
26348
- const owner = getContextOwner(ast);
26349
- const referenceIdentifier = resolveReferenceIdentifier(input, ast);
26350
- if (referenceIdentifier !== void 0) {
26351
- const reference2 = getReference(referenceIdentifier.identifier, owner);
26352
- return makeReference(reference2, annotateReference(ast, referenceIdentifier, reference2));
26353
- }
26354
- const found = anonymousReferences.get(owner);
26355
- if (found !== void 0) {
26356
- return {
26357
- _tag: "Reference",
26358
- $ref: found
26359
- };
26360
- }
26361
- const isShared = shared.has(owner);
26362
- if (isShared || visiting.has(owner)) {
26363
- const reference2 = getReference(`${ast._tag}_`, owner, "");
26364
- anonymousReferences.set(owner, reference2);
26365
- return isShared ? makeReference(reference2, ast) : {
26366
- _tag: "Reference",
26367
- $ref: reference2
26368
- };
26369
- }
26370
- visiting.add(owner);
26371
- const representation = on(ast);
26372
- visiting.delete(owner);
26373
- const reference = anonymousReferences.get(owner);
26714
+ const candidate = getCandidate(input);
26715
+ const ast = candidate.ast;
26716
+ const reference = candidate.reference;
26374
26717
  if (reference !== void 0) {
26375
- assignProperty(references, reference, representation);
26376
- return {
26377
- _tag: "Reference",
26378
- $ref: reference
26379
- };
26718
+ const annotated = candidate.identifier === void 0 ? ast : annotateReference(ast, candidate, reference);
26719
+ return makeReference(reference, annotated);
26380
26720
  }
26381
- return representation;
26721
+ return on(ast);
26382
26722
  }
26383
26723
  function on(ast) {
26384
26724
  const checks = fromChecks(ast.checks);
@@ -26544,7 +26884,7 @@ function fromASTs(asts, options) {
26544
26884
  }
26545
26885
  }
26546
26886
 
26547
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/JsonPatch.js
26887
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/JsonPatch.js
26548
26888
  function get5(oldValue, newValue) {
26549
26889
  const patches = [];
26550
26890
  getLoop(oldValue, newValue, "", patches);
@@ -26725,12 +27065,12 @@ function rebuildFromStack(stack, newParent) {
26725
27065
  return acc;
26726
27066
  }
26727
27067
 
26728
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Optic.js
27068
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Optic.js
26729
27069
  function makeIso(get7, set6) {
26730
- return make22(primitiveNode("Iso", get7, set6));
27070
+ return make23(primitiveNode("Iso", get7, set6));
26731
27071
  }
26732
27072
  function makeLens(get7, replace2) {
26733
- return make22(primitiveNode("Lens", get7, replace2));
27073
+ return make23(primitiveNode("Lens", get7, replace2));
26734
27074
  }
26735
27075
  function primitiveNode(kind, get7, set6) {
26736
27076
  return [{
@@ -26803,7 +27143,7 @@ function compose(a, b) {
26803
27143
  return nodes;
26804
27144
  }
26805
27145
  function makeOptional(getResult, set6) {
26806
- return make22(primitiveNode("Optional", getResult, set6));
27146
+ return make23(primitiveNode("Optional", getResult, set6));
26807
27147
  }
26808
27148
  var OptionalImpl = class {
26809
27149
  /** @internal */
@@ -26822,13 +27162,13 @@ var OptionalImpl = class {
26822
27162
  return (s) => getOrElse2(flatMap2(this.getResult(s), (a) => this.replaceResult(f(a), s)), () => s);
26823
27163
  }
26824
27164
  compose(that) {
26825
- return make22(compose(this.node, that.node));
27165
+ return make23(compose(this.node, that.node));
26826
27166
  }
26827
27167
  key(key) {
26828
- return make22(compose(this.node, [new PathNode([key])]));
27168
+ return make23(compose(this.node, [new PathNode([key])]));
26829
27169
  }
26830
27170
  optionalKey(key) {
26831
- return make22(compose(this.node, primitiveNode("Lens", (s) => s[key], (a, s) => {
27171
+ return make23(compose(this.node, primitiveNode("Lens", (s) => s[key], (a, s) => {
26832
27172
  const copy3 = cloneShallow(s);
26833
27173
  if (a === void 0) {
26834
27174
  if (Array.isArray(copy3) && typeof key === "number") {
@@ -26843,20 +27183,20 @@ var OptionalImpl = class {
26843
27183
  })));
26844
27184
  }
26845
27185
  check(...checks) {
26846
- return make22(compose(this.node, [new CheckNode(checks)]));
27186
+ return make23(compose(this.node, [new CheckNode(checks)]));
26847
27187
  }
26848
27188
  refine(refinement, annotations) {
26849
- return make22(compose(this.node, [new CheckNode([makeFilterByGuard(refinement, annotations)])]));
27189
+ return make23(compose(this.node, [new CheckNode([makeFilterByGuard(refinement, annotations)])]));
26850
27190
  }
26851
27191
  tag(tag4) {
26852
27192
  const err = fail2(new InvalidValue({
26853
27193
  expected: `${JSON.stringify(tag4)} tag`
26854
27194
  }));
26855
- return make22(compose(this.node, primitiveNode("Prism", (s) => s._tag === tag4 ? succeed2(s) : err, identity)));
27195
+ return make23(compose(this.node, primitiveNode("Prism", (s) => s._tag === tag4 ? succeed2(s) : err, identity)));
26856
27196
  }
26857
27197
  at(key, ..._rest) {
26858
27198
  const err = fail2(new Pointer([key], new MissingKey(void 0)));
26859
- return make22(compose(this.node, primitiveNode("Optional", (s) => Object.hasOwn(s, key) ? succeed2(s[key]) : err, (a, s) => {
27199
+ return make23(compose(this.node, primitiveNode("Optional", (s) => Object.hasOwn(s, key) ? succeed2(s[key]) : err, (a, s) => {
26860
27200
  if (Object.hasOwn(s, key)) {
26861
27201
  const copy3 = cloneShallow(s);
26862
27202
  assignProperty(copy3, key, a);
@@ -26962,7 +27302,7 @@ var PrismImpl = class extends OptionalImpl {
26962
27302
  return (s) => getOrElse2(map2(this.getResult(s), (a) => this.set(f(a))), () => s);
26963
27303
  }
26964
27304
  };
26965
- function make22(node) {
27305
+ function make23(node) {
26966
27306
  let op = node[0] ?? identityOperation;
26967
27307
  if (node.length > 1) {
26968
27308
  const kind = node.reduce((kind2, step) => composeKind(kind2, step.kind), "Iso");
@@ -27066,12 +27406,12 @@ function composeKind(a, b) {
27066
27406
  if (b === "Iso" || a === b) return a;
27067
27407
  return "Optional";
27068
27408
  }
27069
- var identityIso = /* @__PURE__ */ make22([]);
27409
+ var identityIso = /* @__PURE__ */ make23([]);
27070
27410
  function id() {
27071
27411
  return identityIso;
27072
27412
  }
27073
27413
 
27074
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/redacted.js
27414
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/redacted.js
27075
27415
  var redactedRegistry = /* @__PURE__ */ new WeakMap();
27076
27416
  var value = (self) => {
27077
27417
  if (redactedRegistry.has(self)) {
@@ -27081,10 +27421,10 @@ var value = (self) => {
27081
27421
  }
27082
27422
  };
27083
27423
 
27084
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Redacted.js
27085
- var TypeId21 = "~effect/data/Redacted";
27086
- var isRedacted = (u) => hasProperty(u, TypeId21);
27087
- var make23 = (value5, options) => {
27424
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Redacted.js
27425
+ var TypeId23 = "~effect/data/Redacted";
27426
+ var isRedacted = (u) => hasProperty(u, TypeId23);
27427
+ var make24 = (value5, options) => {
27088
27428
  const self = Object.create(Proto4);
27089
27429
  if (options?.label) {
27090
27430
  self.label = options.label;
@@ -27093,7 +27433,7 @@ var make23 = (value5, options) => {
27093
27433
  return self;
27094
27434
  };
27095
27435
  var Proto4 = {
27096
- [TypeId21]: {
27436
+ [TypeId23]: {
27097
27437
  _A: (_) => _
27098
27438
  },
27099
27439
  label: void 0,
@@ -27114,11 +27454,11 @@ var Proto4 = {
27114
27454
  var value2 = value;
27115
27455
  var makeEquivalence5 = (isEquivalent) => make2((x, y) => isEquivalent(value2(x), value2(y)));
27116
27456
 
27117
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Schema.js
27118
- var TypeId22 = TypeId20;
27457
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Schema.js
27458
+ var TypeId24 = TypeId22;
27119
27459
  function declareConstructor() {
27120
27460
  return (typeParameters, run2, annotations) => {
27121
- return make24(new Declaration(typeParameters.map(getAST), (typeParameters2) => run2(typeParameters2.map((ast) => make24(ast))), annotations));
27461
+ return make25(new Declaration(typeParameters.map(getAST), (typeParameters2) => run2(typeParameters2.map((ast) => make25(ast))), annotations));
27122
27462
  };
27123
27463
  }
27124
27464
  function declare(is5, annotations) {
@@ -27188,9 +27528,9 @@ function toStandardSchemaV1(self, options) {
27188
27528
  if (exit3) {
27189
27529
  return makeStandardResult(exit3);
27190
27530
  }
27191
- return new Promise((resolve2) => {
27531
+ return new Promise((resolve3) => {
27192
27532
  fiber3.addObserver((exit4) => {
27193
- resolve2(makeStandardResult(exit4));
27533
+ resolve3(makeStandardResult(exit4));
27194
27534
  });
27195
27535
  });
27196
27536
  };
@@ -27369,29 +27709,29 @@ function encodeUnknownSync2(schema, options) {
27369
27709
  };
27370
27710
  }
27371
27711
  var encodeSync2 = encodeUnknownSync2;
27372
- var make24 = make21;
27712
+ var make25 = make22;
27373
27713
  function isSchema(u) {
27374
- return hasProperty(u, TypeId22) && u[TypeId22] === TypeId22;
27714
+ return hasProperty(u, TypeId24) && u[TypeId24] === TypeId24;
27375
27715
  }
27376
- var optionalKey2 = /* @__PURE__ */ lambda((schema) => make24(optionalKey(schema.ast), {
27716
+ var optionalKey2 = /* @__PURE__ */ lambda((schema) => make25(optionalKey(schema.ast), {
27377
27717
  schema
27378
27718
  }));
27379
27719
  var requiredKey = /* @__PURE__ */ lambda((self) => self.schema);
27380
27720
  var optional2 = /* @__PURE__ */ lambda((self) => {
27381
27721
  const schema = UndefinedOr(self);
27382
- return make24(optional(self.ast), {
27722
+ return make25(optional(self.ast), {
27383
27723
  schema
27384
27724
  });
27385
27725
  });
27386
27726
  var required = /* @__PURE__ */ lambda((self) => self.schema.members[0]);
27387
- var mutableKey2 = /* @__PURE__ */ lambda((schema) => make24(mutableKey(schema.ast), {
27727
+ var mutableKey2 = /* @__PURE__ */ lambda((schema) => make25(mutableKey(schema.ast), {
27388
27728
  schema
27389
27729
  }));
27390
27730
  var readonlyKey = /* @__PURE__ */ lambda((self) => self.schema);
27391
- var toType2 = /* @__PURE__ */ lambda((schema) => make24(toType(schema.ast), {
27731
+ var toType2 = /* @__PURE__ */ lambda((schema) => make25(toType(schema.ast), {
27392
27732
  schema
27393
27733
  }));
27394
- var toEncoded2 = /* @__PURE__ */ lambda((schema) => make24(toEncoded(schema.ast), {
27734
+ var toEncoded2 = /* @__PURE__ */ lambda((schema) => make25(toEncoded(schema.ast), {
27395
27735
  schema
27396
27736
  }));
27397
27737
  var FlipTypeId = "~effect/Schema/flip";
@@ -27402,13 +27742,13 @@ function flip4(schema) {
27402
27742
  if (isFlip$(schema)) {
27403
27743
  return schema.schema.rebuild(flip3(schema.ast));
27404
27744
  }
27405
- return make24(flip3(schema.ast), {
27745
+ return make25(flip3(schema.ast), {
27406
27746
  [FlipTypeId]: FlipTypeId,
27407
27747
  schema
27408
27748
  });
27409
27749
  }
27410
27750
  function Literal2(literal2) {
27411
- const out = make24(new Literal(literal2), {
27751
+ const out = make25(new Literal(literal2), {
27412
27752
  literal: literal2,
27413
27753
  transform(to) {
27414
27754
  return out.pipe(decodeTo2(Literal2(to), {
@@ -27423,37 +27763,37 @@ function templateLiteralFromParts(parts2) {
27423
27763
  return new TemplateLiteral(parts2.map((part) => isSchema(part) ? part.ast : new Literal(part)));
27424
27764
  }
27425
27765
  function TemplateLiteral2(parts2) {
27426
- return make24(templateLiteralFromParts(parts2), {
27766
+ return make25(templateLiteralFromParts(parts2), {
27427
27767
  parts: parts2
27428
27768
  });
27429
27769
  }
27430
27770
  function TemplateLiteralParser(parts2) {
27431
- return make24(templateLiteralFromParts(parts2).asTemplateLiteralParser(), {
27771
+ return make25(templateLiteralFromParts(parts2).asTemplateLiteralParser(), {
27432
27772
  parts: parts2
27433
27773
  });
27434
27774
  }
27435
27775
  function Enum2(enums) {
27436
- return make24(new Enum(Object.keys(enums).filter((key) => typeof enums[enums[key]] !== "number").map((key) => [key, enums[key]])), {
27776
+ return make25(new Enum(Object.keys(enums).filter((key) => typeof enums[enums[key]] !== "number").map((key) => [key, enums[key]])), {
27437
27777
  enums
27438
27778
  });
27439
27779
  }
27440
- var Never2 = /* @__PURE__ */ make24(never3);
27441
- var Any2 = /* @__PURE__ */ make24(any);
27442
- var Unknown2 = /* @__PURE__ */ make24(unknown);
27443
- var Null2 = /* @__PURE__ */ make24(null_);
27444
- var Undefined2 = /* @__PURE__ */ make24(undefined_3);
27445
- var String5 = /* @__PURE__ */ make24(string2);
27446
- var Number6 = /* @__PURE__ */ make24(number2);
27447
- var Boolean4 = /* @__PURE__ */ make24(boolean);
27448
- var Symbol3 = /* @__PURE__ */ make24(symbol3);
27449
- var BigInt5 = /* @__PURE__ */ make24(bigInt);
27450
- var Void2 = /* @__PURE__ */ make24(void_5);
27451
- var ObjectKeyword2 = /* @__PURE__ */ make24(objectKeyword);
27780
+ var Never2 = /* @__PURE__ */ make25(never3);
27781
+ var Any2 = /* @__PURE__ */ make25(any);
27782
+ var Unknown2 = /* @__PURE__ */ make25(unknown);
27783
+ var Null2 = /* @__PURE__ */ make25(null_);
27784
+ var Undefined2 = /* @__PURE__ */ make25(undefined_3);
27785
+ var String5 = /* @__PURE__ */ make25(string2);
27786
+ var Number6 = /* @__PURE__ */ make25(number2);
27787
+ var Boolean4 = /* @__PURE__ */ make25(boolean);
27788
+ var Symbol3 = /* @__PURE__ */ make25(symbol3);
27789
+ var BigInt5 = /* @__PURE__ */ make25(bigInt);
27790
+ var Void2 = /* @__PURE__ */ make25(void_5);
27791
+ var ObjectKeyword2 = /* @__PURE__ */ make25(objectKeyword);
27452
27792
  function UniqueSymbol2(symbol6) {
27453
- return make24(new UniqueSymbol(symbol6));
27793
+ return make25(new UniqueSymbol(symbol6));
27454
27794
  }
27455
27795
  function makeStruct(ast, fields) {
27456
- return make24(ast, {
27796
+ return make25(ast, {
27457
27797
  fields,
27458
27798
  mapFields(f, options) {
27459
27799
  const fields2 = f(this.fields);
@@ -27529,19 +27869,19 @@ function extendTo(fields, derive) {
27529
27869
  };
27530
27870
  }
27531
27871
  function Record(key, value5) {
27532
- return make24(record(key.ast, value5.ast), {
27872
+ return make25(record(key.ast, value5.ast), {
27533
27873
  key,
27534
27874
  value: value5
27535
27875
  });
27536
27876
  }
27537
27877
  function StructWithRest(schema, records) {
27538
- return make24(structWithRest(schema.ast, records.map(getAST)), {
27878
+ return make25(structWithRest(schema.ast, records.map(getAST)), {
27539
27879
  schema,
27540
27880
  records
27541
27881
  });
27542
27882
  }
27543
27883
  function makeTuple(ast, elements) {
27544
- return make24(ast, {
27884
+ return make25(ast, {
27545
27885
  elements,
27546
27886
  mapElements(f, options) {
27547
27887
  const elements2 = f(this.elements);
@@ -27553,15 +27893,15 @@ function Tuple(elements) {
27553
27893
  return makeTuple(tuple(elements), elements);
27554
27894
  }
27555
27895
  function TupleWithRest(schema, rest) {
27556
- return make24(tupleWithRest(schema.ast, rest.map(getAST)), {
27896
+ return make25(tupleWithRest(schema.ast, rest.map(getAST)), {
27557
27897
  schema,
27558
27898
  rest
27559
27899
  });
27560
27900
  }
27561
- var ArraySchema = /* @__PURE__ */ lambda((schema) => make24(new Arrays(false, [], [schema.ast]), {
27901
+ var ArraySchema = /* @__PURE__ */ lambda((schema) => make25(new Arrays(false, [], [schema.ast]), {
27562
27902
  value: schema
27563
27903
  }));
27564
- var NonEmptyArray = /* @__PURE__ */ lambda((schema) => make24(new Arrays(false, [schema.ast], [schema.ast]), {
27904
+ var NonEmptyArray = /* @__PURE__ */ lambda((schema) => make25(new Arrays(false, [schema.ast], [schema.ast]), {
27565
27905
  value: schema
27566
27906
  }));
27567
27907
  function ArrayEnsure(schema) {
@@ -27574,12 +27914,12 @@ function UniqueArray(item) {
27574
27914
  return ArraySchema(item).check(isUnique());
27575
27915
  }
27576
27916
  var mutable = /* @__PURE__ */ lambda((schema) => {
27577
- return make24(new Arrays(true, schema.ast.elements, schema.ast.rest), {
27917
+ return make25(new Arrays(true, schema.ast.elements, schema.ast.rest), {
27578
27918
  schema
27579
27919
  });
27580
27920
  });
27581
27921
  function makeUnion(ast, members) {
27582
- return make24(ast, {
27922
+ return make25(ast, {
27583
27923
  members,
27584
27924
  mapMembers(f, options) {
27585
27925
  const members2 = f(this.members);
@@ -27592,7 +27932,7 @@ function Union2(members, options) {
27592
27932
  }
27593
27933
  function Literals(literals) {
27594
27934
  const members = literals.map(Literal2);
27595
- return make24(union2(members, "anyOf", void 0), {
27935
+ return make25(union2(members, "anyOf", void 0), {
27596
27936
  literals,
27597
27937
  members,
27598
27938
  mapMembers(f) {
@@ -27610,18 +27950,18 @@ var NullOr = /* @__PURE__ */ lambda((self) => Union2([self, Null2]));
27610
27950
  var UndefinedOr = /* @__PURE__ */ lambda((self) => Union2([self, Undefined2]));
27611
27951
  var NullishOr = /* @__PURE__ */ lambda((self) => Union2([self, Null2, Undefined2]));
27612
27952
  function suspend3(f) {
27613
- return make24(new Suspend(() => f().ast));
27953
+ return make25(new Suspend(() => f().ast));
27614
27954
  }
27615
27955
  function check(...checks) {
27616
27956
  return (self) => self.check(...checks);
27617
27957
  }
27618
27958
  function refine(refinement, annotations) {
27619
- return (schema) => make24(appendChecks(schema.ast, [makeFilterByGuard(refinement, annotations)]), {
27959
+ return (schema) => make25(appendChecks(schema.ast, [makeFilterByGuard(refinement, annotations)]), {
27620
27960
  schema
27621
27961
  });
27622
27962
  }
27623
27963
  function brand2(identifier2) {
27624
- return (schema) => make24(brand(schema.ast, identifier2), {
27964
+ return (schema) => make25(brand(schema.ast, identifier2), {
27625
27965
  schema,
27626
27966
  identifier: identifier2
27627
27967
  });
@@ -27632,12 +27972,12 @@ function fromBrand(identifier2, ctor) {
27632
27972
  };
27633
27973
  }
27634
27974
  function middlewareDecoding2(decode4) {
27635
- return (schema) => make24(middlewareDecoding(schema.ast, new Middleware(decode4, identity)), {
27975
+ return (schema) => make25(middlewareDecoding(schema.ast, new Middleware(decode4, identity)), {
27636
27976
  schema
27637
27977
  });
27638
27978
  }
27639
27979
  function middlewareEncoding2(encode4) {
27640
- return (schema) => make24(middlewareEncoding(schema.ast, new Middleware(identity, encode4)), {
27980
+ return (schema) => make25(middlewareEncoding(schema.ast, new Middleware(identity, encode4)), {
27641
27981
  schema
27642
27982
  });
27643
27983
  }
@@ -27655,7 +27995,7 @@ function catchEncodingWithContext(f) {
27655
27995
  }
27656
27996
  function decodeTo2(to, transformation) {
27657
27997
  return (from) => {
27658
- return make24(decodeTo(from.ast, to.ast, transformation ? make15(transformation) : passthrough3()), {
27998
+ return make25(decodeTo(from.ast, to.ast, transformation ? make15(transformation) : passthrough3()), {
27659
27999
  from,
27660
28000
  to
27661
28001
  });
@@ -27677,7 +28017,7 @@ function encode(transformation) {
27677
28017
  };
27678
28018
  }
27679
28019
  function withConstructorDefault2(defaultValue) {
27680
- return (schema) => make24(withConstructorDefault(schema.ast, defaultValue), {
28020
+ return (schema) => make25(withConstructorDefault(schema.ast, defaultValue), {
27681
28021
  schema
27682
28022
  });
27683
28023
  }
@@ -27794,7 +28134,7 @@ function TaggedUnion(casesByTag) {
27794
28134
  isAnyOf,
27795
28135
  match: match9
27796
28136
  } = toTaggedUnion("_tag")(union7);
27797
- return make24(union7.ast, {
28137
+ return make25(union7.ast, {
27798
28138
  cases,
27799
28139
  isAnyOf,
27800
28140
  guards,
@@ -28216,7 +28556,7 @@ function isUncapitalized(annotations) {
28216
28556
  var isUncapitalizedReviver = /* @__PURE__ */ makeFilterReviver("effect/schema/isUncapitalized", Null2, ({
28217
28557
  annotations
28218
28558
  }) => isUncapitalized(annotations));
28219
- var Finite = /* @__PURE__ */ make24(finite);
28559
+ var Finite = /* @__PURE__ */ make25(finite);
28220
28560
  var isFinite3 = isFinite2;
28221
28561
  var isFiniteReviver = /* @__PURE__ */ makeFilterReviver("effect/schema/isFinite", Null2, ({
28222
28562
  annotations
@@ -29200,7 +29540,7 @@ function Option(value5) {
29200
29540
  onSome: (t) => `some(${value6(t)})`
29201
29541
  })
29202
29542
  });
29203
- return make24(schema.ast, {
29543
+ return make25(schema.ast, {
29204
29544
  value: value5
29205
29545
  });
29206
29546
  }
@@ -29291,7 +29631,7 @@ function Result(success2, failure) {
29291
29631
  onFailure: (t) => `failure(${failure2(t)})`
29292
29632
  })
29293
29633
  });
29294
- return make24(schema.ast, {
29634
+ return make25(schema.ast, {
29295
29635
  success: success2,
29296
29636
  failure
29297
29637
  });
@@ -29357,23 +29697,23 @@ function Redacted(value5, options) {
29357
29697
  }),
29358
29698
  expected: "Redacted",
29359
29699
  toCodecJson: ([value6]) => link()(value6, {
29360
- decode: transform((e) => make23(e, {
29700
+ decode: transform((e) => make24(e, {
29361
29701
  label
29362
29702
  })),
29363
29703
  encode: disallowJsonEncode ? forbidden((oe) => "Cannot serialize Redacted" + (isSome2(oe) && typeof oe.value.label === "string" ? ` with label: "${oe.value.label}"` : "")) : transform(value2)
29364
29704
  }),
29365
29705
  toArbitrary: ([value6]) => () => ({
29366
- arbitrary: value6.arbitrary.map((a) => make23(a, {
29706
+ arbitrary: value6.arbitrary.map((a) => make24(a, {
29367
29707
  label
29368
29708
  })),
29369
- terminal: value6.terminal?.map((a) => make23(a, {
29709
+ terminal: value6.terminal?.map((a) => make24(a, {
29370
29710
  label
29371
29711
  }))
29372
29712
  }),
29373
29713
  toFormatter: () => globalThis.String,
29374
29714
  toEquivalence: ([value6]) => makeEquivalence5(value6)
29375
29715
  });
29376
- return make24(schema.ast, {
29716
+ return make25(schema.ast, {
29377
29717
  value: value5
29378
29718
  });
29379
29719
  }
@@ -29390,7 +29730,7 @@ function RedactedFromValue(value5, options) {
29390
29730
  label: options?.label,
29391
29731
  disallowJsonEncode: options?.disallowEncode
29392
29732
  }), {
29393
- decode: transform((t) => make23(t, {
29733
+ decode: transform((t) => make24(t, {
29394
29734
  label: options?.label
29395
29735
  })),
29396
29736
  encode: options?.disallowEncode ? forbidden((oe) => "Cannot encode Redacted" + (isSome2(oe) && typeof oe.value.label === "string" ? ` with label: "${oe.value.label}"` : "")) : transform(value2)
@@ -29454,7 +29794,7 @@ function CauseReason(error3, defect) {
29454
29794
  toEquivalence: ([error4, defect2]) => causeReasonToEquivalence(error4, defect2),
29455
29795
  toFormatter: ([error4, defect2]) => causeReasonToFormatter(error4, defect2)
29456
29796
  });
29457
- return make24(schema.ast, {
29797
+ return make25(schema.ast, {
29458
29798
  error: error3,
29459
29799
  defect
29460
29800
  });
@@ -29535,7 +29875,7 @@ function Cause(error3, defect) {
29535
29875
  toEquivalence: ([error4, defect2]) => causeToEquivalence(error4, defect2),
29536
29876
  toFormatter: ([error4, defect2]) => causeToFormatter(error4, defect2)
29537
29877
  });
29538
- return make24(schema.ast, {
29878
+ return make25(schema.ast, {
29539
29879
  error: error3,
29540
29880
  defect
29541
29881
  });
@@ -29712,7 +30052,7 @@ function Exit(value5, error3, defect) {
29712
30052
  };
29713
30053
  }
29714
30054
  });
29715
- return make24(schema.ast, {
30055
+ return make25(schema.ast, {
29716
30056
  value: value5,
29717
30057
  error: error3,
29718
30058
  defect
@@ -29806,7 +30146,7 @@ function ReadonlyMap(key, value5) {
29806
30146
  return `ReadonlyMap(${size6}) { ${entries3.join(", ")} }`;
29807
30147
  }
29808
30148
  });
29809
- return make24(schema.ast, {
30149
+ return make25(schema.ast, {
29810
30150
  key,
29811
30151
  value: value5
29812
30152
  });
@@ -29818,6 +30158,157 @@ var ReadonlyMapReviver = /* @__PURE__ */ makeDeclarationReviver("effect/schema/R
29818
30158
  const schema = ReadonlyMap(typeParameters[0], typeParameters[1]);
29819
30159
  return annotations === void 0 ? schema : schema.annotate(annotations);
29820
30160
  });
30161
+ function graphEncodedSchema(type3, node, edge) {
30162
+ return Struct({
30163
+ type: Literal2(type3),
30164
+ nodes: ArraySchema(Struct({
30165
+ index: Natural,
30166
+ data: node
30167
+ })),
30168
+ edges: ArraySchema(Struct({
30169
+ index: Natural,
30170
+ source: Natural,
30171
+ target: Natural,
30172
+ data: edge
30173
+ }))
30174
+ });
30175
+ }
30176
+ function graphDecode(input, options) {
30177
+ let previous = -1;
30178
+ const indexes = /* @__PURE__ */ new Set();
30179
+ for (let i = 0; i < input.nodes.length; i++) {
30180
+ const index2 = input.nodes[i].index;
30181
+ if (index2 <= previous) {
30182
+ return fail6(new Pointer(["nodes", i, "index"], new InvalidValue({
30183
+ expected: "a strictly increasing node index"
30184
+ }, index2, options)));
30185
+ }
30186
+ previous = index2;
30187
+ indexes.add(index2);
30188
+ }
30189
+ previous = -1;
30190
+ for (let i = 0; i < input.edges.length; i++) {
30191
+ const edge = input.edges[i];
30192
+ if (edge.index <= previous) {
30193
+ return fail6(new Pointer(["edges", i, "index"], new InvalidValue({
30194
+ expected: "a strictly increasing edge index"
30195
+ }, edge.index, options)));
30196
+ }
30197
+ previous = edge.index;
30198
+ if (!indexes.has(edge.source)) {
30199
+ return fail6(new Pointer(["edges", i, "source"], new InvalidValue({
30200
+ expected: "an encoded node index"
30201
+ }, edge.source, options)));
30202
+ }
30203
+ if (!indexes.has(edge.target)) {
30204
+ return fail6(new Pointer(["edges", i, "target"], new InvalidValue({
30205
+ expected: "an encoded node index"
30206
+ }, edge.target, options)));
30207
+ }
30208
+ }
30209
+ return succeed6(hydrate(input));
30210
+ }
30211
+ function graphEncode(input, type3, options) {
30212
+ if (!isGraph(input) || input.mutable || input.type !== type3) {
30213
+ return fail6(new InvalidValue({
30214
+ expected: `an immutable ${type3} Graph`
30215
+ }, input, options));
30216
+ }
30217
+ return succeed6(snapshot(input));
30218
+ }
30219
+ function graphToEquivalence(node, edge) {
30220
+ return (self, that) => {
30221
+ const a = snapshot(self);
30222
+ const b = snapshot(that);
30223
+ if (a.type !== b.type || a.nodes.length !== b.nodes.length || a.edges.length !== b.edges.length) return false;
30224
+ for (let i = 0; i < a.nodes.length; i++) {
30225
+ if (a.nodes[i].index !== b.nodes[i].index || !node(a.nodes[i].data, b.nodes[i].data)) return false;
30226
+ }
30227
+ for (let i = 0; i < a.edges.length; i++) {
30228
+ const ae = a.edges[i];
30229
+ const be = b.edges[i];
30230
+ const sameEndpoints = a.type === "directed" ? ae.source === be.source && ae.target === be.target : ae.source === be.source && ae.target === be.target || ae.source === be.target && ae.target === be.source;
30231
+ if (ae.index !== be.index || !sameEndpoints || !edge(ae.data, be.data)) return false;
30232
+ }
30233
+ return true;
30234
+ };
30235
+ }
30236
+ function graphToArbitrary(type3, node, edge) {
30237
+ return (fc, ctx) => {
30238
+ const empty8 = hydrate({
30239
+ type: type3,
30240
+ nodes: [],
30241
+ edges: []
30242
+ });
30243
+ const terminal = fc.constant(empty8);
30244
+ const arbitrary = fc.array(node.arbitrary).chain((values3) => {
30245
+ const nodes = values3.map((data, index2) => ({
30246
+ index: index2,
30247
+ data
30248
+ }));
30249
+ if (nodes.length === 0) return terminal;
30250
+ const endpoint = fc.integer({
30251
+ min: 0,
30252
+ max: nodes.length - 1
30253
+ });
30254
+ return fc.array(fc.tuple(endpoint, endpoint, edge.arbitrary)).map((values4) => hydrate({
30255
+ type: type3,
30256
+ nodes,
30257
+ edges: values4.map(([source, target, data], index2) => ({
30258
+ index: index2,
30259
+ source,
30260
+ target,
30261
+ data
30262
+ }))
30263
+ }));
30264
+ });
30265
+ return withRecursion(fc, ctx, terminal, arbitrary);
30266
+ };
30267
+ }
30268
+ function Graph(type3, node, edge) {
30269
+ const schema = declareConstructor()([node, edge], ([node2, edge2]) => {
30270
+ const encoded = graphEncodedSchema(type3, node2, edge2);
30271
+ return (input, ast, options) => {
30272
+ if (!isGraph(input) || input.mutable || input.type !== type3) {
30273
+ return fail6(new InvalidType(ast, input, options));
30274
+ }
30275
+ return flatMap5(decodeUnknownEffect(encoded)(snapshot(input), options), (snapshot2) => graphDecode(snapshot2, options));
30276
+ };
30277
+ }, {
30278
+ representation: {
30279
+ id: "effect/schema/Graph",
30280
+ payload: type3
30281
+ },
30282
+ toCode: ({
30283
+ typeParameters
30284
+ }) => ({
30285
+ runtime: `Schema.Graph(${format(type3)}, ${typeParameters[0].runtime}, ${typeParameters[1].runtime})`,
30286
+ Type: `Graph.Graph<${typeParameters[0].Type}, ${typeParameters[1].Type}, ${format(type3)}>`,
30287
+ importDeclarations: [`import * as Graph from "effect/Graph"`]
30288
+ }),
30289
+ expected: `an immutable ${type3} Graph`,
30290
+ toCodec: ([node2, edge2]) => link()(graphEncodedSchema(type3, node2, edge2), transformOrFail2({
30291
+ decode: graphDecode,
30292
+ encode: (graph, options) => graphEncode(graph, type3, options)
30293
+ })),
30294
+ toArbitrary: ([node2, edge2]) => graphToArbitrary(type3, node2, edge2),
30295
+ toEquivalence: ([node2, edge2]) => graphToEquivalence(node2, edge2),
30296
+ toFormatter: () => globalThis.String
30297
+ });
30298
+ return make25(schema.ast, {
30299
+ type: type3,
30300
+ node,
30301
+ edge
30302
+ });
30303
+ }
30304
+ var GraphReviver = /* @__PURE__ */ makeDeclarationReviver("effect/schema/Graph", /* @__PURE__ */ Literals(["directed", "undirected"]), ({
30305
+ annotations,
30306
+ payload,
30307
+ typeParameters
30308
+ }) => {
30309
+ const schema = Graph(payload, typeParameters[0], typeParameters[1]);
30310
+ return annotations === void 0 ? schema : schema.annotate(annotations);
30311
+ });
29821
30312
  function HashMap(key, value5) {
29822
30313
  const schema = declareConstructor()([key, value5], ([key2, value6]) => {
29823
30314
  const entries3 = ArraySchema(Tuple([key2, value6]));
@@ -29858,7 +30349,7 @@ function HashMap(key, value5) {
29858
30349
  return `HashMap(${size6}) { ${entries3.join(", ")} }`;
29859
30350
  }
29860
30351
  });
29861
- return make24(schema.ast, {
30352
+ return make25(schema.ast, {
29862
30353
  key,
29863
30354
  value: value5
29864
30355
  });
@@ -29909,7 +30400,7 @@ function ReadonlySet(value5) {
29909
30400
  return `ReadonlySet(${size6}) { ${values3.join(", ")} }`;
29910
30401
  }
29911
30402
  });
29912
- return make24(schema.ast, {
30403
+ return make25(schema.ast, {
29913
30404
  value: value5
29914
30405
  });
29915
30406
  }
@@ -29959,7 +30450,7 @@ function HashSet(value5) {
29959
30450
  return `HashSet(${size6}) { ${values3.join(", ")} }`;
29960
30451
  }
29961
30452
  });
29962
- return make24(schema.ast, {
30453
+ return make25(schema.ast, {
29963
30454
  value: value5
29964
30455
  });
29965
30456
  }
@@ -30009,7 +30500,7 @@ function Chunk(value5) {
30009
30500
  return `Chunk(${size6}) { ${values3.join(", ")} }`;
30010
30501
  }
30011
30502
  });
30012
- return make24(schema.ast, {
30503
+ return make25(schema.ast, {
30013
30504
  value: value5
30014
30505
  });
30015
30506
  }
@@ -30399,7 +30890,7 @@ var NumberFromString = /* @__PURE__ */ String5.annotate({
30399
30890
  var FiniteFromString = /* @__PURE__ */ String5.annotate({
30400
30891
  expected: "a string that will be decoded as a finite number"
30401
30892
  }).pipe(/* @__PURE__ */ decodeTo2(Finite, numberFromString));
30402
- var BigIntFromString = /* @__PURE__ */ make24(bigIntString).pipe(/* @__PURE__ */ decodeTo2(BigInt5, bigintFromString));
30893
+ var BigIntFromString = /* @__PURE__ */ make25(bigIntString).pipe(/* @__PURE__ */ decodeTo2(BigInt5, bigintFromString));
30403
30894
  var Trimmed = /* @__PURE__ */ String5.check(/* @__PURE__ */ isTrimmed());
30404
30895
  var Trim = /* @__PURE__ */ String5.annotate({
30405
30896
  expected: "a string that will be decoded as a trimmed string"
@@ -30602,7 +31093,7 @@ function makeClass(Inherited, identifier2, struct2, annotations, proto) {
30602
31093
  }
30603
31094
  });
30604
31095
  }
30605
- static [TypeId22] = TypeId22;
31096
+ static [TypeId24] = TypeId24;
30606
31097
  get [ClassTypeId]() {
30607
31098
  return ClassTypeId;
30608
31099
  }
@@ -30678,7 +31169,7 @@ function getClassSchemaFactory(from, identifier2, annotations) {
30678
31169
  const ClassTypeId = getClassTypeId(identifier2);
30679
31170
  const isClassValue = (input) => input instanceof self || hasProperty(input, ClassTypeId);
30680
31171
  const transformation = getClassTransformation(self);
30681
- const to = make24(new Declaration([from.ast], () => (input, ast, options) => {
31172
+ const to = make25(new Declaration([from.ast], () => (input, ast, options) => {
30682
31173
  return isClassValue(input) ? succeed6(input) : fail6(new InvalidType(ast, input, options));
30683
31174
  }, {
30684
31175
  identifier: identifier2,
@@ -30790,9 +31281,9 @@ function toFormatter(schema, options) {
30790
31281
  }
30791
31282
  }
30792
31283
  if (rest.length > 0) {
30793
- const [head2, ...tail2] = rest;
31284
+ const [head4, ...tail2] = rest;
30794
31285
  for (; i < t.length - tail2.length; i++) {
30795
- out.push(head2(t[i]));
31286
+ out.push(head4(t[i]));
30796
31287
  }
30797
31288
  for (let j = 0; j < tail2.length; j++) {
30798
31289
  out.push(tail2[j](t[i + j]));
@@ -30862,15 +31353,15 @@ function overrideToEquivalence(toEquivalence3) {
30862
31353
  function toEquivalence2(schema) {
30863
31354
  return toEquivalence(schema.ast);
30864
31355
  }
30865
- function toRepresentation2(schema) {
30866
- return toRepresentation(schema.ast);
31356
+ function toRepresentation2(schema, options) {
31357
+ return toRepresentation(schema.ast, options);
30867
31358
  }
30868
31359
  function toJsonSchemaDocument2(schema, options) {
30869
- const document = toRepresentation(toCodecJsonAST(schema.ast), toRepresentationOptions);
31360
+ const document = toRepresentation(toCodecJsonAST(schema.ast), options);
30870
31361
  return toJsonSchemaDocument(document, options);
30871
31362
  }
30872
31363
  function toCodecJson(schema) {
30873
- return make24(toCodecJsonAST(schema.ast), {
31364
+ return make25(toCodecJsonAST(schema.ast), {
30874
31365
  schema
30875
31366
  });
30876
31367
  }
@@ -30926,7 +31417,7 @@ function toCodecJsonASTStep(ast, recur3) {
30926
31417
  if (!isFunction(getLink)) {
30927
31418
  return replaceEncoding(ast, [unknownToJson]);
30928
31419
  }
30929
- const typeParameters = ast.typeParameters.map((tp) => make21(toEncoded(tp)));
31420
+ const typeParameters = ast.typeParameters.map((tp) => make22(toEncoded(tp)));
30930
31421
  const link2 = getLink(typeParameters);
30931
31422
  return link2 === void 0 ? ast : replaceEncoding(ast, [mapLink(link2, recur3)]);
30932
31423
  }
@@ -30961,7 +31452,7 @@ function toCodecJsonASTStep(ast, recur3) {
30961
31452
  return ast;
30962
31453
  }
30963
31454
  function toCodecIso(schema) {
30964
- return make24(toCodecIsoAST(toType(schema.ast)));
31455
+ return make25(toCodecIsoAST(toType(schema.ast)));
30965
31456
  }
30966
31457
  var toCodecIsoAST = /* @__PURE__ */ memoize((ast) => {
30967
31458
  const out = toCodecIsoASTStep(ast, toCodecIsoAST);
@@ -30972,7 +31463,7 @@ function toCodecIsoASTStep(ast, recur3) {
30972
31463
  case "Declaration": {
30973
31464
  const getLink = ast.annotations?.toCodecIso ?? ast.annotations?.toCodec;
30974
31465
  if (isFunction(getLink)) {
30975
- const link2 = getLink(ast.typeParameters.map((tp) => make21(tp)));
31466
+ const link2 = getLink(ast.typeParameters.map((tp) => make22(tp)));
30976
31467
  return replaceEncoding(ast, [mapLink(link2, recur3)]);
30977
31468
  }
30978
31469
  return ast;
@@ -30986,12 +31477,12 @@ function toCodecIsoASTStep(ast, recur3) {
30986
31477
  return ast;
30987
31478
  }
30988
31479
  function toCodecStringTree(schema) {
30989
- return make24(toCodecStringTreeAST(schema.ast), {
31480
+ return make25(toCodecStringTreeAST(schema.ast), {
30990
31481
  schema
30991
31482
  });
30992
31483
  }
30993
31484
  function toCodecArrayFromSingle(schema) {
30994
- return make24(toCodecArrayFromSingleAST(schema.ast));
31485
+ return make25(toCodecArrayFromSingleAST(schema.ast));
30995
31486
  }
30996
31487
  function toEncoderXml(codec2, options) {
30997
31488
  const rootName = resolveIdentifier(codec2.ast) ?? resolveTitle(codec2.ast);
@@ -31106,7 +31597,7 @@ var toStringTreeReorder = /* @__PURE__ */ makeReorder((ast) => {
31106
31597
  function toCodecStringTreeASTStep(ast, recur3, onMissingAnnotation) {
31107
31598
  switch (ast._tag) {
31108
31599
  case "Declaration": {
31109
- const typeParameters = ast.typeParameters.map((tp) => make24(recur3(toEncoded(tp))));
31600
+ const typeParameters = ast.typeParameters.map((tp) => make25(recur3(toEncoded(tp))));
31110
31601
  const getStringTreeLink = ast.annotations?.toCodecStringTree;
31111
31602
  if (isFunction(getStringTreeLink)) {
31112
31603
  const link3 = getStringTreeLink(typeParameters);
@@ -31259,7 +31750,7 @@ function toIsoFocus(_) {
31259
31750
  }
31260
31751
  function overrideToCodecIso(to, transformation) {
31261
31752
  return (schema) => {
31262
- return make24(annotate(schema.ast, {
31753
+ return make25(annotate(schema.ast, {
31263
31754
  toCodecIso: () => new Link(to.ast, make15(transformation))
31264
31755
  }), {
31265
31756
  schema
@@ -31286,12 +31777,13 @@ function Tree(node) {
31286
31777
  const Tree2 = Union2([node, ArraySchema(Tree$ref), Record(String5, Tree$ref)]);
31287
31778
  return Tree2;
31288
31779
  }
31289
- var Json2 = /* @__PURE__ */ make24(/* @__PURE__ */ annotate(Json, {
31780
+ var Json2 = /* @__PURE__ */ make25(/* @__PURE__ */ annotate(Json, {
31290
31781
  toCode: () => ({
31291
31782
  runtime: "Schema.Json",
31292
31783
  Type: "Schema.Json"
31293
31784
  })
31294
31785
  }));
31786
+ var JsonObject = /* @__PURE__ */ Record(String5, Json2);
31295
31787
  var JsonReviver = /* @__PURE__ */ makeFixedDeclarationReviver("effect/schema/Json", Json2);
31296
31788
  var JsonError = /* @__PURE__ */ Struct({
31297
31789
  message: String5,
@@ -31299,7 +31791,7 @@ var JsonError = /* @__PURE__ */ Struct({
31299
31791
  stack: /* @__PURE__ */ optionalKey2(String5),
31300
31792
  cause: /* @__PURE__ */ optionalKey2(Json2)
31301
31793
  });
31302
- var MutableJson2 = /* @__PURE__ */ make24(/* @__PURE__ */ annotate(MutableJson, {
31794
+ var MutableJson2 = /* @__PURE__ */ make25(/* @__PURE__ */ annotate(MutableJson, {
31303
31795
  toCode: () => ({
31304
31796
  runtime: "Schema.MutableJson",
31305
31797
  Type: "Schema.MutableJson"
@@ -31313,7 +31805,7 @@ function resolveAnnotationsKey(schema) {
31313
31805
  return schema.ast.context?.annotations;
31314
31806
  }
31315
31807
 
31316
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Console.js
31808
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Console.js
31317
31809
  var Console_exports = {};
31318
31810
  __export(Console_exports, {
31319
31811
  Console: () => Console,
@@ -31410,7 +31902,7 @@ var withTime = /* @__PURE__ */ dual((args2) => isEffect(args2[0]), (self, label)
31410
31902
  console2.timeEnd(label);
31411
31903
  }))));
31412
31904
 
31413
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Match.js
31905
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Match.js
31414
31906
  var Match_exports = {};
31415
31907
  __export(Match_exports, {
31416
31908
  any: () => any3,
@@ -31423,6 +31915,7 @@ __export(Match_exports, {
31423
31915
  discriminators: () => discriminators2,
31424
31916
  discriminatorsExhaustive: () => discriminatorsExhaustive2,
31425
31917
  exhaustive: () => exhaustive2,
31918
+ fn: () => fn4,
31426
31919
  instanceOf: () => instanceOf3,
31427
31920
  instanceOfUnsafe: () => instanceOfUnsafe,
31428
31921
  is: () => is4,
@@ -31452,35 +31945,38 @@ __export(Match_exports, {
31452
31945
  withReturnType: () => withReturnType2
31453
31946
  });
31454
31947
 
31455
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/matcher.js
31456
- var TypeId23 = "~effect/match/Match/Matcher";
31948
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/matcher.js
31949
+ var TypeId25 = "~effect/match/Match/Matcher";
31457
31950
  var TypeMatcherProto = {
31458
- [TypeId23]: {
31951
+ [TypeId25]: {
31459
31952
  _input: identity,
31460
31953
  _filters: identity,
31461
31954
  _remaining: identity,
31462
31955
  _result: identity,
31463
- _return: identity
31956
+ _return: identity,
31957
+ _args: identity
31464
31958
  },
31465
31959
  _tag: "TypeMatcher",
31466
31960
  add(_case) {
31467
- return makeTypeMatcher([...this.cases, _case]);
31961
+ return makeTypeMatcher(this.select, [...this.cases, _case]);
31468
31962
  },
31469
31963
  pipe() {
31470
31964
  return pipeArguments(this, arguments);
31471
31965
  }
31472
31966
  };
31473
- function makeTypeMatcher(cases) {
31967
+ function makeTypeMatcher(select, cases) {
31474
31968
  const matcher = Object.create(TypeMatcherProto);
31969
+ matcher.select = select;
31475
31970
  matcher.cases = cases;
31476
31971
  return matcher;
31477
31972
  }
31478
31973
  var ValueMatcherProto = {
31479
- [TypeId23]: {
31974
+ [TypeId25]: {
31480
31975
  _input: identity,
31481
31976
  _filters: identity,
31482
31977
  _result: identity,
31483
- _return: identity
31978
+ _return: identity,
31979
+ _flavor: identity
31484
31980
  },
31485
31981
  _tag: "ValueMatcher",
31486
31982
  add(_case) {
@@ -31573,14 +32069,15 @@ var makeAndPredicate = (patterns) => {
31573
32069
  return true;
31574
32070
  };
31575
32071
  };
31576
- var type = () => makeTypeMatcher([]);
32072
+ var type = () => makeTypeMatcher(identity, []);
32073
+ var fn3 = (select) => makeTypeMatcher(select, []);
31577
32074
  var value3 = (i) => makeValueMatcher(i, fail2(i));
31578
32075
  var valueTags = /* @__PURE__ */ dual(2, (input, fields) => {
31579
- const match9 = tagsExhaustive(fields)(makeTypeMatcher([]));
32076
+ const match9 = tagsExhaustive(fields)(makeTypeMatcher(identity, []));
31580
32077
  return match9(input);
31581
32078
  });
31582
32079
  var typeTags = () => (fields) => {
31583
- const match9 = tagsExhaustive(fields)(makeTypeMatcher([]));
32080
+ const match9 = tagsExhaustive(fields)(makeTypeMatcher(identity, []));
31584
32081
  return (input) => match9(input);
31585
32082
  };
31586
32083
  var withReturnType = () => (self) => self;
@@ -31638,9 +32135,9 @@ var orElse2 = (f) => (self) => {
31638
32135
  if (isResult2(toResult)) {
31639
32136
  return toResult._tag === "Success" ? toResult.success : f(toResult.failure);
31640
32137
  }
31641
- return (input) => {
31642
- const a = toResult(input);
31643
- return isSuccess2(a) ? a.success : f(a.failure);
32138
+ return (...args2) => {
32139
+ const a = toResult(...args2);
32140
+ return isSuccess2(a) ? a.success : f(a.failure, ...args2);
31644
32141
  };
31645
32142
  };
31646
32143
  var orElseAbsurd = (self) => orElse2(() => {
@@ -31653,22 +32150,24 @@ var result3 = (self) => {
31653
32150
  const len = self.cases.length;
31654
32151
  if (len === 1) {
31655
32152
  const _case = self.cases[0];
31656
- return (input) => {
32153
+ return (...args2) => {
32154
+ const input = self.select(...args2);
31657
32155
  if (_case._tag === "When" && _case.guard(input) === true) {
31658
- return succeed2(_case.evaluate(input));
32156
+ return succeed2(_case.evaluate(input, ...args2));
31659
32157
  } else if (_case._tag === "Not" && _case.guard(input) === false) {
31660
- return succeed2(_case.evaluate(input));
32158
+ return succeed2(_case.evaluate(input, ...args2));
31661
32159
  }
31662
32160
  return fail2(input);
31663
32161
  };
31664
32162
  }
31665
- return (input) => {
32163
+ return (...args2) => {
32164
+ const input = self.select(...args2);
31666
32165
  for (let i = 0; i < len; i++) {
31667
32166
  const _case = self.cases[i];
31668
32167
  if (_case._tag === "When" && _case.guard(input) === true) {
31669
- return succeed2(_case.evaluate(input));
32168
+ return succeed2(_case.evaluate(input, ...args2));
31670
32169
  } else if (_case._tag === "Not" && _case.guard(input) === false) {
31671
- return succeed2(_case.evaluate(input));
32170
+ return succeed2(_case.evaluate(input, ...args2));
31672
32171
  }
31673
32172
  }
31674
32173
  return fail2(input);
@@ -31682,7 +32181,7 @@ var option3 = (self) => {
31682
32181
  onSuccess: some2
31683
32182
  });
31684
32183
  }
31685
- return (input) => match2(toResult(input), {
32184
+ return (...args2) => match2(toResult(...args2), {
31686
32185
  onFailure: () => none2(),
31687
32186
  onSuccess: some2
31688
32187
  });
@@ -31696,8 +32195,8 @@ var exhaustive = (self) => {
31696
32195
  }
31697
32196
  throw new Error(getExhaustiveAbsurdErrorMessage);
31698
32197
  }
31699
- return (u) => {
31700
- const result5 = toResult(u);
32198
+ return (...args2) => {
32199
+ const result5 = toResult(...args2);
31701
32200
  if (isSuccess2(result5)) {
31702
32201
  return result5.success;
31703
32202
  }
@@ -31705,8 +32204,9 @@ var exhaustive = (self) => {
31705
32204
  };
31706
32205
  };
31707
32206
 
31708
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Match.js
32207
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Match.js
31709
32208
  var type2 = type;
32209
+ var fn4 = fn3;
31710
32210
  var value4 = value3;
31711
32211
  var valueTags2 = valueTags;
31712
32212
  var typeTags2 = typeTags;
@@ -31744,7 +32244,7 @@ var result4 = result3;
31744
32244
  var option4 = option3;
31745
32245
  var exhaustive2 = exhaustive;
31746
32246
 
31747
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Ref.js
32247
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Ref.js
31748
32248
  var Ref_exports = {};
31749
32249
  __export(Ref_exports, {
31750
32250
  get: () => get6,
@@ -31752,7 +32252,7 @@ __export(Ref_exports, {
31752
32252
  getAndUpdate: () => getAndUpdate,
31753
32253
  getAndUpdateSome: () => getAndUpdateSome,
31754
32254
  getUnsafe: () => getUnsafe6,
31755
- make: () => make25,
32255
+ make: () => make26,
31756
32256
  makeUnsafe: () => makeUnsafe5,
31757
32257
  modify: () => modify4,
31758
32258
  modifySome: () => modifySome,
@@ -31763,9 +32263,9 @@ __export(Ref_exports, {
31763
32263
  updateSome: () => updateSome,
31764
32264
  updateSomeAndGet: () => updateSomeAndGet
31765
32265
  });
31766
- var TypeId24 = "~effect/Ref";
32266
+ var TypeId26 = "~effect/Ref";
31767
32267
  var RefProto = {
31768
- [TypeId24]: {
32268
+ [TypeId26]: {
31769
32269
  _A: identity
31770
32270
  },
31771
32271
  ...PipeInspectableProto,
@@ -31781,7 +32281,7 @@ var makeUnsafe5 = (value5) => {
31781
32281
  self.ref = make16(value5);
31782
32282
  return self;
31783
32283
  };
31784
- var make25 = (value5) => sync3(() => makeUnsafe5(value5));
32284
+ var make26 = (value5) => sync3(() => makeUnsafe5(value5));
31785
32285
  var get6 = (self) => sync3(() => self.ref.current);
31786
32286
  var set4 = /* @__PURE__ */ dual(2, (self, value5) => sync3(() => set(self.ref, value5)));
31787
32287
  var getAndSet = /* @__PURE__ */ dual(2, (self, value5) => sync3(() => {
@@ -35015,7 +35515,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
35015
35515
  });
35016
35516
  }
35017
35517
  const params = { errorMap: ctx.common.contextualErrorMap };
35018
- const fn3 = ctx.data;
35518
+ const fn5 = ctx.data;
35019
35519
  if (this._def.returns instanceof ZodPromise) {
35020
35520
  const me = this;
35021
35521
  return OK(async function(...args2) {
@@ -35024,7 +35524,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
35024
35524
  error3.addIssue(makeArgsIssue(args2, e));
35025
35525
  throw error3;
35026
35526
  });
35027
- const result5 = await Reflect.apply(fn3, this, parsedArgs);
35527
+ const result5 = await Reflect.apply(fn5, this, parsedArgs);
35028
35528
  const parsedReturns = await me._def.returns._def.type.parseAsync(result5, params).catch((e) => {
35029
35529
  error3.addIssue(makeReturnsIssue(result5, e));
35030
35530
  throw error3;
@@ -35038,7 +35538,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
35038
35538
  if (!parsedArgs.success) {
35039
35539
  throw new ZodError([makeArgsIssue(args2, parsedArgs.error)]);
35040
35540
  }
35041
- const result5 = Reflect.apply(fn3, this, parsedArgs.data);
35541
+ const result5 = Reflect.apply(fn5, this, parsedArgs.data);
35042
35542
  const parsedReturns = me._def.returns.safeParse(result5, params);
35043
35543
  if (!parsedReturns.success) {
35044
35544
  throw new ZodError([makeReturnsIssue(result5, parsedReturns.error)]);
@@ -35747,8 +36247,8 @@ function $constructor(name, initializer3, params) {
35747
36247
  const inst = params?.Parent ? new Definition() : this;
35748
36248
  init2(inst, def);
35749
36249
  (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
35750
- for (const fn3 of inst._zod.deferred) {
35751
- fn3();
36250
+ for (const fn5 of inst._zod.deferred) {
36251
+ fn5();
35752
36252
  }
35753
36253
  return inst;
35754
36254
  }
@@ -35801,7 +36301,7 @@ __export(util_exports, {
35801
36301
  captureStackTrace: () => captureStackTrace,
35802
36302
  cleanEnum: () => cleanEnum,
35803
36303
  cleanRegex: () => cleanRegex,
35804
- clone: () => clone,
36304
+ clone: () => clone2,
35805
36305
  cloneDef: () => cloneDef,
35806
36306
  createTransparentProxy: () => createTransparentProxy,
35807
36307
  defineLazy: () => defineLazy,
@@ -36082,7 +36582,7 @@ var primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boo
36082
36582
  function escapeRegex(str) {
36083
36583
  return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
36084
36584
  }
36085
- function clone(inst, def, params) {
36585
+ function clone2(inst, def, params) {
36086
36586
  const cl = new inst._zod.constr(def ?? inst._zod.def);
36087
36587
  if (!def || params?.parent)
36088
36588
  cl._zod.parent = inst;
@@ -36183,7 +36683,7 @@ function pick2(schema, mask2) {
36183
36683
  },
36184
36684
  checks: []
36185
36685
  });
36186
- return clone(schema, def);
36686
+ return clone2(schema, def);
36187
36687
  }
36188
36688
  function omit3(schema, mask2) {
36189
36689
  const currDef = schema._zod.def;
@@ -36208,7 +36708,7 @@ function omit3(schema, mask2) {
36208
36708
  },
36209
36709
  checks: []
36210
36710
  });
36211
- return clone(schema, def);
36711
+ return clone2(schema, def);
36212
36712
  }
36213
36713
  function extend2(schema, shape) {
36214
36714
  if (!isPlainObject(shape)) {
@@ -36231,7 +36731,7 @@ function extend2(schema, shape) {
36231
36731
  return _shape;
36232
36732
  }
36233
36733
  });
36234
- return clone(schema, def);
36734
+ return clone2(schema, def);
36235
36735
  }
36236
36736
  function safeExtend(schema, shape) {
36237
36737
  if (!isPlainObject(shape)) {
@@ -36244,7 +36744,7 @@ function safeExtend(schema, shape) {
36244
36744
  return _shape;
36245
36745
  }
36246
36746
  });
36247
- return clone(schema, def);
36747
+ return clone2(schema, def);
36248
36748
  }
36249
36749
  function merge3(a, b) {
36250
36750
  const def = mergeDefs(a._zod.def, {
@@ -36259,7 +36759,7 @@ function merge3(a, b) {
36259
36759
  checks: []
36260
36760
  // delete existing checks
36261
36761
  });
36262
- return clone(a, def);
36762
+ return clone2(a, def);
36263
36763
  }
36264
36764
  function partial(Class6, schema, mask2) {
36265
36765
  const currDef = schema._zod.def;
@@ -36297,7 +36797,7 @@ function partial(Class6, schema, mask2) {
36297
36797
  },
36298
36798
  checks: []
36299
36799
  });
36300
- return clone(schema, def);
36800
+ return clone2(schema, def);
36301
36801
  }
36302
36802
  function required2(Class6, schema, mask2) {
36303
36803
  const def = mergeDefs(schema._zod.def, {
@@ -36328,7 +36828,7 @@ function required2(Class6, schema, mask2) {
36328
36828
  return shape;
36329
36829
  }
36330
36830
  });
36331
- return clone(schema, def);
36831
+ return clone2(schema, def);
36332
36832
  }
36333
36833
  function aborted(x, startIndex = 0) {
36334
36834
  if (x.aborted === true)
@@ -37319,9 +37819,9 @@ var Doc = class {
37319
37819
  if (this)
37320
37820
  this.args = args2;
37321
37821
  }
37322
- indented(fn3) {
37822
+ indented(fn5) {
37323
37823
  this.indent += 1;
37324
- fn3(this);
37824
+ fn5(this);
37325
37825
  this.indent -= 1;
37326
37826
  }
37327
37827
  write(arg) {
@@ -37366,8 +37866,8 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
37366
37866
  checks.unshift(inst);
37367
37867
  }
37368
37868
  for (const ch of checks) {
37369
- for (const fn3 of ch._zod.onattach) {
37370
- fn3(inst);
37869
+ for (const fn5 of ch._zod.onattach) {
37870
+ fn5(inst);
37371
37871
  }
37372
37872
  }
37373
37873
  if (checks.length === 0) {
@@ -38190,8 +38690,8 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
38190
38690
  }
38191
38691
  doc.write(`payload.value = newResult;`);
38192
38692
  doc.write(`return payload;`);
38193
- const fn3 = doc.compile();
38194
- return (payload, ctx) => fn3(shape, payload, ctx);
38693
+ const fn5 = doc.compile();
38694
+ return (payload, ctx) => fn5(shape, payload, ctx);
38195
38695
  };
38196
38696
  let fastpass;
38197
38697
  const isObject3 = isObject2;
@@ -40140,29 +40640,29 @@ function _file(Class6, params) {
40140
40640
  });
40141
40641
  }
40142
40642
  // @__NO_SIDE_EFFECTS__
40143
- function _custom(Class6, fn3, _params) {
40643
+ function _custom(Class6, fn5, _params) {
40144
40644
  const norm = normalizeParams(_params);
40145
40645
  norm.abort ?? (norm.abort = true);
40146
40646
  const schema = new Class6({
40147
40647
  type: "custom",
40148
40648
  check: "custom",
40149
- fn: fn3,
40649
+ fn: fn5,
40150
40650
  ...norm
40151
40651
  });
40152
40652
  return schema;
40153
40653
  }
40154
40654
  // @__NO_SIDE_EFFECTS__
40155
- function _refine(Class6, fn3, _params) {
40655
+ function _refine(Class6, fn5, _params) {
40156
40656
  const schema = new Class6({
40157
40657
  type: "custom",
40158
40658
  check: "custom",
40159
- fn: fn3,
40659
+ fn: fn5,
40160
40660
  ...normalizeParams(_params)
40161
40661
  });
40162
40662
  return schema;
40163
40663
  }
40164
40664
  // @__NO_SIDE_EFFECTS__
40165
- function _superRefine(fn3) {
40665
+ function _superRefine(fn5) {
40166
40666
  const ch = /* @__PURE__ */ _check((payload) => {
40167
40667
  payload.addIssue = (issue2) => {
40168
40668
  if (typeof issue2 === "string") {
@@ -40178,17 +40678,17 @@ function _superRefine(fn3) {
40178
40678
  payload.issues.push(issue(_issue2));
40179
40679
  }
40180
40680
  };
40181
- return fn3(payload.value, payload);
40681
+ return fn5(payload.value, payload);
40182
40682
  });
40183
40683
  return ch;
40184
40684
  }
40185
40685
  // @__NO_SIDE_EFFECTS__
40186
- function _check(fn3, params) {
40686
+ function _check(fn5, params) {
40187
40687
  const ch = new $ZodCheck({
40188
40688
  check: "custom",
40189
40689
  ...normalizeParams(params)
40190
40690
  });
40191
- ch._zod.check = fn3;
40691
+ ch._zod.check = fn5;
40192
40692
  return ch;
40193
40693
  }
40194
40694
  // @__NO_SIDE_EFFECTS__
@@ -40352,7 +40852,7 @@ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
40352
40852
  const meta3 = ctx.metadataRegistry.get(schema);
40353
40853
  if (meta3)
40354
40854
  Object.assign(result5.schema, meta3);
40355
- if (ctx.io === "input" && isTransforming(schema)) {
40855
+ if (ctx.io === "input" && isTransforming2(schema)) {
40356
40856
  delete result5.schema.examples;
40357
40857
  delete result5.schema.default;
40358
40858
  }
@@ -40452,7 +40952,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
40452
40952
  }
40453
40953
  }
40454
40954
  }
40455
- function finalize(ctx, schema) {
40955
+ function finalize2(ctx, schema) {
40456
40956
  const root = ctx.seen.get(schema);
40457
40957
  if (!root)
40458
40958
  throw new Error("Unprocessed schema. This is a bug in Zod.");
@@ -40573,7 +41073,7 @@ function finalize(ctx, schema) {
40573
41073
  throw new Error("Error converting schema to JSON.");
40574
41074
  }
40575
41075
  }
40576
- function isTransforming(_schema, _ctx) {
41076
+ function isTransforming2(_schema, _ctx) {
40577
41077
  const ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() };
40578
41078
  if (ctx.seen.has(_schema))
40579
41079
  return false;
@@ -40582,43 +41082,43 @@ function isTransforming(_schema, _ctx) {
40582
41082
  if (def.type === "transform")
40583
41083
  return true;
40584
41084
  if (def.type === "array")
40585
- return isTransforming(def.element, ctx);
41085
+ return isTransforming2(def.element, ctx);
40586
41086
  if (def.type === "set")
40587
- return isTransforming(def.valueType, ctx);
41087
+ return isTransforming2(def.valueType, ctx);
40588
41088
  if (def.type === "lazy")
40589
- return isTransforming(def.getter(), ctx);
41089
+ return isTransforming2(def.getter(), ctx);
40590
41090
  if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") {
40591
- return isTransforming(def.innerType, ctx);
41091
+ return isTransforming2(def.innerType, ctx);
40592
41092
  }
40593
41093
  if (def.type === "intersection") {
40594
- return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);
41094
+ return isTransforming2(def.left, ctx) || isTransforming2(def.right, ctx);
40595
41095
  }
40596
41096
  if (def.type === "record" || def.type === "map") {
40597
- return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
41097
+ return isTransforming2(def.keyType, ctx) || isTransforming2(def.valueType, ctx);
40598
41098
  }
40599
41099
  if (def.type === "pipe") {
40600
- return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
41100
+ return isTransforming2(def.in, ctx) || isTransforming2(def.out, ctx);
40601
41101
  }
40602
41102
  if (def.type === "object") {
40603
41103
  for (const key in def.shape) {
40604
- if (isTransforming(def.shape[key], ctx))
41104
+ if (isTransforming2(def.shape[key], ctx))
40605
41105
  return true;
40606
41106
  }
40607
41107
  return false;
40608
41108
  }
40609
41109
  if (def.type === "union") {
40610
41110
  for (const option5 of def.options) {
40611
- if (isTransforming(option5, ctx))
41111
+ if (isTransforming2(option5, ctx))
40612
41112
  return true;
40613
41113
  }
40614
41114
  return false;
40615
41115
  }
40616
41116
  if (def.type === "tuple") {
40617
41117
  for (const item of def.items) {
40618
- if (isTransforming(item, ctx))
41118
+ if (isTransforming2(item, ctx))
40619
41119
  return true;
40620
41120
  }
40621
- if (def.rest && isTransforming(def.rest, ctx))
41121
+ if (def.rest && isTransforming2(def.rest, ctx))
40622
41122
  return true;
40623
41123
  return false;
40624
41124
  }
@@ -40628,14 +41128,14 @@ var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
40628
41128
  const ctx = initializeContext({ ...params, processors });
40629
41129
  process2(schema, ctx);
40630
41130
  extractDefs(ctx, schema);
40631
- return finalize(ctx, schema);
41131
+ return finalize2(ctx, schema);
40632
41132
  };
40633
41133
  var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
40634
41134
  const { libraryOptions, target } = params ?? {};
40635
41135
  const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
40636
41136
  process2(schema, ctx);
40637
41137
  extractDefs(ctx, schema);
40638
- return finalize(ctx, schema);
41138
+ return finalize2(ctx, schema);
40639
41139
  };
40640
41140
 
40641
41141
  // ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.js
@@ -41114,7 +41614,7 @@ var lazyProcessor = (schema, ctx, _json, params) => {
41114
41614
  seen.ref = innerType;
41115
41615
  };
41116
41616
 
41117
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
41617
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
41118
41618
  function isZ4Schema(s) {
41119
41619
  const schema = s;
41120
41620
  return !!schema._zod;
@@ -41499,7 +41999,7 @@ var ZodType2 = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
41499
41999
  });
41500
42000
  };
41501
42001
  inst.with = inst.check;
41502
- inst.clone = (def2, params) => clone(inst, def2, params);
42002
+ inst.clone = (def2, params) => clone2(inst, def2, params);
41503
42003
  inst.brand = () => inst;
41504
42004
  inst.register = ((reg, meta3) => {
41505
42005
  reg.add(inst, meta3);
@@ -41520,7 +42020,7 @@ var ZodType2 = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
41520
42020
  inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
41521
42021
  inst.refine = (check3, params) => inst.check(refine2(check3, params));
41522
42022
  inst.superRefine = (refinement) => inst.check(superRefine(refinement));
41523
- inst.overwrite = (fn3) => inst.check(_overwrite(fn3));
42023
+ inst.overwrite = (fn5) => inst.check(_overwrite(fn5));
41524
42024
  inst.optional = () => optional3(inst);
41525
42025
  inst.exactOptional = () => exactOptional(inst);
41526
42026
  inst.nullable = () => nullable(inst);
@@ -41556,7 +42056,7 @@ var ZodType2 = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
41556
42056
  };
41557
42057
  inst.isOptional = () => inst.safeParse(void 0).success;
41558
42058
  inst.isNullable = () => inst.safeParse(null).success;
41559
- inst.apply = (fn3) => fn3(inst);
42059
+ inst.apply = (fn5) => fn5(inst);
41560
42060
  return inst;
41561
42061
  });
41562
42062
  var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
@@ -42112,7 +42612,7 @@ function record3(keyType, valueType, params) {
42112
42612
  });
42113
42613
  }
42114
42614
  function partialRecord(keyType, valueType, params) {
42115
- const k = clone(keyType);
42615
+ const k = clone2(keyType);
42116
42616
  k._zod.values = void 0;
42117
42617
  return new ZodRecord2({
42118
42618
  type: "record",
@@ -42282,10 +42782,10 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
42282
42782
  return payload;
42283
42783
  };
42284
42784
  });
42285
- function transform3(fn3) {
42785
+ function transform3(fn5) {
42286
42786
  return new ZodTransform({
42287
42787
  type: "transform",
42288
- transform: fn3
42788
+ transform: fn5
42289
42789
  });
42290
42790
  }
42291
42791
  var ZodOptional2 = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => {
@@ -42498,22 +42998,22 @@ var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
42498
42998
  ZodType2.init(inst, def);
42499
42999
  inst._zod.processJSONSchema = (ctx, json2, params) => customProcessor(inst, ctx, json2, params);
42500
43000
  });
42501
- function check2(fn3) {
43001
+ function check2(fn5) {
42502
43002
  const ch = new $ZodCheck({
42503
43003
  check: "custom"
42504
43004
  // ...util.normalizeParams(params),
42505
43005
  });
42506
- ch._zod.check = fn3;
43006
+ ch._zod.check = fn5;
42507
43007
  return ch;
42508
43008
  }
42509
- function custom(fn3, _params) {
42510
- return _custom(ZodCustom, fn3 ?? (() => true), _params);
43009
+ function custom(fn5, _params) {
43010
+ return _custom(ZodCustom, fn5 ?? (() => true), _params);
42511
43011
  }
42512
- function refine2(fn3, _params = {}) {
42513
- return _refine(ZodCustom, fn3, _params);
43012
+ function refine2(fn5, _params = {}) {
43013
+ return _refine(ZodCustom, fn5, _params);
42514
43014
  }
42515
- function superRefine(fn3) {
42516
- return _superRefine(fn3);
43015
+ function superRefine(fn5) {
43016
+ return _superRefine(fn5);
42517
43017
  }
42518
43018
  var describe2 = describe;
42519
43019
  var meta2 = meta;
@@ -42550,8 +43050,8 @@ function json(params) {
42550
43050
  });
42551
43051
  return jsonSchema;
42552
43052
  }
42553
- function preprocess(fn3, schema) {
42554
- return pipe2(transform3(fn3), schema);
43053
+ function preprocess(fn5, schema) {
43054
+ return pipe2(transform3(fn5), schema);
42555
43055
  }
42556
43056
 
42557
43057
  // ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/compat.js
@@ -42569,7 +43069,7 @@ var z = {
42569
43069
  // ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js
42570
43070
  config(en_default2());
42571
43071
 
42572
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
43072
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
42573
43073
  var LATEST_PROTOCOL_VERSION = "2025-11-25";
42574
43074
  var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
42575
43075
  var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
@@ -44088,7 +44588,7 @@ var UrlElicitationRequiredError = class extends McpError {
44088
44588
  }
44089
44589
  };
44090
44590
 
44091
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
44591
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
44092
44592
  function isTerminal(status) {
44093
44593
  return status === "completed" || status === "failed" || status === "cancelled";
44094
44594
  }
@@ -44096,7 +44596,7 @@ function isTerminal(status) {
44096
44596
  // ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
44097
44597
  var ALPHA_NUMERIC = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
44098
44598
 
44099
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
44599
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
44100
44600
  function getMethodLiteral(schema) {
44101
44601
  const shape = getObjectShape(schema);
44102
44602
  const methodSchema = shape?.method;
@@ -44117,7 +44617,7 @@ function parseWithCompat(schema, data) {
44117
44617
  return result5.data;
44118
44618
  }
44119
44619
 
44120
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
44620
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
44121
44621
  var DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4;
44122
44622
  var Protocol = class {
44123
44623
  constructor(_options) {
@@ -44617,7 +45117,7 @@ var Protocol = class {
44617
45117
  return;
44618
45118
  }
44619
45119
  const pollInterval = task2.pollInterval ?? this._options?.defaultTaskPollInterval ?? 1e3;
44620
- await new Promise((resolve2) => setTimeout(resolve2, pollInterval));
45120
+ await new Promise((resolve3) => setTimeout(resolve3, pollInterval));
44621
45121
  options?.signal?.throwIfAborted();
44622
45122
  }
44623
45123
  } catch (error3) {
@@ -44634,7 +45134,7 @@ var Protocol = class {
44634
45134
  */
44635
45135
  request(request3, resultSchema, options) {
44636
45136
  const { relatedRequestId, resumptionToken, onresumptiontoken, task, relatedTask } = options ?? {};
44637
- return new Promise((resolve2, reject) => {
45137
+ return new Promise((resolve3, reject) => {
44638
45138
  const earlyReject = (error3) => {
44639
45139
  reject(error3);
44640
45140
  };
@@ -44712,7 +45212,7 @@ var Protocol = class {
44712
45212
  if (!parseResult.success) {
44713
45213
  reject(parseResult.error);
44714
45214
  } else {
44715
- resolve2(parseResult.data);
45215
+ resolve3(parseResult.data);
44716
45216
  }
44717
45217
  } catch (error3) {
44718
45218
  reject(error3);
@@ -44973,12 +45473,12 @@ var Protocol = class {
44973
45473
  }
44974
45474
  } catch {
44975
45475
  }
44976
- return new Promise((resolve2, reject) => {
45476
+ return new Promise((resolve3, reject) => {
44977
45477
  if (signal.aborted) {
44978
45478
  reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
44979
45479
  return;
44980
45480
  }
44981
- const timeoutId = setTimeout(resolve2, interval);
45481
+ const timeoutId = setTimeout(resolve3, interval);
44982
45482
  signal.addEventListener("abort", () => {
44983
45483
  clearTimeout(timeoutId);
44984
45484
  reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
@@ -45071,7 +45571,7 @@ function mergeCapabilities(base2, additional) {
45071
45571
  return result5;
45072
45572
  }
45073
45573
 
45074
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
45574
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
45075
45575
  var import_ajv = __toESM(require_ajv(), 1);
45076
45576
  var import_ajv_formats = __toESM(require_dist(), 1);
45077
45577
  function createDefaultAjvInstance() {
@@ -45139,7 +45639,7 @@ var AjvJsonSchemaValidator = class {
45139
45639
  }
45140
45640
  };
45141
45641
 
45142
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
45642
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
45143
45643
  var ExperimentalServerTasks = class {
45144
45644
  constructor(_server) {
45145
45645
  this._server = _server;
@@ -45352,7 +45852,7 @@ var ExperimentalServerTasks = class {
45352
45852
  }
45353
45853
  };
45354
45854
 
45355
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
45855
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
45356
45856
  function assertToolsCallTaskCapability(requests, method, entityName) {
45357
45857
  if (!requests) {
45358
45858
  throw new Error(`${entityName} does not support task creation (required for ${method})`);
@@ -45387,7 +45887,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
45387
45887
  }
45388
45888
  }
45389
45889
 
45390
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
45890
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
45391
45891
  var Server = class extends Protocol {
45392
45892
  /**
45393
45893
  * Initializes this server with the given name and version information.
@@ -45767,10 +46267,10 @@ var Server = class extends Protocol {
45767
46267
  }
45768
46268
  };
45769
46269
 
45770
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
46270
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
45771
46271
  import process3 from "node:process";
45772
46272
 
45773
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
46273
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
45774
46274
  var ReadBuffer = class {
45775
46275
  append(chunk) {
45776
46276
  this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
@@ -45798,7 +46298,7 @@ function serializeMessage(message) {
45798
46298
  return JSON.stringify(message) + "\n";
45799
46299
  }
45800
46300
 
45801
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
46301
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
45802
46302
  var StdioServerTransport = class {
45803
46303
  constructor(_stdin = process3.stdin, _stdout = process3.stdout) {
45804
46304
  this._stdin = _stdin;
@@ -45848,12 +46348,12 @@ var StdioServerTransport = class {
45848
46348
  this.onclose?.();
45849
46349
  }
45850
46350
  send(message) {
45851
- return new Promise((resolve2) => {
46351
+ return new Promise((resolve3) => {
45852
46352
  const json2 = serializeMessage(message);
45853
46353
  if (this._stdout.write(json2)) {
45854
- resolve2();
46354
+ resolve3();
45855
46355
  } else {
45856
- this._stdout.once("drain", resolve2);
46356
+ this._stdout.once("drain", resolve3);
45857
46357
  }
45858
46358
  });
45859
46359
  }
@@ -45939,12 +46439,99 @@ var runInit = () => {
45939
46439
  };
45940
46440
 
45941
46441
  // ../foldkit/src/schema/index.ts
45942
- var makeCallable = (schema) => (
45943
- /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
45944
- new Proxy(function() {
46442
+ var assignPlainProperty = (output, name, value5) => {
46443
+ if (name === "__proto__") {
46444
+ Object.defineProperty(output, name, {
46445
+ value: value5,
46446
+ writable: true,
46447
+ enumerable: true,
46448
+ configurable: true
46449
+ });
46450
+ } else {
46451
+ output[name] = value5;
46452
+ }
46453
+ };
46454
+ var isDirectlyCopyable = (ast) => {
46455
+ if (ast.checks !== void 0 || ast.encoding !== void 0 || ast.context !== void 0 || ast.annotations?.["parseOptions"] !== void 0) {
46456
+ return false;
46457
+ }
46458
+ return Match_exports.value(ast).pipe(
46459
+ Match_exports.withReturnType(),
46460
+ Match_exports.tagsExhaustive({
46461
+ Declaration: () => false,
46462
+ Null: () => true,
46463
+ Undefined: () => true,
46464
+ Void: () => true,
46465
+ Never: () => true,
46466
+ Unknown: () => true,
46467
+ Any: () => true,
46468
+ String: () => true,
46469
+ Number: () => true,
46470
+ Boolean: () => true,
46471
+ BigInt: () => true,
46472
+ Symbol: () => true,
46473
+ Literal: () => true,
46474
+ UniqueSymbol: () => true,
46475
+ ObjectKeyword: () => true,
46476
+ Enum: () => true,
46477
+ TemplateLiteral: ({ parts: parts2 }) => parts2.every(isDirectlyCopyable),
46478
+ Arrays: () => false,
46479
+ Objects: () => false,
46480
+ Union: ({ mode, types }) => mode !== "oneOf" && types.every(isDirectlyCopyable),
46481
+ Suspend: () => false
46482
+ })
46483
+ );
46484
+ };
46485
+ var getDirectPropertyNames = (propertySignatures) => {
46486
+ const names = [];
46487
+ for (const { name, type: type3 } of propertySignatures) {
46488
+ if (name !== "_tag" && !isDirectlyCopyable(SchemaAST_exports.toType(type3))) {
46489
+ return void 0;
46490
+ }
46491
+ names.push(name);
46492
+ }
46493
+ return names;
46494
+ };
46495
+ var makeCallable = (tag4, fields) => {
46496
+ const schema = Schema_exports.TaggedStruct(tag4, fields);
46497
+ const propertyNames = Object.hasOwn(fields, "_tag") ? void 0 : getDirectPropertyNames(schema.ast.propertySignatures);
46498
+ const make27 = (value5) => schema.make(
46499
+ /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
46500
+ value5 ?? {}
46501
+ );
46502
+ const construct = propertyNames !== void 0 ? (value5) => {
46503
+ const input = value5 ?? {};
46504
+ if (Object(input) !== input) {
46505
+ return make27(value5);
46506
+ }
46507
+ const output = {};
46508
+ for (const name of propertyNames) {
46509
+ const descriptor = Object.getOwnPropertyDescriptor(input, name);
46510
+ if (name !== "_tag" && descriptor === void 0 && Reflect.has(input, name)) {
46511
+ return make27(value5);
46512
+ }
46513
+ if (descriptor !== void 0 && !("value" in descriptor)) {
46514
+ return make27(value5);
46515
+ }
46516
+ const inputValue = descriptor === void 0 ? void 0 : input[name];
46517
+ if (name === "_tag") {
46518
+ if (inputValue !== void 0 && inputValue !== tag4) {
46519
+ return make27(value5);
46520
+ }
46521
+ if (descriptor !== void 0 && inputValue === void 0) {
46522
+ assignPlainProperty(output, name, inputValue);
46523
+ }
46524
+ assignPlainProperty(output, name, tag4);
46525
+ } else {
46526
+ assignPlainProperty(output, name, inputValue);
46527
+ }
46528
+ }
46529
+ return output;
46530
+ } : make27;
46531
+ return new Proxy(function() {
45945
46532
  }, {
45946
46533
  apply(_target, _thisArg, argumentsList) {
45947
- return schema.make(argumentsList[0] ?? {});
46534
+ return construct(argumentsList[0]);
45948
46535
  },
45949
46536
  get(_target, property, receiver) {
45950
46537
  return Reflect.get(schema, property, receiver);
@@ -45955,10 +46542,10 @@ var makeCallable = (schema) => (
45955
46542
  getPrototypeOf() {
45956
46543
  return Reflect.getPrototypeOf(schema);
45957
46544
  }
45958
- })
45959
- );
46545
+ });
46546
+ };
45960
46547
  function ts(tag4, fields = {}) {
45961
- return makeCallable(Schema_exports.TaggedStruct(tag4, fields));
46548
+ return makeCallable(tag4, fields);
45962
46549
  }
45963
46550
 
45964
46551
  // ../foldkit/src/devTools/protocol.ts