import {
  ConsoleRef,
  CurrentLogAnnotations,
  CurrentLogSpans,
  CurrentLoggers,
  ErrorClass,
  FileSystem,
  LogToStderr,
  PipeInspectableProto,
  Random,
  Service,
  _await,
  acquireRelease,
  addFinalizer,
  andThen,
  as,
  causePretty,
  compose,
  consolePretty,
  constVoid,
  defaultLogger,
  doneUnsafe,
  dual,
  effect,
  empty,
  ensure,
  exports_Schema,
  exports_ServiceMap,
  fiberInterrupt,
  filterInterruptors,
  flatMap,
  fnUntraced,
  forever,
  forkDetach,
  format,
  formatJson,
  formatLabel,
  formatLogSpan,
  gen,
  has,
  hasInterruptsOnly,
  hasProperty,
  identity,
  ignore,
  interrupt,
  interruptAll,
  into,
  isEffect,
  isEffect1 as isEffect2,
  isFailure1 as isFailure,
  isString,
  isUndefined,
  logError,
  loggerMake,
  make5 as make,
  makeUnsafe1 as makeUnsafe,
  map6 as map,
  provideService,
  runFork,
  runForkWith,
  scope,
  scopeAddFinalizerExit,
  services,
  set,
  sleep,
  structuredMessage,
  succeed4 as succeed,
  suspend,
  suspend1 as suspend2,
  sync,
  sync1 as sync2,
  tag,
  tapCause,
  toPredicate,
  tracerLogger,
  uninterruptibleMask,
  void_,
  void_1 as void_2,
  withFiber,
  withFiber1 as withFiber2
} from "./index-w9j14fjm.js";
import {
  __export
} from "./index-sdksp5px.js";
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@8881a9b/node_modules/effect/dist/Console.js
var Console = ConsoleRef;
var consoleWith = (f) => withFiber((fiber) => f(fiber.getRef(Console)));
var error = (...args) => consoleWith((console) => sync(() => {
  console.error(...args);
}));
var log = (...args) => consoleWith((console) => sync(() => {
  console.log(...args);
}));
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@8881a9b/node_modules/effect/dist/ErrorReporter.js
var ignore2 = "~effect/ErrorReporter/ignore";
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@8881a9b/node_modules/effect/dist/FiberSet.js
var TypeId = "~effect/FiberSet";
var isFiberSet = (u) => hasProperty(u, TypeId);
var Proto = {
  [TypeId]: TypeId,
  [Symbol.iterator]() {
    if (this.state._tag === "Closed") {
      return empty();
    }
    return this.state.backing[Symbol.iterator]();
  },
  ...PipeInspectableProto,
  toJSON() {
    return {
      _id: "FiberMap",
      state: this.state
    };
  }
};
var makeUnsafe2 = (backing, deferred) => {
  const self = Object.create(Proto);
  self.state = {
    _tag: "Open",
    backing
  };
  self.deferred = deferred;
  return self;
};
var make2 = () => acquireRelease(sync2(() => makeUnsafe2(new Set, makeUnsafe())), (set2) => suspend2(() => {
  const state = set2.state;
  if (state._tag === "Closed")
    return void_2;
  set2.state = {
    _tag: "Closed"
  };
  const fibers = state.backing;
  return interruptAll(fibers).pipe(into(set2.deferred));
}));
var internalFiberId = -1;
var isInternalInterruption = /* @__PURE__ */ toPredicate(/* @__PURE__ */ compose(filterInterruptors, /* @__PURE__ */ has(internalFiberId)));
var addUnsafe = /* @__PURE__ */ dual((args) => isFiberSet(args[0]), (self, fiber, options) => {
  if (self.state._tag === "Closed") {
    fiber.interruptUnsafe(internalFiberId);
    return;
  } else if (self.state.backing.has(fiber)) {
    return;
  }
  self.state.backing.add(fiber);
  fiber.addObserver((exit) => {
    if (self.state._tag === "Closed") {
      return;
    }
    self.state.backing.delete(fiber);
    if (isFailure(exit) && (options?.propagateInterruption === true ? !isInternalInterruption(exit.cause) : !hasInterruptsOnly(exit.cause))) {
      doneUnsafe(self.deferred, exit);
    }
  });
});
var constInterruptedFiber = /* @__PURE__ */ function() {
  let fiber = undefined;
  return () => {
    if (fiber === undefined) {
      fiber = runFork(interrupt);
    }
    return fiber;
  };
}();
var runtime = (self) => () => map(services(), (services2) => {
  const runFork2 = runForkWith(services2);
  return (effect2, options) => {
    if (self.state._tag === "Closed") {
      return constInterruptedFiber();
    }
    const fiber = runFork2(effect2, options);
    addUnsafe(self, fiber);
    return fiber;
  };
});
var join = (self) => _await(self.deferred);
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@8881a9b/node_modules/effect/dist/Logger.js
var exports_Logger = {};
__export(exports_Logger, {
  withLeveledConsole: () => withLeveledConsole,
  withConsoleLog: () => withConsoleLog,
  withConsoleError: () => withConsoleError,
  tracerLogger: () => tracerLogger2,
  toFile: () => toFile,
  map: () => map2,
  make: () => make3,
  layer: () => layer,
  isLogger: () => isLogger,
  formatStructured: () => formatStructured,
  formatSimple: () => formatSimple,
  formatLogFmt: () => formatLogFmt,
  formatJson: () => formatJson2,
  defaultLogger: () => defaultLogger2,
  consoleStructured: () => consoleStructured,
  consolePretty: () => consolePretty2,
  consoleLogFmt: () => consoleLogFmt,
  consoleJson: () => consoleJson,
  batched: () => batched,
  LogToStderr: () => LogToStderr2,
  CurrentLoggers: () => CurrentLoggers2
});
var TypeId2 = "~effect/Logger";
var isLogger = (u) => hasProperty(u, TypeId2);
var CurrentLoggers2 = CurrentLoggers;
var LogToStderr2 = LogToStderr;
var map2 = /* @__PURE__ */ dual(2, (self, f) => loggerMake((options) => f(self.log(options))));
var withConsoleLog = (self) => loggerMake((options) => {
  const console = options.fiber.getRef(ConsoleRef);
  return console.log(self.log(options));
});
var withConsoleError = (self) => loggerMake((options) => {
  const console = options.fiber.getRef(ConsoleRef);
  return console.error(self.log(options));
});
var withLeveledConsole = (self) => loggerMake((options) => {
  const console = options.fiber.getRef(ConsoleRef);
  const output = self.log(options);
  switch (options.logLevel) {
    case "Debug":
      return console.debug(output);
    case "Info":
      return console.info(output);
    case "Trace":
      return console.trace(output);
    case "Warn":
      return console.warn(output);
    case "Error":
    case "Fatal":
      return console.error(output);
    default:
      return console.log(output);
  }
});
var textOnly = /^[^\s"=]*$/;
var escapeDoubleQuotes = (s) => `"${s.replace(/\\([\s\S])|(")/g, "\\$1$2")}"`;
var formatFiberId = (fiberId) => `#${fiberId}`;
var format2 = (quoteValue, space) => ({
  cause,
  date,
  fiber,
  logLevel,
  message
}) => {
  const formatValue = (value) => value.match(textOnly) ? value : quoteValue(value);
  const format3 = (label, value) => `${formatLabel(label)}=${formatValue(value)}`;
  const append = (label, value) => " " + format3(label, value);
  let out = format3("timestamp", date.toISOString());
  out += append("level", logLevel);
  out += append("fiber", formatFiberId(fiber.id));
  const messages = ensure(message);
  for (let i = 0;i < messages.length; i++) {
    out += append("message", format(messages[i], {
      space
    }));
  }
  if (cause.reasons.length > 0) {
    out += append("cause", causePretty(cause));
  }
  const now = date.getTime();
  const spans = fiber.getRef(CurrentLogSpans);
  for (const span of spans) {
    out += " " + formatLogSpan(span, now);
  }
  const annotations = fiber.getRef(CurrentLogAnnotations);
  for (const [label, value] of Object.entries(annotations)) {
    out += append(label, format(value, {
      space
    }));
  }
  return out;
};
var make3 = loggerMake;
var defaultLogger2 = defaultLogger;
var formatSimple = /* @__PURE__ */ loggerMake(/* @__PURE__ */ format2(escapeDoubleQuotes));
var formatLogFmt = /* @__PURE__ */ loggerMake(/* @__PURE__ */ format2(JSON.stringify, 0));
var formatStructured = /* @__PURE__ */ loggerMake(({
  cause,
  date,
  fiber,
  logLevel,
  message
}) => {
  const annotationsObj = {};
  const spansObj = {};
  const annotations = fiber.getRef(CurrentLogAnnotations);
  for (const [key, value] of Object.entries(annotations)) {
    annotationsObj[key] = structuredMessage(value);
  }
  const now = date.getTime();
  const spans = fiber.getRef(CurrentLogSpans);
  for (const [label, timestamp] of spans) {
    spansObj[label] = now - timestamp;
  }
  const messageArr = ensure(message);
  return {
    message: messageArr.length === 1 ? structuredMessage(messageArr[0]) : messageArr.map(structuredMessage),
    level: logLevel.toUpperCase(),
    timestamp: date.toISOString(),
    cause: cause.reasons.length > 0 ? causePretty(cause) : undefined,
    annotations: annotationsObj,
    spans: spansObj,
    fiberId: formatFiberId(fiber.id)
  };
});
var formatJson2 = /* @__PURE__ */ map2(formatStructured, formatJson);
var batched = /* @__PURE__ */ dual(2, (self, options) => flatMap(scope, (scope2) => {
  let buffer = [];
  const flush = suspend(() => {
    if (buffer.length === 0) {
      return void_;
    }
    const arr = buffer;
    buffer = [];
    return options.flush(arr);
  });
  return uninterruptibleMask((restore) => restore(sleep(options.window).pipe(andThen(flush), forever)).pipe(forkDetach, flatMap((fiber) => scopeAddFinalizerExit(scope2, () => fiberInterrupt(fiber))), andThen(addFinalizer(() => flush)), as(loggerMake((options2) => {
    buffer.push(self.log(options2));
  }))));
}));
var consolePretty2 = consolePretty;
var consoleLogFmt = /* @__PURE__ */ withConsoleLog(formatLogFmt);
var consoleStructured = /* @__PURE__ */ withConsoleLog(formatStructured);
var consoleJson = /* @__PURE__ */ withConsoleLog(formatJson2);
var tracerLogger2 = tracerLogger;
var layer = (loggers, options) => effect(CurrentLoggers2, withFiber(fnUntraced(function* (fiber) {
  const currentLoggers = new Set(options?.mergeWithExisting === true ? fiber.getRef(CurrentLoggers) : []);
  for (const logger of loggers) {
    currentLoggers.add(isEffect(logger) ? yield* logger : logger);
  }
  return currentLoggers;
})));
var toFile = /* @__PURE__ */ dual((args) => isLogger(args[0]), (self, path, options) => gen(function* () {
  const fs = yield* FileSystem;
  const logFile = yield* fs.open(path, {
    flag: "a+",
    ...options
  });
  const encoder = new TextEncoder;
  return yield* batched(self, {
    window: options?.batchWindow ?? 1000,
    flush: (output) => ignore(logFile.write(encoder.encode(output.join(`
`) + `
`)))
  });
}));
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@8881a9b/node_modules/effect/dist/Random.js
var exports_Random = {};
__export(exports_Random, {
  withSeed: () => withSeed,
  shuffle: () => shuffle,
  nextUUIDv4: () => nextUUIDv4,
  nextIntBetween: () => nextIntBetween,
  nextInt: () => nextInt,
  nextBoolean: () => nextBoolean,
  nextBetween: () => nextBetween,
  next: () => next,
  Random: () => Random2
});
var Random2 = Random;
var randomWith = (f) => withFiber2((fiber) => succeed(f(fiber.getRef(Random2))));
var next = /* @__PURE__ */ randomWith((r) => r.nextDoubleUnsafe());
var nextBoolean = /* @__PURE__ */ randomWith((r) => r.nextDoubleUnsafe() > 0.5);
var nextInt = /* @__PURE__ */ randomWith((r) => r.nextIntUnsafe());
var nextBetween = (min, max) => randomWith((r) => r.nextDoubleUnsafe() * (max - min) + min);
var nextIntBetween = (min, max, options) => {
  const extra = options?.halfOpen === true ? 0 : 1;
  return randomWith((r) => {
    const minInt = Math.ceil(min);
    const maxInt = Math.floor(max);
    return Math.floor(r.nextDoubleUnsafe() * (maxInt - minInt + extra)) + minInt;
  });
};
var shuffle = (elements) => randomWith((r) => {
  const buffer = Array.from(elements);
  for (let i = buffer.length - 1;i >= 1; i = i - 1) {
    const index = Math.min(i, Math.floor(r.nextDoubleUnsafe() * (i + 1)));
    const value = buffer[i];
    buffer[i] = buffer[index];
    buffer[index] = value;
  }
  return buffer;
});
var nextUUIDv4 = /* @__PURE__ */ randomWith((r) => {
  const bytes = [];
  for (let i = 0;i < 16; i++) {
    bytes.push(r.nextIntUnsafe() >>> 0 & 255);
  }
  bytes[6] = bytes[6] & 15 | 64;
  bytes[8] = bytes[8] & 63 | 128;
  const hex = (n) => n.toString(16).padStart(2, "0");
  return [bytes.slice(0, 4).map(hex).join(""), bytes.slice(4, 6).map(hex).join(""), bytes.slice(6, 8).map(hex).join(""), bytes.slice(8, 10).map(hex).join(""), bytes.slice(10, 16).map(hex).join("")].join("-");
});
var withSeed = /* @__PURE__ */ dual(2, (self, seed) => provideService(self, Random2, ISAAC_CSPRNG(seed)));
function ISAAC_CSPRNG(userSeed) {
  const memory = new Array(256);
  const result = new Array(256);
  let accumulator = 0;
  let lastResult = 0;
  let generation = 0;
  let counter = 0;
  const internalSeed = isUndefined(userSeed) ? getInitialSeed() : userSeed;
  seed(internalSeed);
  function getInitialSeed() {
    const uint32a = new Uint32Array(2);
    crypto.getRandomValues(uint32a);
    return uint32a[0] + uint32a[1];
  }
  function reset() {
    accumulator = 0;
    lastResult = 0;
    counter = 0;
    for (let i = 0;i < 256; ++i) {
      memory[i] = 0;
      result[i] = 0;
    }
    generation = 0;
  }
  function seed(userSeed2) {
    const magicNumber = 2654435769;
    let a = magicNumber;
    let b = magicNumber;
    let c = magicNumber;
    let d = magicNumber;
    let e = magicNumber;
    let f = magicNumber;
    let g = magicNumber;
    let h = magicNumber;
    let i = 0;
    let seed2;
    if (isString(userSeed2)) {
      seed2 = toIntArray(userSeed2);
    } else {
      seed2 = [userSeed2];
    }
    reset();
    for (i = 0;i < seed2.length; i++) {
      result[i & 255] += seed2[i];
    }
    function mix() {
      a ^= b << 11;
      d = add32(d, a);
      b = add32(b, c);
      b ^= c >>> 2;
      e = add32(e, b);
      c = add32(c, d);
      c ^= d << 8;
      f = add32(f, c);
      d = add32(d, e);
      d ^= e >>> 16;
      g = add32(g, d);
      e = add32(e, f);
      e ^= f << 10;
      h = add32(h, e);
      f = add32(f, g);
      f ^= g >>> 4;
      a = add32(a, f);
      g = add32(g, h);
      g ^= h << 8;
      b = add32(b, g);
      h = add32(h, a);
      h ^= a >>> 9;
      c = add32(c, h);
      a = add32(a, b);
    }
    for (i = 0;i < 4; i++) {
      mix();
    }
    for (i = 0;i < 256; i += 8) {
      a = add32(a, result[i]);
      b = add32(b, result[i + 1]);
      c = add32(c, result[i + 2]);
      d = add32(d, result[i + 3]);
      e = add32(e, result[i + 4]);
      f = add32(f, result[i + 5]);
      g = add32(g, result[i + 6]);
      h = add32(h, result[i + 7]);
      mix();
      memory[i] = a;
      memory[i + 1] = b;
      memory[i + 2] = c;
      memory[i + 3] = d;
      memory[i + 4] = e;
      memory[i + 5] = f;
      memory[i + 6] = g;
      memory[i + 7] = h;
    }
    for (i = 0;i < 256; i += 8) {
      a = add32(a, memory[i]);
      b = add32(b, memory[i + 1]);
      c = add32(c, memory[i + 2]);
      d = add32(d, memory[i + 3]);
      e = add32(e, memory[i + 4]);
      f = add32(f, memory[i + 5]);
      g = add32(g, memory[i + 6]);
      h = add32(h, memory[i + 7]);
      mix();
      memory[i] = a;
      memory[i + 1] = b;
      memory[i + 2] = c;
      memory[i + 3] = d;
      memory[i + 4] = e;
      memory[i + 5] = f;
      memory[i + 6] = g;
      memory[i + 7] = h;
    }
    pnrg();
    generation = 256;
  }
  function pnrg(n) {
    let i = 0;
    let x = 0;
    let y = 0;
    n = isUndefined(n) ? 1 : Math.abs(Math.floor(n));
    while (n--) {
      counter = add32(counter, 1);
      lastResult = add32(lastResult, counter);
      for (i = 0;i < 256; i++) {
        switch (i & 3) {
          case 0: {
            accumulator ^= accumulator << 13;
            break;
          }
          case 1: {
            accumulator ^= accumulator >>> 6;
            break;
          }
          case 2: {
            accumulator ^= accumulator << 2;
            break;
          }
          case 3: {
            accumulator ^= accumulator >>> 16;
            break;
          }
        }
        accumulator = add32(memory[i + 128 & 255], accumulator);
        x = memory[i];
        memory[i] = add32(memory[x >>> 2 & 255], add32(accumulator, lastResult));
        y = memory[i];
        result[i] = add32(memory[y >>> 10 & 255], x);
        lastResult = result[i];
      }
    }
  }
  function nextInt32() {
    if (!generation--) {
      pnrg();
      generation = 255;
    }
    return result[generation];
  }
  function nextIntUnsafe() {
    const low = nextInt32() >>> 0;
    const high = nextInt32() & 2097151;
    return high * 4294967296 + low - 4503599627370496;
  }
  function nextDoubleUnsafe() {
    const hi = nextInt32() >>> 0 & 2097151;
    const lo = nextInt32() >>> 0;
    const combined = hi * 4294967296 + lo;
    return combined / 9007199254740991;
  }
  return {
    nextIntUnsafe,
    nextDoubleUnsafe
  };
}
function add32(x, y) {
  const lsb = (x & 65535) + (y & 65535);
  const msb = (x >>> 16) + (y >>> 16) + (lsb >>> 16);
  return msb << 16 | lsb & 65535;
}
function toIntArray(seed) {
  let c1 = 0;
  let c2 = 0;
  let unicode = 0;
  const result = [];
  const buffer = [];
  const length = seed.length - 1;
  let index = 0;
  while (index < length) {
    c1 = seed.charCodeAt(index++);
    c2 = seed.charCodeAt(index + 1);
    if (c1 < 128) {
      buffer.push(c1);
    } else if (c1 < 2048) {
      buffer.push(c1 >>> 6 & 31 | 192);
      buffer.push(c1 >>> 0 & 63 | 128);
    } else if ((c1 & 63488) != 55296) {
      buffer.push(c1 >>> 12 & 15 | 224);
      buffer.push(c1 >>> 6 & 63 | 128);
      buffer.push(c1 >>> 0 & 63 | 128);
    } else if ((c1 & 64512) == 55296 && (c2 & 64512) == 56320) {
      unicode = (c2 & 63 | (c1 & 63) << 10) + 65536;
      buffer.push(unicode >>> 18 & 7 | 240);
      buffer.push(unicode >>> 12 & 63 | 128);
      buffer.push(unicode >>> 6 & 63 | 128);
      buffer.push(unicode >>> 0 & 63 | 128);
      index++;
    } else {}
    if (buffer.length > 3) {
      result.push(buffer.shift() << 0 | buffer.shift() << 8 | buffer.shift() << 16 | buffer.shift() << 24);
    }
  }
  return result;
}
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@8881a9b/node_modules/effect/dist/Ref.js
var exports_Ref = {};
__export(exports_Ref, {
  updateSomeAndGet: () => updateSomeAndGet,
  updateSome: () => updateSome,
  updateAndGet: () => updateAndGet,
  update: () => update,
  setAndGet: () => setAndGet,
  set: () => set2,
  modifySome: () => modifySome,
  modify: () => modify,
  makeUnsafe: () => makeUnsafe3,
  make: () => make4,
  getUnsafe: () => getUnsafe,
  getAndUpdateSome: () => getAndUpdateSome,
  getAndUpdate: () => getAndUpdate,
  getAndSet: () => getAndSet,
  get: () => get
});
var TypeId3 = "~effect/Ref";
var RefProto = {
  [TypeId3]: {
    _A: identity
  },
  ...PipeInspectableProto,
  toJSON() {
    return {
      _id: "Ref",
      ref: this.ref
    };
  }
};
var makeUnsafe3 = (value) => {
  const self = Object.create(RefProto);
  self.ref = make(value);
  return self;
};
var make4 = (value) => sync2(() => makeUnsafe3(value));
var get = (self) => sync2(() => self.ref.current);
var set2 = /* @__PURE__ */ dual(2, (self, value) => sync2(() => set(self.ref, value)));
var getAndSet = /* @__PURE__ */ dual(2, (self, value) => sync2(() => {
  const current = self.ref.current;
  self.ref.current = value;
  return current;
}));
var getAndUpdate = /* @__PURE__ */ dual(2, (self, f) => sync2(() => {
  const current = self.ref.current;
  self.ref.current = f(current);
  return current;
}));
var getAndUpdateSome = /* @__PURE__ */ dual(2, (self, pf) => sync2(() => {
  const current = self.ref.current;
  const option = pf(current);
  if (option._tag === "Some") {
    self.ref.current = option.value;
  }
  return current;
}));
var setAndGet = /* @__PURE__ */ dual(2, (self, value) => sync2(() => self.ref.current = value));
var modify = /* @__PURE__ */ dual(2, (self, f) => sync2(() => {
  const [b, a] = f(self.ref.current);
  self.ref.current = a;
  return b;
}));
var modifySome = /* @__PURE__ */ dual(2, (self, pf) => modify(self, (value) => {
  const [b, option] = pf(value);
  return [b, option._tag === "None" ? value : option.value];
}));
var update = /* @__PURE__ */ dual(2, (self, f) => sync2(() => {
  self.ref.current = f(self.ref.current);
}));
var updateAndGet = /* @__PURE__ */ dual(2, (self, f) => sync2(() => self.ref.current = f(self.ref.current)));
var updateSome = /* @__PURE__ */ dual(2, (self, f) => sync2(() => {
  const option = f(self.ref.current);
  if (option._tag === "Some") {
    self.ref.current = option.value;
  }
}));
var updateSomeAndGet = /* @__PURE__ */ dual(2, (self, pf) => sync2(() => {
  const option = pf(self.ref.current);
  if (option._tag === "Some") {
    self.ref.current = option.value;
  }
  return self.ref.current;
}));
var getUnsafe = (self) => self.ref.current;
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@8881a9b/node_modules/effect/dist/Runtime.js
var defaultTeardown = (exit, onExit) => {
  onExit(isFailure(exit) ? hasInterruptsOnly(exit.cause) ? 130 : 1 : 0);
};
var makeRunMain = (f) => dual((args) => isEffect2(args[0]), (effect2, options) => {
  const fiber = options?.disableErrorReporting === true ? runFork(effect2) : runFork(tapCause(effect2, (cause) => {
    if (hasInterruptsOnly(cause)) {
      return void_2;
    }
    return logError(cause);
  }));
  try {
    const keepAlive = globalThis.setInterval(constVoid, 2147483647);
    fiber.addObserver(() => {
      clearInterval(keepAlive);
    });
  } catch {}
  const teardown = options?.teardown ?? defaultTeardown;
  return f({
    fiber,
    teardown
  });
});
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@8881a9b/node_modules/effect/dist/Stdio.js
var TypeId4 = "~effect/Stdio";
var Stdio = /* @__PURE__ */ Service(TypeId4);
var make5 = (options) => ({
  [TypeId4]: TypeId4,
  ...options
});
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@8881a9b/node_modules/effect/dist/Terminal.js
var TypeId5 = "~effect/platform/Terminal";
var QuitErrorTypeId = "effect/platform/Terminal/QuitError";

class QuitError extends (/* @__PURE__ */ ErrorClass("QuitError")({
  _tag: /* @__PURE__ */ tag("QuitError")
})) {
  [QuitErrorTypeId] = QuitErrorTypeId;
}
var isQuitError = (u) => hasProperty(u, QuitErrorTypeId);
var Terminal = /* @__PURE__ */ Service("effect/platform/Terminal");
var make6 = (impl) => Terminal.of({
  ...impl,
  [TypeId5]: TypeId5
});
// src/terminal/Services/PTY.ts
class PtySpawnError extends exports_Schema.TaggedErrorClass()("PtySpawnError", {
  adapter: exports_Schema.String,
  message: exports_Schema.String,
  cause: exports_Schema.optional(exports_Schema.Defect)
}) {
}

class PtyAdapter extends exports_ServiceMap.Service()("t3/terminal/Services/PTY/PtyAdapter") {
}

export { makeRunMain, Stdio, make5 as make, QuitError, isQuitError, Terminal, make6 as make1, error, log, ignore2 as ignore, make2, runtime, join, exports_Logger, exports_Random, get, update, exports_Ref, PtyAdapter };
