@effect/language-service 0.25.0 → 0.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cli.js CHANGED
@@ -1285,7 +1285,7 @@ var dedupeWith = /* @__PURE__ */ dual(2, (self, isEquivalent) => {
1285
1285
  return [];
1286
1286
  });
1287
1287
  var dedupe = (self) => dedupeWith(self, equivalence());
1288
- var join = /* @__PURE__ */ dual(2, (self, sep) => fromIterable(self).join(sep));
1288
+ var join = /* @__PURE__ */ dual(2, (self, sep2) => fromIterable(self).join(sep2));
1289
1289
 
1290
1290
  // node_modules/.pnpm/effect@3.16.12/node_modules/effect/dist/esm/internal/context.js
1291
1291
  var TagTypeId = /* @__PURE__ */ Symbol.for("effect/Context/Tag");
@@ -3064,12 +3064,12 @@ var prettyErrorStack = (message, stack, span2) => {
3064
3064
  const stack2 = stackFn();
3065
3065
  if (typeof stack2 === "string") {
3066
3066
  const locationMatchAll = stack2.matchAll(locationRegex);
3067
- let match18 = false;
3067
+ let match19 = false;
3068
3068
  for (const [, location] of locationMatchAll) {
3069
- match18 = true;
3069
+ match19 = true;
3070
3070
  out.push(` at ${current.name} (${location})`);
3071
3071
  }
3072
- if (!match18) {
3072
+ if (!match19) {
3073
3073
  out.push(` at ${current.name} (${stack2.replace(/^at /, "")})`);
3074
3074
  }
3075
3075
  } else {
@@ -3123,9 +3123,9 @@ var decode = (input) => {
3123
3123
  }
3124
3124
  return nanos(BigInt(Math.round(input[0] * 1e9)) + BigInt(Math.round(input[1])));
3125
3125
  } else if (isString(input)) {
3126
- const match18 = DURATION_REGEX.exec(input);
3127
- if (match18) {
3128
- const [_, valueStr, unit] = match18;
3126
+ const match19 = DURATION_REGEX.exec(input);
3127
+ if (match19) {
3128
+ const [_, valueStr, unit] = match19;
3129
3129
  const value5 = Number(valueStr);
3130
3130
  switch (unit) {
3131
3131
  case "nano":
@@ -5563,67 +5563,67 @@ var Or = (self, that) => {
5563
5563
  });
5564
5564
  return error4;
5565
5565
  };
5566
- var InvalidData = (path2, message, options3 = {
5566
+ var InvalidData = (path3, message, options3 = {
5567
5567
  pathDelim: "."
5568
5568
  }) => {
5569
5569
  const error4 = Object.create(proto2);
5570
5570
  error4._op = OP_INVALID_DATA;
5571
- error4.path = path2;
5571
+ error4.path = path3;
5572
5572
  error4.message = message;
5573
5573
  Object.defineProperty(error4, "toString", {
5574
5574
  enumerable: false,
5575
5575
  value() {
5576
- const path3 = pipe(this.path, join(options3.pathDelim));
5577
- return `(Invalid data at ${path3}: "${this.message}")`;
5576
+ const path4 = pipe(this.path, join(options3.pathDelim));
5577
+ return `(Invalid data at ${path4}: "${this.message}")`;
5578
5578
  }
5579
5579
  });
5580
5580
  return error4;
5581
5581
  };
5582
- var MissingData = (path2, message, options3 = {
5582
+ var MissingData = (path3, message, options3 = {
5583
5583
  pathDelim: "."
5584
5584
  }) => {
5585
5585
  const error4 = Object.create(proto2);
5586
5586
  error4._op = OP_MISSING_DATA;
5587
- error4.path = path2;
5587
+ error4.path = path3;
5588
5588
  error4.message = message;
5589
5589
  Object.defineProperty(error4, "toString", {
5590
5590
  enumerable: false,
5591
5591
  value() {
5592
- const path3 = pipe(this.path, join(options3.pathDelim));
5593
- return `(Missing data at ${path3}: "${this.message}")`;
5592
+ const path4 = pipe(this.path, join(options3.pathDelim));
5593
+ return `(Missing data at ${path4}: "${this.message}")`;
5594
5594
  }
5595
5595
  });
5596
5596
  return error4;
5597
5597
  };
5598
- var SourceUnavailable = (path2, message, cause2, options3 = {
5598
+ var SourceUnavailable = (path3, message, cause2, options3 = {
5599
5599
  pathDelim: "."
5600
5600
  }) => {
5601
5601
  const error4 = Object.create(proto2);
5602
5602
  error4._op = OP_SOURCE_UNAVAILABLE;
5603
- error4.path = path2;
5603
+ error4.path = path3;
5604
5604
  error4.message = message;
5605
5605
  error4.cause = cause2;
5606
5606
  Object.defineProperty(error4, "toString", {
5607
5607
  enumerable: false,
5608
5608
  value() {
5609
- const path3 = pipe(this.path, join(options3.pathDelim));
5610
- return `(Source unavailable at ${path3}: "${this.message}")`;
5609
+ const path4 = pipe(this.path, join(options3.pathDelim));
5610
+ return `(Source unavailable at ${path4}: "${this.message}")`;
5611
5611
  }
5612
5612
  });
5613
5613
  return error4;
5614
5614
  };
5615
- var Unsupported = (path2, message, options3 = {
5615
+ var Unsupported = (path3, message, options3 = {
5616
5616
  pathDelim: "."
5617
5617
  }) => {
5618
5618
  const error4 = Object.create(proto2);
5619
5619
  error4._op = OP_UNSUPPORTED;
5620
- error4.path = path2;
5620
+ error4.path = path3;
5621
5621
  error4.message = message;
5622
5622
  Object.defineProperty(error4, "toString", {
5623
5623
  enumerable: false,
5624
5624
  value() {
5625
- const path3 = pipe(this.path, join(options3.pathDelim));
5626
- return `(Unsupported operation at ${path3}: "${this.message}")`;
5625
+ const path4 = pipe(this.path, join(options3.pathDelim));
5626
+ return `(Unsupported operation at ${path4}: "${this.message}")`;
5627
5627
  }
5628
5628
  });
5629
5629
  return error4;
@@ -5739,9 +5739,9 @@ var isMissingDataOnly = (self) => reduceWithContext2(self, void 0, IsMissingData
5739
5739
  var empty16 = {
5740
5740
  _tag: "Empty"
5741
5741
  };
5742
- var patch5 = /* @__PURE__ */ dual(2, (path2, patch9) => {
5742
+ var patch5 = /* @__PURE__ */ dual(2, (path3, patch9) => {
5743
5743
  let input = of3(patch9);
5744
- let output = path2;
5744
+ let output = path3;
5745
5745
  while (isCons(input)) {
5746
5746
  const patch10 = input.head;
5747
5747
  switch (patch10._tag) {
@@ -5808,7 +5808,7 @@ var make21 = (options3) => ({
5808
5808
  var makeFlat = (options3) => ({
5809
5809
  [FlatConfigProviderTypeId]: FlatConfigProviderTypeId,
5810
5810
  patch: options3.patch,
5811
- load: (path2, config2, split2 = true) => options3.load(path2, config2, split2),
5811
+ load: (path3, config2, split2 = true) => options3.load(path3, config2, split2),
5812
5812
  enumerateChildren: options3.enumerateChildren
5813
5813
  });
5814
5814
  var fromFlat = (flat) => make21({
@@ -5826,29 +5826,29 @@ var fromEnv = (options3) => {
5826
5826
  pathDelim: "_",
5827
5827
  seqDelim: ","
5828
5828
  }, options3);
5829
- const makePathString = (path2) => pipe(path2, join(pathDelim));
5829
+ const makePathString = (path3) => pipe(path3, join(pathDelim));
5830
5830
  const unmakePathString = (pathString) => pathString.split(pathDelim);
5831
5831
  const getEnv = () => typeof process !== "undefined" && "env" in process && typeof process.env === "object" ? process.env : {};
5832
- const load = (path2, primitive2, split2 = true) => {
5833
- const pathString = makePathString(path2);
5832
+ const load = (path3, primitive2, split2 = true) => {
5833
+ const pathString = makePathString(path3);
5834
5834
  const current = getEnv();
5835
5835
  const valueOpt = pathString in current ? some2(current[pathString]) : none2();
5836
- return pipe(valueOpt, mapError(() => MissingData(path2, `Expected ${pathString} to exist in the process context`)), flatMap7((value5) => parsePrimitive(value5, path2, primitive2, seqDelim, split2)));
5836
+ return pipe(valueOpt, mapError(() => MissingData(path3, `Expected ${pathString} to exist in the process context`)), flatMap7((value5) => parsePrimitive(value5, path3, primitive2, seqDelim, split2)));
5837
5837
  };
5838
- const enumerateChildren = (path2) => sync(() => {
5838
+ const enumerateChildren = (path3) => sync(() => {
5839
5839
  const current = getEnv();
5840
5840
  const keys5 = Object.keys(current);
5841
5841
  const keyPaths = keys5.map((value5) => unmakePathString(value5.toUpperCase()));
5842
5842
  const filteredKeyPaths = keyPaths.filter((keyPath) => {
5843
- for (let i = 0; i < path2.length; i++) {
5844
- const pathComponent = pipe(path2, unsafeGet(i));
5843
+ for (let i = 0; i < path3.length; i++) {
5844
+ const pathComponent = pipe(path3, unsafeGet(i));
5845
5845
  const currentElement = keyPath[i];
5846
5846
  if (currentElement === void 0 || pathComponent !== currentElement) {
5847
5847
  return false;
5848
5848
  }
5849
5849
  }
5850
5850
  return true;
5851
- }).flatMap((keyPath) => keyPath.slice(path2.length, path2.length + 1));
5851
+ }).flatMap((keyPath) => keyPath.slice(path3.length, path3.length + 1));
5852
5852
  return fromIterable5(filteredKeyPaths);
5853
5853
  });
5854
5854
  return fromFlat(makeFlat({
@@ -5864,17 +5864,17 @@ var extend = (leftDef, rightDef, left3, right3) => {
5864
5864
  const rightExtension = concat(right3, rightPad);
5865
5865
  return [leftExtension, rightExtension];
5866
5866
  };
5867
- var appendConfigPath = (path2, config2) => {
5867
+ var appendConfigPath = (path3, config2) => {
5868
5868
  let op = config2;
5869
5869
  if (op._tag === "Nested") {
5870
- const out = path2.slice();
5870
+ const out = path3.slice();
5871
5871
  while (op._tag === "Nested") {
5872
5872
  out.push(op.name);
5873
5873
  op = op.config;
5874
5874
  }
5875
5875
  return out;
5876
5876
  }
5877
- return path2;
5877
+ return path3;
5878
5878
  };
5879
5879
  var fromFlatLoop = (flat, prefix, config2, split2) => {
5880
5880
  const op = config2;
@@ -5950,8 +5950,8 @@ var fromFlatLoop = (flat, prefix, config2, split2) => {
5950
5950
  return fail2(right3.left);
5951
5951
  }
5952
5952
  if (isRight2(left3) && isRight2(right3)) {
5953
- const path2 = pipe(prefix, join("."));
5954
- const fail19 = fromFlatLoopFail(prefix, path2);
5953
+ const path3 = pipe(prefix, join("."));
5954
+ const fail19 = fromFlatLoopFail(prefix, path3);
5955
5955
  const [lefts, rights] = extend(fail19, fail19, pipe(left3.right, map3(right2)), pipe(right3.right, map3(right2)));
5956
5956
  return pipe(lefts, zip(rights), forEachSequential(([left4, right4]) => pipe(zip2(left4, right4), map10(([left5, right5]) => op.zip(left5, right5)))));
5957
5957
  }
@@ -5960,19 +5960,19 @@ var fromFlatLoop = (flat, prefix, config2, split2) => {
5960
5960
  }
5961
5961
  }
5962
5962
  };
5963
- var fromFlatLoopFail = (prefix, path2) => (index) => left2(MissingData(prefix, `The element at index ${index} in a sequence at path "${path2}" was missing`));
5964
- var splitPathString = (text8, delim) => {
5965
- const split2 = text8.split(new RegExp(`\\s*${escape(delim)}\\s*`));
5963
+ var fromFlatLoopFail = (prefix, path3) => (index) => left2(MissingData(prefix, `The element at index ${index} in a sequence at path "${path3}" was missing`));
5964
+ var splitPathString = (text9, delim) => {
5965
+ const split2 = text9.split(new RegExp(`\\s*${escape(delim)}\\s*`));
5966
5966
  return split2;
5967
5967
  };
5968
- var parsePrimitive = (text8, path2, primitive2, delimiter, split2) => {
5968
+ var parsePrimitive = (text9, path3, primitive2, delimiter, split2) => {
5969
5969
  if (!split2) {
5970
- return pipe(primitive2.parse(text8), mapBoth2({
5971
- onFailure: prefixed(path2),
5970
+ return pipe(primitive2.parse(text9), mapBoth2({
5971
+ onFailure: prefixed(path3),
5972
5972
  onSuccess: of
5973
5973
  }));
5974
5974
  }
5975
- return pipe(splitPathString(text8, delimiter), forEachSequential((char4) => primitive2.parse(char4.trim())), mapError(prefixed(path2)));
5975
+ return pipe(splitPathString(text9, delimiter), forEachSequential((char4) => primitive2.parse(char4.trim())), mapError(prefixed(path3)));
5976
5976
  };
5977
5977
  var transpose = (array7) => {
5978
5978
  return Object.keys(array7[0]).map((column3) => array7.map((row) => row[column3]));
@@ -5983,9 +5983,9 @@ var indicesFrom = (quotedIndices) => pipe(forEachSequential(quotedIndices, parse
5983
5983
  }), either2, map10(merge));
5984
5984
  var QUOTED_INDEX_REGEX = /^(\[(\d+)\])$/;
5985
5985
  var parseQuotedIndex = (str) => {
5986
- const match18 = str.match(QUOTED_INDEX_REGEX);
5987
- if (match18 !== null) {
5988
- const matchedIndex = match18[2];
5986
+ const match19 = str.match(QUOTED_INDEX_REGEX);
5987
+ if (match19 !== null) {
5988
+ const matchedIndex = match19[2];
5989
5989
  return pipe(matchedIndex !== void 0 && matchedIndex.length > 0 ? some2(matchedIndex) : none2(), flatMap(parseInteger));
5990
5990
  }
5991
5991
  return none2();
@@ -7912,14 +7912,14 @@ var structuredMessage = (u) => {
7912
7912
  }
7913
7913
  }
7914
7914
  };
7915
- var withColor = (text8, ...colors2) => {
7915
+ var withColor = (text9, ...colors2) => {
7916
7916
  let out = "";
7917
7917
  for (let i = 0; i < colors2.length; i++) {
7918
7918
  out += `\x1B[${colors2[i]}m`;
7919
7919
  }
7920
- return out + text8 + "\x1B[0m";
7920
+ return out + text9 + "\x1B[0m";
7921
7921
  };
7922
- var withColorNoop = (text8, ..._colors) => text8;
7922
+ var withColorNoop = (text9, ..._colors) => text9;
7923
7923
  var colors = {
7924
7924
  bold: "1",
7925
7925
  red: "31",
@@ -13692,10 +13692,10 @@ var char = (char4) => {
13692
13692
  op.char = char4;
13693
13693
  return op;
13694
13694
  };
13695
- var text = (text8) => {
13695
+ var text = (text9) => {
13696
13696
  const op = Object.create(proto5);
13697
13697
  op._tag = "Text";
13698
- op.text = text8;
13698
+ op.text = text9;
13699
13699
  return op;
13700
13700
  };
13701
13701
  var flatAlt = /* @__PURE__ */ dual(2, (self, that) => {
@@ -13988,10 +13988,10 @@ var char2 = /* @__PURE__ */ dual(2, (self, char4) => {
13988
13988
  op.stream = self;
13989
13989
  return op;
13990
13990
  });
13991
- var text2 = /* @__PURE__ */ dual(2, (self, text8) => {
13991
+ var text2 = /* @__PURE__ */ dual(2, (self, text9) => {
13992
13992
  const op = Object.create(proto6);
13993
13993
  op._tag = "TextStream";
13994
- op.text = text8;
13994
+ op.text = text9;
13995
13995
  op.stream = self;
13996
13996
  return op;
13997
13997
  });
@@ -14812,8 +14812,8 @@ var make44 = (bytes) => {
14812
14812
  redactedRegistry.set(secret4, bytes.map((byte) => String.fromCharCode(byte)).join(""));
14813
14813
  return secret4;
14814
14814
  };
14815
- var fromString = (text8) => {
14816
- return make44(text8.split("").map((char4) => char4.charCodeAt(0)));
14815
+ var fromString = (text9) => {
14816
+ return make44(text9.split("").map((char4) => char4.charCodeAt(0)));
14817
14817
  };
14818
14818
 
14819
14819
  // node_modules/.pnpm/effect@3.16.12/node_modules/effect/dist/esm/internal/config.js
@@ -14904,14 +14904,14 @@ var formatPropertyKey = (name) => typeof name === "string" ? JSON.stringify(name
14904
14904
  var isNonEmpty5 = (x) => Array.isArray(x);
14905
14905
  var isSingle = (x) => !Array.isArray(x);
14906
14906
  var formatPathKey = (key) => `[${formatPropertyKey(key)}]`;
14907
- var formatPath = (path2) => isNonEmpty5(path2) ? path2.map(formatPathKey).join("") : formatPathKey(path2);
14907
+ var formatPath = (path3) => isNonEmpty5(path3) ? path3.map(formatPathKey).join("") : formatPathKey(path3);
14908
14908
 
14909
14909
  // node_modules/.pnpm/effect@3.16.12/node_modules/effect/dist/esm/internal/schema/errors.js
14910
- var getErrorMessage = (reason, details, path2, ast) => {
14910
+ var getErrorMessage = (reason, details, path3, ast) => {
14911
14911
  let out = reason;
14912
- if (path2 && isNonEmptyReadonlyArray(path2)) {
14912
+ if (path3 && isNonEmptyReadonlyArray(path3)) {
14913
14913
  out += `
14914
- at path: ${formatPath(path2)}`;
14914
+ at path: ${formatPath(path3)}`;
14915
14915
  }
14916
14916
  if (details !== void 0) {
14917
14917
  out += `
@@ -14923,7 +14923,7 @@ schema (${ast._tag}): ${ast}`;
14923
14923
  }
14924
14924
  return out;
14925
14925
  };
14926
- var getSchemaExtendErrorMessage = (x, y, path2) => getErrorMessage("Unsupported schema or overlapping types", `cannot extend ${x} with ${y}`, path2);
14926
+ var getSchemaExtendErrorMessage = (x, y, path3) => getErrorMessage("Unsupported schema or overlapping types", `cannot extend ${x} with ${y}`, path3);
14927
14927
  var getASTUnsupportedKeySchemaErrorMessage = (ast) => getErrorMessage("Unsupported key schema", void 0, void 0, ast);
14928
14928
  var getASTUnsupportedLiteralErrorMessage = (literal2) => getErrorMessage("Unsupported literal", `literal value: ${formatUnknown(literal2)}`);
14929
14929
  var getASTDuplicateIndexSignatureErrorMessage = (type2) => getErrorMessage("Duplicate index signature", `${type2} index signature`);
@@ -15762,8 +15762,8 @@ var unify = (candidates) => {
15762
15762
  var Union = class _Union {
15763
15763
  types;
15764
15764
  annotations;
15765
- static make = (types, annotations2) => {
15766
- return isMembers(types) ? new _Union(types, annotations2) : types.length === 1 ? types[0] : neverKeyword;
15765
+ static make = (types2, annotations2) => {
15766
+ return isMembers(types2) ? new _Union(types2, annotations2) : types2.length === 1 ? types2[0] : neverKeyword;
15767
15767
  };
15768
15768
  /** @internal */
15769
15769
  static unify = (candidates, annotations2) => {
@@ -15773,8 +15773,8 @@ var Union = class _Union {
15773
15773
  * @since 3.10.0
15774
15774
  */
15775
15775
  _tag = "Union";
15776
- constructor(types, annotations2 = {}) {
15777
- this.types = types;
15776
+ constructor(types2, annotations2 = {}) {
15777
+ this.types = types2;
15778
15778
  this.annotations = annotations2;
15779
15779
  }
15780
15780
  /**
@@ -15845,9 +15845,9 @@ var Refinement = class {
15845
15845
  * @since 3.10.0
15846
15846
  */
15847
15847
  _tag = "Refinement";
15848
- constructor(from, filter11, annotations2 = {}) {
15848
+ constructor(from, filter12, annotations2 = {}) {
15849
15849
  this.from = from;
15850
- this.filter = filter11;
15850
+ this.filter = filter12;
15851
15851
  this.annotations = annotations2;
15852
15852
  }
15853
15853
  /**
@@ -16110,8 +16110,8 @@ var typeAST = (ast) => {
16110
16110
  return propertySignatures === ast.propertySignatures && indexSignatures === ast.indexSignatures ? ast : new TypeLiteral(propertySignatures, indexSignatures, ast.annotations);
16111
16111
  }
16112
16112
  case "Union": {
16113
- const types = changeMap(ast.types, typeAST);
16114
- return types === ast.types ? ast : Union.make(types, ast.annotations);
16113
+ const types2 = changeMap(ast.types, typeAST);
16114
+ return types2 === ast.types ? ast : Union.make(types2, ast.annotations);
16115
16115
  }
16116
16116
  case "Suspend":
16117
16117
  return new Suspend(() => typeAST(ast.f()), ast.annotations);
@@ -16182,8 +16182,8 @@ var encodedAST_ = (ast, isBound) => {
16182
16182
  return propertySignatures === ast.propertySignatures && indexSignatures === ast.indexSignatures ? ast : new TypeLiteral(propertySignatures, indexSignatures, createJSONIdentifierAnnotation(ast));
16183
16183
  }
16184
16184
  case "Union": {
16185
- const types = changeMap(ast.types, (ast2) => encodedAST_(ast2, isBound));
16186
- return types === ast.types ? ast : Union.make(types, createJSONIdentifierAnnotation(ast));
16185
+ const types2 = changeMap(ast.types, (ast2) => encodedAST_(ast2, isBound));
16186
+ return types2 === ast.types ? ast : Union.make(types2, createJSONIdentifierAnnotation(ast));
16187
16187
  }
16188
16188
  case "Suspend":
16189
16189
  return new Suspend(() => encodedAST_(ast.f(), isBound), createJSONIdentifierAnnotation(ast));
@@ -16245,8 +16245,8 @@ var Pointer = class {
16245
16245
  * @since 3.10.0
16246
16246
  */
16247
16247
  _tag = "Pointer";
16248
- constructor(path2, actual, issue) {
16249
- this.path = path2;
16248
+ constructor(path3, actual, issue) {
16249
+ this.path = path3;
16250
16250
  this.actual = actual;
16251
16251
  this.issue = issue;
16252
16252
  }
@@ -17356,7 +17356,7 @@ var defaultConfig = {
17356
17356
  showBuiltIns: true,
17357
17357
  showTypes: true
17358
17358
  };
17359
- var normalizeCase = /* @__PURE__ */ dual(2, (self, text8) => self.isCaseSensitive ? text8 : text8.toLowerCase());
17359
+ var normalizeCase = /* @__PURE__ */ dual(2, (self, text9) => self.isCaseSensitive ? text9 : text9.toLowerCase());
17360
17360
 
17361
17361
  // node_modules/.pnpm/@effect+cli@0.66.12_@effect+platform@0.87.12_@effect+printer-ansi@0.44.12_@effect+printer@0.44.12_effect@3.16.12/node_modules/@effect/cli/dist/esm/internal/autoCorrect.js
17362
17362
  var levensteinDistance = (first3, second, config2) => {
@@ -20240,7 +20240,7 @@ function makeTypeLiteralClass(fields, records, ast = getDefaultTypeLiteralAST(fi
20240
20240
  function Struct(fields, ...records) {
20241
20241
  return makeTypeLiteralClass(fields, records);
20242
20242
  }
20243
- var intersectTypeLiterals = (x, y, path2) => {
20243
+ var intersectTypeLiterals = (x, y, path3) => {
20244
20244
  if (isTypeLiteral(x) && isTypeLiteral(y)) {
20245
20245
  const propertySignatures = [...x.propertySignatures];
20246
20246
  for (const ps of y.propertySignatures) {
@@ -20253,18 +20253,18 @@ var intersectTypeLiterals = (x, y, path2) => {
20253
20253
  isOptional,
20254
20254
  type: type2
20255
20255
  } = propertySignatures[i];
20256
- propertySignatures[i] = new PropertySignature(name, extendAST(type2, ps.type, path2.concat(name)), isOptional, true);
20256
+ propertySignatures[i] = new PropertySignature(name, extendAST(type2, ps.type, path3.concat(name)), isOptional, true);
20257
20257
  }
20258
20258
  }
20259
20259
  return new TypeLiteral(propertySignatures, x.indexSignatures.concat(y.indexSignatures));
20260
20260
  }
20261
- throw new Error(getSchemaExtendErrorMessage(x, y, path2));
20261
+ throw new Error(getSchemaExtendErrorMessage(x, y, path3));
20262
20262
  };
20263
20263
  var preserveRefinementAnnotations = /* @__PURE__ */ omitAnnotations([IdentifierAnnotationId]);
20264
20264
  var addRefinementToMembers = (refinement, asts) => asts.map((ast) => new Refinement(ast, refinement.filter, preserveRefinementAnnotations(refinement)));
20265
- var extendAST = (x, y, path2) => Union.make(intersectUnionMembers([x], [y], path2));
20265
+ var extendAST = (x, y, path3) => Union.make(intersectUnionMembers([x], [y], path3));
20266
20266
  var getTypes = (ast) => isUnion3(ast) ? ast.types : [ast];
20267
- var intersectUnionMembers = (xs, ys, path2) => flatMap2(xs, (x) => flatMap2(ys, (y) => {
20267
+ var intersectUnionMembers = (xs, ys, path3) => flatMap2(xs, (x) => flatMap2(ys, (y) => {
20268
20268
  switch (y._tag) {
20269
20269
  case "Literal": {
20270
20270
  if (isString(y.literal) && isStringKeyword(x) || isNumber(y.literal) && isNumberKeyword(x) || isBoolean(y.literal) && isBooleanKeyword(x)) {
@@ -20277,7 +20277,7 @@ var intersectUnionMembers = (xs, ys, path2) => flatMap2(xs, (x) => flatMap2(ys,
20277
20277
  if (isStringKeyword(x) || isLiteral(x) && isString(x.literal)) {
20278
20278
  return [x];
20279
20279
  } else if (isRefinement(x)) {
20280
- return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path2));
20280
+ return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path3));
20281
20281
  }
20282
20282
  } else if (x === stringKeyword) {
20283
20283
  return [y];
@@ -20289,7 +20289,7 @@ var intersectUnionMembers = (xs, ys, path2) => flatMap2(xs, (x) => flatMap2(ys,
20289
20289
  if (isNumberKeyword(x) || isLiteral(x) && isNumber(x.literal)) {
20290
20290
  return [x];
20291
20291
  } else if (isRefinement(x)) {
20292
- return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path2));
20292
+ return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path3));
20293
20293
  }
20294
20294
  } else if (x === numberKeyword) {
20295
20295
  return [y];
@@ -20301,7 +20301,7 @@ var intersectUnionMembers = (xs, ys, path2) => flatMap2(xs, (x) => flatMap2(ys,
20301
20301
  if (isBooleanKeyword(x) || isLiteral(x) && isBoolean(x.literal)) {
20302
20302
  return [x];
20303
20303
  } else if (isRefinement(x)) {
20304
- return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path2));
20304
+ return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path3));
20305
20305
  }
20306
20306
  } else if (x === booleanKeyword) {
20307
20307
  return [y];
@@ -20309,25 +20309,25 @@ var intersectUnionMembers = (xs, ys, path2) => flatMap2(xs, (x) => flatMap2(ys,
20309
20309
  break;
20310
20310
  }
20311
20311
  case "Union":
20312
- return intersectUnionMembers(getTypes(x), y.types, path2);
20312
+ return intersectUnionMembers(getTypes(x), y.types, path3);
20313
20313
  case "Suspend":
20314
- return [new Suspend(() => extendAST(x, y.f(), path2))];
20314
+ return [new Suspend(() => extendAST(x, y.f(), path3))];
20315
20315
  case "Refinement":
20316
- return addRefinementToMembers(y, intersectUnionMembers(getTypes(x), getTypes(y.from), path2));
20316
+ return addRefinementToMembers(y, intersectUnionMembers(getTypes(x), getTypes(y.from), path3));
20317
20317
  case "TypeLiteral": {
20318
20318
  switch (x._tag) {
20319
20319
  case "Union":
20320
- return intersectUnionMembers(x.types, [y], path2);
20320
+ return intersectUnionMembers(x.types, [y], path3);
20321
20321
  case "Suspend":
20322
- return [new Suspend(() => extendAST(x.f(), y, path2))];
20322
+ return [new Suspend(() => extendAST(x.f(), y, path3))];
20323
20323
  case "Refinement":
20324
- return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path2));
20324
+ return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path3));
20325
20325
  case "TypeLiteral":
20326
- return [intersectTypeLiterals(x, y, path2)];
20326
+ return [intersectTypeLiterals(x, y, path3)];
20327
20327
  case "Transformation": {
20328
20328
  const transformation = x.transformation;
20329
- const from = intersectTypeLiterals(x.from, y, path2);
20330
- const to = intersectTypeLiterals(x.to, typeAST(y), path2);
20329
+ const from = intersectTypeLiterals(x.from, y, path3);
20330
+ const to = intersectTypeLiterals(x.to, typeAST(y), path3);
20331
20331
  switch (transformation._tag) {
20332
20332
  case "TypeLiteralTransformation":
20333
20333
  return [new Transformation(from, to, new TypeLiteralTransformation(transformation.propertySignatureTransformations))];
@@ -20349,28 +20349,28 @@ var intersectUnionMembers = (xs, ys, path2) => flatMap2(xs, (x) => flatMap2(ys,
20349
20349
  case "Transformation": {
20350
20350
  if (isTransformation(x)) {
20351
20351
  if (isTypeLiteralTransformation(y.transformation) && isTypeLiteralTransformation(x.transformation)) {
20352
- return [new Transformation(intersectTypeLiterals(x.from, y.from, path2), intersectTypeLiterals(x.to, y.to, path2), new TypeLiteralTransformation(y.transformation.propertySignatureTransformations.concat(x.transformation.propertySignatureTransformations)))];
20352
+ return [new Transformation(intersectTypeLiterals(x.from, y.from, path3), intersectTypeLiterals(x.to, y.to, path3), new TypeLiteralTransformation(y.transformation.propertySignatureTransformations.concat(x.transformation.propertySignatureTransformations)))];
20353
20353
  }
20354
20354
  } else {
20355
- return intersectUnionMembers([y], [x], path2);
20355
+ return intersectUnionMembers([y], [x], path3);
20356
20356
  }
20357
20357
  break;
20358
20358
  }
20359
20359
  }
20360
- throw new Error(getSchemaExtendErrorMessage(x, y, path2));
20360
+ throw new Error(getSchemaExtendErrorMessage(x, y, path3));
20361
20361
  }));
20362
20362
  var extend3 = /* @__PURE__ */ dual(2, (self, that) => make50(extendAST(self.ast, that.ast, [])));
20363
20363
  var compose3 = /* @__PURE__ */ dual((args3) => isSchema(args3[1]), (from, to) => makeTransformationClass(from, to, compose(from.ast, to.ast)));
20364
20364
  var suspend10 = (f) => make50(new Suspend(() => f().ast));
20365
20365
  var RefineSchemaId = /* @__PURE__ */ Symbol.for("effect/SchemaId/Refine");
20366
- function makeRefineClass(from, filter11, ast) {
20366
+ function makeRefineClass(from, filter12, ast) {
20367
20367
  return class RefineClass extends make50(ast) {
20368
20368
  static annotations(annotations2) {
20369
20369
  return makeRefineClass(this.from, this.filter, mergeSchemaAnnotations(this.ast, annotations2));
20370
20370
  }
20371
20371
  static [RefineSchemaId] = from;
20372
20372
  static from = from;
20373
- static filter = filter11;
20373
+ static filter = filter12;
20374
20374
  static make = (a, options3) => {
20375
20375
  return getDisableValidationMakeOption(options3) ? a : validateSync(this)(a);
20376
20376
  };
@@ -20406,11 +20406,11 @@ var toFilterParseIssue = (out, ast, input) => {
20406
20406
  };
20407
20407
  function filter10(predicate, annotations2) {
20408
20408
  return (self) => {
20409
- function filter11(input, options3, ast2) {
20409
+ function filter12(input, options3, ast2) {
20410
20410
  return toFilterParseIssue(predicate(input, options3, ast2), ast2, input);
20411
20411
  }
20412
- const ast = new Refinement(self.ast, filter11, toASTAnnotations(annotations2));
20413
- return makeRefineClass(self, filter11, ast);
20412
+ const ast = new Refinement(self.ast, filter12, toASTAnnotations(annotations2));
20413
+ return makeRefineClass(self, filter12, ast);
20414
20414
  };
20415
20415
  }
20416
20416
  function makeTransformationClass(from, to, ast) {
@@ -21055,8 +21055,8 @@ var bigintPiB = bigint1024 * bigint1024 * bigint1024 * bigint1024 * bigint1024;
21055
21055
  var make51 = (impl) => {
21056
21056
  return tag.of({
21057
21057
  ...impl,
21058
- exists: (path2) => pipe(impl.access(path2), as4(true), catchTag2("SystemError", (e) => e.reason === "NotFound" ? succeed7(false) : fail7(e))),
21059
- readFileString: (path2, encoding) => tryMap2(impl.readFile(path2), {
21058
+ exists: (path3) => pipe(impl.access(path3), as4(true), catchTag2("SystemError", (e) => e.reason === "NotFound" ? succeed7(false) : fail7(e))),
21059
+ readFileString: (path3, encoding) => tryMap2(impl.readFile(path3), {
21060
21060
  try: (_) => new TextDecoder(encoding).decode(_),
21061
21061
  catch: (cause2) => new BadArgument({
21062
21062
  module: "FileSystem",
@@ -21065,14 +21065,14 @@ var make51 = (impl) => {
21065
21065
  cause: cause2
21066
21066
  })
21067
21067
  }),
21068
- stream: (path2, options3) => pipe(impl.open(path2, {
21068
+ stream: (path3, options3) => pipe(impl.open(path3, {
21069
21069
  flag: "r"
21070
21070
  }), options3?.offset ? tap2((file3) => file3.seek(options3.offset, "start")) : identity, map16((file3) => stream(file3, options3)), unwrapScoped6),
21071
- sink: (path2, options3) => pipe(impl.open(path2, {
21071
+ sink: (path3, options3) => pipe(impl.open(path3, {
21072
21072
  flag: "w",
21073
21073
  ...options3
21074
21074
  }), map16((file3) => forEach10((_) => file3.writeAll(_))), unwrapScoped5),
21075
- writeFileString: (path2, data, options3) => flatMap9(try_2({
21075
+ writeFileString: (path3, data, options3) => flatMap9(try_2({
21076
21076
  try: () => new TextEncoder().encode(data),
21077
21077
  catch: (cause2) => new BadArgument({
21078
21078
  module: "FileSystem",
@@ -21080,7 +21080,7 @@ var make51 = (impl) => {
21080
21080
  description: "could not encode string",
21081
21081
  cause: cause2
21082
21082
  })
21083
- }), (_) => impl.writeFile(path2, _, options3))
21083
+ }), (_) => impl.writeFile(path3, _, options3))
21084
21084
  });
21085
21085
  };
21086
21086
  var stream = (file3, {
@@ -21383,12 +21383,12 @@ var windowsFigures = {
21383
21383
  pointer: /* @__PURE__ */ text3(">")
21384
21384
  };
21385
21385
  var figures = /* @__PURE__ */ map16(/* @__PURE__ */ sync4(() => process.platform === "win32"), (isWindows) => isWindows ? windowsFigures : defaultFigures);
21386
- function eraseText(text8, columns) {
21386
+ function eraseText(text9, columns) {
21387
21387
  if (columns === 0) {
21388
21388
  return cat2(eraseLine3, cursorTo3(0));
21389
21389
  }
21390
21390
  let rows = 0;
21391
- const lines3 = text8.split(/\r?\n/);
21391
+ const lines3 = text9.split(/\r?\n/);
21392
21392
  for (const line4 of lines3) {
21393
21393
  rows += 1 + Math.floor(Math.max(line4.length - 1, 0) / columns);
21394
21394
  }
@@ -21672,10 +21672,10 @@ var makeDateParts = (dateMask, date5, locales) => {
21672
21672
  const parts2 = [];
21673
21673
  let result = null;
21674
21674
  while (result = DATE_PART_REGEX.exec(dateMask)) {
21675
- const match18 = result.shift();
21675
+ const match19 = result.shift();
21676
21676
  const index = result.findIndex((group4) => group4 !== void 0);
21677
21677
  if (index in regexGroups) {
21678
- const token = result[index] || match18;
21678
+ const token = result[index] || match19;
21679
21679
  parts2.push(regexGroups[index]({
21680
21680
  token,
21681
21681
  date: date5,
@@ -21684,7 +21684,7 @@ var makeDateParts = (dateMask, date5, locales) => {
21684
21684
  }));
21685
21685
  } else {
21686
21686
  parts2.push(new Token({
21687
- token: result[index] || match18,
21687
+ token: result[index] || match19,
21688
21688
  date: date5,
21689
21689
  parts: parts2,
21690
21690
  locales
@@ -21879,15 +21879,15 @@ var Meridiem = class extends DatePart {
21879
21879
  // node_modules/.pnpm/@effect+platform@0.87.12_effect@3.16.12/node_modules/@effect/platform/dist/esm/internal/path.js
21880
21880
  var TypeId19 = /* @__PURE__ */ Symbol.for("@effect/platform/Path");
21881
21881
  var Path = /* @__PURE__ */ GenericTag("@effect/platform/Path");
21882
- function normalizeStringPosix(path2, allowAboveRoot) {
21882
+ function normalizeStringPosix(path3, allowAboveRoot) {
21883
21883
  let res = "";
21884
21884
  let lastSegmentLength = 0;
21885
21885
  let lastSlash = -1;
21886
21886
  let dots = 0;
21887
21887
  let code2;
21888
- for (let i = 0; i <= path2.length; ++i) {
21889
- if (i < path2.length) {
21890
- code2 = path2.charCodeAt(i);
21888
+ for (let i = 0; i <= path3.length; ++i) {
21889
+ if (i < path3.length) {
21890
+ code2 = path3.charCodeAt(i);
21891
21891
  } else if (code2 === 47) {
21892
21892
  break;
21893
21893
  } else {
@@ -21929,9 +21929,9 @@ function normalizeStringPosix(path2, allowAboveRoot) {
21929
21929
  }
21930
21930
  } else {
21931
21931
  if (res.length > 0) {
21932
- res += "/" + path2.slice(lastSlash + 1, i);
21932
+ res += "/" + path3.slice(lastSlash + 1, i);
21933
21933
  } else {
21934
- res = path2.slice(lastSlash + 1, i);
21934
+ res = path3.slice(lastSlash + 1, i);
21935
21935
  }
21936
21936
  lastSegmentLength = i - lastSlash - 1;
21937
21937
  }
@@ -21946,7 +21946,7 @@ function normalizeStringPosix(path2, allowAboveRoot) {
21946
21946
  }
21947
21947
  return res;
21948
21948
  }
21949
- function _format(sep, pathObject) {
21949
+ function _format(sep2, pathObject) {
21950
21950
  const dir2 = pathObject.dir || pathObject.root;
21951
21951
  const base = pathObject.base || (pathObject.name || "") + (pathObject.ext || "");
21952
21952
  if (!dir2) {
@@ -21955,7 +21955,7 @@ function _format(sep, pathObject) {
21955
21955
  if (dir2 === pathObject.root) {
21956
21956
  return dir2 + base;
21957
21957
  }
21958
- return dir2 + sep + base;
21958
+ return dir2 + sep2 + base;
21959
21959
  }
21960
21960
  function fromFileUrl(url2) {
21961
21961
  if (url2.protocol !== "file:") {
@@ -21991,21 +21991,21 @@ var resolve = function resolve2() {
21991
21991
  let resolvedAbsolute = false;
21992
21992
  let cwd = void 0;
21993
21993
  for (let i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
21994
- let path2;
21994
+ let path3;
21995
21995
  if (i >= 0) {
21996
- path2 = arguments[i];
21996
+ path3 = arguments[i];
21997
21997
  } else {
21998
21998
  const process2 = globalThis.process;
21999
21999
  if (cwd === void 0 && "process" in globalThis && typeof process2 === "object" && process2 !== null && typeof process2.cwd === "function") {
22000
22000
  cwd = process2.cwd();
22001
22001
  }
22002
- path2 = cwd;
22002
+ path3 = cwd;
22003
22003
  }
22004
- if (path2.length === 0) {
22004
+ if (path3.length === 0) {
22005
22005
  continue;
22006
22006
  }
22007
- resolvedPath = path2 + "/" + resolvedPath;
22008
- resolvedAbsolute = path2.charCodeAt(0) === 47;
22007
+ resolvedPath = path3 + "/" + resolvedPath;
22008
+ resolvedAbsolute = path3.charCodeAt(0) === 47;
22009
22009
  }
22010
22010
  resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);
22011
22011
  if (resolvedAbsolute) {
@@ -22057,18 +22057,18 @@ function encodePathChars(filepath) {
22057
22057
  var posixImpl = /* @__PURE__ */ Path.of({
22058
22058
  [TypeId19]: TypeId19,
22059
22059
  resolve,
22060
- normalize(path2) {
22061
- if (path2.length === 0) return ".";
22062
- const isAbsolute = path2.charCodeAt(0) === 47;
22063
- const trailingSeparator = path2.charCodeAt(path2.length - 1) === 47;
22064
- path2 = normalizeStringPosix(path2, !isAbsolute);
22065
- if (path2.length === 0 && !isAbsolute) path2 = ".";
22066
- if (path2.length > 0 && trailingSeparator) path2 += "/";
22067
- if (isAbsolute) return "/" + path2;
22068
- return path2;
22060
+ normalize(path3) {
22061
+ if (path3.length === 0) return ".";
22062
+ const isAbsolute = path3.charCodeAt(0) === 47;
22063
+ const trailingSeparator = path3.charCodeAt(path3.length - 1) === 47;
22064
+ path3 = normalizeStringPosix(path3, !isAbsolute);
22065
+ if (path3.length === 0 && !isAbsolute) path3 = ".";
22066
+ if (path3.length > 0 && trailingSeparator) path3 += "/";
22067
+ if (isAbsolute) return "/" + path3;
22068
+ return path3;
22069
22069
  },
22070
- isAbsolute(path2) {
22071
- return path2.length > 0 && path2.charCodeAt(0) === 47;
22070
+ isAbsolute(path3) {
22071
+ return path3.length > 0 && path3.charCodeAt(0) === 47;
22072
22072
  },
22073
22073
  join() {
22074
22074
  if (arguments.length === 0) {
@@ -22160,14 +22160,14 @@ var posixImpl = /* @__PURE__ */ Path.of({
22160
22160
  return to.slice(toStart);
22161
22161
  }
22162
22162
  },
22163
- dirname(path2) {
22164
- if (path2.length === 0) return ".";
22165
- let code2 = path2.charCodeAt(0);
22163
+ dirname(path3) {
22164
+ if (path3.length === 0) return ".";
22165
+ let code2 = path3.charCodeAt(0);
22166
22166
  const hasRoot = code2 === 47;
22167
22167
  let end5 = -1;
22168
22168
  let matchedSlash = true;
22169
- for (let i = path2.length - 1; i >= 1; --i) {
22170
- code2 = path2.charCodeAt(i);
22169
+ for (let i = path3.length - 1; i >= 1; --i) {
22170
+ code2 = path3.charCodeAt(i);
22171
22171
  if (code2 === 47) {
22172
22172
  if (!matchedSlash) {
22173
22173
  end5 = i;
@@ -22179,19 +22179,19 @@ var posixImpl = /* @__PURE__ */ Path.of({
22179
22179
  }
22180
22180
  if (end5 === -1) return hasRoot ? "/" : ".";
22181
22181
  if (hasRoot && end5 === 1) return "//";
22182
- return path2.slice(0, end5);
22182
+ return path3.slice(0, end5);
22183
22183
  },
22184
- basename(path2, ext) {
22184
+ basename(path3, ext2) {
22185
22185
  let start4 = 0;
22186
22186
  let end5 = -1;
22187
22187
  let matchedSlash = true;
22188
22188
  let i;
22189
- if (ext !== void 0 && ext.length > 0 && ext.length <= path2.length) {
22190
- if (ext.length === path2.length && ext === path2) return "";
22191
- let extIdx = ext.length - 1;
22189
+ if (ext2 !== void 0 && ext2.length > 0 && ext2.length <= path3.length) {
22190
+ if (ext2.length === path3.length && ext2 === path3) return "";
22191
+ let extIdx = ext2.length - 1;
22192
22192
  let firstNonSlashEnd = -1;
22193
- for (i = path2.length - 1; i >= 0; --i) {
22194
- const code2 = path2.charCodeAt(i);
22193
+ for (i = path3.length - 1; i >= 0; --i) {
22194
+ const code2 = path3.charCodeAt(i);
22195
22195
  if (code2 === 47) {
22196
22196
  if (!matchedSlash) {
22197
22197
  start4 = i + 1;
@@ -22203,7 +22203,7 @@ var posixImpl = /* @__PURE__ */ Path.of({
22203
22203
  firstNonSlashEnd = i + 1;
22204
22204
  }
22205
22205
  if (extIdx >= 0) {
22206
- if (code2 === ext.charCodeAt(extIdx)) {
22206
+ if (code2 === ext2.charCodeAt(extIdx)) {
22207
22207
  if (--extIdx === -1) {
22208
22208
  end5 = i;
22209
22209
  }
@@ -22215,11 +22215,11 @@ var posixImpl = /* @__PURE__ */ Path.of({
22215
22215
  }
22216
22216
  }
22217
22217
  if (start4 === end5) end5 = firstNonSlashEnd;
22218
- else if (end5 === -1) end5 = path2.length;
22219
- return path2.slice(start4, end5);
22218
+ else if (end5 === -1) end5 = path3.length;
22219
+ return path3.slice(start4, end5);
22220
22220
  } else {
22221
- for (i = path2.length - 1; i >= 0; --i) {
22222
- if (path2.charCodeAt(i) === 47) {
22221
+ for (i = path3.length - 1; i >= 0; --i) {
22222
+ if (path3.charCodeAt(i) === 47) {
22223
22223
  if (!matchedSlash) {
22224
22224
  start4 = i + 1;
22225
22225
  break;
@@ -22230,17 +22230,17 @@ var posixImpl = /* @__PURE__ */ Path.of({
22230
22230
  }
22231
22231
  }
22232
22232
  if (end5 === -1) return "";
22233
- return path2.slice(start4, end5);
22233
+ return path3.slice(start4, end5);
22234
22234
  }
22235
22235
  },
22236
- extname(path2) {
22236
+ extname(path3) {
22237
22237
  let startDot = -1;
22238
22238
  let startPart = 0;
22239
22239
  let end5 = -1;
22240
22240
  let matchedSlash = true;
22241
22241
  let preDotState = 0;
22242
- for (let i = path2.length - 1; i >= 0; --i) {
22243
- const code2 = path2.charCodeAt(i);
22242
+ for (let i = path3.length - 1; i >= 0; --i) {
22243
+ const code2 = path3.charCodeAt(i);
22244
22244
  if (code2 === 47) {
22245
22245
  if (!matchedSlash) {
22246
22246
  startPart = i + 1;
@@ -22267,7 +22267,7 @@ var posixImpl = /* @__PURE__ */ Path.of({
22267
22267
  preDotState === 1 && startDot === end5 - 1 && startDot === startPart + 1) {
22268
22268
  return "";
22269
22269
  }
22270
- return path2.slice(startDot, end5);
22270
+ return path3.slice(startDot, end5);
22271
22271
  },
22272
22272
  format: function format5(pathObject) {
22273
22273
  if (pathObject === null || typeof pathObject !== "object") {
@@ -22275,7 +22275,7 @@ var posixImpl = /* @__PURE__ */ Path.of({
22275
22275
  }
22276
22276
  return _format("/", pathObject);
22277
22277
  },
22278
- parse(path2) {
22278
+ parse(path3) {
22279
22279
  const ret = {
22280
22280
  root: "",
22281
22281
  dir: "",
@@ -22283,8 +22283,8 @@ var posixImpl = /* @__PURE__ */ Path.of({
22283
22283
  ext: "",
22284
22284
  name: ""
22285
22285
  };
22286
- if (path2.length === 0) return ret;
22287
- let code2 = path2.charCodeAt(0);
22286
+ if (path3.length === 0) return ret;
22287
+ let code2 = path3.charCodeAt(0);
22288
22288
  const isAbsolute = code2 === 47;
22289
22289
  let start4;
22290
22290
  if (isAbsolute) {
@@ -22297,10 +22297,10 @@ var posixImpl = /* @__PURE__ */ Path.of({
22297
22297
  let startPart = 0;
22298
22298
  let end5 = -1;
22299
22299
  let matchedSlash = true;
22300
- let i = path2.length - 1;
22300
+ let i = path3.length - 1;
22301
22301
  let preDotState = 0;
22302
22302
  for (; i >= start4; --i) {
22303
- code2 = path2.charCodeAt(i);
22303
+ code2 = path3.charCodeAt(i);
22304
22304
  if (code2 === 47) {
22305
22305
  if (!matchedSlash) {
22306
22306
  startPart = i + 1;
@@ -22323,20 +22323,20 @@ var posixImpl = /* @__PURE__ */ Path.of({
22323
22323
  preDotState === 0 || // The (right-most) trimmed path component is exactly '..'
22324
22324
  preDotState === 1 && startDot === end5 - 1 && startDot === startPart + 1) {
22325
22325
  if (end5 !== -1) {
22326
- if (startPart === 0 && isAbsolute) ret.base = ret.name = path2.slice(1, end5);
22327
- else ret.base = ret.name = path2.slice(startPart, end5);
22326
+ if (startPart === 0 && isAbsolute) ret.base = ret.name = path3.slice(1, end5);
22327
+ else ret.base = ret.name = path3.slice(startPart, end5);
22328
22328
  }
22329
22329
  } else {
22330
22330
  if (startPart === 0 && isAbsolute) {
22331
- ret.name = path2.slice(1, startDot);
22332
- ret.base = path2.slice(1, end5);
22331
+ ret.name = path3.slice(1, startDot);
22332
+ ret.base = path3.slice(1, end5);
22333
22333
  } else {
22334
- ret.name = path2.slice(startPart, startDot);
22335
- ret.base = path2.slice(startPart, end5);
22334
+ ret.name = path3.slice(startPart, startDot);
22335
+ ret.base = path3.slice(startPart, end5);
22336
22336
  }
22337
- ret.ext = path2.slice(startDot, end5);
22337
+ ret.ext = path3.slice(startDot, end5);
22338
22338
  }
22339
- if (startPart > 0) ret.dir = path2.slice(0, startPart - 1);
22339
+ if (startPart > 0) ret.dir = path3.slice(0, startPart - 1);
22340
22340
  else if (isAbsolute) ret.dir = "/";
22341
22341
  return ret;
22342
22342
  },
@@ -22371,22 +22371,22 @@ var showConfirmation = /* @__PURE__ */ Confirm.$is("Show");
22371
22371
  var renderBeep2 = /* @__PURE__ */ render3(beep3, {
22372
22372
  style: "pretty"
22373
22373
  });
22374
- function resolveCurrentPath(path2, options3) {
22375
- return match2(path2, {
22374
+ function resolveCurrentPath(path3, options3) {
22375
+ return match2(path3, {
22376
22376
  onNone: () => match2(options3.startingPath, {
22377
22377
  onNone: () => sync4(() => process.cwd()),
22378
- onSome: (path3) => flatMap9(FileSystem, (fs) => (
22378
+ onSome: (path4) => flatMap9(FileSystem, (fs) => (
22379
22379
  // Ensure the user provided starting path exists
22380
- orDie2(fs.exists(path3)).pipe(filterOrDieMessage2(identity, `The provided starting path '${path3}' does not exist`), as4(path3))
22380
+ orDie2(fs.exists(path4)).pipe(filterOrDieMessage2(identity, `The provided starting path '${path4}' does not exist`), as4(path4))
22381
22381
  ))
22382
22382
  }),
22383
- onSome: (path3) => succeed7(path3)
22383
+ onSome: (path4) => succeed7(path4)
22384
22384
  });
22385
22385
  }
22386
22386
  function getFileList(directory2, options3) {
22387
22387
  return gen2(function* () {
22388
22388
  const fs = yield* FileSystem;
22389
- const path2 = yield* Path2;
22389
+ const path3 = yield* Path2;
22390
22390
  const files = yield* orDie2(fs.readDirectory(directory2)).pipe(
22391
22391
  // Always prepend the `".."` option to the file list but allow it
22392
22392
  // to be filtered out if the user so desires
@@ -22395,7 +22395,7 @@ function getFileList(directory2, options3) {
22395
22395
  return yield* filter8(files, (file3) => {
22396
22396
  const result = options3.filter(file3);
22397
22397
  const userDefinedFilter = isEffect2(result) ? result : succeed7(result);
22398
- const directoryFilter = options3.type === "directory" ? map16(orDie2(fs.stat(path2.join(directory2, file3))), (info2) => info2.type === "Directory") : succeed7(true);
22398
+ const directoryFilter = options3.type === "directory" ? map16(orDie2(fs.stat(path3.join(directory2, file3))), (info2) => info2.type === "Directory") : succeed7(true);
22399
22399
  return zipWith4(userDefinedFilter, directoryFilter, (a, b) => a && b);
22400
22400
  }, {
22401
22401
  concurrency: files.length
@@ -22408,12 +22408,12 @@ function handleClear2(options3) {
22408
22408
  const terminal = yield* Terminal;
22409
22409
  const columns = yield* terminal.columns;
22410
22410
  const currentPath = yield* resolveCurrentPath(state.path, options3);
22411
- const text8 = "\n".repeat(Math.min(state.files.length, options3.maxPerPage));
22411
+ const text9 = "\n".repeat(Math.min(state.files.length, options3.maxPerPage));
22412
22412
  const clearPath = eraseText(currentPath, columns);
22413
22413
  const message = showConfirmation(state.confirm) ? CONFIRM_MESSAGE : options3.message;
22414
22414
  const clearPrompt = eraseText(`
22415
22415
  ${message}`, columns);
22416
- const clearOptions = eraseText(text8, columns);
22416
+ const clearOptions = eraseText(text9, columns);
22417
22417
  return clearOptions.pipe(cat2(clearPath), cat2(clearPrompt), optimize3(Deep), render3({
22418
22418
  style: "pretty",
22419
22419
  options: {
@@ -22461,13 +22461,13 @@ function renderFiles(state, files, figures2, options3) {
22461
22461
  }
22462
22462
  function renderNextFrame2(state, options3) {
22463
22463
  return gen2(function* () {
22464
- const path2 = yield* Path2;
22464
+ const path3 = yield* Path2;
22465
22465
  const terminal = yield* Terminal;
22466
22466
  const columns = yield* terminal.columns;
22467
22467
  const figures2 = yield* figures;
22468
22468
  const currentPath = yield* resolveCurrentPath(state.path, options3);
22469
22469
  const selectedPath = state.files[state.cursor];
22470
- const resolvedPath = path2.resolve(currentPath, selectedPath);
22470
+ const resolvedPath = path3.resolve(currentPath, selectedPath);
22471
22471
  const resolvedPathMsg = figures2.pointerSmall.pipe(cat2(space2), cat2(text3(resolvedPath)), annotate2(blackBright2));
22472
22472
  if (showConfirmation(state.confirm)) {
22473
22473
  const leadingSymbol2 = annotate2(text3("?"), cyanBright2);
@@ -22542,10 +22542,10 @@ function processCursorDown(state) {
22542
22542
  function processSelection(state, options3) {
22543
22543
  return gen2(function* () {
22544
22544
  const fs = yield* FileSystem;
22545
- const path2 = yield* Path2;
22545
+ const path3 = yield* Path2;
22546
22546
  const currentPath = yield* resolveCurrentPath(state.path, options3);
22547
22547
  const selectedPath = state.files[state.cursor];
22548
- const resolvedPath = path2.resolve(currentPath, selectedPath);
22548
+ const resolvedPath = path3.resolve(currentPath, selectedPath);
22549
22549
  const info2 = yield* orDie2(fs.stat(resolvedPath));
22550
22550
  if (info2.type === "Directory") {
22551
22551
  const files = yield* getFileList(resolvedPath, options3);
@@ -22593,10 +22593,10 @@ function handleProcess2(options3) {
22593
22593
  case "y":
22594
22594
  case "t": {
22595
22595
  if (showConfirmation(state.confirm)) {
22596
- const path2 = yield* Path2;
22596
+ const path3 = yield* Path2;
22597
22597
  const currentPath = yield* resolveCurrentPath(state.path, options3);
22598
22598
  const selectedPath = state.files[state.cursor];
22599
- const resolvedPath = path2.resolve(currentPath, selectedPath);
22599
+ const resolvedPath = path3.resolve(currentPath, selectedPath);
22600
22600
  const files = yield* getFileList(resolvedPath, options3);
22601
22601
  return Action.NextFrame({
22602
22602
  state: {
@@ -22612,10 +22612,10 @@ function handleProcess2(options3) {
22612
22612
  case "n":
22613
22613
  case "f": {
22614
22614
  if (showConfirmation(state.confirm)) {
22615
- const path2 = yield* Path2;
22615
+ const path3 = yield* Path2;
22616
22616
  const currentPath = yield* resolveCurrentPath(state.path, options3);
22617
22617
  const selectedPath = state.files[state.cursor];
22618
- const resolvedPath = path2.resolve(currentPath, selectedPath);
22618
+ const resolvedPath = path3.resolve(currentPath, selectedPath);
22619
22619
  return Action.Submit({
22620
22620
  value: resolvedPath
22621
22621
  });
@@ -22637,14 +22637,14 @@ var file = (options3 = {}) => {
22637
22637
  filter: options3.filter ?? (() => succeed7(true))
22638
22638
  };
22639
22639
  const initialState3 = gen2(function* () {
22640
- const path2 = none2();
22641
- const currentPath = yield* resolveCurrentPath(path2, opts);
22640
+ const path3 = none2();
22641
+ const currentPath = yield* resolveCurrentPath(path3, opts);
22642
22642
  const files = yield* getFileList(currentPath, opts);
22643
22643
  const confirm = Confirm.Hide();
22644
22644
  return {
22645
22645
  cursor: 0,
22646
22646
  files,
22647
- path: path2,
22647
+ path: path3,
22648
22648
  confirm
22649
22649
  };
22650
22650
  });
@@ -23123,8 +23123,8 @@ function handleClear4(options3) {
23123
23123
  const terminal = yield* Terminal;
23124
23124
  const columns = yield* terminal.columns;
23125
23125
  const clearPrompt = cat2(eraseLine3, cursorLeft3);
23126
- const text8 = "\n".repeat(Math.min(options3.choices.length, options3.maxPerPage)) + options3.message;
23127
- const clearOutput = eraseText(text8, columns);
23126
+ const text9 = "\n".repeat(Math.min(options3.choices.length, options3.maxPerPage)) + options3.message;
23127
+ const clearOutput = eraseText(text9, columns);
23128
23128
  return clearOutput.pipe(cat2(clearPrompt), optimize3(Deep), render3({
23129
23129
  style: "pretty",
23130
23130
  options: {
@@ -23210,7 +23210,7 @@ ${error4}`, columns))
23210
23210
  });
23211
23211
  }
23212
23212
  function renderInput2(nextState, options3, submitted) {
23213
- const text8 = getValue(nextState, options3);
23213
+ const text9 = getValue(nextState, options3);
23214
23214
  const annotation = match2(nextState.error, {
23215
23215
  onNone: () => {
23216
23216
  if (submitted) {
@@ -23228,10 +23228,10 @@ function renderInput2(nextState, options3, submitted) {
23228
23228
  return empty32;
23229
23229
  }
23230
23230
  case "password": {
23231
- return annotate2(text3("*".repeat(text8.length)), annotation);
23231
+ return annotate2(text3("*".repeat(text9.length)), annotation);
23232
23232
  }
23233
23233
  case "text": {
23234
- return annotate2(text3(text8), annotation);
23234
+ return annotate2(text3(text9), annotation);
23235
23235
  }
23236
23236
  }
23237
23237
  }
@@ -23608,6 +23608,11 @@ var choice = (alternatives) => {
23608
23608
  op.alternatives = alternatives;
23609
23609
  return op;
23610
23610
  };
23611
+ var text6 = /* @__PURE__ */ (() => {
23612
+ const op = /* @__PURE__ */ Object.create(proto19);
23613
+ op._tag = "Text";
23614
+ return op;
23615
+ })();
23611
23616
  var getChoices = (self) => getChoicesInternal(self);
23612
23617
  var getHelp = (self) => getHelpInternal(self);
23613
23618
  var getTypeName = (self) => getTypeNameInternal(self);
@@ -23756,7 +23761,7 @@ var validateInternal = (self, value5, config2) => {
23756
23761
  case "Path": {
23757
23762
  return flatMap9(FileSystem, (fileSystem) => {
23758
23763
  const errorMsg = "Path options do not have a default value";
23759
- return orElseFail2(value5, () => errorMsg).pipe(tap2((path2) => orDie2(fileSystem.exists(path2)).pipe(tap2((pathExists) => validatePathExistence(path2, self.pathExists, pathExists).pipe(zipRight3(validatePathType(path2, self.pathType, fileSystem).pipe(when2(() => self.pathExists !== "no" && pathExists))))))));
23764
+ return orElseFail2(value5, () => errorMsg).pipe(tap2((path3) => orDie2(fileSystem.exists(path3)).pipe(tap2((pathExists) => validatePathExistence(path3, self.pathExists, pathExists).pipe(zipRight3(validatePathType(path3, self.pathType, fileSystem).pipe(when2(() => self.pathExists !== "no" && pathExists))))))));
23760
23765
  });
23761
23766
  }
23762
23767
  case "Redacted": {
@@ -23771,24 +23776,24 @@ var validateInternal = (self, value5, config2) => {
23771
23776
  }
23772
23777
  };
23773
23778
  var attempt = (option5, typeName, parse5) => orElseFail2(option5, () => `${typeName} options do not have a default value`).pipe(flatMap9((value5) => orElseFail2(parse5(value5), () => `'${value5}' is not a ${typeName}`)));
23774
- var validatePathExistence = (path2, shouldPathExist, pathExists) => {
23779
+ var validatePathExistence = (path3, shouldPathExist, pathExists) => {
23775
23780
  if (shouldPathExist === "no" && pathExists) {
23776
- return fail7(`Path '${path2}' must not exist`);
23781
+ return fail7(`Path '${path3}' must not exist`);
23777
23782
  }
23778
23783
  if (shouldPathExist === "yes" && !pathExists) {
23779
- return fail7(`Path '${path2}' must exist`);
23784
+ return fail7(`Path '${path3}' must exist`);
23780
23785
  }
23781
23786
  return _void;
23782
23787
  };
23783
- var validatePathType = (path2, pathType, fileSystem) => {
23788
+ var validatePathType = (path3, pathType, fileSystem) => {
23784
23789
  switch (pathType) {
23785
23790
  case "file": {
23786
- const checkIsFile = fileSystem.stat(path2).pipe(map16((info2) => info2.type === "File"), orDie2);
23787
- return fail7(`Expected path '${path2}' to be a regular file`).pipe(unlessEffect2(checkIsFile), asVoid2);
23791
+ const checkIsFile = fileSystem.stat(path3).pipe(map16((info2) => info2.type === "File"), orDie2);
23792
+ return fail7(`Expected path '${path3}' to be a regular file`).pipe(unlessEffect2(checkIsFile), asVoid2);
23788
23793
  }
23789
23794
  case "directory": {
23790
- const checkIsDirectory = fileSystem.stat(path2).pipe(map16((info2) => info2.type === "Directory"), orDie2);
23791
- return fail7(`Expected path '${path2}' to be a directory`).pipe(unlessEffect2(checkIsDirectory), asVoid2);
23795
+ const checkIsDirectory = fileSystem.stat(path3).pipe(map16((info2) => info2.type === "Directory"), orDie2);
23796
+ return fail7(`Expected path '${path3}' to be a directory`).pipe(unlessEffect2(checkIsDirectory), asVoid2);
23792
23797
  }
23793
23798
  case "either": {
23794
23799
  return _void;
@@ -24237,6 +24242,7 @@ var none10 = /* @__PURE__ */ (() => {
24237
24242
  op._tag = "Empty";
24238
24243
  return op;
24239
24244
  })();
24245
+ var text7 = (name) => makeSingle(name, empty2(), text6);
24240
24246
  var getHelp3 = (self) => getHelpInternal2(self);
24241
24247
  var getUsage = (self) => getUsageInternal(self);
24242
24248
  var map28 = /* @__PURE__ */ dual(2, (self, f) => makeMap(self, (a) => right2(f(a))));
@@ -25195,6 +25201,8 @@ var getZshCompletions2 = (self, state = {
25195
25201
  // node_modules/.pnpm/@effect+cli@0.66.12_@effect+platform@0.87.12_@effect+printer-ansi@0.44.12_@effect+printer@0.44.12_effect@3.16.12/node_modules/@effect/cli/dist/esm/Options.js
25196
25202
  var all7 = all6;
25197
25203
  var choice3 = choice2;
25204
+ var text8 = text7;
25205
+ var optional4 = optional3;
25198
25206
  var withDefault3 = withDefault2;
25199
25207
  var withDescription3 = withDescription2;
25200
25208
 
@@ -25411,7 +25419,7 @@ var validateInternal2 = (self, args3, config2) => {
25411
25419
  return fail7(missingValue(p(`Missing argument ${getTypeName(self.primitiveType)}`)));
25412
25420
  },
25413
25421
  onNonEmpty: (head5, tail) => validate4(self.primitiveType, some2(head5), config2).pipe(mapBoth4({
25414
- onFailure: (text8) => invalidArgument(p(text8)),
25422
+ onFailure: (text9) => invalidArgument(p(text9)),
25415
25423
  onSuccess: (a) => [tail, a]
25416
25424
  }))
25417
25425
  });
@@ -25559,11 +25567,11 @@ var getZshCompletions3 = (self, state = {
25559
25567
  }
25560
25568
  case "Single": {
25561
25569
  const multiple = state.multiple ? "*" : "";
25562
- const optional4 = state.optional ? "::" : ":";
25570
+ const optional5 = state.optional ? "::" : ":";
25563
25571
  const shortDescription = getShortDescription2(self);
25564
25572
  const description = shortDescription.length > 0 ? ` -- ${shortDescription}` : "";
25565
25573
  const possibleValues = getZshCompletions(self.primitiveType);
25566
- return possibleValues.length === 0 ? empty2() : of(`${multiple}${optional4}${self.name}${description}${possibleValues}`);
25574
+ return possibleValues.length === 0 ? empty2() : of(`${multiple}${optional5}${self.name}${description}${possibleValues}`);
25567
25575
  }
25568
25576
  case "Map": {
25569
25577
  return getZshCompletions3(self.args, state);
@@ -26280,10 +26288,10 @@ var handleBuiltInOption = (self, executable, args3, builtIn2, execute2, config2)
26280
26288
  const description = descriptionList([[text4("Instructions"), instructions]]);
26281
26289
  const header = h1(spans([code("Wizard Mode for CLI Application:"), space3, code(self.name), space3, code(`(${self.version})`), summary5]));
26282
26290
  const help = sequence(header, description);
26283
- const text8 = toAnsiText(help);
26291
+ const text9 = toAnsiText(help);
26284
26292
  const command = fromIterable(getNames2(self.command))[0];
26285
26293
  const wizardPrefix = getWizardPrefix(builtIn2, command, args3);
26286
- return log3(text8).pipe(zipRight3(wizard4(builtIn2.command, wizardPrefix, config2)), tap2((args4) => log3(toAnsiText(renderWizardArgs(args4)))), flatMap9((args4) => toggle2({
26294
+ return log3(text9).pipe(zipRight3(wizard4(builtIn2.command, wizardPrefix, config2)), tap2((args4) => log3(toAnsiText(renderWizardArgs(args4)))), flatMap9((args4) => toggle2({
26287
26295
  message: "Would you like to run the command?",
26288
26296
  initial: true,
26289
26297
  active: "yes",
@@ -26610,7 +26618,7 @@ var makeExecutor2 = makeExecutor;
26610
26618
  var ChildProcess = __toESM(require("child_process"), 1);
26611
26619
 
26612
26620
  // node_modules/.pnpm/@effect+platform-node-shared@0.42.17_@effect+cluster@0.41.17_@effect+platform@0.87.12_@effect_4gcr4mmnr23kd4czky4xf3cnsa/node_modules/@effect/platform-node-shared/dist/esm/internal/error.js
26613
- var handleErrnoException = (module2, method) => (err, [path2]) => {
26621
+ var handleErrnoException = (module2, method) => (err, [path3]) => {
26614
26622
  let reason = "Unknown";
26615
26623
  switch (err.code) {
26616
26624
  case "ENOENT":
@@ -26639,7 +26647,7 @@ var handleErrnoException = (module2, method) => (err, [path2]) => {
26639
26647
  reason,
26640
26648
  module: module2,
26641
26649
  method,
26642
- pathOrDescriptor: path2,
26650
+ pathOrDescriptor: path3,
26643
26651
  syscall: err.syscall,
26644
26652
  description: err.message,
26645
26653
  cause: err
@@ -27292,7 +27300,7 @@ var handleBadArgument = (method) => (cause2) => new BadArgument({
27292
27300
  });
27293
27301
  var access2 = /* @__PURE__ */ (() => {
27294
27302
  const nodeAccess = /* @__PURE__ */ effectify2(NFS.access, /* @__PURE__ */ handleErrnoException("FileSystem", "access"), /* @__PURE__ */ handleBadArgument("access"));
27295
- return (path2, options3) => {
27303
+ return (path3, options3) => {
27296
27304
  let mode = NFS.constants.F_OK;
27297
27305
  if (options3?.readable) {
27298
27306
  mode |= NFS.constants.R_OK;
@@ -27300,7 +27308,7 @@ var access2 = /* @__PURE__ */ (() => {
27300
27308
  if (options3?.writable) {
27301
27309
  mode |= NFS.constants.W_OK;
27302
27310
  }
27303
- return nodeAccess(path2, mode);
27311
+ return nodeAccess(path3, mode);
27304
27312
  };
27305
27313
  })();
27306
27314
  var copy3 = /* @__PURE__ */ (() => {
@@ -27317,11 +27325,11 @@ var copyFile2 = /* @__PURE__ */ (() => {
27317
27325
  })();
27318
27326
  var chmod2 = /* @__PURE__ */ (() => {
27319
27327
  const nodeChmod = /* @__PURE__ */ effectify2(NFS.chmod, /* @__PURE__ */ handleErrnoException("FileSystem", "chmod"), /* @__PURE__ */ handleBadArgument("chmod"));
27320
- return (path2, mode) => nodeChmod(path2, mode);
27328
+ return (path3, mode) => nodeChmod(path3, mode);
27321
27329
  })();
27322
27330
  var chown2 = /* @__PURE__ */ (() => {
27323
27331
  const nodeChown = /* @__PURE__ */ effectify2(NFS.chown, /* @__PURE__ */ handleErrnoException("FileSystem", "chown"), /* @__PURE__ */ handleBadArgument("chown"));
27324
- return (path2, uid, gid) => nodeChown(path2, uid, gid);
27332
+ return (path3, uid, gid) => nodeChown(path3, uid, gid);
27325
27333
  })();
27326
27334
  var link2 = /* @__PURE__ */ (() => {
27327
27335
  const nodeLink = /* @__PURE__ */ effectify2(NFS.link, /* @__PURE__ */ handleErrnoException("FileSystem", "link"), /* @__PURE__ */ handleBadArgument("link"));
@@ -27329,7 +27337,7 @@ var link2 = /* @__PURE__ */ (() => {
27329
27337
  })();
27330
27338
  var makeDirectory = /* @__PURE__ */ (() => {
27331
27339
  const nodeMkdir = /* @__PURE__ */ effectify2(NFS.mkdir, /* @__PURE__ */ handleErrnoException("FileSystem", "makeDirectory"), /* @__PURE__ */ handleBadArgument("makeDirectory"));
27332
- return (path2, options3) => nodeMkdir(path2, {
27340
+ return (path3, options3) => nodeMkdir(path3, {
27333
27341
  recursive: options3?.recursive ?? false,
27334
27342
  mode: options3?.mode
27335
27343
  });
@@ -27345,7 +27353,7 @@ var makeTempDirectoryFactory = (method) => {
27345
27353
  var makeTempDirectory = /* @__PURE__ */ makeTempDirectoryFactory("makeTempDirectory");
27346
27354
  var removeFactory = (method) => {
27347
27355
  const nodeRm = effectify2(NFS.rm, handleErrnoException("FileSystem", method), handleBadArgument(method));
27348
- return (path2, options3) => nodeRm(path2, {
27356
+ return (path3, options3) => nodeRm(path3, {
27349
27357
  recursive: options3?.recursive ?? false,
27350
27358
  force: options3?.force ?? false
27351
27359
  });
@@ -27361,7 +27369,7 @@ var makeTempDirectoryScoped = /* @__PURE__ */ (() => {
27361
27369
  var openFactory = (method) => {
27362
27370
  const nodeOpen = effectify2(NFS.open, handleErrnoException("FileSystem", method), handleBadArgument(method));
27363
27371
  const nodeClose = effectify2(NFS.close, handleErrnoException("FileSystem", method), handleBadArgument(method));
27364
- return (path2, options3) => pipe(acquireRelease2(nodeOpen(path2, options3?.flag ?? "r", options3?.mode), (fd) => orDie2(nodeClose(fd))), map16((fd) => makeFile(FileDescriptor(fd), options3?.flag?.startsWith("a") ?? false)));
27372
+ return (path3, options3) => pipe(acquireRelease2(nodeOpen(path3, options3?.flag ?? "r", options3?.mode), (fd) => orDie2(nodeClose(fd))), map16((fd) => makeFile(FileDescriptor(fd), options3?.flag?.startsWith("a") ?? false)));
27365
27373
  };
27366
27374
  var open2 = /* @__PURE__ */ openFactory("open");
27367
27375
  var makeFile = /* @__PURE__ */ (() => {
@@ -27476,7 +27484,7 @@ var makeTempFileFactory = (method) => {
27476
27484
  const makeDirectory2 = makeTempDirectoryFactory(method);
27477
27485
  const open3 = openFactory(method);
27478
27486
  const randomHexString2 = (bytes) => sync4(() => Crypto.randomBytes(bytes).toString("hex"));
27479
- return (options3) => pipe(zip5(makeDirectory2(options3), randomHexString2(6)), map16(([directory2, random3]) => Path3.join(directory2, random3)), tap2((path2) => scoped2(open3(path2, {
27487
+ return (options3) => pipe(zip5(makeDirectory2(options3), randomHexString2(6)), map16(([directory2, random3]) => Path3.join(directory2, random3)), tap2((path3) => scoped2(open3(path3, {
27480
27488
  flag: "w+"
27481
27489
  }))));
27482
27490
  };
@@ -27488,17 +27496,17 @@ var makeTempFileScoped = /* @__PURE__ */ (() => {
27488
27496
  recursive: true
27489
27497
  })));
27490
27498
  })();
27491
- var readDirectory = (path2, options3) => tryPromise2({
27492
- try: () => NFS.promises.readdir(path2, options3),
27493
- catch: (err) => handleErrnoException("FileSystem", "readDirectory")(err, [path2])
27499
+ var readDirectory = (path3, options3) => tryPromise2({
27500
+ try: () => NFS.promises.readdir(path3, options3),
27501
+ catch: (err) => handleErrnoException("FileSystem", "readDirectory")(err, [path3])
27494
27502
  });
27495
- var readFile2 = (path2) => async2((resume2, signal) => {
27503
+ var readFile2 = (path3) => async2((resume2, signal) => {
27496
27504
  try {
27497
- NFS.readFile(path2, {
27505
+ NFS.readFile(path3, {
27498
27506
  signal
27499
27507
  }, (err, data) => {
27500
27508
  if (err) {
27501
- resume2(fail7(handleErrnoException("FileSystem", "readFile")(err, [path2])));
27509
+ resume2(fail7(handleErrnoException("FileSystem", "readFile")(err, [path3])));
27502
27510
  } else {
27503
27511
  resume2(succeed7(data));
27504
27512
  }
@@ -27509,11 +27517,11 @@ var readFile2 = (path2) => async2((resume2, signal) => {
27509
27517
  });
27510
27518
  var readLink = /* @__PURE__ */ (() => {
27511
27519
  const nodeReadLink = /* @__PURE__ */ effectify2(NFS.readlink, /* @__PURE__ */ handleErrnoException("FileSystem", "readLink"), /* @__PURE__ */ handleBadArgument("readLink"));
27512
- return (path2) => nodeReadLink(path2);
27520
+ return (path3) => nodeReadLink(path3);
27513
27521
  })();
27514
27522
  var realPath = /* @__PURE__ */ (() => {
27515
27523
  const nodeRealPath = /* @__PURE__ */ effectify2(NFS.realpath, /* @__PURE__ */ handleErrnoException("FileSystem", "realPath"), /* @__PURE__ */ handleBadArgument("realPath"));
27516
- return (path2) => nodeRealPath(path2);
27524
+ return (path3) => nodeRealPath(path3);
27517
27525
  })();
27518
27526
  var rename3 = /* @__PURE__ */ (() => {
27519
27527
  const nodeRename = /* @__PURE__ */ effectify2(NFS.rename, /* @__PURE__ */ handleErrnoException("FileSystem", "rename"), /* @__PURE__ */ handleBadArgument("rename"));
@@ -27537,40 +27545,40 @@ var makeFileInfo = (stat3) => ({
27537
27545
  });
27538
27546
  var stat2 = /* @__PURE__ */ (() => {
27539
27547
  const nodeStat = /* @__PURE__ */ effectify2(NFS.stat, /* @__PURE__ */ handleErrnoException("FileSystem", "stat"), /* @__PURE__ */ handleBadArgument("stat"));
27540
- return (path2) => map16(nodeStat(path2), makeFileInfo);
27548
+ return (path3) => map16(nodeStat(path3), makeFileInfo);
27541
27549
  })();
27542
27550
  var symlink2 = /* @__PURE__ */ (() => {
27543
27551
  const nodeSymlink = /* @__PURE__ */ effectify2(NFS.symlink, /* @__PURE__ */ handleErrnoException("FileSystem", "symlink"), /* @__PURE__ */ handleBadArgument("symlink"));
27544
- return (target, path2) => nodeSymlink(target, path2);
27552
+ return (target, path3) => nodeSymlink(target, path3);
27545
27553
  })();
27546
27554
  var truncate2 = /* @__PURE__ */ (() => {
27547
27555
  const nodeTruncate = /* @__PURE__ */ effectify2(NFS.truncate, /* @__PURE__ */ handleErrnoException("FileSystem", "truncate"), /* @__PURE__ */ handleBadArgument("truncate"));
27548
- return (path2, length3) => nodeTruncate(path2, length3 !== void 0 ? Number(length3) : void 0);
27556
+ return (path3, length3) => nodeTruncate(path3, length3 !== void 0 ? Number(length3) : void 0);
27549
27557
  })();
27550
27558
  var utimes2 = /* @__PURE__ */ (() => {
27551
27559
  const nodeUtimes = /* @__PURE__ */ effectify2(NFS.utimes, /* @__PURE__ */ handleErrnoException("FileSystem", "utime"), /* @__PURE__ */ handleBadArgument("utime"));
27552
- return (path2, atime, mtime) => nodeUtimes(path2, atime, mtime);
27560
+ return (path3, atime, mtime) => nodeUtimes(path3, atime, mtime);
27553
27561
  })();
27554
- var watchNode = (path2, options3) => asyncScoped2((emit) => acquireRelease2(sync4(() => {
27555
- const watcher = NFS.watch(path2, {
27562
+ var watchNode = (path3, options3) => asyncScoped2((emit) => acquireRelease2(sync4(() => {
27563
+ const watcher = NFS.watch(path3, {
27556
27564
  recursive: options3?.recursive
27557
- }, (event, path3) => {
27558
- if (!path3) return;
27565
+ }, (event, path4) => {
27566
+ if (!path4) return;
27559
27567
  switch (event) {
27560
27568
  case "rename": {
27561
- emit.fromEffect(matchEffect2(stat2(path3), {
27569
+ emit.fromEffect(matchEffect2(stat2(path4), {
27562
27570
  onSuccess: (_) => succeed7(WatchEventCreate({
27563
- path: path3
27571
+ path: path4
27564
27572
  })),
27565
27573
  onFailure: (err) => err._tag === "SystemError" && err.reason === "NotFound" ? succeed7(WatchEventRemove({
27566
- path: path3
27574
+ path: path4
27567
27575
  })) : fail7(err)
27568
27576
  }));
27569
27577
  return;
27570
27578
  }
27571
27579
  case "change": {
27572
27580
  emit.single(WatchEventUpdate({
27573
- path: path3
27581
+ path: path4
27574
27582
  }));
27575
27583
  return;
27576
27584
  }
@@ -27581,7 +27589,7 @@ var watchNode = (path2, options3) => asyncScoped2((emit) => acquireRelease2(sync
27581
27589
  module: "FileSystem",
27582
27590
  reason: "Unknown",
27583
27591
  method: "watch",
27584
- pathOrDescriptor: path2,
27592
+ pathOrDescriptor: path3,
27585
27593
  cause: error4
27586
27594
  }));
27587
27595
  });
@@ -27590,16 +27598,16 @@ var watchNode = (path2, options3) => asyncScoped2((emit) => acquireRelease2(sync
27590
27598
  });
27591
27599
  return watcher;
27592
27600
  }), (watcher) => sync4(() => watcher.close())));
27593
- var watch2 = (backend, path2, options3) => stat2(path2).pipe(map16((stat3) => backend.pipe(flatMap((_) => _.register(path2, stat3, options3)), getOrElse2(() => watchNode(path2, options3)))), unwrap5);
27594
- var writeFile2 = (path2, data, options3) => async2((resume2, signal) => {
27601
+ var watch2 = (backend, path3, options3) => stat2(path3).pipe(map16((stat3) => backend.pipe(flatMap((_) => _.register(path3, stat3, options3)), getOrElse2(() => watchNode(path3, options3)))), unwrap5);
27602
+ var writeFile2 = (path3, data, options3) => async2((resume2, signal) => {
27595
27603
  try {
27596
- NFS.writeFile(path2, data, {
27604
+ NFS.writeFile(path3, data, {
27597
27605
  signal,
27598
27606
  flag: options3?.flag,
27599
27607
  mode: options3?.mode
27600
27608
  }, (err) => {
27601
27609
  if (err) {
27602
- resume2(fail7(handleErrnoException("FileSystem", "writeFile")(err, [path2])));
27610
+ resume2(fail7(handleErrnoException("FileSystem", "writeFile")(err, [path3])));
27603
27611
  } else {
27604
27612
  resume2(_void);
27605
27613
  }
@@ -27631,8 +27639,8 @@ var makeFileSystem = /* @__PURE__ */ map16(/* @__PURE__ */ serviceOption2(WatchB
27631
27639
  symlink: symlink2,
27632
27640
  truncate: truncate2,
27633
27641
  utimes: utimes2,
27634
- watch(path2, options3) {
27635
- return watch2(backend, path2, options3);
27642
+ watch(path3, options3) {
27643
+ return watch2(backend, path3, options3);
27636
27644
  },
27637
27645
  writeFile: writeFile2
27638
27646
  }));
@@ -27653,12 +27661,12 @@ var fromFileUrl2 = (url2) => try_2({
27653
27661
  cause: error4
27654
27662
  })
27655
27663
  });
27656
- var toFileUrl2 = (path2) => try_2({
27657
- try: () => NodeUrl.pathToFileURL(path2),
27664
+ var toFileUrl2 = (path3) => try_2({
27665
+ try: () => NodeUrl.pathToFileURL(path3),
27658
27666
  catch: (error4) => new BadArgument({
27659
27667
  module: "Path",
27660
27668
  method: "toFileUrl",
27661
- description: `Invalid path: ${path2}`,
27669
+ description: `Invalid path: ${path3}`,
27662
27670
  cause: error4
27663
27671
  })
27664
27672
  });
@@ -28211,6 +28219,1544 @@ var runMain2 = runMain;
28211
28219
  // node_modules/.pnpm/@effect+platform-node@0.89.5_@effect+cluster@0.41.17_@effect+platform@0.87.12_@effect+rpc@0.6_sr25567vovx2tzrgsyzt4avpa4/node_modules/@effect/platform-node/dist/esm/NodeRuntime.js
28212
28220
  var runMain3 = runMain2;
28213
28221
 
28222
+ // node_modules/.pnpm/@isaacs+balanced-match@4.0.1/node_modules/@isaacs/balanced-match/dist/esm/index.js
28223
+ var balanced = (a, b, str) => {
28224
+ const ma = a instanceof RegExp ? maybeMatch(a, str) : a;
28225
+ const mb = b instanceof RegExp ? maybeMatch(b, str) : b;
28226
+ const r = ma !== null && mb != null && range3(ma, mb, str);
28227
+ return r && {
28228
+ start: r[0],
28229
+ end: r[1],
28230
+ pre: str.slice(0, r[0]),
28231
+ body: str.slice(r[0] + ma.length, r[1]),
28232
+ post: str.slice(r[1] + mb.length)
28233
+ };
28234
+ };
28235
+ var maybeMatch = (reg, str) => {
28236
+ const m = str.match(reg);
28237
+ return m ? m[0] : null;
28238
+ };
28239
+ var range3 = (a, b, str) => {
28240
+ let begs, beg, left3, right3 = void 0, result;
28241
+ let ai = str.indexOf(a);
28242
+ let bi = str.indexOf(b, ai + 1);
28243
+ let i = ai;
28244
+ if (ai >= 0 && bi > 0) {
28245
+ if (a === b) {
28246
+ return [ai, bi];
28247
+ }
28248
+ begs = [];
28249
+ left3 = str.length;
28250
+ while (i >= 0 && !result) {
28251
+ if (i === ai) {
28252
+ begs.push(i);
28253
+ ai = str.indexOf(a, i + 1);
28254
+ } else if (begs.length === 1) {
28255
+ const r = begs.pop();
28256
+ if (r !== void 0)
28257
+ result = [r, bi];
28258
+ } else {
28259
+ beg = begs.pop();
28260
+ if (beg !== void 0 && beg < left3) {
28261
+ left3 = beg;
28262
+ right3 = bi;
28263
+ }
28264
+ bi = str.indexOf(b, i + 1);
28265
+ }
28266
+ i = ai < bi && ai >= 0 ? ai : bi;
28267
+ }
28268
+ if (begs.length && right3 !== void 0) {
28269
+ result = [left3, right3];
28270
+ }
28271
+ }
28272
+ return result;
28273
+ };
28274
+
28275
+ // node_modules/.pnpm/@isaacs+brace-expansion@5.0.0/node_modules/@isaacs/brace-expansion/dist/esm/index.js
28276
+ var escSlash = "\0SLASH" + Math.random() + "\0";
28277
+ var escOpen = "\0OPEN" + Math.random() + "\0";
28278
+ var escClose = "\0CLOSE" + Math.random() + "\0";
28279
+ var escComma = "\0COMMA" + Math.random() + "\0";
28280
+ var escPeriod = "\0PERIOD" + Math.random() + "\0";
28281
+ var escSlashPattern = new RegExp(escSlash, "g");
28282
+ var escOpenPattern = new RegExp(escOpen, "g");
28283
+ var escClosePattern = new RegExp(escClose, "g");
28284
+ var escCommaPattern = new RegExp(escComma, "g");
28285
+ var escPeriodPattern = new RegExp(escPeriod, "g");
28286
+ var slashPattern = /\\\\/g;
28287
+ var openPattern = /\\{/g;
28288
+ var closePattern = /\\}/g;
28289
+ var commaPattern = /\\,/g;
28290
+ var periodPattern = /\\./g;
28291
+ function numeric(str) {
28292
+ return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
28293
+ }
28294
+ function escapeBraces(str) {
28295
+ return str.replace(slashPattern, escSlash).replace(openPattern, escOpen).replace(closePattern, escClose).replace(commaPattern, escComma).replace(periodPattern, escPeriod);
28296
+ }
28297
+ function unescapeBraces(str) {
28298
+ return str.replace(escSlashPattern, "\\").replace(escOpenPattern, "{").replace(escClosePattern, "}").replace(escCommaPattern, ",").replace(escPeriodPattern, ".");
28299
+ }
28300
+ function parseCommaParts(str) {
28301
+ if (!str) {
28302
+ return [""];
28303
+ }
28304
+ const parts2 = [];
28305
+ const m = balanced("{", "}", str);
28306
+ if (!m) {
28307
+ return str.split(",");
28308
+ }
28309
+ const { pre, body, post } = m;
28310
+ const p2 = pre.split(",");
28311
+ p2[p2.length - 1] += "{" + body + "}";
28312
+ const postParts = parseCommaParts(post);
28313
+ if (post.length) {
28314
+ ;
28315
+ p2[p2.length - 1] += postParts.shift();
28316
+ p2.push.apply(p2, postParts);
28317
+ }
28318
+ parts2.push.apply(parts2, p2);
28319
+ return parts2;
28320
+ }
28321
+ function expand2(str) {
28322
+ if (!str) {
28323
+ return [];
28324
+ }
28325
+ if (str.slice(0, 2) === "{}") {
28326
+ str = "\\{\\}" + str.slice(2);
28327
+ }
28328
+ return expand_(escapeBraces(str), true).map(unescapeBraces);
28329
+ }
28330
+ function embrace(str) {
28331
+ return "{" + str + "}";
28332
+ }
28333
+ function isPadded(el) {
28334
+ return /^-?0\d/.test(el);
28335
+ }
28336
+ function lte(i, y) {
28337
+ return i <= y;
28338
+ }
28339
+ function gte(i, y) {
28340
+ return i >= y;
28341
+ }
28342
+ function expand_(str, isTop) {
28343
+ const expansions = [];
28344
+ const m = balanced("{", "}", str);
28345
+ if (!m)
28346
+ return [str];
28347
+ const pre = m.pre;
28348
+ const post = m.post.length ? expand_(m.post, false) : [""];
28349
+ if (/\$$/.test(m.pre)) {
28350
+ for (let k = 0; k < post.length; k++) {
28351
+ const expansion = pre + "{" + m.body + "}" + post[k];
28352
+ expansions.push(expansion);
28353
+ }
28354
+ } else {
28355
+ const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
28356
+ const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
28357
+ const isSequence = isNumericSequence || isAlphaSequence;
28358
+ const isOptions2 = m.body.indexOf(",") >= 0;
28359
+ if (!isSequence && !isOptions2) {
28360
+ if (m.post.match(/,(?!,).*\}/)) {
28361
+ str = m.pre + "{" + m.body + escClose + m.post;
28362
+ return expand_(str);
28363
+ }
28364
+ return [str];
28365
+ }
28366
+ let n;
28367
+ if (isSequence) {
28368
+ n = m.body.split(/\.\./);
28369
+ } else {
28370
+ n = parseCommaParts(m.body);
28371
+ if (n.length === 1 && n[0] !== void 0) {
28372
+ n = expand_(n[0], false).map(embrace);
28373
+ if (n.length === 1) {
28374
+ return post.map((p2) => m.pre + n[0] + p2);
28375
+ }
28376
+ }
28377
+ }
28378
+ let N;
28379
+ if (isSequence && n[0] !== void 0 && n[1] !== void 0) {
28380
+ const x = numeric(n[0]);
28381
+ const y = numeric(n[1]);
28382
+ const width3 = Math.max(n[0].length, n[1].length);
28383
+ let incr = n.length === 3 && n[2] !== void 0 ? Math.abs(numeric(n[2])) : 1;
28384
+ let test = lte;
28385
+ const reverse5 = y < x;
28386
+ if (reverse5) {
28387
+ incr *= -1;
28388
+ test = gte;
28389
+ }
28390
+ const pad = n.some(isPadded);
28391
+ N = [];
28392
+ for (let i = x; test(i, y); i += incr) {
28393
+ let c;
28394
+ if (isAlphaSequence) {
28395
+ c = String.fromCharCode(i);
28396
+ if (c === "\\") {
28397
+ c = "";
28398
+ }
28399
+ } else {
28400
+ c = String(i);
28401
+ if (pad) {
28402
+ const need = width3 - c.length;
28403
+ if (need > 0) {
28404
+ const z = new Array(need + 1).join("0");
28405
+ if (i < 0) {
28406
+ c = "-" + z + c.slice(1);
28407
+ } else {
28408
+ c = z + c;
28409
+ }
28410
+ }
28411
+ }
28412
+ }
28413
+ N.push(c);
28414
+ }
28415
+ } else {
28416
+ N = [];
28417
+ for (let j = 0; j < n.length; j++) {
28418
+ N.push.apply(N, expand_(n[j], false));
28419
+ }
28420
+ }
28421
+ for (let j = 0; j < N.length; j++) {
28422
+ for (let k = 0; k < post.length; k++) {
28423
+ const expansion = pre + N[j] + post[k];
28424
+ if (!isTop || isSequence || expansion) {
28425
+ expansions.push(expansion);
28426
+ }
28427
+ }
28428
+ }
28429
+ }
28430
+ return expansions;
28431
+ }
28432
+
28433
+ // node_modules/.pnpm/minimatch@10.0.3/node_modules/minimatch/dist/esm/assert-valid-pattern.js
28434
+ var MAX_PATTERN_LENGTH = 1024 * 64;
28435
+ var assertValidPattern = (pattern2) => {
28436
+ if (typeof pattern2 !== "string") {
28437
+ throw new TypeError("invalid pattern");
28438
+ }
28439
+ if (pattern2.length > MAX_PATTERN_LENGTH) {
28440
+ throw new TypeError("pattern is too long");
28441
+ }
28442
+ };
28443
+
28444
+ // node_modules/.pnpm/minimatch@10.0.3/node_modules/minimatch/dist/esm/brace-expressions.js
28445
+ var posixClasses = {
28446
+ "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
28447
+ "[:alpha:]": ["\\p{L}\\p{Nl}", true],
28448
+ "[:ascii:]": ["\\x00-\\x7f", false],
28449
+ "[:blank:]": ["\\p{Zs}\\t", true],
28450
+ "[:cntrl:]": ["\\p{Cc}", true],
28451
+ "[:digit:]": ["\\p{Nd}", true],
28452
+ "[:graph:]": ["\\p{Z}\\p{C}", true, true],
28453
+ "[:lower:]": ["\\p{Ll}", true],
28454
+ "[:print:]": ["\\p{C}", true],
28455
+ "[:punct:]": ["\\p{P}", true],
28456
+ "[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true],
28457
+ "[:upper:]": ["\\p{Lu}", true],
28458
+ "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true],
28459
+ "[:xdigit:]": ["A-Fa-f0-9", false]
28460
+ };
28461
+ var braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&");
28462
+ var regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
28463
+ var rangesToString = (ranges) => ranges.join("");
28464
+ var parseClass = (glob, position) => {
28465
+ const pos = position;
28466
+ if (glob.charAt(pos) !== "[") {
28467
+ throw new Error("not in a brace expression");
28468
+ }
28469
+ const ranges = [];
28470
+ const negs = [];
28471
+ let i = pos + 1;
28472
+ let sawStart = false;
28473
+ let uflag = false;
28474
+ let escaping = false;
28475
+ let negate3 = false;
28476
+ let endPos = pos;
28477
+ let rangeStart = "";
28478
+ WHILE: while (i < glob.length) {
28479
+ const c = glob.charAt(i);
28480
+ if ((c === "!" || c === "^") && i === pos + 1) {
28481
+ negate3 = true;
28482
+ i++;
28483
+ continue;
28484
+ }
28485
+ if (c === "]" && sawStart && !escaping) {
28486
+ endPos = i + 1;
28487
+ break;
28488
+ }
28489
+ sawStart = true;
28490
+ if (c === "\\") {
28491
+ if (!escaping) {
28492
+ escaping = true;
28493
+ i++;
28494
+ continue;
28495
+ }
28496
+ }
28497
+ if (c === "[" && !escaping) {
28498
+ for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
28499
+ if (glob.startsWith(cls, i)) {
28500
+ if (rangeStart) {
28501
+ return ["$.", false, glob.length - pos, true];
28502
+ }
28503
+ i += cls.length;
28504
+ if (neg)
28505
+ negs.push(unip);
28506
+ else
28507
+ ranges.push(unip);
28508
+ uflag = uflag || u;
28509
+ continue WHILE;
28510
+ }
28511
+ }
28512
+ }
28513
+ escaping = false;
28514
+ if (rangeStart) {
28515
+ if (c > rangeStart) {
28516
+ ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c));
28517
+ } else if (c === rangeStart) {
28518
+ ranges.push(braceEscape(c));
28519
+ }
28520
+ rangeStart = "";
28521
+ i++;
28522
+ continue;
28523
+ }
28524
+ if (glob.startsWith("-]", i + 1)) {
28525
+ ranges.push(braceEscape(c + "-"));
28526
+ i += 2;
28527
+ continue;
28528
+ }
28529
+ if (glob.startsWith("-", i + 1)) {
28530
+ rangeStart = c;
28531
+ i += 2;
28532
+ continue;
28533
+ }
28534
+ ranges.push(braceEscape(c));
28535
+ i++;
28536
+ }
28537
+ if (endPos < i) {
28538
+ return ["", false, 0, false];
28539
+ }
28540
+ if (!ranges.length && !negs.length) {
28541
+ return ["$.", false, glob.length - pos, true];
28542
+ }
28543
+ if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate3) {
28544
+ const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
28545
+ return [regexpEscape(r), false, endPos - pos, false];
28546
+ }
28547
+ const sranges = "[" + (negate3 ? "^" : "") + rangesToString(ranges) + "]";
28548
+ const snegs = "[" + (negate3 ? "" : "^") + rangesToString(negs) + "]";
28549
+ const comb = ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs;
28550
+ return [comb, uflag, endPos - pos, true];
28551
+ };
28552
+
28553
+ // node_modules/.pnpm/minimatch@10.0.3/node_modules/minimatch/dist/esm/unescape.js
28554
+ var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
28555
+ return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
28556
+ };
28557
+
28558
+ // node_modules/.pnpm/minimatch@10.0.3/node_modules/minimatch/dist/esm/ast.js
28559
+ var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
28560
+ var isExtglobType = (c) => types.has(c);
28561
+ var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
28562
+ var startNoDot = "(?!\\.)";
28563
+ var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
28564
+ var justDots = /* @__PURE__ */ new Set(["..", "."]);
28565
+ var reSpecials = new Set("().*{}+?[]^$\\!");
28566
+ var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
28567
+ var qmark = "[^/]";
28568
+ var star = qmark + "*?";
28569
+ var starNoEmpty = qmark + "+?";
28570
+ var AST = class _AST {
28571
+ type;
28572
+ #root;
28573
+ #hasMagic;
28574
+ #uflag = false;
28575
+ #parts = [];
28576
+ #parent;
28577
+ #parentIndex;
28578
+ #negs;
28579
+ #filledNegs = false;
28580
+ #options;
28581
+ #toString;
28582
+ // set to true if it's an extglob with no children
28583
+ // (which really means one child of '')
28584
+ #emptyExt = false;
28585
+ constructor(type2, parent, options3 = {}) {
28586
+ this.type = type2;
28587
+ if (type2)
28588
+ this.#hasMagic = true;
28589
+ this.#parent = parent;
28590
+ this.#root = this.#parent ? this.#parent.#root : this;
28591
+ this.#options = this.#root === this ? options3 : this.#root.#options;
28592
+ this.#negs = this.#root === this ? [] : this.#root.#negs;
28593
+ if (type2 === "!" && !this.#root.#filledNegs)
28594
+ this.#negs.push(this);
28595
+ this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0;
28596
+ }
28597
+ get hasMagic() {
28598
+ if (this.#hasMagic !== void 0)
28599
+ return this.#hasMagic;
28600
+ for (const p2 of this.#parts) {
28601
+ if (typeof p2 === "string")
28602
+ continue;
28603
+ if (p2.type || p2.hasMagic)
28604
+ return this.#hasMagic = true;
28605
+ }
28606
+ return this.#hasMagic;
28607
+ }
28608
+ // reconstructs the pattern
28609
+ toString() {
28610
+ if (this.#toString !== void 0)
28611
+ return this.#toString;
28612
+ if (!this.type) {
28613
+ return this.#toString = this.#parts.map((p2) => String(p2)).join("");
28614
+ } else {
28615
+ return this.#toString = this.type + "(" + this.#parts.map((p2) => String(p2)).join("|") + ")";
28616
+ }
28617
+ }
28618
+ #fillNegs() {
28619
+ if (this !== this.#root)
28620
+ throw new Error("should only call on root");
28621
+ if (this.#filledNegs)
28622
+ return this;
28623
+ this.toString();
28624
+ this.#filledNegs = true;
28625
+ let n;
28626
+ while (n = this.#negs.pop()) {
28627
+ if (n.type !== "!")
28628
+ continue;
28629
+ let p2 = n;
28630
+ let pp = p2.#parent;
28631
+ while (pp) {
28632
+ for (let i = p2.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) {
28633
+ for (const part of n.#parts) {
28634
+ if (typeof part === "string") {
28635
+ throw new Error("string part in extglob AST??");
28636
+ }
28637
+ part.copyIn(pp.#parts[i]);
28638
+ }
28639
+ }
28640
+ p2 = pp;
28641
+ pp = p2.#parent;
28642
+ }
28643
+ }
28644
+ return this;
28645
+ }
28646
+ push(...parts2) {
28647
+ for (const p2 of parts2) {
28648
+ if (p2 === "")
28649
+ continue;
28650
+ if (typeof p2 !== "string" && !(p2 instanceof _AST && p2.#parent === this)) {
28651
+ throw new Error("invalid part: " + p2);
28652
+ }
28653
+ this.#parts.push(p2);
28654
+ }
28655
+ }
28656
+ toJSON() {
28657
+ const ret = this.type === null ? this.#parts.slice().map((p2) => typeof p2 === "string" ? p2 : p2.toJSON()) : [this.type, ...this.#parts.map((p2) => p2.toJSON())];
28658
+ if (this.isStart() && !this.type)
28659
+ ret.unshift([]);
28660
+ if (this.isEnd() && (this === this.#root || this.#root.#filledNegs && this.#parent?.type === "!")) {
28661
+ ret.push({});
28662
+ }
28663
+ return ret;
28664
+ }
28665
+ isStart() {
28666
+ if (this.#root === this)
28667
+ return true;
28668
+ if (!this.#parent?.isStart())
28669
+ return false;
28670
+ if (this.#parentIndex === 0)
28671
+ return true;
28672
+ const p2 = this.#parent;
28673
+ for (let i = 0; i < this.#parentIndex; i++) {
28674
+ const pp = p2.#parts[i];
28675
+ if (!(pp instanceof _AST && pp.type === "!")) {
28676
+ return false;
28677
+ }
28678
+ }
28679
+ return true;
28680
+ }
28681
+ isEnd() {
28682
+ if (this.#root === this)
28683
+ return true;
28684
+ if (this.#parent?.type === "!")
28685
+ return true;
28686
+ if (!this.#parent?.isEnd())
28687
+ return false;
28688
+ if (!this.type)
28689
+ return this.#parent?.isEnd();
28690
+ const pl = this.#parent ? this.#parent.#parts.length : 0;
28691
+ return this.#parentIndex === pl - 1;
28692
+ }
28693
+ copyIn(part) {
28694
+ if (typeof part === "string")
28695
+ this.push(part);
28696
+ else
28697
+ this.push(part.clone(this));
28698
+ }
28699
+ clone(parent) {
28700
+ const c = new _AST(this.type, parent);
28701
+ for (const p2 of this.#parts) {
28702
+ c.copyIn(p2);
28703
+ }
28704
+ return c;
28705
+ }
28706
+ static #parseAST(str, ast, pos, opt) {
28707
+ let escaping = false;
28708
+ let inBrace = false;
28709
+ let braceStart = -1;
28710
+ let braceNeg = false;
28711
+ if (ast.type === null) {
28712
+ let i2 = pos;
28713
+ let acc2 = "";
28714
+ while (i2 < str.length) {
28715
+ const c = str.charAt(i2++);
28716
+ if (escaping || c === "\\") {
28717
+ escaping = !escaping;
28718
+ acc2 += c;
28719
+ continue;
28720
+ }
28721
+ if (inBrace) {
28722
+ if (i2 === braceStart + 1) {
28723
+ if (c === "^" || c === "!") {
28724
+ braceNeg = true;
28725
+ }
28726
+ } else if (c === "]" && !(i2 === braceStart + 2 && braceNeg)) {
28727
+ inBrace = false;
28728
+ }
28729
+ acc2 += c;
28730
+ continue;
28731
+ } else if (c === "[") {
28732
+ inBrace = true;
28733
+ braceStart = i2;
28734
+ braceNeg = false;
28735
+ acc2 += c;
28736
+ continue;
28737
+ }
28738
+ if (!opt.noext && isExtglobType(c) && str.charAt(i2) === "(") {
28739
+ ast.push(acc2);
28740
+ acc2 = "";
28741
+ const ext2 = new _AST(c, ast);
28742
+ i2 = _AST.#parseAST(str, ext2, i2, opt);
28743
+ ast.push(ext2);
28744
+ continue;
28745
+ }
28746
+ acc2 += c;
28747
+ }
28748
+ ast.push(acc2);
28749
+ return i2;
28750
+ }
28751
+ let i = pos + 1;
28752
+ let part = new _AST(null, ast);
28753
+ const parts2 = [];
28754
+ let acc = "";
28755
+ while (i < str.length) {
28756
+ const c = str.charAt(i++);
28757
+ if (escaping || c === "\\") {
28758
+ escaping = !escaping;
28759
+ acc += c;
28760
+ continue;
28761
+ }
28762
+ if (inBrace) {
28763
+ if (i === braceStart + 1) {
28764
+ if (c === "^" || c === "!") {
28765
+ braceNeg = true;
28766
+ }
28767
+ } else if (c === "]" && !(i === braceStart + 2 && braceNeg)) {
28768
+ inBrace = false;
28769
+ }
28770
+ acc += c;
28771
+ continue;
28772
+ } else if (c === "[") {
28773
+ inBrace = true;
28774
+ braceStart = i;
28775
+ braceNeg = false;
28776
+ acc += c;
28777
+ continue;
28778
+ }
28779
+ if (isExtglobType(c) && str.charAt(i) === "(") {
28780
+ part.push(acc);
28781
+ acc = "";
28782
+ const ext2 = new _AST(c, part);
28783
+ part.push(ext2);
28784
+ i = _AST.#parseAST(str, ext2, i, opt);
28785
+ continue;
28786
+ }
28787
+ if (c === "|") {
28788
+ part.push(acc);
28789
+ acc = "";
28790
+ parts2.push(part);
28791
+ part = new _AST(null, ast);
28792
+ continue;
28793
+ }
28794
+ if (c === ")") {
28795
+ if (acc === "" && ast.#parts.length === 0) {
28796
+ ast.#emptyExt = true;
28797
+ }
28798
+ part.push(acc);
28799
+ acc = "";
28800
+ ast.push(...parts2, part);
28801
+ return i;
28802
+ }
28803
+ acc += c;
28804
+ }
28805
+ ast.type = null;
28806
+ ast.#hasMagic = void 0;
28807
+ ast.#parts = [str.substring(pos - 1)];
28808
+ return i;
28809
+ }
28810
+ static fromGlob(pattern2, options3 = {}) {
28811
+ const ast = new _AST(null, void 0, options3);
28812
+ _AST.#parseAST(pattern2, ast, 0, options3);
28813
+ return ast;
28814
+ }
28815
+ // returns the regular expression if there's magic, or the unescaped
28816
+ // string if not.
28817
+ toMMPattern() {
28818
+ if (this !== this.#root)
28819
+ return this.#root.toMMPattern();
28820
+ const glob = this.toString();
28821
+ const [re, body, hasMagic, uflag] = this.toRegExpSource();
28822
+ const anyMagic = hasMagic || this.#hasMagic || this.#options.nocase && !this.#options.nocaseMagicOnly && glob.toUpperCase() !== glob.toLowerCase();
28823
+ if (!anyMagic) {
28824
+ return body;
28825
+ }
28826
+ const flags = (this.#options.nocase ? "i" : "") + (uflag ? "u" : "");
28827
+ return Object.assign(new RegExp(`^${re}$`, flags), {
28828
+ _src: re,
28829
+ _glob: glob
28830
+ });
28831
+ }
28832
+ get options() {
28833
+ return this.#options;
28834
+ }
28835
+ // returns the string match, the regexp source, whether there's magic
28836
+ // in the regexp (so a regular expression is required) and whether or
28837
+ // not the uflag is needed for the regular expression (for posix classes)
28838
+ // TODO: instead of injecting the start/end at this point, just return
28839
+ // the BODY of the regexp, along with the start/end portions suitable
28840
+ // for binding the start/end in either a joined full-path makeRe context
28841
+ // (where we bind to (^|/), or a standalone matchPart context (where
28842
+ // we bind to ^, and not /). Otherwise slashes get duped!
28843
+ //
28844
+ // In part-matching mode, the start is:
28845
+ // - if not isStart: nothing
28846
+ // - if traversal possible, but not allowed: ^(?!\.\.?$)
28847
+ // - if dots allowed or not possible: ^
28848
+ // - if dots possible and not allowed: ^(?!\.)
28849
+ // end is:
28850
+ // - if not isEnd(): nothing
28851
+ // - else: $
28852
+ //
28853
+ // In full-path matching mode, we put the slash at the START of the
28854
+ // pattern, so start is:
28855
+ // - if first pattern: same as part-matching mode
28856
+ // - if not isStart(): nothing
28857
+ // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
28858
+ // - if dots allowed or not possible: /
28859
+ // - if dots possible and not allowed: /(?!\.)
28860
+ // end is:
28861
+ // - if last pattern, same as part-matching mode
28862
+ // - else nothing
28863
+ //
28864
+ // Always put the (?:$|/) on negated tails, though, because that has to be
28865
+ // there to bind the end of the negated pattern portion, and it's easier to
28866
+ // just stick it in now rather than try to inject it later in the middle of
28867
+ // the pattern.
28868
+ //
28869
+ // We can just always return the same end, and leave it up to the caller
28870
+ // to know whether it's going to be used joined or in parts.
28871
+ // And, if the start is adjusted slightly, can do the same there:
28872
+ // - if not isStart: nothing
28873
+ // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
28874
+ // - if dots allowed or not possible: (?:/|^)
28875
+ // - if dots possible and not allowed: (?:/|^)(?!\.)
28876
+ //
28877
+ // But it's better to have a simpler binding without a conditional, for
28878
+ // performance, so probably better to return both start options.
28879
+ //
28880
+ // Then the caller just ignores the end if it's not the first pattern,
28881
+ // and the start always gets applied.
28882
+ //
28883
+ // But that's always going to be $ if it's the ending pattern, or nothing,
28884
+ // so the caller can just attach $ at the end of the pattern when building.
28885
+ //
28886
+ // So the todo is:
28887
+ // - better detect what kind of start is needed
28888
+ // - return both flavors of starting pattern
28889
+ // - attach $ at the end of the pattern when creating the actual RegExp
28890
+ //
28891
+ // Ah, but wait, no, that all only applies to the root when the first pattern
28892
+ // is not an extglob. If the first pattern IS an extglob, then we need all
28893
+ // that dot prevention biz to live in the extglob portions, because eg
28894
+ // +(*|.x*) can match .xy but not .yx.
28895
+ //
28896
+ // So, return the two flavors if it's #root and the first child is not an
28897
+ // AST, otherwise leave it to the child AST to handle it, and there,
28898
+ // use the (?:^|/) style of start binding.
28899
+ //
28900
+ // Even simplified further:
28901
+ // - Since the start for a join is eg /(?!\.) and the start for a part
28902
+ // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
28903
+ // or start or whatever) and prepend ^ or / at the Regexp construction.
28904
+ toRegExpSource(allowDot) {
28905
+ const dot3 = allowDot ?? !!this.#options.dot;
28906
+ if (this.#root === this)
28907
+ this.#fillNegs();
28908
+ if (!this.type) {
28909
+ const noEmpty = this.isStart() && this.isEnd();
28910
+ const src = this.#parts.map((p2) => {
28911
+ const [re, _, hasMagic, uflag] = typeof p2 === "string" ? _AST.#parseGlob(p2, this.#hasMagic, noEmpty) : p2.toRegExpSource(allowDot);
28912
+ this.#hasMagic = this.#hasMagic || hasMagic;
28913
+ this.#uflag = this.#uflag || uflag;
28914
+ return re;
28915
+ }).join("");
28916
+ let start5 = "";
28917
+ if (this.isStart()) {
28918
+ if (typeof this.#parts[0] === "string") {
28919
+ const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]);
28920
+ if (!dotTravAllowed) {
28921
+ const aps = addPatternStart;
28922
+ const needNoTrav = (
28923
+ // dots are allowed, and the pattern starts with [ or .
28924
+ dot3 && aps.has(src.charAt(0)) || // the pattern starts with \., and then [ or .
28925
+ src.startsWith("\\.") && aps.has(src.charAt(2)) || // the pattern starts with \.\., and then [ or .
28926
+ src.startsWith("\\.\\.") && aps.has(src.charAt(4))
28927
+ );
28928
+ const needNoDot = !dot3 && !allowDot && aps.has(src.charAt(0));
28929
+ start5 = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : "";
28930
+ }
28931
+ }
28932
+ }
28933
+ let end5 = "";
28934
+ if (this.isEnd() && this.#root.#filledNegs && this.#parent?.type === "!") {
28935
+ end5 = "(?:$|\\/)";
28936
+ }
28937
+ const final2 = start5 + src + end5;
28938
+ return [
28939
+ final2,
28940
+ unescape(src),
28941
+ this.#hasMagic = !!this.#hasMagic,
28942
+ this.#uflag
28943
+ ];
28944
+ }
28945
+ const repeated4 = this.type === "*" || this.type === "+";
28946
+ const start4 = this.type === "!" ? "(?:(?!(?:" : "(?:";
28947
+ let body = this.#partsToRegExp(dot3);
28948
+ if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
28949
+ const s = this.toString();
28950
+ this.#parts = [s];
28951
+ this.type = null;
28952
+ this.#hasMagic = void 0;
28953
+ return [s, unescape(this.toString()), false, false];
28954
+ }
28955
+ let bodyDotAllowed = !repeated4 || allowDot || dot3 || !startNoDot ? "" : this.#partsToRegExp(true);
28956
+ if (bodyDotAllowed === body) {
28957
+ bodyDotAllowed = "";
28958
+ }
28959
+ if (bodyDotAllowed) {
28960
+ body = `(?:${body})(?:${bodyDotAllowed})*?`;
28961
+ }
28962
+ let final = "";
28963
+ if (this.type === "!" && this.#emptyExt) {
28964
+ final = (this.isStart() && !dot3 ? startNoDot : "") + starNoEmpty;
28965
+ } else {
28966
+ const close3 = this.type === "!" ? (
28967
+ // !() must match something,but !(x) can match ''
28968
+ "))" + (this.isStart() && !dot3 && !allowDot ? startNoDot : "") + star + ")"
28969
+ ) : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && bodyDotAllowed ? ")" : this.type === "*" && bodyDotAllowed ? `)?` : `)${this.type}`;
28970
+ final = start4 + body + close3;
28971
+ }
28972
+ return [
28973
+ final,
28974
+ unescape(body),
28975
+ this.#hasMagic = !!this.#hasMagic,
28976
+ this.#uflag
28977
+ ];
28978
+ }
28979
+ #partsToRegExp(dot3) {
28980
+ return this.#parts.map((p2) => {
28981
+ if (typeof p2 === "string") {
28982
+ throw new Error("string type in extglob ast??");
28983
+ }
28984
+ const [re, _, _hasMagic, uflag] = p2.toRegExpSource(dot3);
28985
+ this.#uflag = this.#uflag || uflag;
28986
+ return re;
28987
+ }).filter((p2) => !(this.isStart() && this.isEnd()) || !!p2).join("|");
28988
+ }
28989
+ static #parseGlob(glob, hasMagic, noEmpty = false) {
28990
+ let escaping = false;
28991
+ let re = "";
28992
+ let uflag = false;
28993
+ for (let i = 0; i < glob.length; i++) {
28994
+ const c = glob.charAt(i);
28995
+ if (escaping) {
28996
+ escaping = false;
28997
+ re += (reSpecials.has(c) ? "\\" : "") + c;
28998
+ continue;
28999
+ }
29000
+ if (c === "\\") {
29001
+ if (i === glob.length - 1) {
29002
+ re += "\\\\";
29003
+ } else {
29004
+ escaping = true;
29005
+ }
29006
+ continue;
29007
+ }
29008
+ if (c === "[") {
29009
+ const [src, needUflag, consumed, magic] = parseClass(glob, i);
29010
+ if (consumed) {
29011
+ re += src;
29012
+ uflag = uflag || needUflag;
29013
+ i += consumed - 1;
29014
+ hasMagic = hasMagic || magic;
29015
+ continue;
29016
+ }
29017
+ }
29018
+ if (c === "*") {
29019
+ if (noEmpty && glob === "*")
29020
+ re += starNoEmpty;
29021
+ else
29022
+ re += star;
29023
+ hasMagic = true;
29024
+ continue;
29025
+ }
29026
+ if (c === "?") {
29027
+ re += qmark;
29028
+ hasMagic = true;
29029
+ continue;
29030
+ }
29031
+ re += regExpEscape(c);
29032
+ }
29033
+ return [re, unescape(glob), !!hasMagic, uflag];
29034
+ }
29035
+ };
29036
+
29037
+ // node_modules/.pnpm/minimatch@10.0.3/node_modules/minimatch/dist/esm/escape.js
29038
+ var escape3 = (s, { windowsPathsNoEscape = false } = {}) => {
29039
+ return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
29040
+ };
29041
+
29042
+ // node_modules/.pnpm/minimatch@10.0.3/node_modules/minimatch/dist/esm/index.js
29043
+ var minimatch = (p2, pattern2, options3 = {}) => {
29044
+ assertValidPattern(pattern2);
29045
+ if (!options3.nocomment && pattern2.charAt(0) === "#") {
29046
+ return false;
29047
+ }
29048
+ return new Minimatch(pattern2, options3).match(p2);
29049
+ };
29050
+ var starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
29051
+ var starDotExtTest = (ext2) => (f) => !f.startsWith(".") && f.endsWith(ext2);
29052
+ var starDotExtTestDot = (ext2) => (f) => f.endsWith(ext2);
29053
+ var starDotExtTestNocase = (ext2) => {
29054
+ ext2 = ext2.toLowerCase();
29055
+ return (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext2);
29056
+ };
29057
+ var starDotExtTestNocaseDot = (ext2) => {
29058
+ ext2 = ext2.toLowerCase();
29059
+ return (f) => f.toLowerCase().endsWith(ext2);
29060
+ };
29061
+ var starDotStarRE = /^\*+\.\*+$/;
29062
+ var starDotStarTest = (f) => !f.startsWith(".") && f.includes(".");
29063
+ var starDotStarTestDot = (f) => f !== "." && f !== ".." && f.includes(".");
29064
+ var dotStarRE = /^\.\*+$/;
29065
+ var dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith(".");
29066
+ var starRE = /^\*+$/;
29067
+ var starTest = (f) => f.length !== 0 && !f.startsWith(".");
29068
+ var starTestDot = (f) => f.length !== 0 && f !== "." && f !== "..";
29069
+ var qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
29070
+ var qmarksTestNocase = ([$0, ext2 = ""]) => {
29071
+ const noext = qmarksTestNoExt([$0]);
29072
+ if (!ext2)
29073
+ return noext;
29074
+ ext2 = ext2.toLowerCase();
29075
+ return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
29076
+ };
29077
+ var qmarksTestNocaseDot = ([$0, ext2 = ""]) => {
29078
+ const noext = qmarksTestNoExtDot([$0]);
29079
+ if (!ext2)
29080
+ return noext;
29081
+ ext2 = ext2.toLowerCase();
29082
+ return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
29083
+ };
29084
+ var qmarksTestDot = ([$0, ext2 = ""]) => {
29085
+ const noext = qmarksTestNoExtDot([$0]);
29086
+ return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
29087
+ };
29088
+ var qmarksTest = ([$0, ext2 = ""]) => {
29089
+ const noext = qmarksTestNoExt([$0]);
29090
+ return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
29091
+ };
29092
+ var qmarksTestNoExt = ([$0]) => {
29093
+ const len = $0.length;
29094
+ return (f) => f.length === len && !f.startsWith(".");
29095
+ };
29096
+ var qmarksTestNoExtDot = ([$0]) => {
29097
+ const len = $0.length;
29098
+ return (f) => f.length === len && f !== "." && f !== "..";
29099
+ };
29100
+ var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
29101
+ var path2 = {
29102
+ win32: { sep: "\\" },
29103
+ posix: { sep: "/" }
29104
+ };
29105
+ var sep = defaultPlatform === "win32" ? path2.win32.sep : path2.posix.sep;
29106
+ minimatch.sep = sep;
29107
+ var GLOBSTAR = Symbol("globstar **");
29108
+ minimatch.GLOBSTAR = GLOBSTAR;
29109
+ var qmark2 = "[^/]";
29110
+ var star2 = qmark2 + "*?";
29111
+ var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
29112
+ var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
29113
+ var filter11 = (pattern2, options3 = {}) => (p2) => minimatch(p2, pattern2, options3);
29114
+ minimatch.filter = filter11;
29115
+ var ext = (a, b = {}) => Object.assign({}, a, b);
29116
+ var defaults = (def) => {
29117
+ if (!def || typeof def !== "object" || !Object.keys(def).length) {
29118
+ return minimatch;
29119
+ }
29120
+ const orig = minimatch;
29121
+ const m = (p2, pattern2, options3 = {}) => orig(p2, pattern2, ext(def, options3));
29122
+ return Object.assign(m, {
29123
+ Minimatch: class Minimatch extends orig.Minimatch {
29124
+ constructor(pattern2, options3 = {}) {
29125
+ super(pattern2, ext(def, options3));
29126
+ }
29127
+ static defaults(options3) {
29128
+ return orig.defaults(ext(def, options3)).Minimatch;
29129
+ }
29130
+ },
29131
+ AST: class AST extends orig.AST {
29132
+ /* c8 ignore start */
29133
+ constructor(type2, parent, options3 = {}) {
29134
+ super(type2, parent, ext(def, options3));
29135
+ }
29136
+ /* c8 ignore stop */
29137
+ static fromGlob(pattern2, options3 = {}) {
29138
+ return orig.AST.fromGlob(pattern2, ext(def, options3));
29139
+ }
29140
+ },
29141
+ unescape: (s, options3 = {}) => orig.unescape(s, ext(def, options3)),
29142
+ escape: (s, options3 = {}) => orig.escape(s, ext(def, options3)),
29143
+ filter: (pattern2, options3 = {}) => orig.filter(pattern2, ext(def, options3)),
29144
+ defaults: (options3) => orig.defaults(ext(def, options3)),
29145
+ makeRe: (pattern2, options3 = {}) => orig.makeRe(pattern2, ext(def, options3)),
29146
+ braceExpand: (pattern2, options3 = {}) => orig.braceExpand(pattern2, ext(def, options3)),
29147
+ match: (list4, pattern2, options3 = {}) => orig.match(list4, pattern2, ext(def, options3)),
29148
+ sep: orig.sep,
29149
+ GLOBSTAR
29150
+ });
29151
+ };
29152
+ minimatch.defaults = defaults;
29153
+ var braceExpand = (pattern2, options3 = {}) => {
29154
+ assertValidPattern(pattern2);
29155
+ if (options3.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern2)) {
29156
+ return [pattern2];
29157
+ }
29158
+ return expand2(pattern2);
29159
+ };
29160
+ minimatch.braceExpand = braceExpand;
29161
+ var makeRe = (pattern2, options3 = {}) => new Minimatch(pattern2, options3).makeRe();
29162
+ minimatch.makeRe = makeRe;
29163
+ var match17 = (list4, pattern2, options3 = {}) => {
29164
+ const mm = new Minimatch(pattern2, options3);
29165
+ list4 = list4.filter((f) => mm.match(f));
29166
+ if (mm.options.nonull && !list4.length) {
29167
+ list4.push(pattern2);
29168
+ }
29169
+ return list4;
29170
+ };
29171
+ minimatch.match = match17;
29172
+ var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
29173
+ var regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
29174
+ var Minimatch = class {
29175
+ options;
29176
+ set;
29177
+ pattern;
29178
+ windowsPathsNoEscape;
29179
+ nonegate;
29180
+ negate;
29181
+ comment;
29182
+ empty;
29183
+ preserveMultipleSlashes;
29184
+ partial;
29185
+ globSet;
29186
+ globParts;
29187
+ nocase;
29188
+ isWindows;
29189
+ platform;
29190
+ windowsNoMagicRoot;
29191
+ regexp;
29192
+ constructor(pattern2, options3 = {}) {
29193
+ assertValidPattern(pattern2);
29194
+ options3 = options3 || {};
29195
+ this.options = options3;
29196
+ this.pattern = pattern2;
29197
+ this.platform = options3.platform || defaultPlatform;
29198
+ this.isWindows = this.platform === "win32";
29199
+ this.windowsPathsNoEscape = !!options3.windowsPathsNoEscape || options3.allowWindowsEscape === false;
29200
+ if (this.windowsPathsNoEscape) {
29201
+ this.pattern = this.pattern.replace(/\\/g, "/");
29202
+ }
29203
+ this.preserveMultipleSlashes = !!options3.preserveMultipleSlashes;
29204
+ this.regexp = null;
29205
+ this.negate = false;
29206
+ this.nonegate = !!options3.nonegate;
29207
+ this.comment = false;
29208
+ this.empty = false;
29209
+ this.partial = !!options3.partial;
29210
+ this.nocase = !!this.options.nocase;
29211
+ this.windowsNoMagicRoot = options3.windowsNoMagicRoot !== void 0 ? options3.windowsNoMagicRoot : !!(this.isWindows && this.nocase);
29212
+ this.globSet = [];
29213
+ this.globParts = [];
29214
+ this.set = [];
29215
+ this.make();
29216
+ }
29217
+ hasMagic() {
29218
+ if (this.options.magicalBraces && this.set.length > 1) {
29219
+ return true;
29220
+ }
29221
+ for (const pattern2 of this.set) {
29222
+ for (const part of pattern2) {
29223
+ if (typeof part !== "string")
29224
+ return true;
29225
+ }
29226
+ }
29227
+ return false;
29228
+ }
29229
+ debug(..._) {
29230
+ }
29231
+ make() {
29232
+ const pattern2 = this.pattern;
29233
+ const options3 = this.options;
29234
+ if (!options3.nocomment && pattern2.charAt(0) === "#") {
29235
+ this.comment = true;
29236
+ return;
29237
+ }
29238
+ if (!pattern2) {
29239
+ this.empty = true;
29240
+ return;
29241
+ }
29242
+ this.parseNegate();
29243
+ this.globSet = [...new Set(this.braceExpand())];
29244
+ if (options3.debug) {
29245
+ this.debug = (...args3) => console.error(...args3);
29246
+ }
29247
+ this.debug(this.pattern, this.globSet);
29248
+ const rawGlobParts = this.globSet.map((s) => this.slashSplit(s));
29249
+ this.globParts = this.preprocess(rawGlobParts);
29250
+ this.debug(this.pattern, this.globParts);
29251
+ let set7 = this.globParts.map((s, _, __) => {
29252
+ if (this.isWindows && this.windowsNoMagicRoot) {
29253
+ const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]);
29254
+ const isDrive = /^[a-z]:/i.test(s[0]);
29255
+ if (isUNC) {
29256
+ return [...s.slice(0, 4), ...s.slice(4).map((ss) => this.parse(ss))];
29257
+ } else if (isDrive) {
29258
+ return [s[0], ...s.slice(1).map((ss) => this.parse(ss))];
29259
+ }
29260
+ }
29261
+ return s.map((ss) => this.parse(ss));
29262
+ });
29263
+ this.debug(this.pattern, set7);
29264
+ this.set = set7.filter((s) => s.indexOf(false) === -1);
29265
+ if (this.isWindows) {
29266
+ for (let i = 0; i < this.set.length; i++) {
29267
+ const p2 = this.set[i];
29268
+ if (p2[0] === "" && p2[1] === "" && this.globParts[i][2] === "?" && typeof p2[3] === "string" && /^[a-z]:$/i.test(p2[3])) {
29269
+ p2[2] = "?";
29270
+ }
29271
+ }
29272
+ }
29273
+ this.debug(this.pattern, this.set);
29274
+ }
29275
+ // various transforms to equivalent pattern sets that are
29276
+ // faster to process in a filesystem walk. The goal is to
29277
+ // eliminate what we can, and push all ** patterns as far
29278
+ // to the right as possible, even if it increases the number
29279
+ // of patterns that we have to process.
29280
+ preprocess(globParts) {
29281
+ if (this.options.noglobstar) {
29282
+ for (let i = 0; i < globParts.length; i++) {
29283
+ for (let j = 0; j < globParts[i].length; j++) {
29284
+ if (globParts[i][j] === "**") {
29285
+ globParts[i][j] = "*";
29286
+ }
29287
+ }
29288
+ }
29289
+ }
29290
+ const { optimizationLevel = 1 } = this.options;
29291
+ if (optimizationLevel >= 2) {
29292
+ globParts = this.firstPhasePreProcess(globParts);
29293
+ globParts = this.secondPhasePreProcess(globParts);
29294
+ } else if (optimizationLevel >= 1) {
29295
+ globParts = this.levelOneOptimize(globParts);
29296
+ } else {
29297
+ globParts = this.adjascentGlobstarOptimize(globParts);
29298
+ }
29299
+ return globParts;
29300
+ }
29301
+ // just get rid of adjascent ** portions
29302
+ adjascentGlobstarOptimize(globParts) {
29303
+ return globParts.map((parts2) => {
29304
+ let gs = -1;
29305
+ while (-1 !== (gs = parts2.indexOf("**", gs + 1))) {
29306
+ let i = gs;
29307
+ while (parts2[i + 1] === "**") {
29308
+ i++;
29309
+ }
29310
+ if (i !== gs) {
29311
+ parts2.splice(gs, i - gs);
29312
+ }
29313
+ }
29314
+ return parts2;
29315
+ });
29316
+ }
29317
+ // get rid of adjascent ** and resolve .. portions
29318
+ levelOneOptimize(globParts) {
29319
+ return globParts.map((parts2) => {
29320
+ parts2 = parts2.reduce((set7, part) => {
29321
+ const prev = set7[set7.length - 1];
29322
+ if (part === "**" && prev === "**") {
29323
+ return set7;
29324
+ }
29325
+ if (part === "..") {
29326
+ if (prev && prev !== ".." && prev !== "." && prev !== "**") {
29327
+ set7.pop();
29328
+ return set7;
29329
+ }
29330
+ }
29331
+ set7.push(part);
29332
+ return set7;
29333
+ }, []);
29334
+ return parts2.length === 0 ? [""] : parts2;
29335
+ });
29336
+ }
29337
+ levelTwoFileOptimize(parts2) {
29338
+ if (!Array.isArray(parts2)) {
29339
+ parts2 = this.slashSplit(parts2);
29340
+ }
29341
+ let didSomething = false;
29342
+ do {
29343
+ didSomething = false;
29344
+ if (!this.preserveMultipleSlashes) {
29345
+ for (let i = 1; i < parts2.length - 1; i++) {
29346
+ const p2 = parts2[i];
29347
+ if (i === 1 && p2 === "" && parts2[0] === "")
29348
+ continue;
29349
+ if (p2 === "." || p2 === "") {
29350
+ didSomething = true;
29351
+ parts2.splice(i, 1);
29352
+ i--;
29353
+ }
29354
+ }
29355
+ if (parts2[0] === "." && parts2.length === 2 && (parts2[1] === "." || parts2[1] === "")) {
29356
+ didSomething = true;
29357
+ parts2.pop();
29358
+ }
29359
+ }
29360
+ let dd = 0;
29361
+ while (-1 !== (dd = parts2.indexOf("..", dd + 1))) {
29362
+ const p2 = parts2[dd - 1];
29363
+ if (p2 && p2 !== "." && p2 !== ".." && p2 !== "**") {
29364
+ didSomething = true;
29365
+ parts2.splice(dd - 1, 2);
29366
+ dd -= 2;
29367
+ }
29368
+ }
29369
+ } while (didSomething);
29370
+ return parts2.length === 0 ? [""] : parts2;
29371
+ }
29372
+ // First phase: single-pattern processing
29373
+ // <pre> is 1 or more portions
29374
+ // <rest> is 1 or more portions
29375
+ // <p> is any portion other than ., .., '', or **
29376
+ // <e> is . or ''
29377
+ //
29378
+ // **/.. is *brutal* for filesystem walking performance, because
29379
+ // it effectively resets the recursive walk each time it occurs,
29380
+ // and ** cannot be reduced out by a .. pattern part like a regexp
29381
+ // or most strings (other than .., ., and '') can be.
29382
+ //
29383
+ // <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}
29384
+ // <pre>/<e>/<rest> -> <pre>/<rest>
29385
+ // <pre>/<p>/../<rest> -> <pre>/<rest>
29386
+ // **/**/<rest> -> **/<rest>
29387
+ //
29388
+ // **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow
29389
+ // this WOULD be allowed if ** did follow symlinks, or * didn't
29390
+ firstPhasePreProcess(globParts) {
29391
+ let didSomething = false;
29392
+ do {
29393
+ didSomething = false;
29394
+ for (let parts2 of globParts) {
29395
+ let gs = -1;
29396
+ while (-1 !== (gs = parts2.indexOf("**", gs + 1))) {
29397
+ let gss = gs;
29398
+ while (parts2[gss + 1] === "**") {
29399
+ gss++;
29400
+ }
29401
+ if (gss > gs) {
29402
+ parts2.splice(gs + 1, gss - gs);
29403
+ }
29404
+ let next = parts2[gs + 1];
29405
+ const p2 = parts2[gs + 2];
29406
+ const p22 = parts2[gs + 3];
29407
+ if (next !== "..")
29408
+ continue;
29409
+ if (!p2 || p2 === "." || p2 === ".." || !p22 || p22 === "." || p22 === "..") {
29410
+ continue;
29411
+ }
29412
+ didSomething = true;
29413
+ parts2.splice(gs, 1);
29414
+ const other = parts2.slice(0);
29415
+ other[gs] = "**";
29416
+ globParts.push(other);
29417
+ gs--;
29418
+ }
29419
+ if (!this.preserveMultipleSlashes) {
29420
+ for (let i = 1; i < parts2.length - 1; i++) {
29421
+ const p2 = parts2[i];
29422
+ if (i === 1 && p2 === "" && parts2[0] === "")
29423
+ continue;
29424
+ if (p2 === "." || p2 === "") {
29425
+ didSomething = true;
29426
+ parts2.splice(i, 1);
29427
+ i--;
29428
+ }
29429
+ }
29430
+ if (parts2[0] === "." && parts2.length === 2 && (parts2[1] === "." || parts2[1] === "")) {
29431
+ didSomething = true;
29432
+ parts2.pop();
29433
+ }
29434
+ }
29435
+ let dd = 0;
29436
+ while (-1 !== (dd = parts2.indexOf("..", dd + 1))) {
29437
+ const p2 = parts2[dd - 1];
29438
+ if (p2 && p2 !== "." && p2 !== ".." && p2 !== "**") {
29439
+ didSomething = true;
29440
+ const needDot = dd === 1 && parts2[dd + 1] === "**";
29441
+ const splin = needDot ? ["."] : [];
29442
+ parts2.splice(dd - 1, 2, ...splin);
29443
+ if (parts2.length === 0)
29444
+ parts2.push("");
29445
+ dd -= 2;
29446
+ }
29447
+ }
29448
+ }
29449
+ } while (didSomething);
29450
+ return globParts;
29451
+ }
29452
+ // second phase: multi-pattern dedupes
29453
+ // {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest>
29454
+ // {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest>
29455
+ // {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest>
29456
+ //
29457
+ // {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest>
29458
+ // ^-- not valid because ** doens't follow symlinks
29459
+ secondPhasePreProcess(globParts) {
29460
+ for (let i = 0; i < globParts.length - 1; i++) {
29461
+ for (let j = i + 1; j < globParts.length; j++) {
29462
+ const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
29463
+ if (matched) {
29464
+ globParts[i] = [];
29465
+ globParts[j] = matched;
29466
+ break;
29467
+ }
29468
+ }
29469
+ }
29470
+ return globParts.filter((gs) => gs.length);
29471
+ }
29472
+ partsMatch(a, b, emptyGSMatch = false) {
29473
+ let ai = 0;
29474
+ let bi = 0;
29475
+ let result = [];
29476
+ let which = "";
29477
+ while (ai < a.length && bi < b.length) {
29478
+ if (a[ai] === b[bi]) {
29479
+ result.push(which === "b" ? b[bi] : a[ai]);
29480
+ ai++;
29481
+ bi++;
29482
+ } else if (emptyGSMatch && a[ai] === "**" && b[bi] === a[ai + 1]) {
29483
+ result.push(a[ai]);
29484
+ ai++;
29485
+ } else if (emptyGSMatch && b[bi] === "**" && a[ai] === b[bi + 1]) {
29486
+ result.push(b[bi]);
29487
+ bi++;
29488
+ } else if (a[ai] === "*" && b[bi] && (this.options.dot || !b[bi].startsWith(".")) && b[bi] !== "**") {
29489
+ if (which === "b")
29490
+ return false;
29491
+ which = "a";
29492
+ result.push(a[ai]);
29493
+ ai++;
29494
+ bi++;
29495
+ } else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
29496
+ if (which === "a")
29497
+ return false;
29498
+ which = "b";
29499
+ result.push(b[bi]);
29500
+ ai++;
29501
+ bi++;
29502
+ } else {
29503
+ return false;
29504
+ }
29505
+ }
29506
+ return a.length === b.length && result;
29507
+ }
29508
+ parseNegate() {
29509
+ if (this.nonegate)
29510
+ return;
29511
+ const pattern2 = this.pattern;
29512
+ let negate3 = false;
29513
+ let negateOffset = 0;
29514
+ for (let i = 0; i < pattern2.length && pattern2.charAt(i) === "!"; i++) {
29515
+ negate3 = !negate3;
29516
+ negateOffset++;
29517
+ }
29518
+ if (negateOffset)
29519
+ this.pattern = pattern2.slice(negateOffset);
29520
+ this.negate = negate3;
29521
+ }
29522
+ // set partial to true to test if, for example,
29523
+ // "/a/b" matches the start of "/*/b/*/d"
29524
+ // Partial means, if you run out of file before you run
29525
+ // out of pattern, then that's fine, as long as all
29526
+ // the parts match.
29527
+ matchOne(file3, pattern2, partial2 = false) {
29528
+ const options3 = this.options;
29529
+ if (this.isWindows) {
29530
+ const fileDrive = typeof file3[0] === "string" && /^[a-z]:$/i.test(file3[0]);
29531
+ const fileUNC = !fileDrive && file3[0] === "" && file3[1] === "" && file3[2] === "?" && /^[a-z]:$/i.test(file3[3]);
29532
+ const patternDrive = typeof pattern2[0] === "string" && /^[a-z]:$/i.test(pattern2[0]);
29533
+ const patternUNC = !patternDrive && pattern2[0] === "" && pattern2[1] === "" && pattern2[2] === "?" && typeof pattern2[3] === "string" && /^[a-z]:$/i.test(pattern2[3]);
29534
+ const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
29535
+ const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
29536
+ if (typeof fdi === "number" && typeof pdi === "number") {
29537
+ const [fd, pd] = [file3[fdi], pattern2[pdi]];
29538
+ if (fd.toLowerCase() === pd.toLowerCase()) {
29539
+ pattern2[pdi] = fd;
29540
+ if (pdi > fdi) {
29541
+ pattern2 = pattern2.slice(pdi);
29542
+ } else if (fdi > pdi) {
29543
+ file3 = file3.slice(fdi);
29544
+ }
29545
+ }
29546
+ }
29547
+ }
29548
+ const { optimizationLevel = 1 } = this.options;
29549
+ if (optimizationLevel >= 2) {
29550
+ file3 = this.levelTwoFileOptimize(file3);
29551
+ }
29552
+ this.debug("matchOne", this, { file: file3, pattern: pattern2 });
29553
+ this.debug("matchOne", file3.length, pattern2.length);
29554
+ for (var fi = 0, pi = 0, fl = file3.length, pl = pattern2.length; fi < fl && pi < pl; fi++, pi++) {
29555
+ this.debug("matchOne loop");
29556
+ var p2 = pattern2[pi];
29557
+ var f = file3[fi];
29558
+ this.debug(pattern2, p2, f);
29559
+ if (p2 === false) {
29560
+ return false;
29561
+ }
29562
+ if (p2 === GLOBSTAR) {
29563
+ this.debug("GLOBSTAR", [pattern2, p2, f]);
29564
+ var fr = fi;
29565
+ var pr = pi + 1;
29566
+ if (pr === pl) {
29567
+ this.debug("** at the end");
29568
+ for (; fi < fl; fi++) {
29569
+ if (file3[fi] === "." || file3[fi] === ".." || !options3.dot && file3[fi].charAt(0) === ".")
29570
+ return false;
29571
+ }
29572
+ return true;
29573
+ }
29574
+ while (fr < fl) {
29575
+ var swallowee = file3[fr];
29576
+ this.debug("\nglobstar while", file3, fr, pattern2, pr, swallowee);
29577
+ if (this.matchOne(file3.slice(fr), pattern2.slice(pr), partial2)) {
29578
+ this.debug("globstar found match!", fr, fl, swallowee);
29579
+ return true;
29580
+ } else {
29581
+ if (swallowee === "." || swallowee === ".." || !options3.dot && swallowee.charAt(0) === ".") {
29582
+ this.debug("dot detected!", file3, fr, pattern2, pr);
29583
+ break;
29584
+ }
29585
+ this.debug("globstar swallow a segment, and continue");
29586
+ fr++;
29587
+ }
29588
+ }
29589
+ if (partial2) {
29590
+ this.debug("\n>>> no match, partial?", file3, fr, pattern2, pr);
29591
+ if (fr === fl) {
29592
+ return true;
29593
+ }
29594
+ }
29595
+ return false;
29596
+ }
29597
+ let hit;
29598
+ if (typeof p2 === "string") {
29599
+ hit = f === p2;
29600
+ this.debug("string match", p2, f, hit);
29601
+ } else {
29602
+ hit = p2.test(f);
29603
+ this.debug("pattern match", p2, f, hit);
29604
+ }
29605
+ if (!hit)
29606
+ return false;
29607
+ }
29608
+ if (fi === fl && pi === pl) {
29609
+ return true;
29610
+ } else if (fi === fl) {
29611
+ return partial2;
29612
+ } else if (pi === pl) {
29613
+ return fi === fl - 1 && file3[fi] === "";
29614
+ } else {
29615
+ throw new Error("wtf?");
29616
+ }
29617
+ }
29618
+ braceExpand() {
29619
+ return braceExpand(this.pattern, this.options);
29620
+ }
29621
+ parse(pattern2) {
29622
+ assertValidPattern(pattern2);
29623
+ const options3 = this.options;
29624
+ if (pattern2 === "**")
29625
+ return GLOBSTAR;
29626
+ if (pattern2 === "")
29627
+ return "";
29628
+ let m;
29629
+ let fastTest = null;
29630
+ if (m = pattern2.match(starRE)) {
29631
+ fastTest = options3.dot ? starTestDot : starTest;
29632
+ } else if (m = pattern2.match(starDotExtRE)) {
29633
+ fastTest = (options3.nocase ? options3.dot ? starDotExtTestNocaseDot : starDotExtTestNocase : options3.dot ? starDotExtTestDot : starDotExtTest)(m[1]);
29634
+ } else if (m = pattern2.match(qmarksRE)) {
29635
+ fastTest = (options3.nocase ? options3.dot ? qmarksTestNocaseDot : qmarksTestNocase : options3.dot ? qmarksTestDot : qmarksTest)(m);
29636
+ } else if (m = pattern2.match(starDotStarRE)) {
29637
+ fastTest = options3.dot ? starDotStarTestDot : starDotStarTest;
29638
+ } else if (m = pattern2.match(dotStarRE)) {
29639
+ fastTest = dotStarTest;
29640
+ }
29641
+ const re = AST.fromGlob(pattern2, this.options).toMMPattern();
29642
+ if (fastTest && typeof re === "object") {
29643
+ Reflect.defineProperty(re, "test", { value: fastTest });
29644
+ }
29645
+ return re;
29646
+ }
29647
+ makeRe() {
29648
+ if (this.regexp || this.regexp === false)
29649
+ return this.regexp;
29650
+ const set7 = this.set;
29651
+ if (!set7.length) {
29652
+ this.regexp = false;
29653
+ return this.regexp;
29654
+ }
29655
+ const options3 = this.options;
29656
+ const twoStar = options3.noglobstar ? star2 : options3.dot ? twoStarDot : twoStarNoDot;
29657
+ const flags = new Set(options3.nocase ? ["i"] : []);
29658
+ let re = set7.map((pattern2) => {
29659
+ const pp = pattern2.map((p2) => {
29660
+ if (p2 instanceof RegExp) {
29661
+ for (const f of p2.flags.split(""))
29662
+ flags.add(f);
29663
+ }
29664
+ return typeof p2 === "string" ? regExpEscape2(p2) : p2 === GLOBSTAR ? GLOBSTAR : p2._src;
29665
+ });
29666
+ pp.forEach((p2, i) => {
29667
+ const next = pp[i + 1];
29668
+ const prev = pp[i - 1];
29669
+ if (p2 !== GLOBSTAR || prev === GLOBSTAR) {
29670
+ return;
29671
+ }
29672
+ if (prev === void 0) {
29673
+ if (next !== void 0 && next !== GLOBSTAR) {
29674
+ pp[i + 1] = "(?:\\/|" + twoStar + "\\/)?" + next;
29675
+ } else {
29676
+ pp[i] = twoStar;
29677
+ }
29678
+ } else if (next === void 0) {
29679
+ pp[i - 1] = prev + "(?:\\/|" + twoStar + ")?";
29680
+ } else if (next !== GLOBSTAR) {
29681
+ pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
29682
+ pp[i + 1] = GLOBSTAR;
29683
+ }
29684
+ });
29685
+ return pp.filter((p2) => p2 !== GLOBSTAR).join("/");
29686
+ }).join("|");
29687
+ const [open3, close3] = set7.length > 1 ? ["(?:", ")"] : ["", ""];
29688
+ re = "^" + open3 + re + close3 + "$";
29689
+ if (this.negate)
29690
+ re = "^(?!" + re + ").+$";
29691
+ try {
29692
+ this.regexp = new RegExp(re, [...flags].join(""));
29693
+ } catch (ex) {
29694
+ this.regexp = false;
29695
+ }
29696
+ return this.regexp;
29697
+ }
29698
+ slashSplit(p2) {
29699
+ if (this.preserveMultipleSlashes) {
29700
+ return p2.split("/");
29701
+ } else if (this.isWindows && /^\/\/[^\/]+/.test(p2)) {
29702
+ return ["", ...p2.split(/\/+/)];
29703
+ } else {
29704
+ return p2.split(/\/+/);
29705
+ }
29706
+ }
29707
+ match(f, partial2 = this.partial) {
29708
+ this.debug("match", f, this.pattern);
29709
+ if (this.comment) {
29710
+ return false;
29711
+ }
29712
+ if (this.empty) {
29713
+ return f === "";
29714
+ }
29715
+ if (f === "/" && partial2) {
29716
+ return true;
29717
+ }
29718
+ const options3 = this.options;
29719
+ if (this.isWindows) {
29720
+ f = f.split("\\").join("/");
29721
+ }
29722
+ const ff = this.slashSplit(f);
29723
+ this.debug(this.pattern, "split", ff);
29724
+ const set7 = this.set;
29725
+ this.debug(this.pattern, "set", set7);
29726
+ let filename = ff[ff.length - 1];
29727
+ if (!filename) {
29728
+ for (let i = ff.length - 2; !filename && i >= 0; i--) {
29729
+ filename = ff[i];
29730
+ }
29731
+ }
29732
+ for (let i = 0; i < set7.length; i++) {
29733
+ const pattern2 = set7[i];
29734
+ let file3 = ff;
29735
+ if (options3.matchBase && pattern2.length === 1) {
29736
+ file3 = [filename];
29737
+ }
29738
+ const hit = this.matchOne(file3, pattern2, partial2);
29739
+ if (hit) {
29740
+ if (options3.flipNegate) {
29741
+ return true;
29742
+ }
29743
+ return !this.negate;
29744
+ }
29745
+ }
29746
+ if (options3.flipNegate) {
29747
+ return false;
29748
+ }
29749
+ return this.negate;
29750
+ }
29751
+ static defaults(def) {
29752
+ return minimatch.defaults(def).Minimatch;
29753
+ }
29754
+ };
29755
+ minimatch.AST = AST;
29756
+ minimatch.Minimatch = Minimatch;
29757
+ minimatch.escape = escape3;
29758
+ minimatch.unescape = unescape;
29759
+
28214
29760
  // src/cli.ts
28215
29761
  var ts = __toESM(require("typescript"));
28216
29762
 
@@ -28285,6 +29831,7 @@ var NanoFiber = class {
28285
29831
  _stack = [];
28286
29832
  _yielded = void 0;
28287
29833
  _services = {};
29834
+ _cache = {};
28288
29835
  runLoop(nano) {
28289
29836
  let current = nano;
28290
29837
  while (true) {
@@ -28377,7 +29924,7 @@ var MatchProto = {
28377
29924
  return this[args2];
28378
29925
  }
28379
29926
  };
28380
- var match17 = (fa, opts) => {
29927
+ var match18 = (fa, opts) => {
28381
29928
  const nano = Object.create(MatchProto);
28382
29929
  nano[args2] = fa;
28383
29930
  nano[contA] = opts.onSuccess;
@@ -28400,7 +29947,7 @@ var ProvideServiceProto = {
28400
29947
  ...fiber._services,
28401
29948
  [tag4.key]: value5
28402
29949
  };
28403
- return match17(fa, {
29950
+ return match18(fa, {
28404
29951
  onSuccess: (_) => {
28405
29952
  fiber._services = prevServices;
28406
29953
  return succeed17(_);
@@ -28435,8 +29982,32 @@ var service2 = (tag4) => {
28435
29982
  nano[args2] = tag4;
28436
29983
  return nano;
28437
29984
  };
28438
- function cachedBy(fa, _key, _lookupKey) {
28439
- return (...args3) => fa(...args3);
29985
+ var CachedProto = {
29986
+ ...PrimitiveProto,
29987
+ [evaluate2](fiber) {
29988
+ const [fa, type2, key] = this[args2];
29989
+ const cache = fiber._cache[type2] || /* @__PURE__ */ new WeakMap();
29990
+ fiber._cache[type2] = cache;
29991
+ const cached3 = cache.get(key);
29992
+ if (cached3) return cached3;
29993
+ return match18(fa, {
29994
+ onSuccess: (_) => {
29995
+ cache.set(key, succeed17(_));
29996
+ return succeed17(_);
29997
+ },
29998
+ onFailure: (_) => {
29999
+ cache.set(key, fail18(_));
30000
+ return fail18(_);
30001
+ }
30002
+ });
30003
+ }
30004
+ };
30005
+ function cachedBy(fa, type2, lookupKey) {
30006
+ return (...p2) => {
30007
+ const nano = Object.create(CachedProto);
30008
+ nano[args2] = [fa(...p2), type2, lookupKey(...p2)];
30009
+ return nano;
30010
+ };
28440
30011
  }
28441
30012
  var option4 = (fa) => {
28442
30013
  const nano = Object.create(MatchProto);
@@ -28667,10 +30238,10 @@ var createDiagnosticExecutor = fn("LSP.createCommentDirectivesProcessor")(
28667
30238
  const sectionOverrides = {};
28668
30239
  const skippedRules = [];
28669
30240
  const regex = /@effect-diagnostics(-next-line)?((?:\s[a-zA-Z0-9/]+:(?:off|warning|error|message|suggestion|skip-file))+)?/gm;
28670
- let match18;
28671
- while ((match18 = regex.exec(sourceFile.text)) !== null) {
28672
- const nextLineCaptureGroup = match18[1];
28673
- const rulesCaptureGroup = match18[2];
30241
+ let match19;
30242
+ while ((match19 = regex.exec(sourceFile.text)) !== null) {
30243
+ const nextLineCaptureGroup = match19[1];
30244
+ const rulesCaptureGroup = match19[2];
28674
30245
  if (rulesCaptureGroup) {
28675
30246
  const trimmedRuleString = rulesCaptureGroup.trim();
28676
30247
  if (trimmedRuleString) {
@@ -28682,7 +30253,7 @@ var createDiagnosticExecutor = fn("LSP.createCommentDirectivesProcessor")(
28682
30253
  if (ruleLevel === "skip-file") skippedRules.push(ruleName);
28683
30254
  const isOverrideNextLine = nextLineCaptureGroup && nextLineCaptureGroup.trim().toLowerCase() === "-next-line";
28684
30255
  if (isOverrideNextLine) {
28685
- const node = findNodeWithLeadingCommentAtPosition(match18.index);
30256
+ const node = findNodeWithLeadingCommentAtPosition(match19.index);
28686
30257
  if (node) {
28687
30258
  lineOverrides[ruleName] = lineOverrides[ruleName] || [];
28688
30259
  lineOverrides[ruleName].unshift({
@@ -28694,7 +30265,7 @@ var createDiagnosticExecutor = fn("LSP.createCommentDirectivesProcessor")(
28694
30265
  } else {
28695
30266
  sectionOverrides[ruleName] = sectionOverrides[ruleName] || [];
28696
30267
  sectionOverrides[ruleName].unshift({
28697
- pos: match18.index,
30268
+ pos: match19.index,
28698
30269
  level: ruleLevel
28699
30270
  });
28700
30271
  }
@@ -29013,8 +30584,7 @@ var unrollUnionMembers = (type2) => {
29013
30584
  var appendToUniqueTypesMap = fn(
29014
30585
  "TypeCheckerApi.appendToUniqueTypesMap"
29015
30586
  )(
29016
- function* (memory, initialType, excludeNever) {
29017
- const ts2 = yield* service2(TypeScriptApi);
30587
+ function* (memory, initialType, shouldExclude) {
29018
30588
  const typeChecker = yield* service2(TypeCheckerApi);
29019
30589
  const newIndexes = /* @__PURE__ */ new Set();
29020
30590
  const knownIndexes = /* @__PURE__ */ new Set();
@@ -29022,7 +30592,7 @@ var appendToUniqueTypesMap = fn(
29022
30592
  while (toTest.length > 0) {
29023
30593
  const type2 = toTest.pop();
29024
30594
  if (!type2) break;
29025
- if (excludeNever && type2.flags & ts2.TypeFlags.Never) {
30595
+ if (yield* shouldExclude(type2)) {
29026
30596
  continue;
29027
30597
  }
29028
30598
  if (type2.isUnion()) {
@@ -30270,7 +31840,18 @@ var leakingRequirements = createDiagnostic({
30270
31840
  );
30271
31841
  if (effectContextType) {
30272
31842
  effectMembers++;
30273
- const { allIndexes } = yield* appendToUniqueTypesMap(memory, effectContextType, true);
31843
+ const { allIndexes } = yield* appendToUniqueTypesMap(
31844
+ memory,
31845
+ effectContextType,
31846
+ (type2) => {
31847
+ if (type2.flags & ts2.TypeFlags.Never) return succeed17(true);
31848
+ return pipe(
31849
+ typeParser.scopeType(type2, atLocation),
31850
+ map33(() => true),
31851
+ orElse14(() => succeed17(false))
31852
+ );
31853
+ }
31854
+ );
30274
31855
  if (!sharedRequirementsKeys) {
30275
31856
  sharedRequirementsKeys = allIndexes;
30276
31857
  } else {
@@ -30827,7 +32408,7 @@ Consider using "scoped" instead to get rid of the scope in the requirements.`,
30827
32408
  var tryCatchInEffectGen = createDiagnostic({
30828
32409
  name: "tryCatchInEffectGen",
30829
32410
  code: 12,
30830
- severity: "warning",
32411
+ severity: "suggestion",
30831
32412
  apply: fn("tryCatchInEffectGen.apply")(function* (sourceFile, report) {
30832
32413
  const ts2 = yield* service2(TypeScriptApi);
30833
32414
  const typeParser = yield* service2(TypeParser);
@@ -31011,7 +32592,7 @@ var printCodeSnippet = (sourceFile, showStartPosition, showEndPosition) => gen2(
31011
32592
  const out = [];
31012
32593
  for (let lineIdx = 0; lineIdx < lines3.length; lineIdx++) {
31013
32594
  const lineNumber = (startLine + 1 + lineIdx).toFixed(0);
31014
- const lineCounterText = " ".repeat(lineNumberMaxLength - lineNumber.length) + lineNumber + " ";
32595
+ const lineCounterText = " ".repeat(Math.max(0, lineNumberMaxLength - lineNumber.length)) + lineNumber + " ";
31015
32596
  out.push(
31016
32597
  hcat2([
31017
32598
  string4(lineCounterText),
@@ -31052,7 +32633,7 @@ var formatDiagnostic = (cwd, sourceFile, diagnostic) => gen2(function* () {
31052
32633
  annotate2(italicized2)
31053
32634
  ),
31054
32635
  space2,
31055
- string4("\u2501".repeat(terminalColumns - titleWidth))
32636
+ string4("\u2501".repeat(Math.max(0, terminalColumns - titleWidth)))
31056
32637
  ]);
31057
32638
  const codeSnippet = yield* printCodeSnippet(
31058
32639
  sourceFile,
@@ -31092,7 +32673,7 @@ var formatDiagnosticAsJson = (cwd, sourceFile, diagnostic) => {
31092
32673
  message: messageText
31093
32674
  };
31094
32675
  };
31095
- var checkEffect2 = (format6) => gen2(function* () {
32676
+ var checkEffect2 = (format6, filter12) => gen2(function* () {
31096
32677
  const host = ts.createSolutionBuilderHost(
31097
32678
  ts.sys,
31098
32679
  ts.createSemanticDiagnosticsBuilderProgram
@@ -31106,7 +32687,14 @@ var checkEffect2 = (format6) => gen2(function* () {
31106
32687
  (_2) => hasProperty(_2, "name") && _2.name === "@effect/language-service"
31107
32688
  ) || {};
31108
32689
  const rootNames = program.getRootFileNames();
31109
- const sourceFiles = program.getSourceFiles().filter((_2) => rootNames.indexOf(_2.fileName) !== -1);
32690
+ let sourceFiles = program.getSourceFiles().filter((_2) => rootNames.indexOf(_2.fileName) !== -1);
32691
+ if (isSome2(filter12)) {
32692
+ const filterPattern = filter12.value;
32693
+ sourceFiles = sourceFiles.filter((sourceFile) => {
32694
+ const relativePath = sourceFile.fileName.startsWith(cwd) ? sourceFile.fileName.slice(cwd.length + 1) : sourceFile.fileName;
32695
+ return minimatch(relativePath, filterPattern);
32696
+ });
32697
+ }
31110
32698
  for (const sourceFile of sourceFiles) {
31111
32699
  const outputDiagnostics = pipe(
31112
32700
  getSemanticDiagnosticsWithCodeFixes(diagnostics, sourceFile),
@@ -31147,9 +32735,9 @@ var checkEffect2 = (format6) => gen2(function* () {
31147
32735
  while (project2) {
31148
32736
  project2.done(
31149
32737
  void 0,
31150
- (fileName, text8, bom) => {
32738
+ (fileName, text9, bom) => {
31151
32739
  if (fileName.endsWith(".d.ts") || fileName.endsWith(".map")) return;
31152
- return ts.sys.writeFile(fileName, text8, bom);
32740
+ return ts.sys.writeFile(fileName, text9, bom);
31153
32741
  }
31154
32742
  );
31155
32743
  project2 = solution.getNextInvalidatedProject();
@@ -31159,7 +32747,15 @@ var formatOption = choice3("format", ["default", "json"]).pipe(
31159
32747
  withDefault3("default"),
31160
32748
  withDescription3("Output format for diagnostics (default or json)")
31161
32749
  );
31162
- var checkCommand = make56("check", { format: formatOption }, ({ format: format6 }) => checkEffect2(format6));
32750
+ var filterOption = text8("filter").pipe(
32751
+ optional4,
32752
+ withDescription3("Filter files by pattern (e.g., '**/*.test.ts', 'src/**/*.ts')")
32753
+ );
32754
+ var checkCommand = make56(
32755
+ "check",
32756
+ { format: formatOption, filter: filterOption },
32757
+ ({ filter: filter12, format: format6 }) => checkEffect2(format6, filter12)
32758
+ );
31163
32759
  var cliCommand = make56(
31164
32760
  "effect-language-service",
31165
32761
  {},