diff --git a/backend/node_modules/effect/dist/cjs/Arbitrary.js b/backend/node_modules/effect/dist/cjs/Arbitrary.js new file mode 100644 index 0000000000000000000000000000000000000000..8d009c4bb6e9554f725f2d417e95829f7d7edab2 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Arbitrary.js @@ -0,0 +1,813 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.makeStringConstraints = exports.makeNumberConstraints = exports.makeLazy = exports.makeDateConstraints = exports.makeBigIntConstraints = exports.makeArrayConstraints = exports.make = exports.getDescription = void 0; +var Arr = _interopRequireWildcard(require("./Array.js")); +var FastCheck = _interopRequireWildcard(require("./FastCheck.js")); +var _GlobalValue = require("./GlobalValue.js"); +var errors_ = _interopRequireWildcard(require("./internal/schema/errors.js")); +var schemaId_ = _interopRequireWildcard(require("./internal/schema/schemaId.js")); +var util_ = _interopRequireWildcard(require("./internal/schema/util.js")); +var Option = _interopRequireWildcard(require("./Option.js")); +var Predicate = _interopRequireWildcard(require("./Predicate.js")); +var SchemaAST = _interopRequireWildcard(require("./SchemaAST.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 3.10.0 + */ + +/** + * Returns a LazyArbitrary for the `A` type of the provided schema. + * + * @category arbitrary + * @since 3.10.0 + */ +const makeLazy = schema => { + const description = getDescription(schema.ast, []); + return go(description, { + maxDepth: 2 + }); +}; +/** + * Returns a fast-check Arbitrary for the `A` type of the provided schema. + * + * @category arbitrary + * @since 3.10.0 + */ +exports.makeLazy = makeLazy; +const make = schema => makeLazy(schema)(FastCheck); +/** @internal */ +exports.make = make; +const makeStringConstraints = options => { + const out = { + _tag: "StringConstraints", + constraints: {} + }; + if (Predicate.isNumber(options.minLength)) { + out.constraints.minLength = options.minLength; + } + if (Predicate.isNumber(options.maxLength)) { + out.constraints.maxLength = options.maxLength; + } + if (Predicate.isString(options.pattern)) { + out.pattern = options.pattern; + } + return out; +}; +/** @internal */ +exports.makeStringConstraints = makeStringConstraints; +const makeNumberConstraints = options => { + const out = { + _tag: "NumberConstraints", + constraints: {}, + isInteger: options.isInteger ?? false + }; + if (Predicate.isNumber(options.min)) { + out.constraints.min = Math.fround(options.min); + } + if (Predicate.isBoolean(options.minExcluded)) { + out.constraints.minExcluded = options.minExcluded; + } + if (Predicate.isNumber(options.max)) { + out.constraints.max = Math.fround(options.max); + } + if (Predicate.isBoolean(options.maxExcluded)) { + out.constraints.maxExcluded = options.maxExcluded; + } + if (Predicate.isBoolean(options.noNaN)) { + out.constraints.noNaN = options.noNaN; + } + if (Predicate.isBoolean(options.noDefaultInfinity)) { + out.constraints.noDefaultInfinity = options.noDefaultInfinity; + } + return out; +}; +/** @internal */ +exports.makeNumberConstraints = makeNumberConstraints; +const makeBigIntConstraints = options => { + const out = { + _tag: "BigIntConstraints", + constraints: {} + }; + if (Predicate.isBigInt(options.min)) { + out.constraints.min = options.min; + } + if (Predicate.isBigInt(options.max)) { + out.constraints.max = options.max; + } + return out; +}; +/** @internal */ +exports.makeBigIntConstraints = makeBigIntConstraints; +const makeArrayConstraints = options => { + const out = { + _tag: "ArrayConstraints", + constraints: {} + }; + if (Predicate.isNumber(options.minLength)) { + out.constraints.minLength = options.minLength; + } + if (Predicate.isNumber(options.maxLength)) { + out.constraints.maxLength = options.maxLength; + } + return out; +}; +/** @internal */ +exports.makeArrayConstraints = makeArrayConstraints; +const makeDateConstraints = options => { + const out = { + _tag: "DateConstraints", + constraints: {} + }; + if (Predicate.isDate(options.min)) { + out.constraints.min = options.min; + } + if (Predicate.isDate(options.max)) { + out.constraints.max = options.max; + } + if (Predicate.isBoolean(options.noInvalidDate)) { + out.constraints.noInvalidDate = options.noInvalidDate; + } + return out; +}; +exports.makeDateConstraints = makeDateConstraints; +const getArbitraryAnnotation = /*#__PURE__*/SchemaAST.getAnnotation(SchemaAST.ArbitraryAnnotationId); +const getASTConstraints = ast => { + const TypeAnnotationId = ast.annotations[SchemaAST.SchemaIdAnnotationId]; + if (Predicate.isPropertyKey(TypeAnnotationId)) { + const out = ast.annotations[TypeAnnotationId]; + if (Predicate.isReadonlyRecord(out)) { + return out; + } + } +}; +const idMemoMap = /*#__PURE__*/(0, _GlobalValue.globalValue)(/*#__PURE__*/Symbol.for("effect/Arbitrary/IdMemoMap"), () => new Map()); +let counter = 0; +function wrapGetDescription(f, g) { + return (ast, path) => f(ast, g(ast, path)); +} +function parseMeta(ast) { + const jsonSchema = SchemaAST.getJSONSchemaAnnotation(ast).pipe(Option.filter(Predicate.isReadonlyRecord), Option.getOrUndefined); + const schemaId = Option.getOrElse(SchemaAST.getSchemaIdAnnotation(ast), () => undefined); + const schemaParams = Option.fromNullable(schemaId).pipe(Option.map(id => ast.annotations[id]), Option.filter(Predicate.isReadonlyRecord), Option.getOrUndefined); + return [schemaId, { + ...schemaParams, + ...jsonSchema + }]; +} +/** @internal */ +const getDescription = exports.getDescription = /*#__PURE__*/wrapGetDescription((ast, description) => { + const annotation = getArbitraryAnnotation(ast); + if (Option.isSome(annotation)) { + return { + ...description, + annotations: [...description.annotations, annotation.value] + }; + } + return description; +}, (ast, path) => { + const [schemaId, meta] = parseMeta(ast); + switch (ast._tag) { + case "Refinement": + { + const from = getDescription(ast.from, path); + switch (from._tag) { + case "StringKeyword": + return { + ...from, + constraints: [...from.constraints, makeStringConstraints(meta)], + refinements: [...from.refinements, ast] + }; + case "NumberKeyword": + { + const c = schemaId === schemaId_.NonNaNSchemaId ? makeNumberConstraints({ + noNaN: true + }) : schemaId === schemaId_.FiniteSchemaId || schemaId === schemaId_.JsonNumberSchemaId ? makeNumberConstraints({ + noDefaultInfinity: true, + noNaN: true + }) : makeNumberConstraints({ + isInteger: "type" in meta && meta.type === "integer", + noNaN: undefined, + noDefaultInfinity: undefined, + min: meta.exclusiveMinimum ?? meta.minimum, + minExcluded: "exclusiveMinimum" in meta ? true : undefined, + max: meta.exclusiveMaximum ?? meta.maximum, + maxExcluded: "exclusiveMaximum" in meta ? true : undefined + }); + return { + ...from, + constraints: [...from.constraints, c], + refinements: [...from.refinements, ast] + }; + } + case "BigIntKeyword": + { + const c = getASTConstraints(ast); + return { + ...from, + constraints: c !== undefined ? [...from.constraints, makeBigIntConstraints(c)] : from.constraints, + refinements: [...from.refinements, ast] + }; + } + case "TupleType": + return { + ...from, + constraints: [...from.constraints, makeArrayConstraints({ + minLength: meta.minItems, + maxLength: meta.maxItems + })], + refinements: [...from.refinements, ast] + }; + case "DateFromSelf": + return { + ...from, + constraints: [...from.constraints, makeDateConstraints(meta)], + refinements: [...from.refinements, ast] + }; + default: + return { + ...from, + refinements: [...from.refinements, ast] + }; + } + } + case "Declaration": + { + if (schemaId === schemaId_.DateFromSelfSchemaId) { + return { + _tag: "DateFromSelf", + constraints: [makeDateConstraints(meta)], + path, + refinements: [], + annotations: [] + }; + } + return { + _tag: "Declaration", + typeParameters: ast.typeParameters.map(ast => getDescription(ast, path)), + path, + refinements: [], + annotations: [], + ast + }; + } + case "Literal": + { + return { + _tag: "Literal", + literal: ast.literal, + path, + refinements: [], + annotations: [] + }; + } + case "UniqueSymbol": + { + return { + _tag: "UniqueSymbol", + symbol: ast.symbol, + path, + refinements: [], + annotations: [] + }; + } + case "Enums": + { + return { + _tag: "Enums", + enums: ast.enums, + path, + refinements: [], + annotations: [], + ast + }; + } + case "TemplateLiteral": + { + return { + _tag: "TemplateLiteral", + head: ast.head, + spans: ast.spans.map(span => ({ + description: getDescription(span.type, path), + literal: span.literal + })), + path, + refinements: [], + annotations: [] + }; + } + case "StringKeyword": + return { + _tag: "StringKeyword", + constraints: [], + path, + refinements: [], + annotations: [] + }; + case "NumberKeyword": + return { + _tag: "NumberKeyword", + constraints: [], + path, + refinements: [], + annotations: [] + }; + case "BigIntKeyword": + return { + _tag: "BigIntKeyword", + constraints: [], + path, + refinements: [], + annotations: [] + }; + case "TupleType": + return { + _tag: "TupleType", + constraints: [], + elements: ast.elements.map((element, i) => ({ + isOptional: element.isOptional, + description: getDescription(element.type, [...path, i]) + })), + rest: ast.rest.map((element, i) => getDescription(element.type, [...path, i])), + path, + refinements: [], + annotations: [] + }; + case "TypeLiteral": + return { + _tag: "TypeLiteral", + propertySignatures: ast.propertySignatures.map(ps => ({ + isOptional: ps.isOptional, + name: ps.name, + value: getDescription(ps.type, [...path, ps.name]) + })), + indexSignatures: ast.indexSignatures.map(is => ({ + parameter: getDescription(is.parameter, path), + value: getDescription(is.type, path) + })), + path, + refinements: [], + annotations: [] + }; + case "Union": + return { + _tag: "Union", + members: ast.types.map((member, i) => getDescription(member, [...path, i])), + path, + refinements: [], + annotations: [] + }; + case "Suspend": + { + const memoId = idMemoMap.get(ast); + if (memoId !== undefined) { + return { + _tag: "Ref", + id: memoId, + ast, + path, + refinements: [], + annotations: [] + }; + } + counter++; + const id = `__id-${counter}__`; + idMemoMap.set(ast, id); + return { + _tag: "Suspend", + id, + ast, + description: () => getDescription(ast.f(), path), + path, + refinements: [], + annotations: [] + }; + } + case "Transformation": + return getDescription(ast.to, path); + case "NeverKeyword": + return { + _tag: "NeverKeyword", + path, + refinements: [], + annotations: [], + ast + }; + default: + { + return { + _tag: "Keyword", + value: ast._tag, + path, + refinements: [], + annotations: [] + }; + } + } +}); +function getMax(n1, n2) { + return n1 === undefined ? n2 : n2 === undefined ? n1 : n1 <= n2 ? n2 : n1; +} +function getMin(n1, n2) { + return n1 === undefined ? n2 : n2 === undefined ? n1 : n1 <= n2 ? n1 : n2; +} +const getOr = (a, b) => { + return a === undefined ? b : b === undefined ? a : a || b; +}; +function mergePattern(pattern1, pattern2) { + if (pattern1 === undefined) { + return pattern2; + } + if (pattern2 === undefined) { + return pattern1; + } + return `(?:${pattern1})|(?:${pattern2})`; +} +function mergeStringConstraints(c1, c2) { + return makeStringConstraints({ + minLength: getMax(c1.constraints.minLength, c2.constraints.minLength), + maxLength: getMin(c1.constraints.maxLength, c2.constraints.maxLength), + pattern: mergePattern(c1.pattern, c2.pattern) + }); +} +function buildStringConstraints(description) { + return description.constraints.length === 0 ? undefined : description.constraints.reduce(mergeStringConstraints); +} +function mergeNumberConstraints(c1, c2) { + return makeNumberConstraints({ + isInteger: c1.isInteger || c2.isInteger, + min: getMax(c1.constraints.min, c2.constraints.min), + minExcluded: getOr(c1.constraints.minExcluded, c2.constraints.minExcluded), + max: getMin(c1.constraints.max, c2.constraints.max), + maxExcluded: getOr(c1.constraints.maxExcluded, c2.constraints.maxExcluded), + noNaN: getOr(c1.constraints.noNaN, c2.constraints.noNaN), + noDefaultInfinity: getOr(c1.constraints.noDefaultInfinity, c2.constraints.noDefaultInfinity) + }); +} +function buildNumberConstraints(description) { + return description.constraints.length === 0 ? undefined : description.constraints.reduce(mergeNumberConstraints); +} +function mergeBigIntConstraints(c1, c2) { + return makeBigIntConstraints({ + min: getMax(c1.constraints.min, c2.constraints.min), + max: getMin(c1.constraints.max, c2.constraints.max) + }); +} +function buildBigIntConstraints(description) { + return description.constraints.length === 0 ? undefined : description.constraints.reduce(mergeBigIntConstraints); +} +function mergeDateConstraints(c1, c2) { + return makeDateConstraints({ + min: getMax(c1.constraints.min, c2.constraints.min), + max: getMin(c1.constraints.max, c2.constraints.max), + noInvalidDate: getOr(c1.constraints.noInvalidDate, c2.constraints.noInvalidDate) + }); +} +function buildDateConstraints(description) { + return description.constraints.length === 0 ? undefined : description.constraints.reduce(mergeDateConstraints); +} +const constArrayConstraints = /*#__PURE__*/makeArrayConstraints({}); +function mergeArrayConstraints(c1, c2) { + return makeArrayConstraints({ + minLength: getMax(c1.constraints.minLength, c2.constraints.minLength), + maxLength: getMin(c1.constraints.maxLength, c2.constraints.maxLength) + }); +} +function buildArrayConstraints(description) { + return description.constraints.length === 0 ? undefined : description.constraints.reduce(mergeArrayConstraints); +} +const arbitraryMemoMap = /*#__PURE__*/(0, _GlobalValue.globalValue)(/*#__PURE__*/Symbol.for("effect/Arbitrary/arbitraryMemoMap"), () => new WeakMap()); +function applyFilters(filters, arb) { + return fc => filters.reduce((arb, filter) => arb.filter(filter), arb(fc)); +} +function absurd(message) { + return () => { + throw new Error(message); + }; +} +function getContextConstraints(description) { + switch (description._tag) { + case "StringKeyword": + return buildStringConstraints(description); + case "NumberKeyword": + return buildNumberConstraints(description); + case "BigIntKeyword": + return buildBigIntConstraints(description); + case "DateFromSelf": + return buildDateConstraints(description); + case "TupleType": + return buildArrayConstraints(description); + } +} +function wrapGo(f, g) { + return (description, ctx) => f(description, ctx, g(description, ctx)); +} +const go = /*#__PURE__*/wrapGo((description, ctx, lazyArb) => { + const annotation = description.annotations[description.annotations.length - 1]; + // error handling + if (annotation === undefined) { + switch (description._tag) { + case "Declaration": + case "NeverKeyword": + throw new Error(errors_.getArbitraryMissingAnnotationErrorMessage(description.path, description.ast)); + case "Enums": + if (description.enums.length === 0) { + throw new Error(errors_.getArbitraryEmptyEnumErrorMessage(description.path)); + } + } + } + const filters = description.refinements.map(ast => a => Option.isNone(ast.filter(a, SchemaAST.defaultParseOption, ast))); + if (annotation === undefined) { + return applyFilters(filters, lazyArb); + } + const constraints = getContextConstraints(description); + if (constraints !== undefined) { + ctx = { + ...ctx, + constraints + }; + } + if (description._tag === "Declaration") { + return applyFilters(filters, annotation(...description.typeParameters.map(p => go(p, ctx)), ctx)); + } + if (description.refinements.length > 0) { + // TODO(4.0): remove the `lazyArb` parameter + return applyFilters(filters, annotation(lazyArb, ctx)); + } + return annotation(ctx); +}, (description, ctx) => { + switch (description._tag) { + case "DateFromSelf": + { + const constraints = buildDateConstraints(description); + return fc => fc.date(constraints?.constraints); + } + case "Declaration": + case "NeverKeyword": + return absurd(`BUG: cannot generate an arbitrary for ${description._tag}`); + case "Literal": + return fc => fc.constant(description.literal); + case "UniqueSymbol": + return fc => fc.constant(description.symbol); + case "Keyword": + { + switch (description.value) { + case "UndefinedKeyword": + return fc => fc.constant(undefined); + case "VoidKeyword": + case "UnknownKeyword": + case "AnyKeyword": + return fc => fc.anything(); + case "BooleanKeyword": + return fc => fc.boolean(); + case "SymbolKeyword": + return fc => fc.string().map(s => Symbol.for(s)); + case "ObjectKeyword": + return fc => fc.oneof(fc.object(), fc.array(fc.anything())); + } + } + case "Enums": + return fc => fc.oneof(...description.enums.map(([_, value]) => fc.constant(value))); + case "TemplateLiteral": + { + return fc => { + const string = fc.string({ + maxLength: 5 + }); + const number = fc.float({ + noDefaultInfinity: true, + noNaN: true + }); + const getTemplateLiteralArb = description => { + const components = description.head !== "" ? [fc.constant(description.head)] : []; + const getTemplateLiteralSpanTypeArb = description => { + switch (description._tag) { + case "StringKeyword": + return string; + case "NumberKeyword": + return number; + case "Literal": + return fc.constant(String(description.literal)); + case "Union": + return fc.oneof(...description.members.map(getTemplateLiteralSpanTypeArb)); + case "TemplateLiteral": + return getTemplateLiteralArb(description); + default: + return fc.constant(""); + } + }; + description.spans.forEach(span => { + components.push(getTemplateLiteralSpanTypeArb(span.description)); + if (span.literal !== "") { + components.push(fc.constant(span.literal)); + } + }); + return fc.tuple(...components).map(spans => spans.join("")); + }; + return getTemplateLiteralArb(description); + }; + } + case "StringKeyword": + { + const constraints = buildStringConstraints(description); + const pattern = constraints?.pattern; + return pattern !== undefined ? fc => fc.stringMatching(new RegExp(pattern)) : fc => fc.string(constraints?.constraints); + } + case "NumberKeyword": + { + const constraints = buildNumberConstraints(description); + return constraints?.isInteger ? fc => fc.integer(constraints.constraints) : fc => fc.float(constraints?.constraints); + } + case "BigIntKeyword": + { + const constraints = buildBigIntConstraints(description); + return fc => fc.bigInt(constraints?.constraints ?? {}); + } + case "TupleType": + { + const elements = []; + let hasOptionals = false; + for (const element of description.elements) { + elements.push(go(element.description, ctx)); + if (element.isOptional) { + hasOptionals = true; + } + } + const rest = description.rest.map(d => go(d, ctx)); + return fc => { + // --------------------------------------------- + // handle elements + // --------------------------------------------- + let output = fc.tuple(...elements.map(arb => arb(fc))); + if (hasOptionals) { + const indexes = fc.tuple(...description.elements.map(element => element.isOptional ? fc.boolean() : fc.constant(true))); + output = output.chain(tuple => indexes.map(booleans => { + for (const [i, b] of booleans.reverse().entries()) { + if (!b) { + tuple.splice(booleans.length - i, 1); + } + } + return tuple; + })); + } + // --------------------------------------------- + // handle rest element + // --------------------------------------------- + if (Arr.isNonEmptyReadonlyArray(rest)) { + const constraints = buildArrayConstraints(description) ?? constArrayConstraints; + const [head, ...tail] = rest; + const item = head(fc); + output = output.chain(as => { + const len = as.length; + // We must adjust the constraints for the rest element + // because the elements might have generated some values + const restArrayConstraints = subtractElementsLength(constraints.constraints, len); + if (restArrayConstraints.maxLength === 0) { + return fc.constant(as); + } + /* + `getSuspendedArray` is used to generate less values in + the context of a recursive schema. Without it, the following schema + would generate an big amount of values possibly leading to a stack + overflow: + ```ts + type A = ReadonlyArray + const schema = S.Array( + S.NullOr(S.suspend((): S.Schema => schema)) + ) + ``` + */ + const arr = ctx.depthIdentifier !== undefined ? getSuspendedArray(fc, ctx.depthIdentifier, ctx.maxDepth, item, restArrayConstraints) : fc.array(item, restArrayConstraints); + if (len === 0) { + return arr; + } + return arr.map(rest => [...as, ...rest]); + }); + // --------------------------------------------- + // handle post rest elements + // --------------------------------------------- + for (let j = 0; j < tail.length; j++) { + output = output.chain(as => tail[j](fc).map(a => [...as, a])); + } + } + return output; + }; + } + case "TypeLiteral": + { + const propertySignatures = []; + const requiredKeys = []; + for (const ps of description.propertySignatures) { + if (!ps.isOptional) { + requiredKeys.push(ps.name); + } + propertySignatures.push(go(ps.value, ctx)); + } + const indexSignatures = description.indexSignatures.map(is => [go(is.parameter, ctx), go(is.value, ctx)]); + return fc => { + const pps = {}; + for (let i = 0; i < propertySignatures.length; i++) { + const ps = description.propertySignatures[i]; + pps[ps.name] = propertySignatures[i](fc); + } + let output = fc.record(pps, { + requiredKeys + }); + // --------------------------------------------- + // handle index signatures + // --------------------------------------------- + for (let i = 0; i < indexSignatures.length; i++) { + const key = indexSignatures[i][0](fc); + const value = indexSignatures[i][1](fc); + output = output.chain(o => { + const item = fc.tuple(key, value); + /* + `getSuspendedArray` is used to generate less key/value pairs in + the context of a recursive schema. Without it, the following schema + would generate an big amount of values possibly leading to a stack + overflow: + ```ts + type A = { [_: string]: A } + const schema = S.Record({ key: S.String, value: S.suspend((): S.Schema => schema) }) + ``` + */ + const arr = ctx.depthIdentifier !== undefined ? getSuspendedArray(fc, ctx.depthIdentifier, ctx.maxDepth, item, { + maxLength: 2 + }) : fc.array(item); + return arr.map(tuples => ({ + ...Object.fromEntries(tuples), + ...o + })); + }); + } + return output; + }; + } + case "Union": + { + const members = description.members.map(member => go(member, ctx)); + return fc => fc.oneof(...members.map(arb => arb(fc))); + } + case "Suspend": + { + const memo = arbitraryMemoMap.get(description.ast); + if (memo) { + return memo; + } + if (ctx.depthIdentifier === undefined) { + ctx = { + ...ctx, + depthIdentifier: description.id + }; + } + const get = util_.memoizeThunk(() => { + return go(description.description(), ctx); + }); + const out = fc => fc.constant(null).chain(() => get()(fc)); + arbitraryMemoMap.set(description.ast, out); + return out; + } + case "Ref": + { + const memo = arbitraryMemoMap.get(description.ast); + if (memo) { + return memo; + } + throw new Error(`BUG: Ref ${JSON.stringify(description.id)} not found`); + } + } +}); +function subtractElementsLength(constraints, len) { + if (len === 0 || constraints.minLength === undefined && constraints.maxLength === undefined) { + return constraints; + } + const out = { + ...constraints + }; + if (out.minLength !== undefined) { + out.minLength = Math.max(out.minLength - len, 0); + } + if (out.maxLength !== undefined) { + out.maxLength = Math.max(out.maxLength - len, 0); + } + return out; +} +const getSuspendedArray = (fc, depthIdentifier, maxDepth, item, constraints) => { + // In the context of a recursive schema, we don't want a `maxLength` greater than 2. + // The only exception is when `minLength` is also set, in which case we set + // `maxLength` to the minimum value, which is `minLength`. + const maxLengthLimit = Math.max(2, constraints.minLength ?? 0); + if (constraints.maxLength !== undefined && constraints.maxLength > maxLengthLimit) { + constraints = { + ...constraints, + maxLength: maxLengthLimit + }; + } + return fc.oneof({ + maxDepth, + depthIdentifier + }, fc.constant([]), fc.array(item, constraints)); +}; +//# sourceMappingURL=Arbitrary.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Array.js b/backend/node_modules/effect/dist/cjs/Array.js new file mode 100644 index 0000000000000000000000000000000000000000..c0d4a6bc4cc0c41a6fd0f53b02fd838b60c39e0d --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Array.js @@ -0,0 +1,2695 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.replaceOption = exports.replace = exports.removeOption = exports.remove = exports.reduceRight = exports.reduce = exports.range = exports.prependAll = exports.prepend = exports.partitionMap = exports.partition = exports.pad = exports.of = exports.modifyOption = exports.modifyNonEmptyLast = exports.modifyNonEmptyHead = exports.modify = exports.min = exports.max = exports.matchRight = exports.matchLeft = exports.match = exports.mapAccum = exports.map = exports.makeBy = exports.make = exports.liftPredicate = exports.liftOption = exports.liftNullable = exports.liftEither = exports.let = exports.length = exports.lastNonEmpty = exports.last = exports.join = exports.isNonEmptyReadonlyArray = exports.isNonEmptyArray = exports.isEmptyReadonlyArray = exports.isEmptyArray = exports.isArray = exports.intersperse = exports.intersectionWith = exports.intersection = exports.insertAt = exports.initNonEmpty = exports.init = exports.headNonEmpty = exports.head = exports.groupWith = exports.groupBy = exports.group = exports.getSomes = exports.getRights = exports.getOrder = exports.getLefts = exports.getEquivalence = exports.get = exports.fromRecord = exports.fromOption = exports.fromNullable = exports.fromIterable = exports.forEach = exports.flatten = exports.flatMapNullable = exports.flatMap = exports.findLastIndex = exports.findLast = exports.findFirstWithIndex = exports.findFirstIndex = exports.findFirst = exports.filterMapWhile = exports.filterMap = exports.filter = exports.extend = exports.every = exports.ensure = exports.empty = exports.dropWhile = exports.dropRight = exports.drop = exports.differenceWith = exports.difference = exports.dedupeWith = exports.dedupeAdjacentWith = exports.dedupeAdjacent = exports.dedupe = exports.countBy = exports.copy = exports.containsWith = exports.contains = exports.chunksOf = exports.chop = exports.cartesianWith = exports.cartesian = exports.bindTo = exports.bind = exports.appendAll = exports.append = exports.allocate = exports.Do = void 0; +exports.zipWith = exports.zip = exports.window = exports.unzip = exports.unsafeGet = exports.unprepend = exports.unionWith = exports.union = exports.unfold = exports.unappend = exports.takeWhile = exports.takeRight = exports.take = exports.tailNonEmpty = exports.tail = exports.splitWhere = exports.splitNonEmptyAt = exports.splitAt = exports.split = exports.span = exports.sortWith = exports.sortBy = exports.sort = exports.some = exports.setNonEmptyLast = exports.setNonEmptyHead = exports.separate = exports.scanRight = exports.scan = exports.rotate = exports.reverse = exports.replicate = void 0; +var Either = _interopRequireWildcard(require("./Either.js")); +var Equal = _interopRequireWildcard(require("./Equal.js")); +var Equivalence = _interopRequireWildcard(require("./Equivalence.js")); +var _Function = require("./Function.js"); +var internalArray = _interopRequireWildcard(require("./internal/array.js")); +var internalDoNotation = _interopRequireWildcard(require("./internal/doNotation.js")); +var moduleIterable = _interopRequireWildcard(require("./Iterable.js")); +var Option = _interopRequireWildcard(require("./Option.js")); +var Order = _interopRequireWildcard(require("./Order.js")); +var Predicate = _interopRequireWildcard(require("./Predicate.js")); +var Record = _interopRequireWildcard(require("./Record.js")); +var Tuple = _interopRequireWildcard(require("./Tuple.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * This module provides utility functions for working with arrays in TypeScript. + * + * @since 2.0.0 + */ + +/** + * Builds a `NonEmptyArray` from an non-empty collection of elements. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.make(1, 2, 3) + * console.log(result) // [1, 2, 3] + * ``` + * + * @category constructors + * @since 2.0.0 + */ +const make = (...elements) => elements; +/** + * Creates a new `Array` of the specified length. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.allocate(3) + * console.log(result) // [ <3 empty items> ] + * ``` + * + * @category constructors + * @since 2.0.0 + */ +exports.make = make; +const allocate = n => new Array(n); +/** + * Return a `NonEmptyArray` of length `n` with element `i` initialized with `f(i)`. + * + * **Note**. `n` is normalized to an integer >= 1. + * + * **Example** + * + * ```ts + * import { makeBy } from "effect/Array" + * + * const result = makeBy(5, n => n * 2) + * console.log(result) // [0, 2, 4, 6, 8] + * ``` + * + * @category constructors + * @since 2.0.0 + */ +exports.allocate = allocate; +const makeBy = exports.makeBy = /*#__PURE__*/(0, _Function.dual)(2, (n, f) => { + const max = Math.max(1, Math.floor(n)); + const out = new Array(max); + for (let i = 0; i < max; i++) { + out[i] = f(i); + } + return out; +}); +/** + * Return a `NonEmptyArray` containing a range of integers, including both endpoints. + * + * **Example** + * + * ```ts + * import { range } from "effect/Array" + * + * const result = range(1, 3) + * console.log(result) // [1, 2, 3] + * ``` + * + * @category constructors + * @since 2.0.0 + */ +const range = (start, end) => start <= end ? makeBy(end - start + 1, i => start + i) : [start]; +/** + * Return a `NonEmptyArray` containing a value repeated the specified number of times. + * + * **Note**. `n` is normalized to an integer >= 1. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.replicate("a", 3) + * console.log(result) // ["a", "a", "a"] + * ``` + * + * @category constructors + * @since 2.0.0 + */ +exports.range = range; +const replicate = exports.replicate = /*#__PURE__*/(0, _Function.dual)(2, (a, n) => makeBy(n, () => a)); +/** + * Creates a new `Array` from an iterable collection of values. + * If the input is already an array, it returns the input as-is. + * Otherwise, it converts the iterable collection to an array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.fromIterable(new Set([1, 2, 3])) + * console.log(result) // [1, 2, 3] + * ``` + * + * @category constructors + * @since 2.0.0 + */ +const fromIterable = collection => Array.isArray(collection) ? collection : Array.from(collection); +/** + * Creates a new `Array` from a value that might not be an iterable. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * console.log(Array.ensure("a")) // ["a"] + * console.log(Array.ensure(["a"])) // ["a"] + * console.log(Array.ensure(["a", "b", "c"])) // ["a", "b", "c"] + * ``` + * + * @category constructors + * @since 3.3.0 + */ +exports.fromIterable = fromIterable; +const ensure = self => Array.isArray(self) ? self : [self]; +/** + * Takes a record and returns an array of tuples containing its keys and values. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.fromRecord({ a: 1, b: 2, c: 3 }) + * console.log(result) // [["a", 1], ["b", 2], ["c", 3]] + * ``` + * + * @category conversions + * @since 2.0.0 + */ +exports.ensure = ensure; +const fromRecord = exports.fromRecord = Record.toEntries; +/** + * Converts an `Option` to an array. + * + * **Example** + * + * ```ts + * import { Array, Option } from "effect" + * + * console.log(Array.fromOption(Option.some(1))) // [1] + * console.log(Array.fromOption(Option.none())) // [] + * ``` + * + * @category conversions + * @since 2.0.0 + */ +const fromOption = exports.fromOption = Option.toArray; +/** + * Matches the elements of an array, applying functions to cases of empty and non-empty arrays. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const match = Array.match({ + * onEmpty: () => "empty", + * onNonEmpty: ([head, ...tail]) => `head: ${head}, tail: ${tail.length}` + * }) + * console.log(match([])) // "empty" + * console.log(match([1, 2, 3])) // "head: 1, tail: 2" + * ``` + * + * @category pattern matching + * @since 2.0.0 + */ +const match = exports.match = /*#__PURE__*/(0, _Function.dual)(2, (self, { + onEmpty, + onNonEmpty +}) => isNonEmptyReadonlyArray(self) ? onNonEmpty(self) : onEmpty()); +/** + * Matches the elements of an array from the left, applying functions to cases of empty and non-empty arrays. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const matchLeft = Array.matchLeft({ + * onEmpty: () => "empty", + * onNonEmpty: (head, tail) => `head: ${head}, tail: ${tail.length}` + * }) + * console.log(matchLeft([])) // "empty" + * console.log(matchLeft([1, 2, 3])) // "head: 1, tail: 2" + * ``` + * + * @category pattern matching + * @since 2.0.0 + */ +const matchLeft = exports.matchLeft = /*#__PURE__*/(0, _Function.dual)(2, (self, { + onEmpty, + onNonEmpty +}) => isNonEmptyReadonlyArray(self) ? onNonEmpty(headNonEmpty(self), tailNonEmpty(self)) : onEmpty()); +/** + * Matches the elements of an array from the right, applying functions to cases of empty and non-empty arrays. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const matchRight = Array.matchRight({ + * onEmpty: () => "empty", + * onNonEmpty: (init, last) => `init: ${init.length}, last: ${last}` + * }) + * console.log(matchRight([])) // "empty" + * console.log(matchRight([1, 2, 3])) // "init: 2, last: 3" + * ``` + * + * @category pattern matching + * @since 2.0.0 + */ +const matchRight = exports.matchRight = /*#__PURE__*/(0, _Function.dual)(2, (self, { + onEmpty, + onNonEmpty +}) => isNonEmptyReadonlyArray(self) ? onNonEmpty(initNonEmpty(self), lastNonEmpty(self)) : onEmpty()); +/** + * Prepend an element to the front of an `Iterable`, creating a new `NonEmptyArray`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.prepend([2, 3, 4], 1) + * console.log(result) // [1, 2, 3, 4] + * ``` + * + * @category concatenating + * @since 2.0.0 + */ +const prepend = exports.prepend = /*#__PURE__*/(0, _Function.dual)(2, (self, head) => [head, ...self]); +/** + * Prepends the specified prefix array (or iterable) to the beginning of the specified array (or iterable). + * If either array is non-empty, the result is also a non-empty array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.prependAll([2, 3], [0, 1]) + * console.log(result) // [0, 1, 2, 3] + * ``` + * + * @category concatenating + * @since 2.0.0 + */ +const prependAll = exports.prependAll = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => fromIterable(that).concat(fromIterable(self))); +/** + * Append an element to the end of an `Iterable`, creating a new `NonEmptyArray`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.append([1, 2, 3], 4); + * console.log(result) // [1, 2, 3, 4] + * ``` + * + * @category concatenating + * @since 2.0.0 + */ +const append = exports.append = /*#__PURE__*/(0, _Function.dual)(2, (self, last) => [...self, last]); +/** + * Concatenates two arrays (or iterables), combining their elements. + * If either array is non-empty, the result is also a non-empty array. + * + * @category concatenating + * @since 2.0.0 + */ +const appendAll = exports.appendAll = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => fromIterable(self).concat(fromIterable(that))); +/** + * Accumulates values from an `Iterable` starting from the left, storing + * each intermediate result in an array. Useful for tracking the progression of + * a value through a series of transformations. + * + * **Example** + * + * ```ts + * import { Array } from "effect"; + * + * const result = Array.scan([1, 2, 3, 4], 0, (acc, value) => acc + value) + * console.log(result) // [0, 1, 3, 6, 10] + * + * // Explanation: + * // This function starts with the initial value (0 in this case) + * // and adds each element of the array to this accumulator one by one, + * // keeping track of the cumulative sum after each addition. + * // Each of these sums is captured in the resulting array. + * ``` + * + * @category folding + * @since 2.0.0 + */ +const scan = exports.scan = /*#__PURE__*/(0, _Function.dual)(3, (self, b, f) => { + const out = [b]; + let i = 0; + for (const a of self) { + out[i + 1] = f(out[i], a); + i++; + } + return out; +}); +/** + * Accumulates values from an `Iterable` starting from the right, storing + * each intermediate result in an array. Useful for tracking the progression of + * a value through a series of transformations. + * + * **Example** + * + * ```ts + * import { Array } from "effect"; + * + * const result = Array.scanRight([1, 2, 3, 4], 0, (acc, value) => acc + value) + * console.log(result) // [10, 9, 7, 4, 0] + * ``` + * + * @category folding + * @since 2.0.0 + */ +const scanRight = exports.scanRight = /*#__PURE__*/(0, _Function.dual)(3, (self, b, f) => { + const input = fromIterable(self); + const out = new Array(input.length + 1); + out[input.length] = b; + for (let i = input.length - 1; i >= 0; i--) { + out[i] = f(out[i + 1], input[i]); + } + return out; +}); +/** + * Determine if `unknown` is an Array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * console.log(Array.isArray(null)) // false + * console.log(Array.isArray([1, 2, 3])) // true + * ``` + * + * @category guards + * @since 2.0.0 + */ +const isArray = exports.isArray = Array.isArray; +/** + * Determine if an `Array` is empty narrowing down the type to `[]`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * console.log(Array.isEmptyArray([])) // true + * console.log(Array.isEmptyArray([1, 2, 3])) // false + * ``` + * + * @category guards + * @since 2.0.0 + */ +const isEmptyArray = self => self.length === 0; +/** + * Determine if a `ReadonlyArray` is empty narrowing down the type to `readonly []`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * console.log(Array.isEmptyReadonlyArray([])) // true + * console.log(Array.isEmptyReadonlyArray([1, 2, 3])) // false + * ``` + * + * @category guards + * @since 2.0.0 + */ +exports.isEmptyArray = isEmptyArray; +const isEmptyReadonlyArray = exports.isEmptyReadonlyArray = isEmptyArray; +/** + * Determine if an `Array` is non empty narrowing down the type to `NonEmptyArray`. + * + * An `Array` is considered to be a `NonEmptyArray` if it contains at least one element. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * console.log(Array.isNonEmptyArray([])) // false + * console.log(Array.isNonEmptyArray([1, 2, 3])) // true + * ``` + * + * @category guards + * @since 2.0.0 + */ +const isNonEmptyArray = exports.isNonEmptyArray = internalArray.isNonEmptyArray; +/** + * Determine if a `ReadonlyArray` is non empty narrowing down the type to `NonEmptyReadonlyArray`. + * + * A `ReadonlyArray` is considered to be a `NonEmptyReadonlyArray` if it contains at least one element. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * console.log(Array.isNonEmptyReadonlyArray([])) // false + * console.log(Array.isNonEmptyReadonlyArray([1, 2, 3])) // true + * ``` + * + * @category guards + * @since 2.0.0 + */ +const isNonEmptyReadonlyArray = exports.isNonEmptyReadonlyArray = internalArray.isNonEmptyArray; +/** + * Return the number of elements in a `ReadonlyArray`. + * + * @category getters + * @since 2.0.0 + */ +const length = self => self.length; +exports.length = length; +const isOutOfBounds = (i, as) => i < 0 || i >= as.length; +const clamp = (i, as) => Math.floor(Math.min(Math.max(0, i), as.length)); +/** + * This function provides a safe way to read a value at a particular index from a `ReadonlyArray`. + * + * @category getters + * @since 2.0.0 + */ +const get = exports.get = /*#__PURE__*/(0, _Function.dual)(2, (self, index) => { + const i = Math.floor(index); + return isOutOfBounds(i, self) ? Option.none() : Option.some(self[i]); +}); +/** + * Gets an element unsafely, will throw on out of bounds. + * + * @since 2.0.0 + * @category unsafe + */ +const unsafeGet = exports.unsafeGet = /*#__PURE__*/(0, _Function.dual)(2, (self, index) => { + const i = Math.floor(index); + if (isOutOfBounds(i, self)) { + throw new Error(`Index ${i} out of bounds`); + } + return self[i]; +}); +/** + * Return a tuple containing the first element, and a new `Array` of the remaining elements, if any. + * + * **Example** + * + * ```ts + * import { Array } from "effect"; + * + * const result = Array.unprepend([1, 2, 3, 4]) + * console.log(result) // [1, [2, 3, 4]] + * ``` + * + * @category splitting + * @since 2.0.0 + */ +const unprepend = self => [headNonEmpty(self), tailNonEmpty(self)]; +/** + * Return a tuple containing a copy of the `NonEmptyReadonlyArray` without its last element, and that last element. + * + * **Example** + * + * ```ts + * import { Array } from "effect"; + * + * const result = Array.unappend([1, 2, 3, 4]) + * console.log(result) // [[1, 2, 3], 4] + * ``` + * + * @category splitting + * @since 2.0.0 + */ +exports.unprepend = unprepend; +const unappend = self => [initNonEmpty(self), lastNonEmpty(self)]; +/** + * Get the first element of a `ReadonlyArray`, or `None` if the `ReadonlyArray` is empty. + * + * @category getters + * @since 2.0.0 + */ +exports.unappend = unappend; +const head = exports.head = /*#__PURE__*/get(0); +/** + * Get the first element of a non empty array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.headNonEmpty([1, 2, 3, 4]) + * console.log(result) // 1 + * ``` + * + * @category getters + * @since 2.0.0 + */ +const headNonEmpty = exports.headNonEmpty = /*#__PURE__*/unsafeGet(0); +/** + * Get the last element in a `ReadonlyArray`, or `None` if the `ReadonlyArray` is empty. + * + * @category getters + * @since 2.0.0 + */ +const last = self => isNonEmptyReadonlyArray(self) ? Option.some(lastNonEmpty(self)) : Option.none(); +/** + * Get the last element of a non empty array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.lastNonEmpty([1, 2, 3, 4]) + * console.log(result) // 4 + * ``` + * + * @category getters + * @since 2.0.0 + */ +exports.last = last; +const lastNonEmpty = self => self[self.length - 1]; +/** + * Get all but the first element of an `Iterable`, creating a new `Array`, or `None` if the `Iterable` is empty. + * + * @category getters + * @since 2.0.0 + */ +exports.lastNonEmpty = lastNonEmpty; +const tail = self => { + const input = fromIterable(self); + return isNonEmptyReadonlyArray(input) ? Option.some(tailNonEmpty(input)) : Option.none(); +}; +/** + * Get all but the first element of a `NonEmptyReadonlyArray`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.tailNonEmpty([1, 2, 3, 4]) + * console.log(result) // [2, 3, 4] + * ``` + * + * @category getters + * @since 2.0.0 + */ +exports.tail = tail; +const tailNonEmpty = self => self.slice(1); +/** + * Get all but the last element of an `Iterable`, creating a new `Array`, or `None` if the `Iterable` is empty. + * + * @category getters + * @since 2.0.0 + */ +exports.tailNonEmpty = tailNonEmpty; +const init = self => { + const input = fromIterable(self); + return isNonEmptyReadonlyArray(input) ? Option.some(initNonEmpty(input)) : Option.none(); +}; +/** + * Get all but the last element of a non empty array, creating a new array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.initNonEmpty([1, 2, 3, 4]) + * console.log(result) // [1, 2, 3] + * ``` + * + * @category getters + * @since 2.0.0 + */ +exports.init = init; +const initNonEmpty = self => self.slice(0, -1); +/** + * Keep only a max number of elements from the start of an `Iterable`, creating a new `Array`. + * + * **Note**. `n` is normalized to a non negative integer. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.take([1, 2, 3, 4, 5], 3) + * console.log(result) // [1, 2, 3] + * ``` + * + * @category getters + * @since 2.0.0 + */ +exports.initNonEmpty = initNonEmpty; +const take = exports.take = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => { + const input = fromIterable(self); + return input.slice(0, clamp(n, input)); +}); +/** + * Keep only a max number of elements from the end of an `Iterable`, creating a new `Array`. + * + * **Note**. `n` is normalized to a non negative integer. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.takeRight([1, 2, 3, 4, 5], 3) + * console.log(result) // [3, 4, 5] + * ``` + * + * @category getters + * @since 2.0.0 + */ +const takeRight = exports.takeRight = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => { + const input = fromIterable(self); + const i = clamp(n, input); + return i === 0 ? [] : input.slice(-i); +}); +/** + * Calculate the longest initial subarray for which all element satisfy the specified predicate, creating a new `Array`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.takeWhile([1, 3, 2, 4, 1, 2], x => x < 4) + * console.log(result) // [1, 3, 2] + * + * // Explanation: + * // - The function starts with the first element (`1`), which is less than `4`, so it adds `1` to the result. + * // - The next element (`3`) is also less than `4`, so it adds `3`. + * // - The next element (`2`) is again less than `4`, so it adds `2`. + * // - The function then encounters `4`, which is not less than `4`. At this point, it stops checking further elements and finalizes the result. + * ``` + * + * @category getters + * @since 2.0.0 + */ +const takeWhile = exports.takeWhile = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => { + let i = 0; + const out = []; + for (const a of self) { + if (!predicate(a, i)) { + break; + } + out.push(a); + i++; + } + return out; +}); +const spanIndex = (self, predicate) => { + let i = 0; + for (const a of self) { + if (!predicate(a, i)) { + break; + } + i++; + } + return i; +}; +/** + * Split an `Iterable` into two parts: + * + * 1. the longest initial subarray for which all elements satisfy the specified predicate + * 2. the remaining elements + * + * @category splitting + * @since 2.0.0 + */ +const span = exports.span = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => splitAt(self, spanIndex(self, predicate))); +/** + * Drop a max number of elements from the start of an `Iterable`, creating a new `Array`. + * + * **Note**. `n` is normalized to a non negative integer. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.drop([1, 2, 3, 4, 5], 2) + * console.log(result) // [3, 4, 5] + * ``` + * + * @category getters + * @since 2.0.0 + */ +const drop = exports.drop = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => { + const input = fromIterable(self); + return input.slice(clamp(n, input), input.length); +}); +/** + * Drop a max number of elements from the end of an `Iterable`, creating a new `Array`. + * + * **Note**. `n` is normalized to a non negative integer. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.dropRight([1, 2, 3, 4, 5], 2) + * console.log(result) // [1, 2, 3] + * ``` + * + * @category getters + * @since 2.0.0 + */ +const dropRight = exports.dropRight = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => { + const input = fromIterable(self); + return input.slice(0, input.length - clamp(n, input)); +}); +/** + * Remove the longest initial subarray for which all element satisfy the specified predicate, creating a new `Array`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.dropWhile([1, 2, 3, 4, 5], x => x < 4) + * console.log(result) // [4, 5] + * ``` + * + * @category getters + * @since 2.0.0 + */ +const dropWhile = exports.dropWhile = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => fromIterable(self).slice(spanIndex(self, predicate))); +/** + * Return the first index for which a predicate holds. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.findFirstIndex([5, 3, 8, 9], x => x > 5) + * console.log(result) // Option.some(2) + * ``` + * + * @category elements + * @since 2.0.0 + */ +const findFirstIndex = exports.findFirstIndex = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => { + let i = 0; + for (const a of self) { + if (predicate(a, i)) { + return Option.some(i); + } + i++; + } + return Option.none(); +}); +/** + * Return the last index for which a predicate holds. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.findLastIndex([1, 3, 8, 9], x => x < 5) + * console.log(result) // Option.some(1) + * ``` + * + * @category elements + * @since 2.0.0 + */ +const findLastIndex = exports.findLastIndex = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => { + const input = fromIterable(self); + for (let i = input.length - 1; i >= 0; i--) { + if (predicate(input[i], i)) { + return Option.some(i); + } + } + return Option.none(); +}); +/** + * Returns the first element that satisfies the specified + * predicate, or `None` if no such element exists. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.findFirst([1, 2, 3, 4, 5], x => x > 3) + * console.log(result) // Option.some(4) + * ``` + * + * @category elements + * @since 2.0.0 + */ +const findFirst = exports.findFirst = moduleIterable.findFirst; +/** + * Finds the last element in an iterable collection that satisfies the given predicate or refinement. + * Returns an `Option` containing the found element, or `Option.none` if no element matches. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.findLast([1, 2, 3, 4, 5], n => n % 2 === 0) + * console.log(result) // Option.some(4) + * ``` + * + * @category elements + * @since 2.0.0 + */ +const findLast = exports.findLast = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + const input = fromIterable(self); + for (let i = input.length - 1; i >= 0; i--) { + const a = input[i]; + const o = f(a, i); + if (Predicate.isBoolean(o)) { + if (o) { + return Option.some(a); + } + } else { + if (Option.isSome(o)) { + return o; + } + } + } + return Option.none(); +}); +/** + * Returns a tuple of the first element that satisfies the specified + * predicate and its index, or `None` if no such element exists. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.findFirstWithIndex([1, 2, 3, 4, 5], x => x > 3) + * console.log(result) // Option.some([4, 3]) + * ``` + * + * @category elements + * @since 3.17.0 + */ +const findFirstWithIndex = exports.findFirstWithIndex = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + let i = 0; + for (const a of self) { + const o = f(a, i); + if (Predicate.isBoolean(o)) { + if (o) { + return Option.some([a, i]); + } + } else { + if (Option.isSome(o)) { + return Option.some([o.value, i]); + } + } + i++; + } + return Option.none(); +}); +/** + * Counts all the element of the given array that pass the given predicate + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.countBy([1, 2, 3, 4, 5], n => n % 2 === 0) + * console.log(result) // 2 + * ``` + * + * @category folding + * @since 3.16.0 + */ +const countBy = exports.countBy = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + let count = 0; + const as = fromIterable(self); + for (let i = 0; i < as.length; i++) { + const a = as[i]; + if (f(a, i)) { + count++; + } + } + return count; +}); +/** + * Insert an element at the specified index, creating a new `NonEmptyArray`, + * or return `None` if the index is out of bounds. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.insertAt(['a', 'b', 'c', 'e'], 3, 'd') + * console.log(result) // Option.some(['a', 'b', 'c', 'd', 'e']) + * ``` + * + * @since 2.0.0 + */ +const insertAt = exports.insertAt = /*#__PURE__*/(0, _Function.dual)(3, (self, i, b) => { + const out = Array.from(self); + // v--- `= self.length` is ok, it means inserting in last position + if (i < 0 || i > out.length) { + return Option.none(); + } + out.splice(i, 0, b); + return Option.some(out); +}); +/** + * Change the element at the specified index, creating a new `Array`, + * or return a copy of the input if the index is out of bounds. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.replace(['a', 'b', 'c', 'd'], 1, 'z') + * console.log(result) // ['a', 'z', 'c', 'd'] + * ``` + * + * @since 2.0.0 + */ +const replace = exports.replace = /*#__PURE__*/(0, _Function.dual)(3, (self, i, b) => modify(self, i, () => b)); +/** + * Replaces an element in an array with the given value, returning an option of the updated array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.replaceOption([1, 2, 3], 1, 4) + * console.log(result) // Option.some([1, 4, 3]) + * ``` + * + * @since 2.0.0 + */ +const replaceOption = exports.replaceOption = /*#__PURE__*/(0, _Function.dual)(3, (self, i, b) => modifyOption(self, i, () => b)); +/** + * Apply a function to the element at the specified index, creating a new `Array`, + * or return a copy of the input if the index is out of bounds. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.modify([1, 2, 3, 4], 2, (n) => n * 2) + * console.log(result) // [1, 2, 6, 4] + * ``` + * + * @since 2.0.0 + */ +const modify = exports.modify = /*#__PURE__*/(0, _Function.dual)(3, (self, i, f) => { + const out = Array.from(self); + if (isOutOfBounds(i, out)) { + return out; + } + const b = f(out[i]); + out[i] = b; + return out; +}); +/** + * Apply a function to the element at the specified index, creating a new `Array`, + * or return `None` if the index is out of bounds. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const input = [1, 2, 3, 4] + * const result = Array.modifyOption(input, 2, (n) => n * 2) + * console.log(result) // Option.some([1, 2, 6, 4]) + * + * const outOfBoundsResult = Array.modifyOption(input, 5, (n) => n * 2) + * console.log(outOfBoundsResult) // Option.none() + * ``` + * + * @since 2.0.0 + */ +const modifyOption = exports.modifyOption = /*#__PURE__*/(0, _Function.dual)(3, (self, i, f) => { + const arr = fromIterable(self); + if (isOutOfBounds(i, arr)) { + return Option.none(); + } + const out = Array.isArray(self) ? self.slice() : arr; + const b = f(arr[i]); + out[i] = b; + return Option.some(out); +}); +/** + * Delete the element at the specified index, creating a new `Array`, + * or return a copy of the input if the index is out of bounds. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const input = [1, 2, 3, 4] + * const result = Array.remove(input, 2) + * console.log(result) // [1, 2, 4] + * + * const outOfBoundsResult = Array.remove(input, 5) + * console.log(outOfBoundsResult) // [1, 2, 3, 4] + * ``` + * + * @since 2.0.0 + */ +const remove = exports.remove = /*#__PURE__*/(0, _Function.dual)(2, (self, i) => { + const out = Array.from(self); + if (isOutOfBounds(i, out)) { + return out; + } + out.splice(i, 1); + return out; +}); +/** + * Delete the element at the specified index, creating a new `Array`, + * or return `None` if the index is out of bounds. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Array, Option } from "effect" + * + * const numbers = [1, 2, 3, 4] + * const result = Array.removeOption(numbers, 2) + * assert.deepStrictEqual(result, Option.some([1, 2, 4])) + * + * const outOfBoundsResult = Array.removeOption(numbers, 5) + * assert.deepStrictEqual(outOfBoundsResult, Option.none()) + * ``` + * + * @since 3.16.0 + */ +const removeOption = exports.removeOption = /*#__PURE__*/(0, _Function.dual)(2, (self, i) => { + const arr = fromIterable(self); + if (isOutOfBounds(i, arr)) { + return Option.none(); + } + const out = Array.isArray(self) ? self.slice() : arr; + out.splice(i, 1); + return Option.some(out); +}); +/** + * Reverse an `Iterable`, creating a new `Array`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.reverse([1, 2, 3, 4]) + * console.log(result) // [4, 3, 2, 1] + * ``` + * + * @category elements + * @since 2.0.0 + */ +const reverse = self => Array.from(self).reverse(); +/** + * Create a new array with elements sorted in increasing order based on the specified comparator. + * If the input is a `NonEmptyReadonlyArray`, the output will also be a `NonEmptyReadonlyArray`. + * + * @category sorting + * @since 2.0.0 + */ +exports.reverse = reverse; +const sort = exports.sort = /*#__PURE__*/(0, _Function.dual)(2, (self, O) => { + const out = Array.from(self); + out.sort(O); + return out; +}); +/** + * Sorts an array based on a provided mapping function and order. The mapping + * function transforms the elements into a value that can be compared, and the + * order defines how those values should be sorted. + * + * **Example** + * + * ```ts + * import { Array, Order } from "effect" + * + * const result = Array.sortWith(["aaa", "b", "cc"], (s) => s.length, Order.number) + * console.log(result) // ["b", "cc", "aaa"] + * + * // Explanation: + * // The array of strings is sorted based on their lengths. The mapping function `(s) => s.length` + * // converts each string into its length, and the `Order.number` specifies that the lengths should + * // be sorted in ascending order. + * ``` + * + * @since 2.0.0 + * @category elements + */ +const sortWith = exports.sortWith = /*#__PURE__*/(0, _Function.dual)(3, (self, f, order) => Array.from(self).map(a => [a, f(a)]).sort(([, a], [, b]) => order(a, b)).map(([_]) => _)); +/** + * Sorts the elements of an `Iterable` in increasing order based on the provided + * orders. The elements are compared using the first order in `orders`, then the + * second order if the first comparison is equal, and so on. + * + * **Example** + * + * ```ts + * import { Array, Order, pipe } from "effect" + * + * const users = [ + * { name: "Alice", age: 30 }, + * { name: "Bob", age: 25 }, + * { name: "Charlie", age: 30 } + * ] + * + * const result = pipe( + * users, + * Array.sortBy( + * Order.mapInput(Order.number, (user: (typeof users)[number]) => user.age), + * Order.mapInput(Order.string, (user: (typeof users)[number]) => user.name) + * ) + * ) + * + * console.log(result) + * // [ + * // { name: "Bob", age: 25 }, + * // { name: "Alice", age: 30 }, + * // { name: "Charlie", age: 30 } + * // ] + * + * // Explanation: + * // The array of users is sorted first by age in ascending order. When ages are equal, + * // the users are further sorted by name in ascending order. + * ``` + * + * @category sorting + * @since 2.0.0 + */ +const sortBy = (...orders) => { + const sortByAll = sort(Order.combineAll(orders)); + return self => { + const input = fromIterable(self); + if (isNonEmptyReadonlyArray(input)) { + return sortByAll(input); + } + return []; + }; +}; +/** + * Takes two `Iterable`s and returns an `Array` of corresponding pairs. + * If one input `Iterable` is short, excess elements of the + * longer `Iterable` are discarded. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.zip([1, 2, 3], ['a', 'b']) + * console.log(result) // [[1, 'a'], [2, 'b']] + * ``` + * + * @category zipping + * @since 2.0.0 + */ +exports.sortBy = sortBy; +const zip = exports.zip = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => zipWith(self, that, Tuple.make)); +/** + * Apply a function to pairs of elements at the same index in two `Iterable`s, collecting the results in a new `Array`. If one + * input `Iterable` is short, excess elements of the longer `Iterable` are discarded. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.zipWith([1, 2, 3], [4, 5, 6], (a, b) => a + b) + * console.log(result) // [5, 7, 9] + * ``` + * + * @category zipping + * @since 2.0.0 + */ +const zipWith = exports.zipWith = /*#__PURE__*/(0, _Function.dual)(3, (self, that, f) => { + const as = fromIterable(self); + const bs = fromIterable(that); + if (isNonEmptyReadonlyArray(as) && isNonEmptyReadonlyArray(bs)) { + const out = [f(headNonEmpty(as), headNonEmpty(bs))]; + const len = Math.min(as.length, bs.length); + for (let i = 1; i < len; i++) { + out[i] = f(as[i], bs[i]); + } + return out; + } + return []; +}); +/** + * This function is the inverse of `zip`. Takes an `Iterable` of pairs and return two corresponding `Array`s. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.unzip([[1, "a"], [2, "b"], [3, "c"]]) + * console.log(result) // [[1, 2, 3], ['a', 'b', 'c']] + * ``` + * + * @since 2.0.0 + */ +const unzip = self => { + const input = fromIterable(self); + if (isNonEmptyReadonlyArray(input)) { + const fa = [input[0][0]]; + const fb = [input[0][1]]; + for (let i = 1; i < input.length; i++) { + fa[i] = input[i][0]; + fb[i] = input[i][1]; + } + return [fa, fb]; + } + return [[], []]; +}; +/** + * Places an element in between members of an `Iterable`. + * If the input is a non-empty array, the result is also a non-empty array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.intersperse([1, 2, 3], 0) + * console.log(result) // [1, 0, 2, 0, 3] + * ``` + * + * @since 2.0.0 + */ +exports.unzip = unzip; +const intersperse = exports.intersperse = /*#__PURE__*/(0, _Function.dual)(2, (self, middle) => { + const input = fromIterable(self); + if (isNonEmptyReadonlyArray(input)) { + const out = [headNonEmpty(input)]; + const tail = tailNonEmpty(input); + for (let i = 0; i < tail.length; i++) { + if (i < tail.length) { + out.push(middle); + } + out.push(tail[i]); + } + return out; + } + return []; +}); +/** + * Apply a function to the head, creating a new `NonEmptyReadonlyArray`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.modifyNonEmptyHead([1, 2, 3], n => n * 10) + * console.log(result) // [10, 2, 3] + * ``` + * + * @since 2.0.0 + */ +const modifyNonEmptyHead = exports.modifyNonEmptyHead = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => [f(headNonEmpty(self)), ...tailNonEmpty(self)]); +/** + * Change the head, creating a new `NonEmptyReadonlyArray`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.setNonEmptyHead([1, 2, 3], 10) + * console.log(result) // [10, 2, 3] + * ``` + * + * @since 2.0.0 + */ +const setNonEmptyHead = exports.setNonEmptyHead = /*#__PURE__*/(0, _Function.dual)(2, (self, b) => modifyNonEmptyHead(self, () => b)); +/** + * Apply a function to the last element, creating a new `NonEmptyReadonlyArray`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.modifyNonEmptyLast([1, 2, 3], n => n * 2) + * console.log(result) // [1, 2, 6] + * ``` + * + * @since 2.0.0 + */ +const modifyNonEmptyLast = exports.modifyNonEmptyLast = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => append(initNonEmpty(self), f(lastNonEmpty(self)))); +/** + * Change the last element, creating a new `NonEmptyReadonlyArray`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.setNonEmptyLast([1, 2, 3], 4) + * console.log(result) // [1, 2, 4] + * ``` + * + * @since 2.0.0 + */ +const setNonEmptyLast = exports.setNonEmptyLast = /*#__PURE__*/(0, _Function.dual)(2, (self, b) => modifyNonEmptyLast(self, () => b)); +/** + * Rotate an `Iterable` by `n` steps. + * If the input is a non-empty array, the result is also a non-empty array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.rotate(['a', 'b', 'c', 'd', 'e'], 2) + * console.log(result) // [ 'd', 'e', 'a', 'b', 'c' ] + * ``` + * + * @since 2.0.0 + */ +const rotate = exports.rotate = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => { + const input = fromIterable(self); + if (isNonEmptyReadonlyArray(input)) { + const len = input.length; + const m = Math.round(n) % len; + if (isOutOfBounds(Math.abs(m), input) || m === 0) { + return copy(input); + } + if (m < 0) { + const [f, s] = splitNonEmptyAt(input, -m); + return appendAll(s, f); + } else { + return rotate(self, m - len); + } + } + return []; +}); +/** + * Returns a function that checks if a `ReadonlyArray` contains a given value using a provided `isEquivalent` function. + * + * **Example** + * + * ```ts + * import { Array, pipe } from "effect" + * + * const isEquivalent = (a: number, b: number) => a === b + * const containsNumber = Array.containsWith(isEquivalent) + * const result = pipe([1, 2, 3, 4], containsNumber(3)) + * console.log(result) // true + * ``` + * + * @category elements + * @since 2.0.0 + */ +const containsWith = isEquivalent => (0, _Function.dual)(2, (self, a) => { + for (const i of self) { + if (isEquivalent(a, i)) { + return true; + } + } + return false; +}); +exports.containsWith = containsWith; +const _equivalence = /*#__PURE__*/Equal.equivalence(); +/** + * Returns a function that checks if a `ReadonlyArray` contains a given value using the default `Equivalence`. + * + * **Example** + * + * ```ts + * import { Array, pipe } from "effect" + * + * const result = pipe(['a', 'b', 'c', 'd'], Array.contains('c')) + * console.log(result) // true + * ``` + * + * @category elements + * @since 2.0.0 + */ +const contains = exports.contains = /*#__PURE__*/containsWith(_equivalence); +/** + * A useful recursion pattern for processing an `Iterable` to produce a new `Array`, often used for "chopping" up the input + * `Iterable`. Typically chop is called with some function that will consume an initial prefix of the `Iterable` and produce a + * value and the rest of the `Array`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.chop([1, 2, 3, 4, 5], (as): [number, Array] => [as[0] * 2, as.slice(1)]) + * console.log(result) // [2, 4, 6, 8, 10] + * + * // Explanation: + * // The `chopFunction` takes the first element of the array, doubles it, and then returns it along with the rest of the array. + * // The `chop` function applies this `chopFunction` recursively to the input array `[1, 2, 3, 4, 5]`, + * // resulting in a new array `[2, 4, 6, 8, 10]`. + * ``` + * + * @since 2.0.0 + */ +const chop = exports.chop = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + const input = fromIterable(self); + if (isNonEmptyReadonlyArray(input)) { + const [b, rest] = f(input); + const out = [b]; + let next = rest; + while (internalArray.isNonEmptyArray(next)) { + const [b, rest] = f(next); + out.push(b); + next = rest; + } + return out; + } + return []; +}); +/** + * Splits an `Iterable` into two segments, with the first segment containing a maximum of `n` elements. + * The value of `n` can be `0`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.splitAt([1, 2, 3, 4, 5], 3) + * console.log(result) // [[1, 2, 3], [4, 5]] + * ``` + * + * @category splitting + * @since 2.0.0 + */ +const splitAt = exports.splitAt = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => { + const input = Array.from(self); + const _n = Math.floor(n); + if (isNonEmptyReadonlyArray(input)) { + if (_n >= 1) { + return splitNonEmptyAt(input, _n); + } + return [[], input]; + } + return [input, []]; +}); +/** + * Splits a `NonEmptyReadonlyArray` into two segments, with the first segment containing a maximum of `n` elements. + * The value of `n` must be `>= 1`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.splitNonEmptyAt(["a", "b", "c", "d", "e"], 3) + * console.log(result) // [["a", "b", "c"], ["d", "e"]] + * ``` + * + * @category splitting + * @since 2.0.0 + */ +const splitNonEmptyAt = exports.splitNonEmptyAt = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => { + const _n = Math.max(1, Math.floor(n)); + return _n >= self.length ? [copy(self), []] : [prepend(self.slice(1, _n), headNonEmpty(self)), self.slice(_n)]; +}); +/** + * Splits this iterable into `n` equally sized arrays. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.split([1, 2, 3, 4, 5, 6, 7, 8], 3) + * console.log(result) // [[1, 2, 3], [4, 5, 6], [7, 8]] + * ``` + * + * @since 2.0.0 + * @category splitting + */ +const split = exports.split = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => { + const input = fromIterable(self); + return chunksOf(input, Math.ceil(input.length / Math.floor(n))); +}); +/** + * Splits this iterable on the first element that matches this predicate. + * Returns a tuple containing two arrays: the first one is before the match, and the second one is from the match onward. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.splitWhere([1, 2, 3, 4, 5], n => n > 3) + * console.log(result) // [[1, 2, 3], [4, 5]] + * ``` + * + * @category splitting + * @since 2.0.0 + */ +const splitWhere = exports.splitWhere = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => span(self, (a, i) => !predicate(a, i))); +/** + * Copies an array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.copy([1, 2, 3]) + * console.log(result) // [1, 2, 3] + * ``` + * + * @since 2.0.0 + */ +const copy = self => self.slice(); +/** + * Pads an array. + * Returns a new array of length `n` with the elements of `array` followed by `fill` elements if `array` is shorter than `n`. + * If `array` is longer than `n`, the returned array will be a slice of `array` containing the `n` first elements of `array`. + * If `n` is less than or equal to 0, the returned array will be an empty array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.pad([1, 2, 3], 6, 0) + * console.log(result) // [1, 2, 3, 0, 0, 0] + * ``` + * + * @since 3.8.4 + */ +exports.copy = copy; +const pad = exports.pad = /*#__PURE__*/(0, _Function.dual)(3, (self, n, fill) => { + if (self.length >= n) { + return take(self, n); + } + return appendAll(self, makeBy(n - self.length, () => fill)); +}); +/** + * Splits an `Iterable` into length-`n` pieces. The last piece will be shorter if `n` does not evenly divide the length of + * the `Iterable`. Note that `chunksOf(n)([])` is `[]`, not `[[]]`. This is intentional, and is consistent with a recursive + * definition of `chunksOf`; it satisfies the property that + * + * ```ts skip-type-checking + * chunksOf(n)(xs).concat(chunksOf(n)(ys)) == chunksOf(n)(xs.concat(ys))) + * ``` + * + * whenever `n` evenly divides the length of `self`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.chunksOf([1, 2, 3, 4, 5], 2) + * console.log(result) // [[1, 2], [3, 4], [5]] + * + * // Explanation: + * // The `chunksOf` function takes an array of numbers `[1, 2, 3, 4, 5]` and a number `2`. + * // It splits the array into chunks of length 2. Since the array length is not evenly divisible by 2, + * // the last chunk contains the remaining elements. + * // The result is `[[1, 2], [3, 4], [5]]`. + * ``` + * + * @category splitting + * @since 2.0.0 + */ +const chunksOf = exports.chunksOf = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => { + const input = fromIterable(self); + if (isNonEmptyReadonlyArray(input)) { + return chop(input, splitNonEmptyAt(n)); + } + return []; +}); +/** + * Creates sliding windows of size `n` from an `Iterable`. + * If the number of elements is less than `n` or if `n` is not greater than zero, + * an empty array is returned. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Array } from "effect" + * + * const numbers = [1, 2, 3, 4, 5] + * assert.deepStrictEqual(Array.window(numbers, 3), [[1, 2, 3], [2, 3, 4], [3, 4, 5]]) + * assert.deepStrictEqual(Array.window(numbers, 6), []) + * ``` + * + * @category splitting + * @since 3.13.2 + */ +const window = exports.window = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => { + const input = fromIterable(self); + if (n > 0 && isNonEmptyReadonlyArray(input)) { + return Array.from({ + length: input.length - (n - 1) + }, (_, index) => input.slice(index, index + n)); + } + return []; +}); +/** + * Group equal, consecutive elements of a `NonEmptyReadonlyArray` into `NonEmptyArray`s using the provided `isEquivalent` function. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.groupWith(["a", "a", "b", "b", "b", "c", "a"], (x, y) => x === y) + * console.log(result) // [["a", "a"], ["b", "b", "b"], ["c"], ["a"]] + * ``` + * + * @category grouping + * @since 2.0.0 + */ +const groupWith = exports.groupWith = /*#__PURE__*/(0, _Function.dual)(2, (self, isEquivalent) => chop(self, as => { + const h = headNonEmpty(as); + const out = [h]; + let i = 1; + for (; i < as.length; i++) { + const a = as[i]; + if (isEquivalent(a, h)) { + out.push(a); + } else { + break; + } + } + return [out, as.slice(i)]; +})); +/** + * Group equal, consecutive elements of a `NonEmptyReadonlyArray` into `NonEmptyArray`s. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.group([1, 1, 2, 2, 2, 3, 1]) + * console.log(result) // [[1, 1], [2, 2, 2], [3], [1]] + * ``` + * + * @category grouping + * @since 2.0.0 + */ +const group = exports.group = /*#__PURE__*/groupWith(/*#__PURE__*/Equal.equivalence()); +/** + * Splits an `Iterable` into sub-non-empty-arrays stored in an object, based on the result of calling a `string`-returning + * function on each element, and grouping the results according to values returned + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const people = [ + * { name: "Alice", group: "A" }, + * { name: "Bob", group: "B" }, + * { name: "Charlie", group: "A" } + * ] + * + * const result = Array.groupBy(people, person => person.group) + * console.log(result) + * // { + * // A: [{ name: "Alice", group: "A" }, { name: "Charlie", group: "A" }], + * // B: [{ name: "Bob", group: "B" }] + * // } + * ``` + * + * @category grouping + * @since 2.0.0 + */ +const groupBy = exports.groupBy = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + const out = {}; + for (const a of self) { + const k = f(a); + if (Object.prototype.hasOwnProperty.call(out, k)) { + out[k].push(a); + } else { + out[k] = [a]; + } + } + return out; +}); +/** + * Calculates the union of two arrays using the provided equivalence relation. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const union = Array.unionWith([1, 2], [2, 3], (a, b) => a === b) + * console.log(union) // [1, 2, 3] + * ``` + * + * @since 2.0.0 + */ +const unionWith = exports.unionWith = /*#__PURE__*/(0, _Function.dual)(3, (self, that, isEquivalent) => { + const a = fromIterable(self); + const b = fromIterable(that); + if (isNonEmptyReadonlyArray(a)) { + if (isNonEmptyReadonlyArray(b)) { + const dedupe = dedupeWith(isEquivalent); + return dedupe(appendAll(a, b)); + } + return a; + } + return b; +}); +/** + * Creates a union of two arrays, removing duplicates. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.union([1, 2], [2, 3]) + * console.log(result) // [1, 2, 3] + * ``` + * + * @since 2.0.0 + */ +const union = exports.union = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => unionWith(self, that, _equivalence)); +/** + * Creates an `Array` of unique values that are included in all given `Iterable`s using the provided `isEquivalent` function. + * The order and references of result values are determined by the first `Iterable`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }] + * const array2 = [{ id: 3 }, { id: 4 }, { id: 1 }] + * const isEquivalent = (a: { id: number }, b: { id: number }) => a.id === b.id + * const result = Array.intersectionWith(isEquivalent)(array2)(array1) + * console.log(result) // [{ id: 1 }, { id: 3 }] + * ``` + * + * @since 2.0.0 + */ +const intersectionWith = isEquivalent => { + const has = containsWith(isEquivalent); + return (0, _Function.dual)(2, (self, that) => { + const bs = fromIterable(that); + return fromIterable(self).filter(a => has(bs, a)); + }); +}; +/** + * Creates an `Array` of unique values that are included in all given `Iterable`s. + * The order and references of result values are determined by the first `Iterable`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.intersection([1, 2, 3], [3, 4, 1]) + * console.log(result) // [1, 3] + * ``` + * + * @since 2.0.0 + */ +exports.intersectionWith = intersectionWith; +const intersection = exports.intersection = /*#__PURE__*/intersectionWith(_equivalence); +/** + * Creates a `Array` of values not included in the other given `Iterable` using the provided `isEquivalent` function. + * The order and references of result values are determined by the first `Iterable`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const array1 = [1, 2, 3] + * const array2 = [2, 3, 4] + * const difference = Array.differenceWith((a, b) => a === b)(array1, array2) + * console.log(difference) // [1] + * ``` + * + * @since 2.0.0 + */ +const differenceWith = isEquivalent => { + const has = containsWith(isEquivalent); + return (0, _Function.dual)(2, (self, that) => { + const bs = fromIterable(that); + return fromIterable(self).filter(a => !has(bs, a)); + }); +}; +/** + * Creates a `Array` of values not included in the other given `Iterable`. + * The order and references of result values are determined by the first `Iterable`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const difference = Array.difference([1, 2, 3], [2, 3, 4]) + * console.log(difference) // [1] + * ``` + * + * @since 2.0.0 + */ +exports.differenceWith = differenceWith; +const difference = exports.difference = /*#__PURE__*/differenceWith(_equivalence); +/** + * @category constructors + * @since 2.0.0 + */ +const empty = () => []; +/** + * Constructs a new `NonEmptyArray` from the specified value. + * + * @category constructors + * @since 2.0.0 + */ +exports.empty = empty; +const of = a => [a]; +/** + * @category mapping + * @since 2.0.0 + */ +exports.of = of; +const map = exports.map = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => self.map(f)); +/** + * Applies a function to each element in an array and returns a new array containing the concatenated mapped elements. + * + * @category sequencing + * @since 2.0.0 + */ +const flatMap = exports.flatMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + if (isEmptyReadonlyArray(self)) { + return []; + } + const out = []; + for (let i = 0; i < self.length; i++) { + const inner = f(self[i], i); + for (let j = 0; j < inner.length; j++) { + out.push(inner[j]); + } + } + return out; +}); +/** + * Combines multiple arrays into a single array by concatenating all elements + * from each nested array. This function ensures that the structure of nested + * arrays is collapsed into a single, flat array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.flatten([[1, 2], [], [3, 4], [], [5, 6]]) + * console.log(result) // [1, 2, 3, 4, 5, 6] + * ``` + * + * @category sequencing + * @since 2.0.0 + */ +const flatten = exports.flatten = /*#__PURE__*/flatMap(_Function.identity); +/** + * Applies a function to each element of the `Iterable` and filters based on the result, keeping the transformed values where the function returns `Some`. + * This method combines filtering and mapping functionalities, allowing transformations and filtering of elements based on a single function pass. + * + * **Example** + * + * ```ts + * import { Array, Option } from "effect" + * + * const evenSquares = (x: number) => x % 2 === 0 ? Option.some(x * x) : Option.none() + * + * const result = Array.filterMap([1, 2, 3, 4, 5], evenSquares); + * console.log(result) // [4, 16] + * ``` + * + * @category filtering + * @since 2.0.0 + */ +const filterMap = exports.filterMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + const as = fromIterable(self); + const out = []; + for (let i = 0; i < as.length; i++) { + const o = f(as[i], i); + if (Option.isSome(o)) { + out.push(o.value); + } + } + return out; +}); +/** + * Applies a function to each element of the array and filters based on the result, stopping when a condition is not met. + * This method combines filtering and mapping in a single pass, and short-circuits, i.e., stops processing, as soon as the function returns `None`. + * This is useful when you need to transform an array but only up to the point where a certain condition holds true. + * + * **Example** + * + * ```ts + * import { Array, Option } from "effect" + * + * const toSquareTillOdd = (x: number) => x % 2 === 0 ? Option.some(x * x) : Option.none() + * + * const result = Array.filterMapWhile([2, 4, 5], toSquareTillOdd) + * console.log(result) // [4, 16] + * ``` + * + * @category filtering + * @since 2.0.0 + */ +const filterMapWhile = exports.filterMapWhile = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + let i = 0; + const out = []; + for (const a of self) { + const b = f(a, i); + if (Option.isSome(b)) { + out.push(b.value); + } else { + break; + } + i++; + } + return out; +}); +/** + * Applies a function to each element of the `Iterable`, categorizing the results into two separate arrays. + * This function is particularly useful for operations where each element can result in two possible types, + * and you want to separate these types into different collections. For instance, separating validation results + * into successes and failures. + * + * **Example** + * + * ```ts + * import { Array, Either } from "effect"; + * + * const isEven = (x: number) => x % 2 === 0 + * + * const result = Array.partitionMap([1, 2, 3, 4, 5], x => + * isEven(x) ? Either.right(x) : Either.left(x) + * ) + * console.log(result) + * // [ + * // [1, 3, 5], + * // [2, 4] + * // ] + * ``` + * + * @category filtering + * @since 2.0.0 + */ +const partitionMap = exports.partitionMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + const left = []; + const right = []; + const as = fromIterable(self); + for (let i = 0; i < as.length; i++) { + const e = f(as[i], i); + if (Either.isLeft(e)) { + left.push(e.left); + } else { + right.push(e.right); + } + } + return [left, right]; +}); +/** + * Retrieves the `Some` values from an `Iterable` of `Option`s, collecting them into an array. + * + * **Example** + * + * ```ts + * import { Array, Option } from "effect" + * + * const result = Array.getSomes([Option.some(1), Option.none(), Option.some(2)]) + * console.log(result) // [1, 2] + * ``` + * + * @category filtering + * @since 2.0.0 + */ +const getSomes = exports.getSomes = /*#__PURE__*/filterMap(_Function.identity); +/** + * Retrieves the `Left` values from an `Iterable` of `Either`s, collecting them into an array. + * + * **Example** + * + * ```ts + * import { Array, Either } from "effect" + * + * const result = Array.getLefts([Either.right(1), Either.left("err"), Either.right(2)]) + * console.log(result) // ["err"] + * ``` + * + * @category filtering + * @since 2.0.0 + */ +const getLefts = self => { + const out = []; + for (const a of self) { + if (Either.isLeft(a)) { + out.push(a.left); + } + } + return out; +}; +/** + * Retrieves the `Right` values from an `Iterable` of `Either`s, collecting them into an array. + * + * **Example** + * + * ```ts + * import { Array, Either } from "effect" + * + * const result = Array.getRights([Either.right(1), Either.left("err"), Either.right(2)]) + * console.log(result) // [1, 2] + * ``` + * + * @category filtering + * @since 2.0.0 + */ +exports.getLefts = getLefts; +const getRights = self => { + const out = []; + for (const a of self) { + if (Either.isRight(a)) { + out.push(a.right); + } + } + return out; +}; +/** + * @category filtering + * @since 2.0.0 + */ +exports.getRights = getRights; +const filter = exports.filter = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => { + const as = fromIterable(self); + const out = []; + for (let i = 0; i < as.length; i++) { + if (predicate(as[i], i)) { + out.push(as[i]); + } + } + return out; +}); +/** + * Separate elements based on a predicate that also exposes the index of the element. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.partition([1, 2, 3, 4], n => n % 2 === 0) + * console.log(result) // [[1, 3], [2, 4]] + * ``` + * + * @category filtering + * @since 2.0.0 + */ +const partition = exports.partition = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => { + const left = []; + const right = []; + const as = fromIterable(self); + for (let i = 0; i < as.length; i++) { + if (predicate(as[i], i)) { + right.push(as[i]); + } else { + left.push(as[i]); + } + } + return [left, right]; +}); +/** + * Separates an `Iterable` into two arrays based on a predicate. + * + * @category filtering + * @since 2.0.0 + */ +const separate = exports.separate = /*#__PURE__*/partitionMap(_Function.identity); +/** + * Reduces an array from the left. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.reduce([1, 2, 3], 0, (acc, n) => acc + n) + * console.log(result) // 6 + * ``` + * + * @category folding + * @since 2.0.0 + */ +const reduce = exports.reduce = /*#__PURE__*/(0, _Function.dual)(3, (self, b, f) => fromIterable(self).reduce((b, a, i) => f(b, a, i), b)); +/** + * Reduces an array from the right. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.reduceRight([1, 2, 3], 0, (acc, n) => acc + n) + * console.log(result) // 6 + * ``` + * + * @category folding + * @since 2.0.0 + */ +const reduceRight = exports.reduceRight = /*#__PURE__*/(0, _Function.dual)(3, (self, b, f) => fromIterable(self).reduceRight((b, a, i) => f(b, a, i), b)); +/** + * Lifts a predicate into an array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const isEven = (n: number) => n % 2 === 0 + * const to = Array.liftPredicate(isEven) + * console.log(to(1)) // [] + * console.log(to(2)) // [2] + * ``` + * + * @category lifting + * @since 2.0.0 + */ +const liftPredicate = predicate => b => predicate(b) ? [b] : []; +/** + * @category lifting + * @since 2.0.0 + */ +exports.liftPredicate = liftPredicate; +const liftOption = f => (...a) => fromOption(f(...a)); +/** + * @category conversions + * @since 2.0.0 + */ +exports.liftOption = liftOption; +const fromNullable = a => a == null ? empty() : [a]; +/** + * @category lifting + * @since 2.0.0 + */ +exports.fromNullable = fromNullable; +const liftNullable = f => (...a) => fromNullable(f(...a)); +/** + * Maps over an array and flattens the result, removing null and undefined values. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.flatMapNullable([1, 2, 3], n => (n % 2 === 0 ? null : n)) + * console.log(result) // [1, 3] + * + * // Explanation: + * // The array of numbers [1, 2, 3] is mapped with a function that returns null for even numbers + * // and the number itself for odd numbers. The resulting array [1, null, 3] is then flattened + * // to remove null values, resulting in [1, 3]. + * ``` + * + * @category sequencing + * @since 2.0.0 + */ +exports.liftNullable = liftNullable; +const flatMapNullable = exports.flatMapNullable = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => flatMap(self, a => fromNullable(f(a)))); +/** + * Lifts a function that returns an `Either` into a function that returns an array. + * If the `Either` is a left, it returns an empty array. + * If the `Either` is a right, it returns an array with the right value. + * + * **Example** + * + * ```ts + * import { Array, Either } from "effect" + * + * const parseNumber = (s: string): Either.Either => + * isNaN(Number(s)) ? Either.left(new Error("Not a number")) : Either.right(Number(s)) + * + * const liftedParseNumber = Array.liftEither(parseNumber) + * + * const result1 = liftedParseNumber("42") + * console.log(result1) // [42] + * + * const result2 = liftedParseNumber("not a number") + * console.log(result2) // [] + * + * // Explanation: + * // The function parseNumber is lifted to return an array. + * // When parsing "42", it returns an Either.left with the number 42, resulting in [42]. + * // When parsing "not a number", it returns an Either.right with an error, resulting in an empty array []. + * ``` + * + * @category lifting + * @since 2.0.0 + */ +const liftEither = f => (...a) => { + const e = f(...a); + return Either.isLeft(e) ? [] : [e.right]; +}; +/** + * Check if a predicate holds true for every `ReadonlyArray` element. + * + * @category elements + * @since 2.0.0 + */ +exports.liftEither = liftEither; +const every = exports.every = /*#__PURE__*/(0, _Function.dual)(2, (self, refinement) => self.every(refinement)); +/** + * Check if a predicate holds true for some `ReadonlyArray` element. + * + * @category elements + * @since 2.0.0 + */ +const some = exports.some = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => self.some(predicate)); +/** + * Extends an array with a function that maps each subarray to a value. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.extend([1, 2, 3], as => as.length) + * console.log(result) // [3, 2, 1] + * + * // Explanation: + * // The function maps each subarray starting from each element to its length. + * // The subarrays are: [1, 2, 3], [2, 3], [3]. + * // The lengths are: 3, 2, 1. + * // Therefore, the result is [3, 2, 1]. + * ``` + * + * @since 2.0.0 + */ +const extend = exports.extend = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => self.map((_, i, as) => f(as.slice(i)))); +/** + * Finds the minimum element in an array based on a comparator. + * + * **Example** + * + * ```ts + * import { Array, Order } from "effect" + * + * const result = Array.min([3, 1, 2], Order.number) + * console.log(result) // 1 + * ``` + * + * @since 2.0.0 + */ +const min = exports.min = /*#__PURE__*/(0, _Function.dual)(2, (self, O) => self.reduce(Order.min(O))); +/** + * Finds the maximum element in an array based on a comparator. + * + * **Example** + * + * ```ts + * import { Array, Order } from "effect" + * + * const result = Array.max([3, 1, 2], Order.number) + * console.log(result) // 3 + * ``` + * + * @since 2.0.0 + */ +const max = exports.max = /*#__PURE__*/(0, _Function.dual)(2, (self, O) => self.reduce(Order.max(O))); +/** + * @category constructors + * @since 2.0.0 + */ +const unfold = (b, f) => { + const out = []; + let next = b; + let o; + while (Option.isSome(o = f(next))) { + const [a, b] = o.value; + out.push(a); + next = b; + } + return out; +}; +/** + * This function creates and returns a new `Order` for an array of values based on a given `Order` for the elements of the array. + * The returned `Order` compares two arrays by applying the given `Order` to each element in the arrays. + * If all elements are equal, the arrays are then compared based on their length. + * It is useful when you need to compare two arrays of the same type and you have a specific way of comparing each element of the array. + * + * @category instances + * @since 2.0.0 + */ +exports.unfold = unfold; +const getOrder = exports.getOrder = Order.array; +/** + * Creates an equivalence relation for arrays. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const eq = Array.getEquivalence((a, b) => a === b) + * console.log(eq([1, 2, 3], [1, 2, 3])) // true + * ``` + * + * @category instances + * @since 2.0.0 + */ +const getEquivalence = exports.getEquivalence = Equivalence.array; +/** + * Performs a side-effect for each element of the `Iterable`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * Array.forEach([1, 2, 3], n => console.log(n)) // 1, 2, 3 + * ``` + * + * @since 2.0.0 + */ +const forEach = exports.forEach = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => fromIterable(self).forEach((a, i) => f(a, i))); +/** + * Remove duplicates from an `Iterable` using the provided `isEquivalent` function, + * preserving the order of the first occurrence of each element. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.dedupeWith([1, 2, 2, 3, 3, 3], (a, b) => a === b) + * console.log(result) // [1, 2, 3] + * ``` + * + * @since 2.0.0 + */ +const dedupeWith = exports.dedupeWith = /*#__PURE__*/(0, _Function.dual)(2, (self, isEquivalent) => { + const input = fromIterable(self); + if (isNonEmptyReadonlyArray(input)) { + const out = [headNonEmpty(input)]; + const rest = tailNonEmpty(input); + for (const r of rest) { + if (out.every(a => !isEquivalent(r, a))) { + out.push(r); + } + } + return out; + } + return []; +}); +/** + * Remove duplicates from an `Iterable`, preserving the order of the first occurrence of each element. + * The equivalence used to compare elements is provided by `Equal.equivalence()` from the `Equal` module. + * + * @since 2.0.0 + */ +const dedupe = self => dedupeWith(self, Equal.equivalence()); +/** + * Deduplicates adjacent elements that are identical using the provided `isEquivalent` function. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.dedupeAdjacentWith([1, 1, 2, 2, 3, 3], (a, b) => a === b) + * console.log(result) // [1, 2, 3] + * ``` + * + * @since 2.0.0 + */ +exports.dedupe = dedupe; +const dedupeAdjacentWith = exports.dedupeAdjacentWith = /*#__PURE__*/(0, _Function.dual)(2, (self, isEquivalent) => { + const out = []; + let lastA = Option.none(); + for (const a of self) { + if (Option.isNone(lastA) || !isEquivalent(a, lastA.value)) { + out.push(a); + lastA = Option.some(a); + } + } + return out; +}); +/** + * Deduplicates adjacent elements that are identical. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.dedupeAdjacent([1, 1, 2, 2, 3, 3]) + * console.log(result) // [1, 2, 3] + * ``` + * + * @since 2.0.0 + */ +const dedupeAdjacent = exports.dedupeAdjacent = /*#__PURE__*/dedupeAdjacentWith(/*#__PURE__*/Equal.equivalence()); +/** + * Joins the elements together with "sep" in the middle. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const strings = ["a", "b", "c"] + * const joined = Array.join(strings, "-") + * console.log(joined) // "a-b-c" + * ``` + * + * @since 2.0.0 + * @category folding + */ +const join = exports.join = /*#__PURE__*/(0, _Function.dual)(2, (self, sep) => fromIterable(self).join(sep)); +/** + * Statefully maps over the chunk, producing new elements of type `B`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.mapAccum([1, 2, 3], 0, (acc, n) => [acc + n, acc + n]) + * console.log(result) // [6, [1, 3, 6]] + * ``` + * + * @since 2.0.0 + * @category folding + */ +const mapAccum = exports.mapAccum = /*#__PURE__*/(0, _Function.dual)(3, (self, s, f) => { + let i = 0; + let s1 = s; + const out = []; + for (const a of self) { + const r = f(s1, a, i); + s1 = r[0]; + out.push(r[1]); + i++; + } + return [s1, out]; +}); +/** + * Zips this chunk crosswise with the specified chunk using the specified combiner. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.cartesianWith([1, 2], ["a", "b"], (a, b) => `${a}-${b}`) + * console.log(result) // ["1-a", "1-b", "2-a", "2-b"] + * ``` + * + * @since 2.0.0 + * @category elements + */ +const cartesianWith = exports.cartesianWith = /*#__PURE__*/(0, _Function.dual)(3, (self, that, f) => flatMap(self, a => map(that, b => f(a, b)))); +/** + * Zips this chunk crosswise with the specified chunk. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.cartesian([1, 2], ["a", "b"]) + * console.log(result) // [[1, "a"], [1, "b"], [2, "a"], [2, "b"]] + * ``` + * + * @since 2.0.0 + * @category elements + */ +const cartesian = exports.cartesian = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => cartesianWith(self, that, (a, b) => [a, b])); +// ------------------------------------------------------------------------------------- +// do notation +// ------------------------------------------------------------------------------------- +/** + * The "do simulation" for array allows you to sequentially apply operations to the elements of arrays, just as nested loops allow you to go through all combinations of elements in an arrays. + * + * It can be used to simulate "array comprehension". + * It's a technique that allows you to create new arrays by iterating over existing ones and applying specific **conditions** or **transformations** to the elements. It's like assembling a new collection from pieces of other collections based on certain rules. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Array` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * 5. Regular `Array` functions like `map` and `filter` can still be used within the do simulation. These functions will receive the accumulated variables as arguments within the scope + * + * **Example** + * + * ```ts + * import { Array, pipe } from "effect" + * + * const doResult = pipe( + * Array.Do, + * Array.bind("x", () => [1, 3, 5]), + * Array.bind("y", () => [2, 4, 6]), + * Array.filter(({ x, y }) => x < y), // condition + * Array.map(({ x, y }) => [x, y] as const) // transformation + * ) + * console.log(doResult) // [[1, 2], [1, 4], [1, 6], [3, 4], [3, 6], [5, 6]] + * + * // equivalent + * const x = [1, 3, 5], + * y = [2, 4, 6], + * result = []; + * for(let i = 0; i < x.length; i++) { + * for(let j = 0; j < y.length; j++) { + * const _x = x[i], _y = y[j]; + * if(_x < _y) result.push([_x, _y] as const) + * } + * } + * ``` + * + * @see {@link bindTo} + * @see {@link bind} + * @see {@link let_ let} + * + * @category do notation + * @since 3.2.0 + */ +const Do = exports.Do = /*#__PURE__*/of({}); +/** + * The "do simulation" for array allows you to sequentially apply operations to the elements of arrays, just as nested loops allow you to go through all combinations of elements in an arrays. + * + * It can be used to simulate "array comprehension". + * It's a technique that allows you to create new arrays by iterating over existing ones and applying specific **conditions** or **transformations** to the elements. It's like assembling a new collection from pieces of other collections based on certain rules. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Array` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * 5. Regular `Array` functions like `map` and `filter` can still be used within the do simulation. These functions will receive the accumulated variables as arguments within the scope + * + * **Example** + * + * ```ts + * import { Array, pipe } from "effect" + * + * const doResult = pipe( + * Array.Do, + * Array.bind("x", () => [1, 3, 5]), + * Array.bind("y", () => [2, 4, 6]), + * Array.filter(({ x, y }) => x < y), // condition + * Array.map(({ x, y }) => [x, y] as const) // transformation + * ) + * console.log(doResult) // [[1, 2], [1, 4], [1, 6], [3, 4], [3, 6], [5, 6]] + * + * // equivalent + * const x = [1, 3, 5], + * y = [2, 4, 6], + * result = []; + * for(let i = 0; i < x.length; i++) { + * for(let j = 0; j < y.length; j++) { + * const _x = x[i], _y = y[j]; + * if(_x < _y) result.push([_x, _y] as const) + * } + * } + * ``` + * + * @see {@link bindTo} + * @see {@link Do} + * @see {@link let_ let} + * + * @category do notation + * @since 3.2.0 + */ +const bind = exports.bind = /*#__PURE__*/internalDoNotation.bind(map, flatMap); +/** + * The "do simulation" for array allows you to sequentially apply operations to the elements of arrays, just as nested loops allow you to go through all combinations of elements in an arrays. + * + * It can be used to simulate "array comprehension". + * It's a technique that allows you to create new arrays by iterating over existing ones and applying specific **conditions** or **transformations** to the elements. It's like assembling a new collection from pieces of other collections based on certain rules. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Array` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * 5. Regular `Array` functions like `map` and `filter` can still be used within the do simulation. These functions will receive the accumulated variables as arguments within the scope + * + * **Example** + * + * ```ts + * import { Array, pipe } from "effect" + * + * const doResult = pipe( + * Array.Do, + * Array.bind("x", () => [1, 3, 5]), + * Array.bind("y", () => [2, 4, 6]), + * Array.filter(({ x, y }) => x < y), // condition + * Array.map(({ x, y }) => [x, y] as const) // transformation + * ) + * console.log(doResult) // [[1, 2], [1, 4], [1, 6], [3, 4], [3, 6], [5, 6]] + * + * // equivalent + * const x = [1, 3, 5], + * y = [2, 4, 6], + * result = []; + * for(let i = 0; i < x.length; i++) { + * for(let j = 0; j < y.length; j++) { + * const _x = x[i], _y = y[j]; + * if(_x < _y) result.push([_x, _y] as const) + * } + * } + * ``` + * + * @see {@link bindTo} + * @see {@link Do} + * @see {@link let_ let} + * + * @category do notation + * @since 3.2.0 + */ +const bindTo = exports.bindTo = /*#__PURE__*/internalDoNotation.bindTo(map); +const let_ = exports.let = /*#__PURE__*/internalDoNotation.let_(map); +//# sourceMappingURL=Array.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/BigDecimal.js b/backend/node_modules/effect/dist/cjs/BigDecimal.js new file mode 100644 index 0000000000000000000000000000000000000000..d6e0d8b3f7a8d0d34e8c22a91695a9f688773d63 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/BigDecimal.js @@ -0,0 +1,1116 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.unsafeToNumber = exports.unsafeRemainder = exports.unsafeMakeNormalized = exports.unsafeFromString = exports.unsafeFromNumber = exports.unsafeDivide = exports.truncate = exports.toExponential = exports.sumAll = exports.sum = exports.subtract = exports.sign = exports.scale = exports.safeFromNumber = exports.roundTerminal = exports.round = exports.remainder = exports.normalize = exports.negate = exports.multiply = exports.min = exports.max = exports.make = exports.lessThanOrEqualTo = exports.lessThan = exports.isZero = exports.isPositive = exports.isNegative = exports.isInteger = exports.isBigDecimal = exports.greaterThanOrEqualTo = exports.greaterThan = exports.fromString = exports.fromNumber = exports.fromBigInt = exports.format = exports.floor = exports.equals = exports.divide = exports.digitAt = exports.clamp = exports.ceil = exports.between = exports.abs = exports.TypeId = exports.Order = exports.Equivalence = void 0; +var Equal = _interopRequireWildcard(require("./Equal.js")); +var equivalence = _interopRequireWildcard(require("./Equivalence.js")); +var _Function = require("./Function.js"); +var Hash = _interopRequireWildcard(require("./Hash.js")); +var _Inspectable = require("./Inspectable.js"); +var Option = _interopRequireWildcard(require("./Option.js")); +var order = _interopRequireWildcard(require("./Order.js")); +var _Pipeable = require("./Pipeable.js"); +var _Predicate = require("./Predicate.js"); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * This module provides utility functions and type class instances for working with the `BigDecimal` type in TypeScript. + * It includes functions for basic arithmetic operations, as well as type class instances for `Equivalence` and `Order`. + * + * A `BigDecimal` allows storing any real number to arbitrary precision; which avoids common floating point errors + * (such as 0.1 + 0.2 ≠ 0.3) at the cost of complexity. + * + * Internally, `BigDecimal` uses a `BigInt` object, paired with a 64-bit integer which determines the position of the + * decimal point. Therefore, the precision *is not* actually arbitrary, but limited to 263 decimal places. + * + * It is not recommended to convert a floating point number to a decimal directly, as the floating point representation + * may be unexpected. + * + * @module BigDecimal + * @since 2.0.0 + * @see {@link module:BigInt} for more similar operations on `bigint` types + * @see {@link module:Number} for more similar operations on `number` types + */ + +const DEFAULT_PRECISION = 100; +const FINITE_INT_REGEX = /^[+-]?\d+$/; +/** + * @since 2.0.0 + * @category symbols + */ +const TypeId = exports.TypeId = /*#__PURE__*/Symbol.for("effect/BigDecimal"); +const BigDecimalProto = { + [TypeId]: TypeId, + [Hash.symbol]() { + const normalized = normalize(this); + return (0, _Function.pipe)(Hash.hash(normalized.value), Hash.combine(Hash.number(normalized.scale)), Hash.cached(this)); + }, + [Equal.symbol](that) { + return isBigDecimal(that) && equals(this, that); + }, + toString() { + return `BigDecimal(${format(this)})`; + }, + toJSON() { + return { + _id: "BigDecimal", + value: String(this.value), + scale: this.scale + }; + }, + [_Inspectable.NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + } +}; +/** + * Checks if a given value is a `BigDecimal`. + * + * @since 2.0.0 + * @category guards + */ +const isBigDecimal = u => (0, _Predicate.hasProperty)(u, TypeId); +/** + * Creates a `BigDecimal` from a `bigint` value and a scale. + * + * @since 2.0.0 + * @category constructors + */ +exports.isBigDecimal = isBigDecimal; +const make = (value, scale) => { + const o = Object.create(BigDecimalProto); + o.value = value; + o.scale = scale; + return o; +}; +/** + * Internal function used to create pre-normalized `BigDecimal`s. + * + * @internal + */ +exports.make = make; +const unsafeMakeNormalized = (value, scale) => { + if (value !== bigint0 && value % bigint10 === bigint0) { + throw new RangeError("Value must be normalized"); + } + const o = make(value, scale); + o.normalized = o; + return o; +}; +exports.unsafeMakeNormalized = unsafeMakeNormalized; +const bigint0 = /*#__PURE__*/BigInt(0); +const bigint1 = /*#__PURE__*/BigInt(1); +const bigint10 = /*#__PURE__*/BigInt(10); +const zero = /*#__PURE__*/unsafeMakeNormalized(bigint0, 0); +/** + * Normalizes a given `BigDecimal` by removing trailing zeros. + * + * **Example** + * + * ```ts + * import * as assert from "node:assert" + * import { normalize, make, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(normalize(unsafeFromString("123.00000")), normalize(make(123n, 0))) + * assert.deepStrictEqual(normalize(unsafeFromString("12300000")), normalize(make(123n, -5))) + * ``` + * + * @since 2.0.0 + * @category scaling + */ +const normalize = self => { + if (self.normalized === undefined) { + if (self.value === bigint0) { + self.normalized = zero; + } else { + const digits = `${self.value}`; + let trail = 0; + for (let i = digits.length - 1; i >= 0; i--) { + if (digits[i] === "0") { + trail++; + } else { + break; + } + } + if (trail === 0) { + self.normalized = self; + } + const value = BigInt(digits.substring(0, digits.length - trail)); + const scale = self.scale - trail; + self.normalized = unsafeMakeNormalized(value, scale); + } + } + return self.normalized; +}; +/** + * Scales a given `BigDecimal` to the specified scale. + * + * If the given scale is smaller than the current scale, the value will be rounded down to + * the nearest integer. + * + * @since 2.0.0 + * @category scaling + */ +exports.normalize = normalize; +const scale = exports.scale = /*#__PURE__*/(0, _Function.dual)(2, (self, scale) => { + if (scale > self.scale) { + return make(self.value * bigint10 ** BigInt(scale - self.scale), scale); + } + if (scale < self.scale) { + return make(self.value / bigint10 ** BigInt(self.scale - scale), scale); + } + return self; +}); +/** + * Provides an addition operation on `BigDecimal`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { sum, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(sum(unsafeFromString("2"), unsafeFromString("3")), unsafeFromString("5")) + * ``` + * + * @since 2.0.0 + * @category math + */ +const sum = exports.sum = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => { + if (that.value === bigint0) { + return self; + } + if (self.value === bigint0) { + return that; + } + if (self.scale > that.scale) { + return make(scale(that, self.scale).value + self.value, self.scale); + } + if (self.scale < that.scale) { + return make(scale(self, that.scale).value + that.value, that.scale); + } + return make(self.value + that.value, self.scale); +}); +/** + * Provides a multiplication operation on `BigDecimal`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { multiply, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(multiply(unsafeFromString("2"), unsafeFromString("3")), unsafeFromString("6")) + * ``` + * + * @since 2.0.0 + * @category math + */ +const multiply = exports.multiply = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => { + if (that.value === bigint0 || self.value === bigint0) { + return zero; + } + return make(self.value * that.value, self.scale + that.scale); +}); +/** + * Provides a subtraction operation on `BigDecimal`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { subtract, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(subtract(unsafeFromString("2"), unsafeFromString("3")), unsafeFromString("-1")) + * ``` + * + * @since 2.0.0 + * @category math + */ +const subtract = exports.subtract = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => { + if (that.value === bigint0) { + return self; + } + if (self.value === bigint0) { + return make(-that.value, that.scale); + } + if (self.scale > that.scale) { + return make(self.value - scale(that, self.scale).value, self.scale); + } + if (self.scale < that.scale) { + return make(scale(self, that.scale).value - that.value, that.scale); + } + return make(self.value - that.value, self.scale); +}); +/** + * Internal function used for arbitrary precision division. + */ +const divideWithPrecision = (num, den, scale, precision) => { + const numNegative = num < bigint0; + const denNegative = den < bigint0; + const negateResult = numNegative !== denNegative; + num = numNegative ? -num : num; + den = denNegative ? -den : den; + // Shift digits until numerator is larger than denominator (set scale appropriately). + while (num < den) { + num *= bigint10; + scale++; + } + // First division. + let quotient = num / den; + let remainder = num % den; + if (remainder === bigint0) { + // No remainder, return immediately. + return make(negateResult ? -quotient : quotient, scale); + } + // The quotient is guaranteed to be non-negative at this point. No need to consider sign. + let count = `${quotient}`.length; + // Shift the remainder by 1 decimal; The quotient will be 1 digit upon next division. + remainder *= bigint10; + while (remainder !== bigint0 && count < precision) { + const q = remainder / den; + const r = remainder % den; + quotient = quotient * bigint10 + q; + remainder = r * bigint10; + count++; + scale++; + } + if (remainder !== bigint0) { + // Round final number with remainder. + quotient += roundTerminal(remainder / den); + } + return make(negateResult ? -quotient : quotient, scale); +}; +/** + * Internal function used for rounding. + * + * Returns 1 if the most significant digit is >= 5, otherwise 0. + * + * This is used after dividing a number by a power of ten and rounding the last digit. + * + * @internal + */ +const roundTerminal = n => { + const pos = n >= bigint0 ? 0 : 1; + return Number(`${n}`[pos]) < 5 ? bigint0 : bigint1; +}; +/** + * Provides a division operation on `BigDecimal`s. + * + * If the dividend is not a multiple of the divisor the result will be a `BigDecimal` value + * which represents the integer division rounded down to the nearest integer. + * + * If the divisor is `0`, the result will be `None`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigDecimal, Option } from "effect" + * + * assert.deepStrictEqual(BigDecimal.divide(BigDecimal.unsafeFromString("6"), BigDecimal.unsafeFromString("3")), Option.some(BigDecimal.unsafeFromString("2"))) + * assert.deepStrictEqual(BigDecimal.divide(BigDecimal.unsafeFromString("6"), BigDecimal.unsafeFromString("4")), Option.some(BigDecimal.unsafeFromString("1.5"))) + * assert.deepStrictEqual(BigDecimal.divide(BigDecimal.unsafeFromString("6"), BigDecimal.unsafeFromString("0")), Option.none()) + * ``` + * + * @since 2.0.0 + * @category math + */ +exports.roundTerminal = roundTerminal; +const divide = exports.divide = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => { + if (that.value === bigint0) { + return Option.none(); + } + if (self.value === bigint0) { + return Option.some(zero); + } + const scale = self.scale - that.scale; + if (self.value === that.value) { + return Option.some(make(bigint1, scale)); + } + return Option.some(divideWithPrecision(self.value, that.value, scale, DEFAULT_PRECISION)); +}); +/** + * Provides an unsafe division operation on `BigDecimal`s. + * + * If the dividend is not a multiple of the divisor the result will be a `BigDecimal` value + * which represents the integer division rounded down to the nearest integer. + * + * Throws a `RangeError` if the divisor is `0`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { unsafeDivide, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(unsafeDivide(unsafeFromString("6"), unsafeFromString("3")), unsafeFromString("2")) + * assert.deepStrictEqual(unsafeDivide(unsafeFromString("6"), unsafeFromString("4")), unsafeFromString("1.5")) + * ``` + * + * @since 2.0.0 + * @category math + */ +const unsafeDivide = exports.unsafeDivide = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => { + if (that.value === bigint0) { + throw new RangeError("Division by zero"); + } + if (self.value === bigint0) { + return zero; + } + const scale = self.scale - that.scale; + if (self.value === that.value) { + return make(bigint1, scale); + } + return divideWithPrecision(self.value, that.value, scale, DEFAULT_PRECISION); +}); +/** + * @since 2.0.0 + * @category instances + */ +const Order = exports.Order = /*#__PURE__*/order.make((self, that) => { + const scmp = order.number(sign(self), sign(that)); + if (scmp !== 0) { + return scmp; + } + if (self.scale > that.scale) { + return order.bigint(self.value, scale(that, self.scale).value); + } + if (self.scale < that.scale) { + return order.bigint(scale(self, that.scale).value, that.value); + } + return order.bigint(self.value, that.value); +}); +/** + * Returns `true` if the first argument is less than the second, otherwise `false`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { lessThan, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(lessThan(unsafeFromString("2"), unsafeFromString("3")), true) + * assert.deepStrictEqual(lessThan(unsafeFromString("3"), unsafeFromString("3")), false) + * assert.deepStrictEqual(lessThan(unsafeFromString("4"), unsafeFromString("3")), false) + * ``` + * + * @since 2.0.0 + * @category predicates + */ +const lessThan = exports.lessThan = /*#__PURE__*/order.lessThan(Order); +/** + * Checks if a given `BigDecimal` is less than or equal to the provided one. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { lessThanOrEqualTo, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(lessThanOrEqualTo(unsafeFromString("2"), unsafeFromString("3")), true) + * assert.deepStrictEqual(lessThanOrEqualTo(unsafeFromString("3"), unsafeFromString("3")), true) + * assert.deepStrictEqual(lessThanOrEqualTo(unsafeFromString("4"), unsafeFromString("3")), false) + * ``` + * + * @since 2.0.0 + * @category predicates + */ +const lessThanOrEqualTo = exports.lessThanOrEqualTo = /*#__PURE__*/order.lessThanOrEqualTo(Order); +/** + * Returns `true` if the first argument is greater than the second, otherwise `false`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { greaterThan, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(greaterThan(unsafeFromString("2"), unsafeFromString("3")), false) + * assert.deepStrictEqual(greaterThan(unsafeFromString("3"), unsafeFromString("3")), false) + * assert.deepStrictEqual(greaterThan(unsafeFromString("4"), unsafeFromString("3")), true) + * ``` + * + * @since 2.0.0 + * @category predicates + */ +const greaterThan = exports.greaterThan = /*#__PURE__*/order.greaterThan(Order); +/** + * Checks if a given `BigDecimal` is greater than or equal to the provided one. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { greaterThanOrEqualTo, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(greaterThanOrEqualTo(unsafeFromString("2"), unsafeFromString("3")), false) + * assert.deepStrictEqual(greaterThanOrEqualTo(unsafeFromString("3"), unsafeFromString("3")), true) + * assert.deepStrictEqual(greaterThanOrEqualTo(unsafeFromString("4"), unsafeFromString("3")), true) + * ``` + * + * @since 2.0.0 + * @category predicates + */ +const greaterThanOrEqualTo = exports.greaterThanOrEqualTo = /*#__PURE__*/order.greaterThanOrEqualTo(Order); +/** + * Checks if a `BigDecimal` is between a `minimum` and `maximum` value (inclusive). + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigDecimal } from "effect" + * + * const between = BigDecimal.between({ + * minimum: BigDecimal.unsafeFromString("1"), + * maximum: BigDecimal.unsafeFromString("5") } + * ) + * + * assert.deepStrictEqual(between(BigDecimal.unsafeFromString("3")), true) + * assert.deepStrictEqual(between(BigDecimal.unsafeFromString("0")), false) + * assert.deepStrictEqual(between(BigDecimal.unsafeFromString("6")), false) + * ``` + * + * @since 2.0.0 + * @category predicates + */ +const between = exports.between = /*#__PURE__*/order.between(Order); +/** + * Restricts the given `BigDecimal` to be within the range specified by the `minimum` and `maximum` values. + * + * - If the `BigDecimal` is less than the `minimum` value, the function returns the `minimum` value. + * - If the `BigDecimal` is greater than the `maximum` value, the function returns the `maximum` value. + * - Otherwise, it returns the original `BigDecimal`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigDecimal } from "effect" + * + * const clamp = BigDecimal.clamp({ + * minimum: BigDecimal.unsafeFromString("1"), + * maximum: BigDecimal.unsafeFromString("5") } + * ) + * + * assert.deepStrictEqual(clamp(BigDecimal.unsafeFromString("3")), BigDecimal.unsafeFromString("3")) + * assert.deepStrictEqual(clamp(BigDecimal.unsafeFromString("0")), BigDecimal.unsafeFromString("1")) + * assert.deepStrictEqual(clamp(BigDecimal.unsafeFromString("6")), BigDecimal.unsafeFromString("5")) + * ``` + * + * @since 2.0.0 + * @category math + */ +const clamp = exports.clamp = /*#__PURE__*/order.clamp(Order); +/** + * Returns the minimum between two `BigDecimal`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { min, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(min(unsafeFromString("2"), unsafeFromString("3")), unsafeFromString("2")) + * ``` + * + * @since 2.0.0 + * @category math + */ +const min = exports.min = /*#__PURE__*/order.min(Order); +/** + * Returns the maximum between two `BigDecimal`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { max, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(max(unsafeFromString("2"), unsafeFromString("3")), unsafeFromString("3")) + * ``` + * + * @since 2.0.0 + * @category math + */ +const max = exports.max = /*#__PURE__*/order.max(Order); +/** + * Determines the sign of a given `BigDecimal`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { sign, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(sign(unsafeFromString("-5")), -1) + * assert.deepStrictEqual(sign(unsafeFromString("0")), 0) + * assert.deepStrictEqual(sign(unsafeFromString("5")), 1) + * ``` + * + * @since 2.0.0 + * @category math + */ +const sign = n => n.value === bigint0 ? 0 : n.value < bigint0 ? -1 : 1; +/** + * Determines the absolute value of a given `BigDecimal`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { abs, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(abs(unsafeFromString("-5")), unsafeFromString("5")) + * assert.deepStrictEqual(abs(unsafeFromString("0")), unsafeFromString("0")) + * assert.deepStrictEqual(abs(unsafeFromString("5")), unsafeFromString("5")) + * ``` + * + * @since 2.0.0 + * @category math + */ +exports.sign = sign; +const abs = n => n.value < bigint0 ? make(-n.value, n.scale) : n; +/** + * Provides a negate operation on `BigDecimal`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { negate, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(negate(unsafeFromString("3")), unsafeFromString("-3")) + * assert.deepStrictEqual(negate(unsafeFromString("-6")), unsafeFromString("6")) + * ``` + * + * @since 2.0.0 + * @category math + */ +exports.abs = abs; +const negate = n => make(-n.value, n.scale); +/** + * Returns the remainder left over when one operand is divided by a second operand. + * + * If the divisor is `0`, the result will be `None`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigDecimal, Option } from "effect" + * + * assert.deepStrictEqual(BigDecimal.remainder(BigDecimal.unsafeFromString("2"), BigDecimal.unsafeFromString("2")), Option.some(BigDecimal.unsafeFromString("0"))) + * assert.deepStrictEqual(BigDecimal.remainder(BigDecimal.unsafeFromString("3"), BigDecimal.unsafeFromString("2")), Option.some(BigDecimal.unsafeFromString("1"))) + * assert.deepStrictEqual(BigDecimal.remainder(BigDecimal.unsafeFromString("-4"), BigDecimal.unsafeFromString("2")), Option.some(BigDecimal.unsafeFromString("0"))) + * ``` + * + * @since 2.0.0 + * @category math + */ +exports.negate = negate; +const remainder = exports.remainder = /*#__PURE__*/(0, _Function.dual)(2, (self, divisor) => { + if (divisor.value === bigint0) { + return Option.none(); + } + const max = Math.max(self.scale, divisor.scale); + return Option.some(make(scale(self, max).value % scale(divisor, max).value, max)); +}); +/** + * Returns the remainder left over when one operand is divided by a second operand. + * + * Throws a `RangeError` if the divisor is `0`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { unsafeRemainder, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(unsafeRemainder(unsafeFromString("2"), unsafeFromString("2")), unsafeFromString("0")) + * assert.deepStrictEqual(unsafeRemainder(unsafeFromString("3"), unsafeFromString("2")), unsafeFromString("1")) + * assert.deepStrictEqual(unsafeRemainder(unsafeFromString("-4"), unsafeFromString("2")), unsafeFromString("0")) + * ``` + * + * @since 2.0.0 + * @category math + */ +const unsafeRemainder = exports.unsafeRemainder = /*#__PURE__*/(0, _Function.dual)(2, (self, divisor) => { + if (divisor.value === bigint0) { + throw new RangeError("Division by zero"); + } + const max = Math.max(self.scale, divisor.scale); + return make(scale(self, max).value % scale(divisor, max).value, max); +}); +/** + * @category instances + * @since 2.0.0 + */ +const Equivalence = exports.Equivalence = /*#__PURE__*/equivalence.make((self, that) => { + if (self.scale > that.scale) { + return scale(that, self.scale).value === self.value; + } + if (self.scale < that.scale) { + return scale(self, that.scale).value === that.value; + } + return self.value === that.value; +}); +/** + * Checks if two `BigDecimal`s are equal. + * + * @since 2.0.0 + * @category predicates + */ +const equals = exports.equals = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => Equivalence(self, that)); +/** + * Creates a `BigDecimal` from a `bigint` value. + * + * @since 2.0.0 + * @category constructors + */ +const fromBigInt = n => make(n, 0); +/** + * Creates a `BigDecimal` from a `number` value. + * + * It is not recommended to convert a floating point number to a decimal directly, + * as the floating point representation may be unexpected. + * + * Throws a `RangeError` if the number is not finite (`NaN`, `+Infinity` or `-Infinity`). + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { unsafeFromNumber, make } from "effect/BigDecimal" + * + * assert.deepStrictEqual(unsafeFromNumber(123), make(123n, 0)) + * assert.deepStrictEqual(unsafeFromNumber(123.456), make(123456n, 3)) + * ``` + * + * @since 3.11.0 + * @category constructors + */ +exports.fromBigInt = fromBigInt; +const unsafeFromNumber = n => Option.getOrThrowWith(safeFromNumber(n), () => new RangeError(`Number must be finite, got ${n}`)); +/** + * Creates a `BigDecimal` from a `number` value. + * + * It is not recommended to convert a floating point number to a decimal directly, + * as the floating point representation may be unexpected. + * + * Throws a `RangeError` if the number is not finite (`NaN`, `+Infinity` or `-Infinity`). + * + * @since 2.0.0 + * @category constructors + * @deprecated Use {@link unsafeFromNumber} instead. + */ +exports.unsafeFromNumber = unsafeFromNumber; +const fromNumber = exports.fromNumber = unsafeFromNumber; +// TODO(4.0): Rename this to `fromNumber` after removing the current, unsafe implementation of `fromNumber`. +/** + * Creates a `BigDecimal` from a `number` value. + * + * It is not recommended to convert a floating point number to a decimal directly, + * as the floating point representation may be unexpected. + * + * Returns `None` if the number is not finite (`NaN`, `+Infinity` or `-Infinity`). + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigDecimal, Option } from "effect" + * + * assert.deepStrictEqual(BigDecimal.safeFromNumber(123), Option.some(BigDecimal.make(123n, 0))) + * assert.deepStrictEqual(BigDecimal.safeFromNumber(123.456), Option.some(BigDecimal.make(123456n, 3))) + * assert.deepStrictEqual(BigDecimal.safeFromNumber(Infinity), Option.none()) + * ``` + * + * @since 3.11.0 + * @category constructors + */ +const safeFromNumber = n => { + if (!Number.isFinite(n)) { + return Option.none(); + } + const string = `${n}`; + if (string.includes("e")) { + return fromString(string); + } + const [lead, trail = ""] = string.split("."); + return Option.some(make(BigInt(`${lead}${trail}`), trail.length)); +}; +/** + * Parses a numerical `string` into a `BigDecimal`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigDecimal, Option } from "effect" + * + * assert.deepStrictEqual(BigDecimal.fromString("123"), Option.some(BigDecimal.make(123n, 0))) + * assert.deepStrictEqual(BigDecimal.fromString("123.456"), Option.some(BigDecimal.make(123456n, 3))) + * assert.deepStrictEqual(BigDecimal.fromString("123.abc"), Option.none()) + * ``` + * + * @since 2.0.0 + * @category constructors + */ +exports.safeFromNumber = safeFromNumber; +const fromString = s => { + if (s === "") { + return Option.some(zero); + } + let base; + let exp; + const seperator = s.search(/[eE]/); + if (seperator !== -1) { + const trail = s.slice(seperator + 1); + base = s.slice(0, seperator); + exp = Number(trail); + if (base === "" || !Number.isSafeInteger(exp) || !FINITE_INT_REGEX.test(trail)) { + return Option.none(); + } + } else { + base = s; + exp = 0; + } + let digits; + let offset; + const dot = base.search(/\./); + if (dot !== -1) { + const lead = base.slice(0, dot); + const trail = base.slice(dot + 1); + digits = `${lead}${trail}`; + offset = trail.length; + } else { + digits = base; + offset = 0; + } + if (!FINITE_INT_REGEX.test(digits)) { + return Option.none(); + } + const scale = offset - exp; + if (!Number.isSafeInteger(scale)) { + return Option.none(); + } + return Option.some(make(BigInt(digits), scale)); +}; +/** + * Parses a numerical `string` into a `BigDecimal`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { unsafeFromString, make } from "effect/BigDecimal" + * + * assert.deepStrictEqual(unsafeFromString("123"), make(123n, 0)) + * assert.deepStrictEqual(unsafeFromString("123.456"), make(123456n, 3)) + * assert.throws(() => unsafeFromString("123.abc")) + * ``` + * + * @since 2.0.0 + * @category constructors + */ +exports.fromString = fromString; +const unsafeFromString = s => Option.getOrThrowWith(fromString(s), () => new Error("Invalid numerical string")); +/** + * Formats a given `BigDecimal` as a `string`. + * + * If the scale of the `BigDecimal` is greater than or equal to 16, the `BigDecimal` will + * be formatted in scientific notation. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { format, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(format(unsafeFromString("-5")), "-5") + * assert.deepStrictEqual(format(unsafeFromString("123.456")), "123.456") + * assert.deepStrictEqual(format(unsafeFromString("-0.00000123")), "-0.00000123") + * ``` + * + * @since 2.0.0 + * @category conversions + */ +exports.unsafeFromString = unsafeFromString; +const format = n => { + const normalized = normalize(n); + if (Math.abs(normalized.scale) >= 16) { + return toExponential(normalized); + } + const negative = normalized.value < bigint0; + const absolute = negative ? `${normalized.value}`.substring(1) : `${normalized.value}`; + let before; + let after; + if (normalized.scale >= absolute.length) { + before = "0"; + after = "0".repeat(normalized.scale - absolute.length) + absolute; + } else { + const location = absolute.length - normalized.scale; + if (location > absolute.length) { + const zeros = location - absolute.length; + before = `${absolute}${"0".repeat(zeros)}`; + after = ""; + } else { + after = absolute.slice(location); + before = absolute.slice(0, location); + } + } + const complete = after === "" ? before : `${before}.${after}`; + return negative ? `-${complete}` : complete; +}; +/** + * Formats a given `BigDecimal` as a `string` in scientific notation. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { toExponential, make } from "effect/BigDecimal" + * + * assert.deepStrictEqual(toExponential(make(123456n, -5)), "1.23456e+10") + * ``` + * + * @since 3.11.0 + * @category conversions + */ +exports.format = format; +const toExponential = n => { + if (isZero(n)) { + return "0e+0"; + } + const normalized = normalize(n); + const digits = `${abs(normalized).value}`; + const head = digits.slice(0, 1); + const tail = digits.slice(1); + let output = `${isNegative(normalized) ? "-" : ""}${head}`; + if (tail !== "") { + output += `.${tail}`; + } + const exp = tail.length - normalized.scale; + return `${output}e${exp >= 0 ? "+" : ""}${exp}`; +}; +/** + * Converts a `BigDecimal` to a `number`. + * + * This function will produce incorrect results if the `BigDecimal` exceeds the 64-bit range of a `number`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { unsafeToNumber, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(unsafeToNumber(unsafeFromString("123.456")), 123.456) + * ``` + * + * @since 2.0.0 + * @category conversions + */ +exports.toExponential = toExponential; +const unsafeToNumber = n => Number(format(n)); +/** + * Checks if a given `BigDecimal` is an integer. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isInteger, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(isInteger(unsafeFromString("0")), true) + * assert.deepStrictEqual(isInteger(unsafeFromString("1")), true) + * assert.deepStrictEqual(isInteger(unsafeFromString("1.1")), false) + * ``` + * + * @since 2.0.0 + * @category predicates + */ +exports.unsafeToNumber = unsafeToNumber; +const isInteger = n => normalize(n).scale <= 0; +/** + * Checks if a given `BigDecimal` is `0`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isZero, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(isZero(unsafeFromString("0")), true) + * assert.deepStrictEqual(isZero(unsafeFromString("1")), false) + * ``` + * + * @since 2.0.0 + * @category predicates + */ +exports.isInteger = isInteger; +const isZero = n => n.value === bigint0; +/** + * Checks if a given `BigDecimal` is negative. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isNegative, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(isNegative(unsafeFromString("-1")), true) + * assert.deepStrictEqual(isNegative(unsafeFromString("0")), false) + * assert.deepStrictEqual(isNegative(unsafeFromString("1")), false) + * ``` + * + * @since 2.0.0 + * @category predicates + */ +exports.isZero = isZero; +const isNegative = n => n.value < bigint0; +/** + * Checks if a given `BigDecimal` is positive. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isPositive, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(isPositive(unsafeFromString("-1")), false) + * assert.deepStrictEqual(isPositive(unsafeFromString("0")), false) + * assert.deepStrictEqual(isPositive(unsafeFromString("1")), true) + * ``` + * + * @since 2.0.0 + * @category predicates + */ +exports.isNegative = isNegative; +const isPositive = n => n.value > bigint0; +exports.isPositive = isPositive; +const isBigDecimalArgs = args => isBigDecimal(args[0]); +/** + * Calculate the ceiling of a `BigDecimal` at the given scale. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { ceil, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(ceil(unsafeFromString("145"), -1), unsafeFromString("150")) + * assert.deepStrictEqual(ceil(unsafeFromString("-14.5")), unsafeFromString("-14")) + * ``` + * + * @since 3.16.0 + * @category math + */ +const ceil = exports.ceil = /*#__PURE__*/(0, _Function.dual)(isBigDecimalArgs, (self, scale = 0) => { + const truncated = truncate(self, scale); + if (isPositive(self) && lessThan(truncated, self)) { + return sum(truncated, make(1n, scale)); + } + return truncated; +}); +/** + * Calculate the floor of a `BigDecimal` at the given scale. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { floor, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(floor(unsafeFromString("145"), -1), unsafeFromString("140")) + * assert.deepStrictEqual(floor(unsafeFromString("-14.5")), unsafeFromString("-15")) + * ``` + * + * @since 3.16.0 + * @category math + */ +const floor = exports.floor = /*#__PURE__*/(0, _Function.dual)(isBigDecimalArgs, (self, scale = 0) => { + const truncated = truncate(self, scale); + if (isNegative(self) && greaterThan(truncated, self)) { + return sum(truncated, make(-1n, scale)); + } + return truncated; +}); +/** + * Truncate a `BigDecimal` at the given scale. This is the same operation as rounding away from zero. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { truncate, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(truncate(unsafeFromString("145"), -1), unsafeFromString("140")) + * assert.deepStrictEqual(truncate(unsafeFromString("-14.5")), unsafeFromString("-14")) + * ``` + * + * @since 3.16.0 + * @category math + */ +const truncate = exports.truncate = /*#__PURE__*/(0, _Function.dual)(isBigDecimalArgs, (self, scale = 0) => { + if (self.scale <= scale) { + return self; + } + // BigInt division truncates towards zero + return make(self.value / 10n ** BigInt(self.scale - scale), scale); +}); +/** + * Internal function used by `round` for `half-even` and `half-odd` rounding modes. + * + * Returns the digit at the position of the given `scale` within the `BigDecimal`. + * + * @internal + */ +const digitAt = exports.digitAt = /*#__PURE__*/(0, _Function.dual)(2, (self, scale) => { + if (self.scale < scale) { + return 0n; + } + const scaled = self.value / 10n ** BigInt(self.scale - scale); + return scaled % 10n; +}); +/** + * Rounds a `BigDecimal` at the given scale with the specified rounding mode. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { round, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(round(unsafeFromString("145"), { mode: "from-zero", scale: -1 }), unsafeFromString("150")) + * assert.deepStrictEqual(round(unsafeFromString("-14.5")), unsafeFromString("-15")) + * ``` + * + * @since 3.16.0 + * @category math + */ +const round = exports.round = /*#__PURE__*/(0, _Function.dual)(isBigDecimalArgs, (self, options) => { + const mode = options?.mode ?? "half-from-zero"; + const scale = options?.scale ?? 0; + switch (mode) { + case "ceil": + return ceil(self, scale); + case "floor": + return floor(self, scale); + case "to-zero": + return truncate(self, scale); + case "from-zero": + return isPositive(self) ? ceil(self, scale) : floor(self, scale); + case "half-ceil": + return floor(sum(self, make(5n, scale + 1)), scale); + case "half-floor": + return ceil(sum(self, make(-5n, scale + 1)), scale); + case "half-to-zero": + return isNegative(self) ? floor(sum(self, make(5n, scale + 1)), scale) : ceil(sum(self, make(-5n, scale + 1)), scale); + case "half-from-zero": + return isNegative(self) ? ceil(sum(self, make(-5n, scale + 1)), scale) : floor(sum(self, make(5n, scale + 1)), scale); + } + const halfCeil = floor(sum(self, make(5n, scale + 1)), scale); + const halfFloor = ceil(sum(self, make(-5n, scale + 1)), scale); + const digit = digitAt(halfCeil, scale); + switch (mode) { + case "half-even": + return equals(halfCeil, halfFloor) ? halfCeil : digit % 2n === 0n ? halfCeil : halfFloor; + case "half-odd": + return equals(halfCeil, halfFloor) ? halfCeil : digit % 2n === 0n ? halfFloor : halfCeil; + } +}); +/** + * Takes an `Iterable` of `BigDecimal`s and returns their sum as a single `BigDecimal` + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { unsafeFromString, sumAll } from "effect/BigDecimal" + * + * assert.deepStrictEqual(sumAll([unsafeFromString("2"), unsafeFromString("3"), unsafeFromString("4")]), unsafeFromString("9")) + * ``` + * + * @category math + * @since 3.16.0 + */ +const sumAll = collection => { + let out = zero; + for (const n of collection) { + out = sum(out, n); + } + return out; +}; +exports.sumAll = sumAll; +//# sourceMappingURL=BigDecimal.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/BigDecimal.js.map b/backend/node_modules/effect/dist/cjs/BigDecimal.js.map new file mode 100644 index 0000000000000000000000000000000000000000..db821eb28acd38a6562386eb97b37d01b3920447 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/BigDecimal.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BigDecimal.js","names":["Equal","_interopRequireWildcard","require","equivalence","_Function","Hash","_Inspectable","Option","order","_Pipeable","_Predicate","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","DEFAULT_PRECISION","FINITE_INT_REGEX","TypeId","exports","Symbol","for","BigDecimalProto","symbol","normalized","normalize","pipe","hash","value","combine","number","scale","cached","that","isBigDecimal","equals","toString","format","toJSON","_id","String","NodeInspectSymbol","pipeArguments","arguments","u","hasProperty","make","create","unsafeMakeNormalized","bigint0","bigint10","RangeError","BigInt","bigint1","zero","self","undefined","digits","trail","length","substring","dual","sum","multiply","subtract","divideWithPrecision","num","den","precision","numNegative","denNegative","negateResult","quotient","remainder","count","q","roundTerminal","pos","Number","divide","none","some","unsafeDivide","Order","scmp","sign","bigint","lessThan","lessThanOrEqualTo","greaterThan","greaterThanOrEqualTo","between","clamp","min","max","abs","negate","divisor","Math","unsafeRemainder","Equivalence","fromBigInt","unsafeFromNumber","getOrThrowWith","safeFromNumber","fromNumber","isFinite","string","includes","fromString","lead","split","s","base","exp","seperator","search","slice","isSafeInteger","test","offset","dot","unsafeFromString","Error","toExponential","negative","absolute","before","after","repeat","location","zeros","complete","isZero","head","tail","output","isNegative","unsafeToNumber","isInteger","isPositive","isBigDecimalArgs","args","ceil","truncated","truncate","floor","digitAt","scaled","round","options","mode","halfCeil","halfFloor","digit","sumAll","collection","out"],"sources":["../../src/BigDecimal.ts"],"sourcesContent":[null],"mappings":";;;;;;AAmBA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,IAAA,GAAAJ,uBAAA,CAAAC,O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G,GAAGvG,IAAI;EACd,KAAK,MAAMrD,CAAC,IAAI2J,UAAU,EAAE;IAC1BC,GAAG,GAAG/F,GAAG,CAAC+F,GAAG,EAAE5J,CAAC,CAAC;EACnB;EAEA,OAAO4J,GAAG;AACZ,CAAC;AAAA1I,OAAA,CAAAwI,MAAA,GAAAA,MAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/BigInt.js b/backend/node_modules/effect/dist/cjs/BigInt.js new file mode 100644 index 0000000000000000000000000000000000000000..d32b5dffaa9c61da9fc8704f3b45f6221dd582e4 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/BigInt.js @@ -0,0 +1,567 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.unsafeSqrt = exports.unsafeDivide = exports.toNumber = exports.sumAll = exports.sum = exports.subtract = exports.sqrt = exports.sign = exports.multiplyAll = exports.multiply = exports.min = exports.max = exports.lessThanOrEqualTo = exports.lessThan = exports.lcm = exports.isBigInt = exports.increment = exports.greaterThanOrEqualTo = exports.greaterThan = exports.gcd = exports.fromString = exports.fromNumber = exports.divide = exports.decrement = exports.clamp = exports.between = exports.abs = exports.Order = exports.Equivalence = void 0; +var equivalence = _interopRequireWildcard(require("./Equivalence.js")); +var _Function = require("./Function.js"); +var Option = _interopRequireWildcard(require("./Option.js")); +var order = _interopRequireWildcard(require("./Order.js")); +var predicate = _interopRequireWildcard(require("./Predicate.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * This module provides utility functions and type class instances for working with the `bigint` type in TypeScript. + * It includes functions for basic arithmetic operations, as well as type class instances for + * `Equivalence` and `Order`. + * + * @module BigInt + * @since 2.0.0 + * @see {@link module:BigDecimal} for more similar operations on `BigDecimal` types + * @see {@link module:Number} for more similar operations on `number` types + */ + +const bigint0 = /*#__PURE__*/BigInt(0); +const bigint1 = /*#__PURE__*/BigInt(1); +const bigint2 = /*#__PURE__*/BigInt(2); +/** + * Tests if a value is a `bigint`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isBigInt } from "effect/BigInt" + * + * assert.deepStrictEqual(isBigInt(1n), true) + * assert.deepStrictEqual(isBigInt(1), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +const isBigInt = exports.isBigInt = predicate.isBigInt; +/** + * Provides an addition operation on `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { sum } from "effect/BigInt" + * + * assert.deepStrictEqual(sum(2n, 3n), 5n) + * ``` + * + * @category math + * @since 2.0.0 + */ +const sum = exports.sum = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => self + that); +/** + * Provides a multiplication operation on `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { multiply } from "effect/BigInt" + * + * assert.deepStrictEqual(multiply(2n, 3n), 6n) + * ``` + * + * @category math + * @since 2.0.0 + */ +const multiply = exports.multiply = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => self * that); +/** + * Provides a subtraction operation on `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { subtract } from "effect/BigInt" + * + * assert.deepStrictEqual(subtract(2n, 3n), -1n) + * ``` + * + * @category math + * @since 2.0.0 + */ +const subtract = exports.subtract = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => self - that); +/** + * Provides a division operation on `bigint`s. + * + * If the dividend is not a multiple of the divisor the result will be a `bigint` value + * which represents the integer division rounded down to the nearest integer. + * + * Returns `None` if the divisor is `0n`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt, Option } from "effect" + * + * assert.deepStrictEqual(BigInt.divide(6n, 3n), Option.some(2n)) + * assert.deepStrictEqual(BigInt.divide(6n, 0n), Option.none()) + * ``` + * + * @category math + * @since 2.0.0 + */ +const divide = exports.divide = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => that === bigint0 ? Option.none() : Option.some(self / that)); +/** + * Provides a division operation on `bigint`s. + * + * If the dividend is not a multiple of the divisor the result will be a `bigint` value + * which represents the integer division rounded down to the nearest integer. + * + * Throws a `RangeError` if the divisor is `0n`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { unsafeDivide } from "effect/BigInt" + * + * assert.deepStrictEqual(unsafeDivide(6n, 3n), 2n) + * assert.deepStrictEqual(unsafeDivide(6n, 4n), 1n) + * ``` + * + * @category math + * @since 2.0.0 + */ +const unsafeDivide = exports.unsafeDivide = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => self / that); +/** + * Returns the result of adding `1n` to a given number. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { increment } from "effect/BigInt" + * + * assert.deepStrictEqual(increment(2n), 3n) + * ``` + * + * @category math + * @since 2.0.0 + */ +const increment = n => n + bigint1; +/** + * Decrements a number by `1n`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { decrement } from "effect/BigInt" + * + * assert.deepStrictEqual(decrement(3n), 2n) + * ``` + * + * @category math + * @since 2.0.0 + */ +exports.increment = increment; +const decrement = n => n - bigint1; +/** + * @category instances + * @since 2.0.0 + */ +exports.decrement = decrement; +const Equivalence = exports.Equivalence = equivalence.bigint; +/** + * @category instances + * @since 2.0.0 + */ +const Order = exports.Order = order.bigint; +/** + * Returns `true` if the first argument is less than the second, otherwise `false`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { lessThan } from "effect/BigInt" + * + * assert.deepStrictEqual(lessThan(2n, 3n), true) + * assert.deepStrictEqual(lessThan(3n, 3n), false) + * assert.deepStrictEqual(lessThan(4n, 3n), false) + * ``` + * + * @category predicates + * @since 2.0.0 + */ +const lessThan = exports.lessThan = /*#__PURE__*/order.lessThan(Order); +/** + * Returns a function that checks if a given `bigint` is less than or equal to the provided one. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { lessThanOrEqualTo } from "effect/BigInt" + * + * assert.deepStrictEqual(lessThanOrEqualTo(2n, 3n), true) + * assert.deepStrictEqual(lessThanOrEqualTo(3n, 3n), true) + * assert.deepStrictEqual(lessThanOrEqualTo(4n, 3n), false) + * ``` + * + * @category predicates + * @since 2.0.0 + */ +const lessThanOrEqualTo = exports.lessThanOrEqualTo = /*#__PURE__*/order.lessThanOrEqualTo(Order); +/** + * Returns `true` if the first argument is greater than the second, otherwise `false`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { greaterThan } from "effect/BigInt" + * + * assert.deepStrictEqual(greaterThan(2n, 3n), false) + * assert.deepStrictEqual(greaterThan(3n, 3n), false) + * assert.deepStrictEqual(greaterThan(4n, 3n), true) + * ``` + * + * @category predicates + * @since 2.0.0 + */ +const greaterThan = exports.greaterThan = /*#__PURE__*/order.greaterThan(Order); +/** + * Returns a function that checks if a given `bigint` is greater than or equal to the provided one. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { greaterThanOrEqualTo } from "effect/BigInt" + * + * assert.deepStrictEqual(greaterThanOrEqualTo(2n, 3n), false) + * assert.deepStrictEqual(greaterThanOrEqualTo(3n, 3n), true) + * assert.deepStrictEqual(greaterThanOrEqualTo(4n, 3n), true) + * ``` + * + * @category predicates + * @since 2.0.0 + */ +const greaterThanOrEqualTo = exports.greaterThanOrEqualTo = /*#__PURE__*/order.greaterThanOrEqualTo(Order); +/** + * Checks if a `bigint` is between a `minimum` and `maximum` value (inclusive). + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt } from "effect" + * + * const between = BigInt.between({ minimum: 0n, maximum: 5n }) + * + * assert.deepStrictEqual(between(3n), true) + * assert.deepStrictEqual(between(-1n), false) + * assert.deepStrictEqual(between(6n), false) + * ``` + * + * @category predicates + * @since 2.0.0 + */ +const between = exports.between = /*#__PURE__*/order.between(Order); +/** + * Restricts the given `bigint` to be within the range specified by the `minimum` and `maximum` values. + * + * - If the `bigint` is less than the `minimum` value, the function returns the `minimum` value. + * - If the `bigint` is greater than the `maximum` value, the function returns the `maximum` value. + * - Otherwise, it returns the original `bigint`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt } from "effect" + * + * const clamp = BigInt.clamp({ minimum: 1n, maximum: 5n }) + * + * assert.equal(clamp(3n), 3n) + * assert.equal(clamp(0n), 1n) + * assert.equal(clamp(6n), 5n) + * ``` + * + * @since 2.0.0 + */ +const clamp = exports.clamp = /*#__PURE__*/order.clamp(Order); +/** + * Returns the minimum between two `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { min } from "effect/BigInt" + * + * assert.deepStrictEqual(min(2n, 3n), 2n) + * ``` + * + * @since 2.0.0 + */ +const min = exports.min = /*#__PURE__*/order.min(Order); +/** + * Returns the maximum between two `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { max } from "effect/BigInt" + * + * assert.deepStrictEqual(max(2n, 3n), 3n) + * ``` + * + * @since 2.0.0 + */ +const max = exports.max = /*#__PURE__*/order.max(Order); +/** + * Determines the sign of a given `bigint`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { sign } from "effect/BigInt" + * + * assert.deepStrictEqual(sign(-5n), -1) + * assert.deepStrictEqual(sign(0n), 0) + * assert.deepStrictEqual(sign(5n), 1) + * ``` + * + * @category math + * @since 2.0.0 + */ +const sign = n => Order(n, bigint0); +/** + * Determines the absolute value of a given `bigint`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { abs } from "effect/BigInt" + * + * assert.deepStrictEqual(abs(-5n), 5n) + * assert.deepStrictEqual(abs(0n), 0n) + * assert.deepStrictEqual(abs(5n), 5n) + * ``` + * + * @category math + * @since 2.0.0 + */ +exports.sign = sign; +const abs = n => n < bigint0 ? -n : n; +/** + * Determines the greatest common divisor of two `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { gcd } from "effect/BigInt" + * + * assert.deepStrictEqual(gcd(2n, 3n), 1n) + * assert.deepStrictEqual(gcd(2n, 4n), 2n) + * assert.deepStrictEqual(gcd(16n, 24n), 8n) + * ``` + * + * @category math + * @since 2.0.0 + */ +exports.abs = abs; +const gcd = exports.gcd = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => { + while (that !== bigint0) { + const t = that; + that = self % that; + self = t; + } + return self; +}); +/** + * Determines the least common multiple of two `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { lcm } from "effect/BigInt" + * + * assert.deepStrictEqual(lcm(2n, 3n), 6n) + * assert.deepStrictEqual(lcm(2n, 4n), 4n) + * assert.deepStrictEqual(lcm(16n, 24n), 48n) + * ``` + * + * @category math + * @since 2.0.0 + */ +const lcm = exports.lcm = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => self * that / gcd(self, that)); +/** + * Determines the square root of a given `bigint` unsafely. Throws if the given `bigint` is negative. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { unsafeSqrt } from "effect/BigInt" + * + * assert.deepStrictEqual(unsafeSqrt(4n), 2n) + * assert.deepStrictEqual(unsafeSqrt(9n), 3n) + * assert.deepStrictEqual(unsafeSqrt(16n), 4n) + * ``` + * + * @category math + * @since 2.0.0 + */ +const unsafeSqrt = n => { + if (n < bigint0) { + throw new RangeError("Cannot take the square root of a negative number"); + } + if (n < bigint2) { + return n; + } + let x = n / bigint2; + while (x * x > n) { + x = (n / x + x) / bigint2; + } + return x; +}; +/** + * Determines the square root of a given `bigint` safely. Returns `none` if the given `bigint` is negative. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt, Option } from "effect" + * + * assert.deepStrictEqual(BigInt.sqrt(4n), Option.some(2n)) + * assert.deepStrictEqual(BigInt.sqrt(9n), Option.some(3n)) + * assert.deepStrictEqual(BigInt.sqrt(16n), Option.some(4n)) + * assert.deepStrictEqual(BigInt.sqrt(-1n), Option.none()) + * ``` + * + * @category math + * @since 2.0.0 + */ +exports.unsafeSqrt = unsafeSqrt; +const sqrt = n => greaterThanOrEqualTo(n, bigint0) ? Option.some(unsafeSqrt(n)) : Option.none(); +/** + * Takes an `Iterable` of `bigint`s and returns their sum as a single `bigint + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { sumAll } from "effect/BigInt" + * + * assert.deepStrictEqual(sumAll([2n, 3n, 4n]), 9n) + * ``` + * + * @category math + * @since 2.0.0 + */ +exports.sqrt = sqrt; +const sumAll = collection => { + let out = bigint0; + for (const n of collection) { + out += n; + } + return out; +}; +/** + * Takes an `Iterable` of `bigint`s and returns their multiplication as a single `number`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { multiplyAll } from "effect/BigInt" + * + * assert.deepStrictEqual(multiplyAll([2n, 3n, 4n]), 24n) + * ``` + * + * @category math + * @since 2.0.0 + */ +exports.sumAll = sumAll; +const multiplyAll = collection => { + let out = bigint1; + for (const n of collection) { + if (n === bigint0) { + return bigint0; + } + out *= n; + } + return out; +}; +/** + * Takes a `bigint` and returns an `Option` of `number`. + * + * If the `bigint` is outside the safe integer range for JavaScript (`Number.MAX_SAFE_INTEGER` + * and `Number.MIN_SAFE_INTEGER`), it returns `Option.none()`. Otherwise, it converts the `bigint` + * to a number and returns `Option.some(number)`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt as BI, Option } from "effect" + * + * assert.deepStrictEqual(BI.toNumber(BigInt(42)), Option.some(42)) + * assert.deepStrictEqual(BI.toNumber(BigInt(Number.MAX_SAFE_INTEGER) + BigInt(1)), Option.none()) + * assert.deepStrictEqual(BI.toNumber(BigInt(Number.MIN_SAFE_INTEGER) - BigInt(1)), Option.none()) + * ``` + * + * @category conversions + * @since 2.0.0 + */ +exports.multiplyAll = multiplyAll; +const toNumber = b => { + if (b > BigInt(Number.MAX_SAFE_INTEGER) || b < BigInt(Number.MIN_SAFE_INTEGER)) { + return Option.none(); + } + return Option.some(Number(b)); +}; +/** + * Takes a string and returns an `Option` of `bigint`. + * + * If the string is empty or contains characters that cannot be converted into a `bigint`, + * it returns `Option.none()`, otherwise, it returns `Option.some(bigint)`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt as BI, Option } from "effect" + * + * assert.deepStrictEqual(BI.fromString("42"), Option.some(BigInt(42))) + * assert.deepStrictEqual(BI.fromString(" "), Option.none()) + * assert.deepStrictEqual(BI.fromString("a"), Option.none()) + * ``` + * + * @category conversions + * @since 2.4.12 + */ +exports.toNumber = toNumber; +const fromString = s => { + try { + return s.trim() === "" ? Option.none() : Option.some(BigInt(s)); + } catch { + return Option.none(); + } +}; +/** + * Takes a number and returns an `Option` of `bigint`. + * + * If the number is outside the safe integer range for JavaScript (`Number.MAX_SAFE_INTEGER` + * and `Number.MIN_SAFE_INTEGER`), it returns `Option.none()`. Otherwise, it attempts to + * convert the number to a `bigint` and returns `Option.some(bigint)`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt as BI, Option } from "effect" + * + * assert.deepStrictEqual(BI.fromNumber(42), Option.some(BigInt(42))) + * assert.deepStrictEqual(BI.fromNumber(Number.MAX_SAFE_INTEGER + 1), Option.none()) + * assert.deepStrictEqual(BI.fromNumber(Number.MIN_SAFE_INTEGER - 1), Option.none()) + * ``` + * + * @category conversions + * @since 2.4.12 + */ +exports.fromString = fromString; +const fromNumber = n => { + if (n > Number.MAX_SAFE_INTEGER || n < Number.MIN_SAFE_INTEGER) { + return Option.none(); + } + try { + return Option.some(BigInt(n)); + } catch { + return Option.none(); + } +}; +exports.fromNumber = fromNumber; +//# sourceMappingURL=BigInt.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/BigInt.js.map b/backend/node_modules/effect/dist/cjs/BigInt.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ea94d1234e46a401e31bee0b9e236a9266cbc18a --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/BigInt.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BigInt.js","names":["equivalence","_interopRequireWildcard","require","_Function","Option","order","predicate","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","bigint0","BigInt","bigint1","bigint2","isBigInt","exports","sum","dual","self","that","multiply","subtract","divide","none","some","unsafeDivide","increment","decrement","Equivalence","bigint","Order","lessThan","lessThanOrEqualTo","greaterThan","greaterThanOrEqualTo","between","clamp","min","max","sign","abs","gcd","lcm","unsafeSqrt","RangeError","x","sqrt","sumAll","collection","out","multiplyAll","toNumber","b","Number","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","fromString","s","trim","fromNumber"],"sources":["../../src/BigInt.ts"],"sourcesContent":[null],"mappings":";;;;;;AAWA,IAAAA,WAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,KAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAEA,IAAAI,SAAA,GAAAL,uBAAA,CAAAC,OAAA;AAA2C,SAAAD,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,CAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO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AAE;EACtB;EAEA,IAAI;IACF,OAAOnC,MAAM,CAACoC,IAAI,CAACb,MAAM,CAAChB,CAAC,CAAC,CAAC;EAC/B,CAAC,CAAC,MAAM;IACN,OAAOP,MAAM,CAACmC,IAAI,EAAE;EACtB;AACF,CAAC;AAAAR,OAAA,CAAA4C,UAAA,GAAAA,UAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Boolean.js b/backend/node_modules/effect/dist/cjs/Boolean.js new file mode 100644 index 0000000000000000000000000000000000000000..2fe5ba260a8c2e5fd28d915c398b460b74703d55 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Boolean.js @@ -0,0 +1,251 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.xor = exports.some = exports.or = exports.not = exports.nor = exports.nand = exports.match = exports.isBoolean = exports.implies = exports.every = exports.eqv = exports.and = exports.Order = exports.Equivalence = void 0; +var equivalence = _interopRequireWildcard(require("./Equivalence.js")); +var _Function = require("./Function.js"); +var order = _interopRequireWildcard(require("./Order.js")); +var predicate = _interopRequireWildcard(require("./Predicate.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * This module provides utility functions and type class instances for working with the `boolean` type in TypeScript. + * It includes functions for basic boolean operations, as well as type class instances for + * `Equivalence` and `Order`. + * + * @since 2.0.0 + */ + +/** + * Tests if a value is a `boolean`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isBoolean } from "effect/Boolean" + * + * assert.deepStrictEqual(isBoolean(true), true) + * assert.deepStrictEqual(isBoolean("true"), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +const isBoolean = exports.isBoolean = predicate.isBoolean; +/** + * This function returns the result of either of the given functions depending on the value of the boolean parameter. + * It is useful when you have to run one of two functions depending on the boolean value. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Boolean } from "effect" + * + * assert.deepStrictEqual(Boolean.match(true, { onFalse: () => "It's false!", onTrue: () => "It's true!" }), "It's true!") + * ``` + * + * @category pattern matching + * @since 2.0.0 + */ +const match = exports.match = /*#__PURE__*/(0, _Function.dual)(2, (value, options) => value ? options.onTrue() : options.onFalse()); +/** + * @category instances + * @since 2.0.0 + */ +const Equivalence = exports.Equivalence = equivalence.boolean; +/** + * @category instances + * @since 2.0.0 + */ +const Order = exports.Order = order.boolean; +/** + * Negates the given boolean: `!self` + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { not } from "effect/Boolean" + * + * assert.deepStrictEqual(not(true), false) + * assert.deepStrictEqual(not(false), true) + * ``` + * + * @category combinators + * @since 2.0.0 + */ +const not = self => !self; +/** + * Combines two boolean using AND: `self && that`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { and } from "effect/Boolean" + * + * assert.deepStrictEqual(and(true, true), true) + * assert.deepStrictEqual(and(true, false), false) + * assert.deepStrictEqual(and(false, true), false) + * assert.deepStrictEqual(and(false, false), false) + * ``` + * + * @category combinators + * @since 2.0.0 + */ +exports.not = not; +const and = exports.and = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => self && that); +/** + * Combines two boolean using NAND: `!(self && that)`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { nand } from "effect/Boolean" + * + * assert.deepStrictEqual(nand(true, true), false) + * assert.deepStrictEqual(nand(true, false), true) + * assert.deepStrictEqual(nand(false, true), true) + * assert.deepStrictEqual(nand(false, false), true) + * ``` + * + * @category combinators + * @since 2.0.0 + */ +const nand = exports.nand = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => !(self && that)); +/** + * Combines two boolean using OR: `self || that`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { or } from "effect/Boolean" + * + * assert.deepStrictEqual(or(true, true), true) + * assert.deepStrictEqual(or(true, false), true) + * assert.deepStrictEqual(or(false, true), true) + * assert.deepStrictEqual(or(false, false), false) + * ``` + * + * @category combinators + * @since 2.0.0 + */ +const or = exports.or = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => self || that); +/** + * Combines two booleans using NOR: `!(self || that)`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { nor } from "effect/Boolean" + * + * assert.deepStrictEqual(nor(true, true), false) + * assert.deepStrictEqual(nor(true, false), false) + * assert.deepStrictEqual(nor(false, true), false) + * assert.deepStrictEqual(nor(false, false), true) + * ``` + * + * @category combinators + * @since 2.0.0 + */ +const nor = exports.nor = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => !(self || that)); +/** + * Combines two booleans using XOR: `(!self && that) || (self && !that)`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { xor } from "effect/Boolean" + * + * assert.deepStrictEqual(xor(true, true), false) + * assert.deepStrictEqual(xor(true, false), true) + * assert.deepStrictEqual(xor(false, true), true) + * assert.deepStrictEqual(xor(false, false), false) + * ``` + * + * @category combinators + * @since 2.0.0 + */ +const xor = exports.xor = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => !self && that || self && !that); +/** + * Combines two booleans using EQV (aka XNOR): `!xor(self, that)`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { eqv } from "effect/Boolean" + * + * assert.deepStrictEqual(eqv(true, true), true) + * assert.deepStrictEqual(eqv(true, false), false) + * assert.deepStrictEqual(eqv(false, true), false) + * assert.deepStrictEqual(eqv(false, false), true) + * ``` + * + * @category combinators + * @since 2.0.0 + */ +const eqv = exports.eqv = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => !xor(self, that)); +/** + * Combines two booleans using an implication: `(!self || that)`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { implies } from "effect/Boolean" + * + * assert.deepStrictEqual(implies(true, true), true) + * assert.deepStrictEqual(implies(true, false), false) + * assert.deepStrictEqual(implies(false, true), true) + * assert.deepStrictEqual(implies(false, false), true) + * ``` + * + * @category combinators + * @since 2.0.0 + */ +const implies = exports.implies = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => self ? that : true); +/** + * This utility function is used to check if all the elements in a collection of boolean values are `true`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { every } from "effect/Boolean" + * + * assert.deepStrictEqual(every([true, true, true]), true) + * assert.deepStrictEqual(every([true, false, true]), false) + * ``` + * + * @since 2.0.0 + */ +const every = collection => { + for (const b of collection) { + if (!b) { + return false; + } + } + return true; +}; +/** + * This utility function is used to check if at least one of the elements in a collection of boolean values is `true`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { some } from "effect/Boolean" + * + * assert.deepStrictEqual(some([true, false, true]), true) + * assert.deepStrictEqual(some([false, false, false]), false) + * ``` + * + * @since 2.0.0 + */ +exports.every = every; +const some = collection => { + for (const b of collection) { + if (b) { + return true; + } + } + return false; +}; +exports.some = some; +//# sourceMappingURL=Boolean.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Boolean.js.map b/backend/node_modules/effect/dist/cjs/Boolean.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f5cb30313829c6b16f4c1a36b92170a51f962126 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Boolean.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Boolean.js","names":["equivalence","_interopRequireWildcard","require","_Function","order","predicate","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","isBoolean","exports","match","dual","value","options","onTrue","onFalse","Equivalence","boolean","Order","not","self","and","that","nand","or","nor","xor","eqv","implies","every","collection","b","some"],"sources":["../../src/Boolean.ts"],"sourcesContent":[null],"mappings":";;;;;;A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;;;;;;;;;;AAiBO,MAAMI,GAAG,GAAAjB,OAAA,CAAAiB,GAAA,gBAqCZ,IAAAf,cAAI,EAAC,CAAC,EAAE,CAACS,IAAa,EAAEE,IAAa,KAAe,CAACF,IAAI,IAAIE,IAAI,IAAMF,IAAI,IAAI,CAACE,IAAK,CAAC;AAE1F;;;;;;;;;;;;;;;;;AAiBO,MAAMK,GAAG,GAAAlB,OAAA,CAAAkB,GAAA,gBAqCZ,IAAAhB,cAAI,EAAC,CAAC,EAAE,CAACS,IAAa,EAAEE,IAAa,KAAc,CAACI,GAAG,CAACN,IAAI,EAAEE,IAAI,CAAC,CAAC;AAExE;;;;;;;;;;;;;;;;;AAiBO,MAAMM,OAAO,GAAAnB,OAAA,CAAAmB,OAAA,gBAqChB,IAAAjB,cAAI,EAAC,CAAC,EAAE,CAACS,IAAI,EAAEE,IAAI,KAAKF,IAAI,GAAGE,IAAI,GAAG,IAAI,CAAC;AAE/C;;;;;;;;;;;;;;AAcO,MAAMO,KAAK,GAAIC,UAA6B,IAAa;EAC9D,KAAK,MAAMC,CAAC,IAAID,UAAU,EAAE;IAC1B,IAAI,CAACC,CAAC,EAAE;MACN,OAAO,KAAK;IACd;EACF;EACA,OAAO,IAAI;AACb,CAAC;AAED;;;;;;;;;;;;;;AAAAtB,OAAA,CAAAoB,KAAA,GAAAA,KAAA;AAcO,MAAMG,IAAI,GAAIF,UAA6B,IAAa;EAC7D,KAAK,MAAMC,CAAC,IAAID,UAAU,EAAE;IAC1B,IAAIC,CAAC,EAAE;MACL,OAAO,IAAI;IACb;EACF;EACA,OAAO,KAAK;AACd,CAAC;AAAAtB,OAAA,CAAAuB,IAAA,GAAAA,IAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Brand.js.map b/backend/node_modules/effect/dist/cjs/Brand.js.map new file mode 100644 index 0000000000000000000000000000000000000000..186cbfe354e7c99ee6a25454042ccb966b800d2a --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Brand.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Brand.js","names":["Arr","_interopRequireWildcard","require","Either","_Function","Option","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","BrandTypeId","exports","Symbol","for","RefinedConstructorsTypeId","error","message","meta","errors","flatten","refined","args","either","length","unbranded","right","left","match","onNone","onSome","assign","getOrThrowWith","identity","option","getRight","is","isRight","nominal","some","_args","all","brands","result","brand","nextResult","isLeft","onLeft","onRight","unsafeCoerce"],"sources":["../../src/Brand.ts"],"sourcesContent":[null],"mappings":";;;;;;;;AAkBA,IAAAA,GAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAAqC,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,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D,IAAI,CAAC;MACrC,IAAIjC,MAAM,CAACyD,MAAM,CAACH,MAAM,CAAC,IAAItD,MAAM,CAACyD,MAAM,CAACD,UAAU,CAAC,EAAE;QACtDF,MAAM,GAAGtD,MAAM,CAACsC,IAAI,CAAC,CAAC,GAAGgB,MAAM,CAAChB,IAAI,EAAE,GAAGkB,UAAU,CAAClB,IAAI,CAAC,CAAC;MAC5D,CAAC,MAAM;QACLgB,MAAM,GAAGtD,MAAM,CAACyD,MAAM,CAACH,MAAM,CAAC,GAAGA,MAAM,GAAGE,UAAU;MACtD;IACF;IACA,OAAOF,MAAM;EACf,CAAC;EACD;EACA,OAAOnC,MAAM,CAACuB,MAAM,CAAET,IAAI,IACxBjC,MAAM,CAACuC,KAAK,CAACL,MAAM,CAACD,IAAI,CAAC,EAAE;IACzByB,MAAM,EAAGvD,CAAC,IAAI;MACZ,MAAMA,CAAC;IACT,CAAC;IACDwD,OAAO,EAAEf;GACV,CAAC,EAAE;IACJ,CAAClB,yBAAyB,GAAGA,yBAAyB;IACtDmB,MAAM,EAAGZ,IAAS,IAAK/B,MAAM,CAAC4C,QAAQ,CAACZ,MAAM,CAACD,IAAI,CAAC,CAAC;IACpDC,MAAM;IACNa,EAAE,EAAGd,IAAS,IAAkBjC,MAAM,CAACgD,OAAO,CAACd,MAAM,CAACD,IAAI,CAAC;GAC5D,CAAC;AACJ,CAAC;AAED;;;;;;AAAAV,OAAA,CAAA6B,GAAA,GAAAA,GAAA;AAMO,MAAMhB,SAAS,GAAAb,OAAA,CAAAa,SAAA,GAA6DwB,sBAAY","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Cache.js b/backend/node_modules/effect/dist/cjs/Cache.js new file mode 100644 index 0000000000000000000000000000000000000000..163dfdc4d3c2b5860ecfc0e5137d0a9db9f7825e --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Cache.js @@ -0,0 +1,50 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.makeWith = exports.makeEntryStats = exports.makeCacheStats = exports.make = exports.ConsumerCacheTypeId = exports.CacheTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/cache.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const CacheTypeId = exports.CacheTypeId = internal.CacheTypeId; +/** + * @since 3.6.4 + * @category symbols + */ +const ConsumerCacheTypeId = exports.ConsumerCacheTypeId = internal.ConsumerCacheTypeId; +/** + * Constructs a new cache with the specified capacity, time to live, and + * lookup function. + * + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * Constructs a new cache with the specified capacity, time to live, and + * lookup function, where the time to live can depend on the `Exit` value + * returned by the lookup function. + * + * @since 2.0.0 + * @category constructors + */ +const makeWith = exports.makeWith = internal.makeWith; +/** + * Constructs a new `CacheStats` from the specified values. + * + * @since 2.0.0 + * @category constructors + */ +const makeCacheStats = exports.makeCacheStats = internal.makeCacheStats; +/** + * Constructs a new `EntryStats` from the specified values. + * + * @since 2.0.0 + * @category constructors + */ +const makeEntryStats = exports.makeEntryStats = internal.makeEntryStats; +//# sourceMappingURL=Cache.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Cache.js.map b/backend/node_modules/effect/dist/cjs/Cache.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5b37ff8eb87ba49d53de6ea350afc5f1e5f52c66 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Cache.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Cache.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","CacheTypeId","exports","ConsumerCacheTypeId","make","makeWith","makeCacheStats","makeEntryStats"],"sources":["../../src/Cache.ts"],"sourcesContent":[null],"mappings":";;;;;;AAOA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA+C,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAK/C;;;;AAIO,MAAMkB,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAkBtB,QAAQ,CAACsB,WAAW;AAQ9D;;;;AAIO,MAAME,mBAAmB,GAAAD,OAAA,CAAAC,mBAAA,GAAkBxB,QAAQ,CAACwB,mBAAmB;AAsK9E;;;;;;;AAOO,MAAMC,IAAI,GAAAF,OAAA,CAAAE,IAAA,GAMkDzB,QAAQ,CAACyB,IAAI;AAEhF;;;;;;;;AAQO,MAAMC,QAAQ,GAAAH,OAAA,CAAAG,QAAA,GAM8C1B,QAAQ,CAAC0B,QAAQ;AAepF;;;;;;AAMO,MAAMC,cAAc,GAAAJ,OAAA,CAAAI,cAAA,GAMT3B,QAAQ,CAAC2B,cAAc;AAYzC;;;;;;AAMO,MAAMC,cAAc,GAAAL,OAAA,CAAAK,cAAA,GAAyC5B,QAAQ,CAAC4B,cAAc","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Cause.js b/backend/node_modules/effect/dist/cjs/Cause.js new file mode 100644 index 0000000000000000000000000000000000000000..e39f0dc7dc9ae87cb4de3eff9fa50e60453b6a2b --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Cause.js @@ -0,0 +1,1011 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.stripSomeDefects = exports.stripFailures = exports.squashWith = exports.squash = exports.size = exports.sequential = exports.reduceWithContext = exports.reduce = exports.prettyErrors = exports.pretty = exports.parallel = exports.originalError = exports.match = exports.map = exports.linearize = exports.keepDefects = exports.isUnknownException = exports.isTimeoutException = exports.isSequentialType = exports.isRuntimeException = exports.isParallelType = exports.isNoSuchElementException = exports.isInterruptedOnly = exports.isInterruptedException = exports.isInterrupted = exports.isInterruptType = exports.isIllegalArgumentException = exports.isFailure = exports.isFailType = exports.isExceededCapacityException = exports.isEmptyType = exports.isEmpty = exports.isDieType = exports.isDie = exports.isCause = exports.interruptors = exports.interruptOption = exports.interrupt = exports.flipCauseOption = exports.flatten = exports.flatMap = exports.find = exports.filter = exports.failures = exports.failureOrCause = exports.failureOption = exports.fail = exports.empty = exports.dieOption = exports.die = exports.defects = exports.contains = exports.as = exports.andThen = exports.YieldableError = exports.UnknownExceptionTypeId = exports.UnknownException = exports.TimeoutExceptionTypeId = exports.TimeoutException = exports.RuntimeExceptionTypeId = exports.RuntimeException = exports.NoSuchElementExceptionTypeId = exports.NoSuchElementException = exports.InvalidPubSubCapacityExceptionTypeId = exports.InterruptedExceptionTypeId = exports.InterruptedException = exports.IllegalArgumentExceptionTypeId = exports.IllegalArgumentException = exports.ExceededCapacityExceptionTypeId = exports.ExceededCapacityException = exports.CauseTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/cause.js")); +var core = _interopRequireWildcard(require("./internal/core.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * A unique symbol identifying the `Cause` type. + * + * **Details** + * + * This provides a symbol that helps identify instances of the `Cause` data + * type. This can be used for advanced operations such as refining types or + * building internal utilities that check whether an unknown value is a `Cause`. + * + * @see {@link isCause} Check if a value is a `Cause` + * + * @since 2.0.0 + * @category Symbols + */ +const CauseTypeId = exports.CauseTypeId = internal.CauseTypeId; +/** + * A unique symbol identifying the `RuntimeException` type. + * + * **Details** + * + * This provides a symbol that identifies a `RuntimeException`. This is + * typically used internally by the library to recognize checked exceptions that + * occur during runtime. + * + * @see {@link RuntimeException} Create or work with a `RuntimeException` + * + * @since 2.0.0 + * @category Symbols + */ +const RuntimeExceptionTypeId = exports.RuntimeExceptionTypeId = core.RuntimeExceptionTypeId; +/** + * A unique symbol identifying the `InterruptedException` type. + * + * **Details** + * + * This provides a symbol that identifies an `InterruptedException`. This is + * typically used internally to recognize when a fiber has been interrupted, + * helping the framework handle interruption logic correctly. + * + * @see {@link InterruptedException} Create or work with an `InterruptedException` + * + * @since 2.0.0 + * @category Symbols + */ +const InterruptedExceptionTypeId = exports.InterruptedExceptionTypeId = core.InterruptedExceptionTypeId; +/** + * A unique symbol identifying the `IllegalArgumentException` type. + * + * **Details** + * + * This provides a symbol that identifies an `IllegalArgumentException`. This is + * often used in scenarios where invalid arguments are supplied to methods that + * expect specific input. + * + * @see {@link IllegalArgumentException} Create or work with an `IllegalArgumentException` + * + * @since 2.0.0 + * @category Symbols + */ +const IllegalArgumentExceptionTypeId = exports.IllegalArgumentExceptionTypeId = core.IllegalArgumentExceptionTypeId; +/** + * A unique symbol identifying the `NoSuchElementException` type. + * + * **Details** + * + * This provides a symbol that identifies a `NoSuchElementException`. It helps + * differentiate cases where a required element is missing within a data + * structure. + * + * @see {@link NoSuchElementException} Create or work with a `NoSuchElementException` + * + * @since 2.0.0 + * @category Symbols + */ +const NoSuchElementExceptionTypeId = exports.NoSuchElementExceptionTypeId = core.NoSuchElementExceptionTypeId; +/** + * A unique symbol identifying the `InvalidPubSubCapacityException` type. + * + * **Details** + * + * This provides a symbol that identifies an `InvalidPubSubCapacityException`. + * It indicates an error related to an invalid capacity passed to a `PubSub` + * structure. + * + * @see {@link InvalidPubSubCapacityException} Create or work with an `InvalidPubSubCapacityException` + * + * @since 2.0.0 + * @category Symbols + */ +const InvalidPubSubCapacityExceptionTypeId = exports.InvalidPubSubCapacityExceptionTypeId = core.InvalidPubSubCapacityExceptionTypeId; +/** + * A unique symbol identifying the `ExceededCapacityException` type. + * + * **Details** + * + * This provides a symbol that identifies an `ExceededCapacityException`. It + * denotes situations where a resource has exceeded its configured capacity + * limit. + * + * @see {@link ExceededCapacityException} Create or work with an `ExceededCapacityException` + * + * @since 3.5.0 + * @category Symbols + */ +const ExceededCapacityExceptionTypeId = exports.ExceededCapacityExceptionTypeId = core.ExceededCapacityExceptionTypeId; +/** + * A unique symbol identifying the `TimeoutException` type. + * + * **Details** + * + * This provides a symbol that identifies a `TimeoutException`. It helps the + * framework recognize errors related to operations that fail to complete within + * a given timeframe. + * + * @see {@link TimeoutException} Create or work with a `TimeoutException` + * + * @since 2.0.0 + * @category Symbols + */ +const TimeoutExceptionTypeId = exports.TimeoutExceptionTypeId = core.TimeoutExceptionTypeId; +/** + * A unique symbol identifying the `UnknownException` type. + * + * **Details** + * + * This provides a symbol that identifies an `UnknownException`. It is typically + * used for generic or unexpected errors that do not fit other specific + * exception categories. + * + * @see {@link UnknownException} Create or work with an `UnknownException` + * + * @since 2.0.0 + * @category Symbols + */ +const UnknownExceptionTypeId = exports.UnknownExceptionTypeId = core.UnknownExceptionTypeId; +/** + * Creates an error that occurs at runtime, extendable for other exception + * types. + * + * @since 2.0.0 + * @category Errors + */ +const YieldableError = exports.YieldableError = core.YieldableError; +/** + * Creates an `Empty` cause. + * + * **Details** + * + * This function returns a cause that signifies "no error." It's commonly used + * to represent an absence of failure conditions. + * + * @see {@link isEmpty} Check if a `Cause` is empty + * + * @since 2.0.0 + * @category Constructors + */ +const empty = exports.empty = internal.empty; +/** + * Creates a `Fail` cause from an expected error. + * + * **Details** + * + * This function constructs a `Cause` carrying an error of type `E`. It's used + * when you want to represent a known or anticipated failure in your effectful + * computations. + * + * @see {@link isFailure} Check if a `Cause` contains a failure + * + * @since 2.0.0 + * @category Constructors + */ +const fail = exports.fail = internal.fail; +/** + * Creates a `Die` cause from an unexpected error. + * + * **Details** + * + * This function wraps an unhandled or unknown defect (like a runtime crash) + * into a `Cause`. It's useful for capturing unforeseen issues in a structured + * way. + * + * @see {@link isDie} Check if a `Cause` contains a defect + * + * @since 2.0.0 + * @category Constructors + */ +const die = exports.die = internal.die; +/** + * Creates an `Interrupt` cause from a `FiberId`. + * + * **Details** + * + * This function represents a fiber that has been interrupted. It stores the + * identifier of the interrupted fiber, enabling precise tracking of concurrent + * cancellations. + * + * @see {@link isInterrupted} Check if a `Cause` contains an interruption + * + * @since 2.0.0 + * @category Constructors + */ +const interrupt = exports.interrupt = internal.interrupt; +/** + * Combines two `Cause`s in parallel. + * + * **Details** + * + * This function merges two errors that occurred simultaneously. Instead of + * discarding one error, both are retained, allowing for richer error reporting + * and debugging. + * + * @see {@link isParallelType} Check if a `Cause` is a `Parallel` + * + * @since 2.0.0 + * @category Constructors + */ +const parallel = exports.parallel = internal.parallel; +/** + * Combines two `Cause`s sequentially. + * + * **Details** + * + * This function merges two errors that occurred in sequence, such as a main + * error followed by a finalization error. It preserves both errors for complete + * failure information. + * + * @see {@link isSequentialType} Check if a `Cause` is a `Sequential` + * + * @since 2.0.0 + * @category Constructors + */ +const sequential = exports.sequential = internal.sequential; +/** + * Checks if a value is a `Cause`. + * + * @since 2.0.0 + * @category Guards + */ +const isCause = exports.isCause = internal.isCause; +/** + * Checks if a `Cause` is an `Empty` type. + * + * @see {@link empty} Create a new `Empty` cause + * + * @since 2.0.0 + * @category Guards + */ +const isEmptyType = exports.isEmptyType = internal.isEmptyType; +/** + * Checks if a `Cause` is a `Fail` type. + * + * @see {@link fail} Create a new `Fail` cause + * + * @since 2.0.0 + * @category Guards + */ +const isFailType = exports.isFailType = internal.isFailType; +/** + * Checks if a `Cause` is a `Die` type. + * + * @see {@link die} Create a new `Die` cause + * + * @since 2.0.0 + * @category Guards + */ +const isDieType = exports.isDieType = internal.isDieType; +/** + * Checks if a `Cause` is an `Interrupt` type. + * + * @see {@link interrupt} Create an `Interrupt` cause + * + * @since 2.0.0 + * @category Guards + */ +const isInterruptType = exports.isInterruptType = internal.isInterruptType; +/** + * Checks if a `Cause` is a `Sequential` type. + * + * @see {@link sequential} Combine two `Cause`s sequentially + * + * @since 2.0.0 + * @category Guards + */ +const isSequentialType = exports.isSequentialType = internal.isSequentialType; +/** + * Checks if a `Cause` is a `Parallel` type. + * + * @see {@link parallel} Combine two `Cause`s in parallel + * + * @since 2.0.0 + * @category Guards + */ +const isParallelType = exports.isParallelType = internal.isParallelType; +/** + * Calculates the size of a `Cause`. + * + * **Details** + * + * This function returns the total number of `Cause` nodes in the semiring + * structure, reflecting how many individual error elements are recorded. + * + * @since 2.0.0 + * @category Getters + */ +const size = exports.size = internal.size; +/** + * Checks if a `Cause` is entirely empty. + * + * **Details** + * + * This function returns `true` if the `Cause` contains no errors, defects, or + * interruptions. It's helpful for verifying if a computation truly had no + * failures. + * + * @since 2.0.0 + * @category Getters + */ +const isEmpty = exports.isEmpty = internal.isEmpty; +/** + * Checks if a `Cause` contains a failure. + * + * **Details** + * + * This function returns `true` if the `Cause` includes any `Fail` error. It's + * commonly used to confirm whether a workflow encountered an anticipated error + * versus just defects or interruptions. + * + * @since 2.0.0 + * @category Getters + */ +const isFailure = exports.isFailure = internal.isFailure; +/** + * Checks if a `Cause` contains a defect. + * + * **Details** + * + * This function returns `true` if the `Cause` includes any unexpected or + * unhandled errors (`Die`). It's useful for differentiating known failures from + * unexpected ones. + * + * @since 2.0.0 + * @category Getters + */ +const isDie = exports.isDie = internal.isDie; +/** + * Checks if a `Cause` contains an interruption. + * + * **Details** + * + * This function returns `true` if the `Cause` includes any fiber interruptions. + * + * @since 2.0.0 + * @category Getters + */ +const isInterrupted = exports.isInterrupted = internal.isInterrupted; +/** + * Checks if a `Cause` contains only interruptions. + * + * **Details** + * + * This function returns `true` if the `Cause` has been interrupted but does not + * contain any other failures, such as `Fail` or `Die`. It's helpful for + * verifying purely "cancellation" scenarios. + * + * @since 2.0.0 + * @category Getters + */ +const isInterruptedOnly = exports.isInterruptedOnly = internal.isInterruptedOnly; +/** + * Extracts all recoverable errors of type `E` from a `Cause`. + * + * **Details** + * + * This function returns a chunk of errors, providing a list of all `Fail` + * values found in the cause. It's useful for collecting all known failures for + * logging or combined error handling. + * + * @since 2.0.0 + * @category Getters + */ +const failures = exports.failures = internal.failures; +/** + * Extracts all unrecoverable defects from a `Cause`. + * + * **Details** + * + * This function returns a chunk of values representing unexpected errors + * (`Die`). It's handy for capturing or logging unanticipated failures that + * might need special handling, such as bug reports. + * + * @since 2.0.0 + * @category Getters + */ +const defects = exports.defects = internal.defects; +/** + * Collects all `FiberId`s responsible for interrupting a fiber. + * + * **Details** + * + * This function returns a set of IDs indicating which fibers caused + * interruptions within this `Cause`. It's useful for debugging concurrency + * issues or tracing cancellations. + * + * @since 2.0.0 + * @category Getters + */ +const interruptors = exports.interruptors = internal.interruptors; +/** + * Retrieves the first `Fail` error in a `Cause`, if present. + * + * **Details** + * + * This function returns an `Option` containing the first recoverable error + * (`E`) from the cause. It's often used to quickly check if there's a primary + * error to handle or display. + * + * @since 2.0.0 + * @category Getters + */ +const failureOption = exports.failureOption = internal.failureOption; +/** + * Splits a `Cause` into either its first `Fail` error or the rest of the cause + * (which might only contain `Die` or `Interrupt`). + * + * **Details** + * + * This function either returns the checked error (`E`) or the remaining + * `Cause` with defects/interruptions. It helps you decide if there's a + * recoverable path or if only unhandled issues remain. + * + * @since 2.0.0 + * @category Getters + */ +const failureOrCause = exports.failureOrCause = internal.failureOrCause; +/** + * Strips out failures with an error of `None` from a `Cause>`. + * + * **Details** + * + * This function turns a `Cause>` into an `Option>`. If the + * cause only contains failures of `None`, it becomes `None`; otherwise, it + * returns a `Cause` of the remaining errors. It's helpful when working with + * optional errors and filtering out certain error paths. + * + * @since 2.0.0 + * @category Getters + */ +const flipCauseOption = exports.flipCauseOption = internal.flipCauseOption; +/** + * Retrieves the first `Die` defect in a `Cause`, if present. + * + * **Details** + * + * This function returns an `Option` containing the first unexpected failure + * (`Die`) discovered. It's helpful for diagnosing the primary defect in a chain + * of errors. + * + * @since 2.0.0 + * @category Getters + */ +const dieOption = exports.dieOption = internal.dieOption; +/** + * Retrieves the first `Interrupt` in a `Cause`, if present. + * + * **Details** + * + * This function returns an `Option` with the first fiber interruption + * discovered. This is particularly useful for concurrency analysis or debugging + * cancellations. + * + * @since 2.0.0 + * @category Getters + */ +const interruptOption = exports.interruptOption = internal.interruptOption; +/** + * Removes all `Fail` and `Interrupt` nodes, keeping only defects (`Die`) in a + * `Cause`. + * + * **Details** + * + * This function strips a cause of recoverable errors and interruptions, leaving + * only unexpected failures. If no defects remain, it returns `None`. It's + * valuable for focusing only on unanticipated problems when both known errors + * and defects could occur. + * + * @since 2.0.0 + * @category Getters + */ +const keepDefects = exports.keepDefects = internal.keepDefects; +// TODO(4.0): remove? what's the point of this API? +/** + * Linearizes a `Cause` into a set of parallel causes, each containing a + * sequential chain of failures. + * + * **Details** + * + * This function reorganizes the cause structure so that you can analyze each + * parallel branch separately, even if they have multiple sequential errors. + * + * @since 2.0.0 + * @category Getters + */ +const linearize = exports.linearize = internal.linearize; +/** + * Removes `Fail` and `Interrupt` nodes from a `Cause`, keeping only defects + * (`Die`). + * + * **Details** + * + * This function is similar to `keepDefects` but returns a `Cause` + * directly, which can still store `Die` or finalizer-related defects. It's + * helpful for analyzing only the irrecoverable portion of the error. + * + * @since 2.0.0 + * @category Getters + */ +const stripFailures = exports.stripFailures = internal.stripFailures; +/** + * Removes matching defects from a `Cause` using a partial function, returning + * the remainder. + * + * **Details** + * + * This function applies a user-defined extraction function to each defect + * (`Die`). If the function matches the defect, that defect is removed. If all + * defects match, the result is `None`. Otherwise, you get a `Cause` with the + * unmatched defects. + * + * @since 2.0.0 + * @category Getters + */ +const stripSomeDefects = exports.stripSomeDefects = internal.stripSomeDefects; +/** + * Replaces any errors in a `Cause` with a provided constant error. + * + * **Details** + * + * This function transforms all `Fail` errors into the specified error value, + * preserving the structure of the `Cause`. It's useful when you no longer need + * the original error details but still want to keep the cause shape. + * + * @see {@link map} Apply a custom transformation to `Fail` errors + * + * @since 2.0.0 + * @category Mapping + */ +const as = exports.as = internal.as; +/** + * Transforms the errors in a `Cause` using a user-provided function. + * + * **Details** + * + * This function applies `f` to each `Fail` error while leaving defects (`Die`) + * and interruptions untouched. It's useful for changing or simplifying error + * types in your effectful workflows. + * + * @see {@link as} Replace errors with a single constant + * + * @since 2.0.0 + * @category Mapping + */ +const map = exports.map = internal.map; +/** + * Transforms errors in a `Cause` into new causes. + * + * **Details** + * + * This function applies a function `f` to each `Fail` error, converting it into + * a new `Cause`. This is especially powerful for merging or restructuring error + * types while preserving or combining cause information. + * + * @see {@link map} Apply a simpler transformation to errors + * + * @since 2.0.0 + * @category Sequencing + */ +const flatMap = exports.flatMap = internal.flatMap; +/** + * Sequences two `Cause`s. The second `Cause` can be dependent on the result of + * the first `Cause`. + * + * @since 2.0.0 + * @category Sequencing + */ +const andThen = exports.andThen = internal.andThen; +/** + * Flattens a nested `Cause` structure. + * + * **Details** + * + * This function takes a `Cause>` and merges the layers into a single + * `Cause`. It's useful for eliminating additional nesting created by + * repeated transformations or compositions. + * + * @see {@link flatMap} Compose nested causes + * + * @since 2.0.0 + * @category Sequencing + */ +const flatten = exports.flatten = internal.flatten; +/** + * Checks if the current `Cause` contains or is equal to another `Cause`. + * + * **Details** + * + * This function returns `true` if `that` cause is part of or the same as + * the current `Cause`. It's useful when you need to check for specific + * error patterns or deduplicate repeated failures. + * + * @since 2.0.0 + * @category Elements + */ +const contains = exports.contains = internal.contains; +/** + * Extracts the most "important" defect from a `Cause`. + * + * **Details** + * + * This function reduces a `Cause` to a single, prioritized defect. It evaluates + * the `Cause` in the following order of priority: + * + * 1. If the `Cause` contains a failure (e.g., from `Effect.fail`), it returns + * the raw error value. + * 2. If there is no failure, it looks for the first defect (e.g., from + * `Effect.die`). + * 3. If neither of the above is present, and the `Cause` stems from an + * interruption, it creates and returns an `InterruptedException`. + * + * This function ensures you can always extract a meaningful representation of + * the primary issue from a potentially complex `Cause` structure. + * + * **When to Use** + * + * Use this function when you need to extract the most relevant error or defect + * from a `Cause`, especially in scenarios where multiple errors or defects may + * be present. It's particularly useful for simplifying error reporting or + * logging. + * + * @see {@link squashWith} Allows transforming failures into defects when squashing. + * + * @since 2.0.0 + * @category Destructors + */ +const squash = exports.squash = core.causeSquash; +/** + * Extracts the most "important" defect from a `Cause`, transforming failures + * into defects using a provided function. + * + * **Details** + * + * This function reduces a `Cause` to a single, prioritized defect, while + * allowing you to transform recoverable failures into defects through a custom + * function. It processes the `Cause` in the following order: + * + * 1. If the `Cause` contains a failure (e.g., from `Effect.fail`), it applies + * the provided function `f` to the error to transform it into a defect. + * 2. If there is no failure, it looks for the first defect (e.g., from + * `Effect.die`) and returns it. + * 3. If neither is present and the `Cause` stems from an interruption, it + * returns an `InterruptedException`. + * + * This function is particularly useful when you need custom handling or + * transformation of errors while processing a `Cause`. + * + * @see {@link squash} Extracts the most "important" defect without transforming failures. + * + * @since 2.0.0 + * @category Destructors + */ +const squashWith = exports.squashWith = core.causeSquashWith; +/** + * Searches a `Cause` using a partial function to extract information. + * + * **Details** + * + * This function allows you to search through a `Cause` using a custom partial + * function. The partial function is applied to the `Cause`, and if it matches, + * the result is returned wrapped in a `Some`. If no match is found, the result + * is `None`. + * + * This is particularly useful when you are only interested in specific types of + * errors, defects, or interruption causes within a potentially complex `Cause` + * structure. By leveraging a partial function, you can focus on extracting only + * the relevant information you care about. + * + * The partial function should return an `Option` indicating whether it matched + * and the value it extracted. + * + * @since 2.0.0 + * @category Elements + */ +const find = exports.find = internal.find; +/** + * Preserves parts of a `Cause` that match a given predicate. + * + * **Details** + * + * This function allows you to retain only the parts of a `Cause` structure that + * match a specified predicate or refinement. Any parts of the `Cause` that do + * not match the provided condition are excluded from the result. + * + * You can use this function in two ways: + * - With a `Predicate`: A function that evaluates whether a `Cause` should be + * retained based on its value. + * - With a `Refinement`: A more specific predicate that can refine the type of + * the `Cause`. + * + * This is useful when you need to extract specific types of errors, defects, or + * interruptions from a `Cause` while discarding unrelated parts. + * + * @since 2.0.0 + * @category Filtering + */ +const filter = exports.filter = internal.filter; +/** + * Transforms a `Cause` into a single value using custom handlers for each + * possible case. + * + * **Details** + * + * This function processes a `Cause` by applying a set of custom handlers to + * each possible type of cause: `Empty`, `Fail`, `Die`, `Interrupt`, + * `Sequential`, and `Parallel`. The result of this function is a single value + * of type `Z`. This function allows you to define exactly how to handle each + * part of a `Cause`, whether it's a failure, defect, interruption, or a + * combination of these. + * + * The options parameter provides handlers for: + * - `onEmpty`: Handles the case where the cause is `Empty`, meaning no errors + * occurred. + * - `onFail`: Processes a failure with an error of type `E`. + * - `onDie`: Processes a defect (unexpected error). + * - `onInterrupt`: Handles a fiber interruption, providing the `FiberId` of the + * interruption. + * - `onSequential`: Combines two sequential causes into a single value of type + * `Z`. + * - `onParallel`: Combines two parallel causes into a single value of type `Z`. + * + * @since 2.0.0 + * @category Matching + */ +const match = exports.match = internal.match; +/** + * Combines all parts of a `Cause` into a single value by starting with an + * initial value. + * + * **Details** + * + * This function processes a `Cause` by starting with an initial value (`zero`) + * and applying a custom function (`pf`) to combine all elements of the `Cause` + * into a single result of type `Z`. The custom function determines how each + * part of the `Cause` contributes to the final result. The function can return + * an `Option` to either continue combining values or skip specific parts of the + * `Cause`. + * + * This function is useful for tasks such as: + * - Aggregating error messages from a `Cause` into a single string. + * - Summarizing the structure of a `Cause` into a simplified result. + * - Filtering or processing only specific parts of a `Cause`. + * + * The reduction proceeds in a top-down manner, visiting all nodes in the + * `Cause` structure. This gives you complete control over how each part of the + * `Cause` contributes to the final result. + * + * @since 2.0.0 + * @category Reducing + */ +const reduce = exports.reduce = internal.reduce; +/** + * Combines all parts of a `Cause` into a single value using a custom reducer + * and a context. + * + * **Details** + * + * This function allows you to reduce a `Cause` into a single value of type `Z` + * using a custom `CauseReducer`. A `CauseReducer` provides methods to handle + * specific parts of the `Cause`, such as failures, defects, or interruptions. + * Additionally, this function provides access to a `context` value, which can + * be used to carry information or maintain state during the reduction process. + * + * This is particularly useful when the reduction process needs additional + * context or configuration, such as: + * - Aggregating error details with dynamic formatting. + * - Collecting logs or statistics about the `Cause`. + * - Performing stateful transformations based on the `context`. + * + * @see {@link reduce} To reduce a `Cause` without additional context. + * + * @since 2.0.0 + * @category Reducing + */ +const reduceWithContext = exports.reduceWithContext = internal.reduceWithContext; +/** + * Creates an error that indicates a `Fiber` was interrupted. + * + * **Details** + * + * This function constructs an `InterruptedException` recognized by the Effect + * runtime. It is usually thrown or returned when a fiber's execution is + * interrupted by external events or by another fiber. This is particularly + * helpful in concurrent programs where fibers may halt each other before + * completion. + * + * @since 2.0.0 + * @category Errors + */ +const InterruptedException = exports.InterruptedException = core.InterruptedException; +/** + * Checks if a given unknown value is an `InterruptedException`. + * + * @since 2.0.0 + * @category Guards + */ +const isInterruptedException = exports.isInterruptedException = core.isInterruptedException; +/** + * Creates an error indicating an invalid method argument. + * + * **Details** + * + * This function constructs an `IllegalArgumentException`. It is typically + * thrown or returned when an operation receives improper inputs, such as + * out-of-range values or invalid object states. + * + * @since 2.0.0 + * @category Errors + */ +const IllegalArgumentException = exports.IllegalArgumentException = core.IllegalArgumentException; +/** + * Checks if a given unknown value is an `IllegalArgumentException`. + * + * @since 2.0.0 + * @category Guards + */ +const isIllegalArgumentException = exports.isIllegalArgumentException = core.isIllegalArgumentException; +/** + * Creates an error indicating a missing element. + * + * **Details** + * + * This function constructs a `NoSuchElementException`. It helps you clearly + * communicate that a required element is unavailable. + * + * @since 2.0.0 + * @category Errors + */ +const NoSuchElementException = exports.NoSuchElementException = core.NoSuchElementException; +/** + * Checks if a given unknown value is a `NoSuchElementException`. + * + * @since 2.0.0 + * @category Guards + */ +const isNoSuchElementException = exports.isNoSuchElementException = core.isNoSuchElementException; +/** + * Creates an error for general runtime errors. + * + * **Details** + * + * This function constructs a `RuntimeException`, for errors that occur at + * runtime but are not specifically typed or categorized as interruptions, + * missing elements, or invalid arguments. It helps unify a wide range of + * unexpected conditions under a single, recognizable error type. + * + * @since 2.0.0 + * @category Errors + */ +const RuntimeException = exports.RuntimeException = core.RuntimeException; +/** + * Checks if a given unknown value is a `RuntimeException`. + * + * @since 2.0.0 + * @category Guards + */ +const isRuntimeException = exports.isRuntimeException = core.isRuntimeException; +/** + * Creates an error for operations that exceed their expected time. + * + * **Details** + * + * This function constructs a `TimeoutException`. It is typically used to signal + * that an operation or fiber did not complete within a designated time limit, + * allowing you to handle slow or hanging processes. + * + * @since 2.0.0 + * @category Errors + */ +const TimeoutException = exports.TimeoutException = core.TimeoutException; +/** + * Checks if a given unknown value is a `TimeoutException`. + * + * @since 3.15.0 + * @category Guards + */ +const isTimeoutException = exports.isTimeoutException = core.isTimeoutException; +/** + * Creates an instance of `UnknownException`, an error object used to handle + * unknown errors such as those from rejected promises. + * + * **Details** + * + * This function constructs an `UnknownException` with flexible behavior for + * managing the error message and cause. + * + * The required `error` argument is passed as the `cause` to the global `Error` + * constructor, ensuring that the original cause is preserved in the error chain + * for debugging purposes. This ensures that the origin stack trace is + * preserved. + * + * The `error` argument is always stored in the `error` property of the + * `UnknownException` instance for reference, regardless of its type. + * + * Additionally, if you provide a `message` argument, it is used as the error + * message. If no `message` is provided, the error message defaults to `"An + * unknown error occurred"`. + * + * **When to Use** + * + * Use this function when you need to handle unexpected or unknown errors in + * your application, particularly when the source of the error might not provide + * a clear message. This is useful for wrapping generic errors thrown from + * promises or external APIs. + * + * @since 2.0.0 + * @category Errors + */ +const UnknownException = exports.UnknownException = core.UnknownException; +/** + * Checks if a given unknown value is an `UnknownException`. + * + * @since 2.0.0 + * @category Guards + */ +const isUnknownException = exports.isUnknownException = core.isUnknownException; +/** + * Creates an error indicating resource capacity has been exceeded. + * + * **Details** + * + * This function constructs an `ExceededCapacityException`, signifying that an + * operation or resource usage surpassed established limits. This can be + * essential for concurrency or resource management situations, ensuring your + * application doesn't go beyond acceptable thresholds. + * + * @since 3.5.0 + * @category Errors + */ +const ExceededCapacityException = exports.ExceededCapacityException = core.ExceededCapacityException; +/** + * Checks if a given unknown value is an `ExceededCapacityException`. + * + * @since 3.5.0 + * @category Guards + */ +const isExceededCapacityException = exports.isExceededCapacityException = core.isExceededCapacityException; +/** + * Converts a `Cause` into a human-readable string. + * + * **Details** + * + * This function pretty-prints the entire `Cause`, including any failures, + * defects, and interruptions. It can be especially helpful for logging, + * debugging, or displaying structured errors to users. + * + * You can optionally pass `options` to configure how the error cause is + * rendered. By default, it includes essential details of all errors in the + * `Cause`. + * + * @see {@link prettyErrors} Get a list of `PrettyError` objects instead of a single string. + * + * @since 2.0.0 + * @category Formatting + */ +const pretty = exports.pretty = internal.pretty; +/** + * Returns a list of prettified errors (`PrettyError`) from a `Cause`. + * + * **Details** + * + * This function inspects the entire `Cause` and produces an array of + * `PrettyError` objects. Each object may include additional metadata, such as a + * `Span`, to provide deeper insights into where and how the error occurred. + * + * @since 3.2.0 + * @category Formatting + */ +const prettyErrors = exports.prettyErrors = internal.prettyErrors; +/** + * Retrieves the original, unproxied error instance from an error object. + * + * **Details** + * + * This function returns the underlying error object without any + * library-specific wrapping or proxying that might occur during error handling. + * This can be essential if you need direct access to the error's native + * properties, such as stack traces or custom data fields, for detailed + * debugging or integration with external systems. + * + * @since 2.0.0 + * @category Errors + */ +const originalError = exports.originalError = core.originalInstance; +//# sourceMappingURL=Cause.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Cause.js.map b/backend/node_modules/effect/dist/cjs/Cause.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f87cd4ca180a2aa9cc0d4e290d55a0414e5d4842 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Cause.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Cause.js","names":["internal","_interopRequireWildcard","require","core","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","CauseTypeId","exports","RuntimeExceptionTypeId","InterruptedExceptionTypeId","IllegalArgumentExceptionTypeId","NoSuchElementExceptionTypeId","InvalidPubSubCapacityExceptionTypeId","ExceededCapacityExceptionTypeId","TimeoutExceptionTypeId","UnknownExceptionTypeId","YieldableError","empty","fail","die","interrupt","parallel","sequential","isCause","isEmptyType","isFailType","isDieType","isInterruptType","isSequentialType","isParallelType","size","isEmpty","isFailure","isDie","isInterrupted","isInterruptedOnly","failures","defects","interruptors","failureOption","failureOrCause","flipCauseOption","dieOption","interruptOption","keepDefects","linearize","stripFailures","stripSomeDefects","as","map","flatMap","andThen","flatten","contains","squash","causeSquash","squashWith","causeSquashWith","find","filter","match","reduce","reduceWithContext","InterruptedException","isInterruptedException","IllegalArgumentException","isIllegalArgumentException","NoSuchElementException","isNoSuchElementException","RuntimeException","isRuntimeException","TimeoutException","isTimeoutException","UnknownException","isUnknownException","ExceededCapacityException","isExceededCapacityException","pretty","prettyErrors","originalError","originalInstance"],"sources":["../../src/Cause.ts"],"sourcesContent":[null],"mappings":";;;;;;AA+BA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAF,uBAAA,CAAAC,OAAA;AAA0C,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,C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,OAAA,CAAAwE,aAAA,GAAqB7F,IAAI,CAAC8F,gBAAgB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Channel.js b/backend/node_modules/effect/dist/cjs/Channel.js new file mode 100644 index 0000000000000000000000000000000000000000..ba35eb41f4be19cb5b34d4cbd7ef306d1b960dc1 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Channel.js @@ -0,0 +1,889 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.toSink = exports.toQueue = exports.toPullIn = exports.toPull = exports.toPubSub = exports.sync = exports.suspend = exports.succeed = exports.splitLines = exports.scopedWith = exports.scoped = exports.runScoped = exports.runDrain = exports.runCollect = exports.run = exports.repeated = exports.readWithCause = exports.readWith = exports.readOrFail = exports.read = exports.provideSomeLayer = exports.provideService = exports.provideLayer = exports.provideContext = exports.pipeToOrFail = exports.pipeTo = exports.orElse = exports.orDieWith = exports.orDie = exports.never = exports.mergeWith = exports.mergeOutWith = exports.mergeOut = exports.mergeMap = exports.mergeAllWith = exports.mergeAllUnboundedWith = exports.mergeAllUnbounded = exports.mergeAll = exports.mapOutEffectPar = exports.mapOutEffect = exports.mapOut = exports.mapInputInEffect = exports.mapInputIn = exports.mapInputErrorEffect = exports.mapInputError = exports.mapInputEffect = exports.mapInputContext = exports.mapInput = exports.mapErrorCause = exports.mapError = exports.mapEffect = exports.map = exports.isChannelException = exports.isChannel = exports.interruptWhenDeferred = exports.interruptWhen = exports.identity = exports.fromQueue = exports.fromPubSubScoped = exports.fromPubSub = exports.fromOption = exports.fromInput = exports.fromEither = exports.fromEffect = exports.foldChannel = exports.foldCauseChannel = exports.flatten = exports.flatMap = exports.failSync = exports.failCauseSync = exports.failCause = exports.fail = exports.ensuringWith = exports.ensuring = exports.emitCollect = exports.embedInput = exports.drain = exports.doneCollect = exports.contextWithEffect = exports.contextWithChannel = exports.contextWith = exports.context = exports.concatOut = exports.concatMapWithCustom = exports.concatMapWith = exports.concatMap = exports.concatAllWith = exports.concatAll = exports.collect = exports.catchAllCause = exports.catchAll = exports.bufferChunk = exports.buffer = exports.asVoid = exports.as = exports.acquireUseRelease = exports.acquireReleaseOut = exports.ChannelTypeId = exports.ChannelExceptionTypeId = exports.ChannelException = void 0; +exports.zipRight = exports.zipLeft = exports.zip = exports.writeChunk = exports.writeAll = exports.write = exports.withSpan = exports.void = exports.updateService = exports.unwrapScopedWith = exports.unwrapScoped = exports.unwrap = exports.toStream = void 0; +var channel = _interopRequireWildcard(require("./internal/channel.js")); +var core = _interopRequireWildcard(require("./internal/core-stream.js")); +var sink = _interopRequireWildcard(require("./internal/sink.js")); +var stream = _interopRequireWildcard(require("./internal/stream.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const ChannelTypeId = exports.ChannelTypeId = core.ChannelTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +const ChannelExceptionTypeId = exports.ChannelExceptionTypeId = channel.ChannelExceptionTypeId; +/** + * @since 3.5.4 + * @category refinements + */ +const isChannel = exports.isChannel = core.isChannel; +/** + * @since 2.0.0 + * @category constructors + */ +const acquireUseRelease = exports.acquireUseRelease = channel.acquireUseRelease; +/** + * @since 2.0.0 + * @category constructors + */ +const acquireReleaseOut = exports.acquireReleaseOut = core.acquireReleaseOut; +/** + * Returns a new channel that is the same as this one, except the terminal + * value of the channel is the specified constant value. + * + * This method produces the same result as mapping this channel to the + * specified constant value. + * + * @since 2.0.0 + * @category mapping + */ +const as = exports.as = channel.as; +/** + * @since 2.0.0 + * @category mapping + */ +const asVoid = exports.asVoid = channel.asVoid; +/** + * Creates a channel backed by a buffer. When the buffer is empty, the channel + * will simply passthrough its input as output. However, when the buffer is + * non-empty, the value inside the buffer will be passed along as output. + * + * @since 2.0.0 + * @category constructors + */ +const buffer = exports.buffer = channel.buffer; +/** + * @since 2.0.0 + * @category constructors + */ +const bufferChunk = exports.bufferChunk = channel.bufferChunk; +/** + * Returns a new channel that is the same as this one, except if this channel + * errors for any typed error, then the returned channel will switch over to + * using the fallback channel returned by the specified error handler. + * + * @since 2.0.0 + * @category error handling + */ +const catchAll = exports.catchAll = channel.catchAll; +/** + * Returns a new channel that is the same as this one, except if this channel + * errors for any typed error, then the returned channel will switch over to + * using the fallback channel returned by the specified error handler. + * + * @since 2.0.0 + * @category error handling + */ +const catchAllCause = exports.catchAllCause = core.catchAllCause; +/** + * Concat sequentially a channel of channels. + * + * @since 2.0.0 + * @category constructors + */ +const concatAll = exports.concatAll = core.concatAll; +/** + * Concat sequentially a channel of channels. + * + * @since 2.0.0 + * @category constructors + */ +const concatAllWith = exports.concatAllWith = core.concatAllWith; +/** + * Returns a new channel whose outputs are fed to the specified factory + * function, which creates new channels in response. These new channels are + * sequentially concatenated together, and all their outputs appear as outputs + * of the newly returned channel. + * + * @since 2.0.0 + * @category utils + */ +const concatMap = exports.concatMap = channel.concatMap; +/** + * Returns a new channel whose outputs are fed to the specified factory + * function, which creates new channels in response. These new channels are + * sequentially concatenated together, and all their outputs appear as outputs + * of the newly returned channel. The provided merging function is used to + * merge the terminal values of all channels into the single terminal value of + * the returned channel. + * + * @since 2.0.0 + * @category utils + */ +const concatMapWith = exports.concatMapWith = core.concatMapWith; +/** + * Returns a new channel whose outputs are fed to the specified factory + * function, which creates new channels in response. These new channels are + * sequentially concatenated together, and all their outputs appear as outputs + * of the newly returned channel. The provided merging function is used to + * merge the terminal values of all channels into the single terminal value of + * the returned channel. + * + * @since 2.0.0 + * @category utils + */ +const concatMapWithCustom = exports.concatMapWithCustom = core.concatMapWithCustom; +/** + * Returns a new channel, which is the same as this one, except its outputs + * are filtered and transformed by the specified partial function. + * + * @since 2.0.0 + * @category utils + */ +const collect = exports.collect = channel.collect; +/** + * Returns a new channel, which is the concatenation of all the channels that + * are written out by this channel. This method may only be called on channels + * that output other channels. + * + * @since 2.0.0 + * @category utils + */ +const concatOut = exports.concatOut = channel.concatOut; +/** + * Returns a new channel which is the same as this one but applies the given + * function to the input channel's done value. + * + * @since 2.0.0 + * @category utils + */ +const mapInput = exports.mapInput = channel.mapInput; +/** + * Returns a new channel which is the same as this one but applies the given + * effectual function to the input channel's done value. + * + * @since 2.0.0 + * @category utils + */ +const mapInputEffect = exports.mapInputEffect = channel.mapInputEffect; +/** + * Returns a new channel which is the same as this one but applies the given + * function to the input channel's error value. + * + * @since 2.0.0 + * @category utils + */ +const mapInputError = exports.mapInputError = channel.mapInputError; +/** + * Returns a new channel which is the same as this one but applies the given + * effectual function to the input channel's error value. + * + * @since 2.0.0 + * @category utils + */ +const mapInputErrorEffect = exports.mapInputErrorEffect = channel.mapInputErrorEffect; +/** + * Returns a new channel which is the same as this one but applies the given + * function to the input channel's output elements. + * + * @since 2.0.0 + * @category utils + */ +const mapInputIn = exports.mapInputIn = channel.mapInputIn; +/** + * Returns a new channel which is the same as this one but applies the given + * effectual function to the input channel's output elements. + * + * @since 2.0.0 + * @category utils + */ +const mapInputInEffect = exports.mapInputInEffect = channel.mapInputInEffect; +/** + * Returns a new channel, which is the same as this one, except that all the + * outputs are collected and bundled into a tuple together with the terminal + * value of this channel. + * + * As the channel returned from this channel collects all of this channel's + * output into an in- memory chunk, it is not safe to call this method on + * channels that output a large or unbounded number of values. + * + * @since 2.0.0 + * @category utils + */ +const doneCollect = exports.doneCollect = channel.doneCollect; +/** + * Returns a new channel which reads all the elements from upstream's output + * channel and ignores them, then terminates with the upstream result value. + * + * @since 2.0.0 + * @category utils + */ +const drain = exports.drain = channel.drain; +/** + * Returns a new channel which connects the given `AsyncInputProducer` as + * this channel's input. + * + * @since 2.0.0 + * @category utils + */ +const embedInput = exports.embedInput = core.embedInput; +/** + * Returns a new channel that collects the output and terminal value of this + * channel, which it then writes as output of the returned channel. + * + * @since 2.0.0 + * @category utils + */ +const emitCollect = exports.emitCollect = channel.emitCollect; +/** + * Returns a new channel with an attached finalizer. The finalizer is + * guaranteed to be executed so long as the channel begins execution (and + * regardless of whether or not it completes). + * + * @since 2.0.0 + * @category utils + */ +const ensuring = exports.ensuring = channel.ensuring; +/** + * Returns a new channel with an attached finalizer. The finalizer is + * guaranteed to be executed so long as the channel begins execution (and + * regardless of whether or not it completes). + * + * @since 2.0.0 + * @category utils + */ +const ensuringWith = exports.ensuringWith = core.ensuringWith; +/** + * Accesses the whole context of the channel. + * + * @since 2.0.0 + * @category context + */ +const context = exports.context = channel.context; +/** + * Accesses the context of the channel with the specified function. + * + * @since 2.0.0 + * @category context + */ +const contextWith = exports.contextWith = channel.contextWith; +/** + * Accesses the context of the channel in the context of a channel. + * + * @since 2.0.0 + * @category context + */ +const contextWithChannel = exports.contextWithChannel = channel.contextWithChannel; +/** + * Accesses the context of the channel in the context of an effect. + * + * @since 2.0.0 + * @category context + */ +const contextWithEffect = exports.contextWithEffect = channel.contextWithEffect; +/** + * Constructs a channel that fails immediately with the specified error. + * + * @since 2.0.0 + * @category constructors + */ +const fail = exports.fail = core.fail; +/** + * Constructs a channel that succeeds immediately with the specified lazily + * evaluated value. + * + * @since 2.0.0 + * @category constructors + */ +const failSync = exports.failSync = core.failSync; +/** + * Constructs a channel that fails immediately with the specified `Cause`. + * + * @since 2.0.0 + * @category constructors + */ +const failCause = exports.failCause = core.failCause; +/** + * Constructs a channel that succeeds immediately with the specified lazily + * evaluated `Cause`. + * + * @since 2.0.0 + * @category constructors + */ +const failCauseSync = exports.failCauseSync = core.failCauseSync; +/** + * Returns a new channel, which sequentially combines this channel, together + * with the provided factory function, which creates a second channel based on + * the terminal value of this channel. The result is a channel that will first + * perform the functions of this channel, before performing the functions of + * the created channel (including yielding its terminal value). + * + * @since 2.0.0 + * @category sequencing + */ +const flatMap = exports.flatMap = core.flatMap; +/** + * Returns a new channel, which flattens the terminal value of this channel. + * This function may only be called if the terminal value of this channel is + * another channel of compatible types. + * + * @since 2.0.0 + * @category sequencing + */ +const flatten = exports.flatten = channel.flatten; +/** + * Folds over the result of this channel. + * + * @since 2.0.0 + * @category utils + */ +const foldChannel = exports.foldChannel = channel.foldChannel; +/** + * Folds over the result of this channel including any cause of termination. + * + * @since 2.0.0 + * @category utils + */ +const foldCauseChannel = exports.foldCauseChannel = core.foldCauseChannel; +/** + * Use an effect to end a channel. + * + * @since 2.0.0 + * @category constructors + */ +const fromEffect = exports.fromEffect = core.fromEffect; +/** + * Constructs a channel from an `Either`. + * + * @since 2.0.0 + * @category constructors + */ +const fromEither = exports.fromEither = channel.fromEither; +/** + * Construct a `Channel` from an `AsyncInputConsumer`. + * + * @since 2.0.0 + * @category constructors + */ +const fromInput = exports.fromInput = channel.fromInput; +/** + * Construct a `Channel` from a `PubSub`. + * + * @since 2.0.0 + * @category constructors + */ +const fromPubSub = exports.fromPubSub = channel.fromPubSub; +/** + * Construct a `Channel` from a `PubSub` within a scoped effect. + * + * @since 2.0.0 + * @category constructors + */ +const fromPubSubScoped = exports.fromPubSubScoped = channel.fromPubSubScoped; +/** + * Construct a `Channel` from an `Option`. + * + * @since 2.0.0 + * @category constructors + */ +const fromOption = exports.fromOption = channel.fromOption; +/** + * Construct a `Channel` from a `Queue`. + * + * @since 2.0.0 + * @category constructors + */ +const fromQueue = exports.fromQueue = channel.fromQueue; +/** + * @since 2.0.0 + * @category constructors + */ +const identity = exports.identity = channel.identityChannel; +/** + * Returns a new channel, which is the same as this one, except it will be + * interrupted when the specified effect completes. If the effect completes + * successfully before the underlying channel is done, then the returned + * channel will yield the success value of the effect as its terminal value. + * On the other hand, if the underlying channel finishes first, then the + * returned channel will yield the success value of the underlying channel as + * its terminal value. + * + * @since 2.0.0 + * @category utils + */ +const interruptWhen = exports.interruptWhen = channel.interruptWhen; +/** + * Returns a new channel, which is the same as this one, except it will be + * interrupted when the specified deferred is completed. If the deferred is + * completed before the underlying channel is done, then the returned channel + * will yield the value of the deferred. Otherwise, if the underlying channel + * finishes first, then the returned channel will yield the value of the + * underlying channel. + * + * @since 2.0.0 + * @category utils + */ +const interruptWhenDeferred = exports.interruptWhenDeferred = channel.interruptWhenDeferred; +/** + * Returns a new channel, which is the same as this one, except the terminal + * value of the returned channel is created by applying the specified function + * to the terminal value of this channel. + * + * @since 2.0.0 + * @category mapping + */ +const map = exports.map = channel.map; +/** + * Returns a new channel, which is the same as this one, except the terminal + * value of the returned channel is created by applying the specified + * effectful function to the terminal value of this channel. + * + * @since 2.0.0 + * @category mapping + */ +const mapEffect = exports.mapEffect = channel.mapEffect; +/** + * Returns a new channel, which is the same as this one, except the failure + * value of the returned channel is created by applying the specified function + * to the failure value of this channel. + * + * @since 2.0.0 + * @category mapping + */ +const mapError = exports.mapError = channel.mapError; +/** + * A more powerful version of `mapError` which also surfaces the `Cause` + * of the channel failure. + * + * @since 2.0.0 + * @category mapping + */ +const mapErrorCause = exports.mapErrorCause = channel.mapErrorCause; +/** + * Maps the output of this channel using the specified function. + * + * @since 2.0.0 + * @category mapping + */ +const mapOut = exports.mapOut = channel.mapOut; +/** + * Creates a channel that is like this channel but the given effectful function + * gets applied to each emitted output element. + * + * @since 2.0.0 + * @category mapping + */ +const mapOutEffect = exports.mapOutEffect = channel.mapOutEffect; +/** + * Creates a channel that is like this channel but the given Effect function gets + * applied to each emitted output element, taking `n` elements at once and + * mapping them in parallel. + * + * @since 2.0.0 + * @category mapping + */ +const mapOutEffectPar = exports.mapOutEffectPar = channel.mapOutEffectPar; +/** + * @since 2.0.0 + * @category utils + */ +const mergeAll = exports.mergeAll = channel.mergeAll; +/** + * @since 2.0.0 + * @category utils + */ +const mergeAllUnbounded = exports.mergeAllUnbounded = channel.mergeAllUnbounded; +/** + * @since 2.0.0 + * @category utils + */ +const mergeAllUnboundedWith = exports.mergeAllUnboundedWith = channel.mergeAllUnboundedWith; +/** + * @since 2.0.0 + * @category utils + */ +const mergeAllWith = exports.mergeAllWith = channel.mergeAllWith; +/** + * Returns a new channel which creates a new channel for each emitted element + * and merges some of them together. Different merge strategies control what + * happens if there are more than the given maximum number of channels gets + * created. See `Channel.mergeAll`. + * + * @since 2.0.0 + * @category mapping + */ +const mergeMap = exports.mergeMap = channel.mergeMap; +/** + * Returns a new channel which merges a number of channels emitted by this + * channel using the back pressuring merge strategy. See `Channel.mergeAll`. + * + * @since 2.0.0 + * @category utils + */ +const mergeOut = exports.mergeOut = channel.mergeOut; +/** + * Returns a new channel which merges a number of channels emitted by this + * channel using the back pressuring merge strategy and uses a given function + * to merge each completed subchannel's result value. See + * `Channel.mergeAll`. + * + * @since 2.0.0 + * @category utils + */ +const mergeOutWith = exports.mergeOutWith = channel.mergeOutWith; +/** + * Returns a new channel, which is the merge of this channel and the specified + * channel, where the behavior of the returned channel on left or right early + * termination is decided by the specified `leftDone` and `rightDone` merge + * decisions. + * + * @since 2.0.0 + * @category utils + */ +const mergeWith = exports.mergeWith = channel.mergeWith; +/** + * Returns a channel that never completes + * + * @since 2.0.0 + * @category constructors + */ +const never = exports.never = channel.never; +/** + * Translates channel failure into death of the fiber, making all failures + * unchecked and not a part of the type of the channel. + * + * @since 2.0.0 + * @category error handling + */ +const orDie = exports.orDie = channel.orDie; +/** + * Keeps none of the errors, and terminates the fiber with them, using the + * specified function to convert the `OutErr` into a defect. + * + * @since 2.0.0 + * @category error handling + */ +const orDieWith = exports.orDieWith = channel.orDieWith; +/** + * Returns a new channel that will perform the operations of this one, until + * failure, and then it will switch over to the operations of the specified + * fallback channel. + * + * @since 2.0.0 + * @category error handling + */ +const orElse = exports.orElse = channel.orElse; +/** + * Returns a new channel that pipes the output of this channel into the + * specified channel. The returned channel has the input type of this channel, + * and the output type of the specified channel, terminating with the value of + * the specified channel. + * + * @since 2.0.0 + * @category utils + */ +const pipeTo = exports.pipeTo = core.pipeTo; +/** + * Returns a new channel that pipes the output of this channel into the + * specified channel and preserves this channel's failures without providing + * them to the other channel for observation. + * + * @since 2.0.0 + * @category utils + */ +const pipeToOrFail = exports.pipeToOrFail = channel.pipeToOrFail; +/** + * Provides the channel with its required context, which eliminates its + * dependency on `Env`. + * + * @since 2.0.0 + * @category context + */ +const provideContext = exports.provideContext = core.provideContext; +/** + * Provides a layer to the channel, which translates it to another level. + * + * @since 2.0.0 + * @category context + */ +const provideLayer = exports.provideLayer = channel.provideLayer; +/** + * Transforms the context being provided to the channel with the specified + * function. + * + * @since 2.0.0 + * @category context + */ +const mapInputContext = exports.mapInputContext = channel.mapInputContext; +/** + * Splits the context into two parts, providing one part using the + * specified layer and leaving the remainder `Env0`. + * + * @since 2.0.0 + * @category context + */ +const provideSomeLayer = exports.provideSomeLayer = channel.provideSomeLayer; +/** + * Provides the effect with the single service it requires. If the effect + * requires more than one service use `provideContext` instead. + * + * @since 2.0.0 + * @category context + */ +const provideService = exports.provideService = channel.provideService; +/** + * @since 2.0.0 + * @category constructors + */ +const read = exports.read = channel.read; +/** + * @since 2.0.0 + * @category constructors + */ +const readOrFail = exports.readOrFail = core.readOrFail; +/** + * @since 2.0.0 + * @category constructors + */ +const readWith = exports.readWith = core.readWith; +/** + * @since 2.0.0 + * @category constructors + */ +const readWithCause = exports.readWithCause = core.readWithCause; +/** + * Creates a channel which repeatedly runs this channel. + * + * @since 2.0.0 + * @category utils + */ +const repeated = exports.repeated = channel.repeated; +/** + * Runs a channel until the end is received. + * + * @since 2.0.0 + * @category destructors + */ +const run = exports.run = channel.run; +/** + * Run the channel until it finishes with a done value or fails with an error + * and collects its emitted output elements. + * + * The channel must not read any input. + * + * @since 2.0.0 + * @category destructors + */ +const runCollect = exports.runCollect = channel.runCollect; +/** + * Runs a channel until the end is received. + * + * @since 2.0.0 + * @category destructors + */ +const runDrain = exports.runDrain = channel.runDrain; +/** + * Run the channel until it finishes with a done value or fails with an error. + * The channel must not read any input or write any output. + * + * Closing the channel, which includes execution of all the finalizers + * attached to the channel will be added to the current scope as a finalizer. + * + * @since 3.11.0 + * @category destructors + */ +const runScoped = exports.runScoped = channel.runScoped; +/** + * Use a scoped effect to emit an output element. + * + * @since 2.0.0 + * @category constructors + */ +const scoped = exports.scoped = channel.scoped; +/** + * Use a function that receives a scope and returns an effect to emit an output + * element. The output element will be the result of the returned effect, if + * successful. + * + * @since 3.11.0 + * @category constructors + */ +const scopedWith = exports.scopedWith = channel.scopedWith; +/** + * Splits strings on newlines. Handles both Windows newlines (`\r\n`) and UNIX + * newlines (`\n`). + * + * @since 2.0.0 + * @category combinators + */ +const splitLines = exports.splitLines = channel.splitLines; +/** + * Constructs a channel that succeeds immediately with the specified value. + * + * @since 2.0.0 + * @category constructors + */ +const succeed = exports.succeed = core.succeed; +/** + * Lazily constructs a channel from the given side effect. + * + * @since 2.0.0 + * @category constructors + */ +const suspend = exports.suspend = core.suspend; +/** + * Constructs a channel that succeeds immediately with the specified lazy value. + * + * @since 2.0.0 + * @category constructors + */ +const sync = exports.sync = core.sync; +/** + * Converts a `Channel` to a `PubSub`. + * + * @since 2.0.0 + * @category destructors + */ +const toPubSub = exports.toPubSub = channel.toPubSub; +/** + * Returns a scoped `Effect` that can be used to repeatedly pull elements from + * the constructed `Channel`. The pull effect fails with the channel's failure + * in case the channel fails, or returns either the channel's done value or an + * emitted element. + * + * @since 2.0.0 + * @category destructors + */ +const toPull = exports.toPull = channel.toPull; +/** + * Returns an `Effect` that can be used to repeatedly pull elements from the + * constructed `Channel` within the provided `Scope`. The pull effect fails + * with the channel's failure in case the channel fails, or returns either the + * channel's done value or an emitted element. + * + * @since 3.11.0 + * @category destructors + */ +const toPullIn = exports.toPullIn = channel.toPullIn; +/** + * Converts a `Channel` to a `Queue`. + * + * @since 2.0.0 + * @category destructors + */ +const toQueue = exports.toQueue = channel.toQueue; +/** Converts this channel to a `Sink`. + * + * @since 2.0.0 + * @category destructors + */ +const toSink = exports.toSink = sink.channelToSink; +/** + * Converts this channel to a `Stream`. + * + * @since 2.0.0 + * @category destructors + */ +const toStream = exports.toStream = stream.channelToStream; +const void_ = exports.void = core.void; +/** + * Constructs a `Channel` from an effect that will result in a `Channel` if + * successful. + * + * @since 2.0.0 + * @category constructors + */ +const unwrap = exports.unwrap = channel.unwrap; +/** + * Constructs a `Channel` from a scoped effect that will result in a + * `Channel` if successful. + * + * @since 2.0.0 + * @category constructors + */ +const unwrapScoped = exports.unwrapScoped = channel.unwrapScoped; +/** + * Constructs a `Channel` from a function which receives a `Scope` and returns + * an effect that will result in a `Channel` if successful. + * + * @since 3.11.0 + * @category constructors + */ +const unwrapScopedWith = exports.unwrapScopedWith = channel.unwrapScopedWith; +/** + * Updates a service in the context of this channel. + * + * @since 2.0.0 + * @category context + */ +const updateService = exports.updateService = channel.updateService; +/** + * Wraps the channel with a new span for tracing. + * + * @since 2.0.0 + * @category tracing + */ +const withSpan = exports.withSpan = channel.withSpan; +/** + * Writes a single value to the channel. + * + * @since 2.0.0 + * @category constructors + */ +const write = exports.write = core.write; +/** + * Writes a sequence of values to the channel. + * + * @since 2.0.0 + * @category constructors + */ +const writeAll = exports.writeAll = channel.writeAll; +/** + * Writes a `Chunk` of values to the channel. + * + * @since 2.0.0 + * @category constructors + */ +const writeChunk = exports.writeChunk = channel.writeChunk; +/** + * Returns a new channel that is the sequential composition of this channel + * and the specified channel. The returned channel terminates with a tuple of + * the terminal values of both channels. + * + * @since 2.0.0 + * @category zipping + */ +const zip = exports.zip = channel.zip; +/** + * Returns a new channel that is the sequential composition of this channel + * and the specified channel. The returned channel terminates with the + * terminal value of this channel. + * + * @since 2.0.0 + * @category zipping + */ +const zipLeft = exports.zipLeft = channel.zipLeft; +/** + * Returns a new channel that is the sequential composition of this channel + * and the specified channel. The returned channel terminates with the + * terminal value of that channel. + * + * @since 2.0.0 + * @category zipping + */ +const zipRight = exports.zipRight = channel.zipRight; +/** + * Represents a generic checked exception which occurs when a `Channel` is + * executed. + * + * @since 2.0.0 + * @category errors + */ +const ChannelException = exports.ChannelException = channel.ChannelException; +/** + * Returns `true` if the specified value is an `ChannelException`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isChannelException = exports.isChannelException = channel.isChannelException; +//# sourceMappingURL=Channel.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/ChildExecutorDecision.js b/backend/node_modules/effect/dist/cjs/ChildExecutorDecision.js new file mode 100644 index 0000000000000000000000000000000000000000..9c3cbdb48b85f1e4ec001c7bf29a5f64e93ffe46 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/ChildExecutorDecision.js @@ -0,0 +1,72 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.match = exports.isYield = exports.isContinue = exports.isClose = exports.isChildExecutorDecision = exports.Yield = exports.Continue = exports.Close = exports.ChildExecutorDecisionTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/channel/childExecutorDecision.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * @since 2.0.0 + * @category symbols + */ +const ChildExecutorDecisionTypeId = exports.ChildExecutorDecisionTypeId = internal.ChildExecutorDecisionTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +const Continue = exports.Continue = internal.Continue; +/** + * @since 2.0.0 + * @category constructors + */ +const Close = exports.Close = internal.Close; +/** + * @since 2.0.0 + * @category constructors + */ +const Yield = exports.Yield = internal.Yield; +/** + * Returns `true` if the specified value is a `ChildExecutorDecision`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isChildExecutorDecision = exports.isChildExecutorDecision = internal.isChildExecutorDecision; +/** + * Returns `true` if the specified `ChildExecutorDecision` is a `Continue`, + * `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isContinue = exports.isContinue = internal.isContinue; +/** + * Returns `true` if the specified `ChildExecutorDecision` is a `Close`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isClose = exports.isClose = internal.isClose; +/** + * Returns `true` if the specified `ChildExecutorDecision` is a `Yield`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isYield = exports.isYield = internal.isYield; +/** + * Folds over a `ChildExecutorDecision` to produce a value of type `A`. + * + * @since 2.0.0 + * @category folding + */ +const match = exports.match = internal.match; +//# sourceMappingURL=ChildExecutorDecision.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/ChildExecutorDecision.js.map b/backend/node_modules/effect/dist/cjs/ChildExecutorDecision.js.map new file mode 100644 index 0000000000000000000000000000000000000000..07634069e9f6950552d3d61482181416a597789c --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/ChildExecutorDecision.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ChildExecutorDecision.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ChildExecutorDecisionTypeId","exports","Continue","Close","Yield","isChildExecutorDecision","isContinue","isClose","isYield","match"],"sources":["../../src/ChildExecutorDecision.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAuE,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CA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A,CAAAI,uBAAA,GAA+C3B,QAAQ,CAAC2B,uBAAuB;AAEnH;;;;;;;AAOO,MAAMC,UAAU,GAAAL,OAAA,CAAAK,UAAA,GAAsD5B,QAAQ,CAAC4B,UAAU;AAEhG;;;;;;;AAOO,MAAMC,OAAO,GAAAN,OAAA,CAAAM,OAAA,GAAmD7B,QAAQ,CAAC6B,OAAO;AAEvF;;;;;;;AAOO,MAAMC,OAAO,GAAAP,OAAA,CAAAO,OAAA,GAAmD9B,QAAQ,CAAC8B,OAAO;AAEvF;;;;;;AAMO,MAAMC,KAAK,GAAAR,OAAA,CAAAQ,KAAA,GA4Bd/B,QAAQ,CAAC+B,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Chunk.js b/backend/node_modules/effect/dist/cjs/Chunk.js new file mode 100644 index 0000000000000000000000000000000000000000..4f22a8ed45952aae1a00dd690b6c858b3fa5d86b --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Chunk.js @@ -0,0 +1,1114 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.zipWith = exports.zip = exports.unzip = exports.unsafeLast = exports.unsafeHead = exports.unsafeGet = exports.unsafeFromNonEmptyArray = exports.unsafeFromArray = exports.union = exports.toReadonlyArray = exports.toArray = exports.takeWhile = exports.takeRight = exports.take = exports.tailNonEmpty = exports.tail = exports.splitWhere = exports.splitNonEmptyAt = exports.splitAt = exports.split = exports.sortWith = exports.sort = exports.some = exports.size = exports.separate = exports.reverse = exports.replaceOption = exports.replace = exports.removeOption = exports.remove = exports.reduceRight = exports.reduce = exports.range = exports.prependAll = exports.prepend = exports.partitionMap = exports.partition = exports.of = exports.modifyOption = exports.modify = exports.mapAccum = exports.map = exports.makeBy = exports.make = exports.lastNonEmpty = exports.last = exports.join = exports.isNonEmpty = exports.isEmpty = exports.isChunk = exports.intersection = exports.headNonEmpty = exports.head = exports.getEquivalence = exports.get = exports.fromIterable = exports.forEach = exports.flatten = exports.flatMap = exports.findLastIndex = exports.findLast = exports.findFirstIndex = exports.findFirst = exports.filterMapWhile = exports.filterMap = exports.filter = exports.every = exports.empty = exports.dropWhile = exports.dropRight = exports.drop = exports.differenceWith = exports.difference = exports.dedupeAdjacent = exports.dedupe = exports.containsWith = exports.contains = exports.compact = exports.chunksOf = exports.appendAll = exports.append = void 0; +var RA = _interopRequireWildcard(require("./Array.js")); +var Equal = _interopRequireWildcard(require("./Equal.js")); +var Equivalence = _interopRequireWildcard(require("./Equivalence.js")); +var _Function = require("./Function.js"); +var Hash = _interopRequireWildcard(require("./Hash.js")); +var _Inspectable = require("./Inspectable.js"); +var O = _interopRequireWildcard(require("./Option.js")); +var Order = _interopRequireWildcard(require("./Order.js")); +var _Pipeable = require("./Pipeable.js"); +var _Predicate = require("./Predicate.js"); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +const TypeId = /*#__PURE__*/Symbol.for("effect/Chunk"); +function copy(src, srcPos, dest, destPos, len) { + for (let i = srcPos; i < Math.min(src.length, srcPos + len); i++) { + dest[destPos + i - srcPos] = src[i]; + } + return dest; +} +const emptyArray = []; +/** + * Compares the two chunks of equal length using the specified function + * + * @category equivalence + * @since 2.0.0 + */ +const getEquivalence = isEquivalent => Equivalence.make((self, that) => self.length === that.length && toReadonlyArray(self).every((value, i) => isEquivalent(value, unsafeGet(that, i)))); +exports.getEquivalence = getEquivalence; +const _equivalence = /*#__PURE__*/getEquivalence(Equal.equals); +const ChunkProto = { + [TypeId]: { + _A: _ => _ + }, + toString() { + return (0, _Inspectable.format)(this.toJSON()); + }, + toJSON() { + return { + _id: "Chunk", + values: toReadonlyArray(this).map(_Inspectable.toJSON) + }; + }, + [_Inspectable.NodeInspectSymbol]() { + return this.toJSON(); + }, + [Equal.symbol](that) { + return isChunk(that) && _equivalence(this, that); + }, + [Hash.symbol]() { + return Hash.cached(this, Hash.array(toReadonlyArray(this))); + }, + [Symbol.iterator]() { + switch (this.backing._tag) { + case "IArray": + { + return this.backing.array[Symbol.iterator](); + } + case "IEmpty": + { + return emptyArray[Symbol.iterator](); + } + default: + { + return toReadonlyArray(this)[Symbol.iterator](); + } + } + }, + pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + } +}; +const makeChunk = backing => { + const chunk = Object.create(ChunkProto); + chunk.backing = backing; + switch (backing._tag) { + case "IEmpty": + { + chunk.length = 0; + chunk.depth = 0; + chunk.left = chunk; + chunk.right = chunk; + break; + } + case "IConcat": + { + chunk.length = backing.left.length + backing.right.length; + chunk.depth = 1 + Math.max(backing.left.depth, backing.right.depth); + chunk.left = backing.left; + chunk.right = backing.right; + break; + } + case "IArray": + { + chunk.length = backing.array.length; + chunk.depth = 0; + chunk.left = _empty; + chunk.right = _empty; + break; + } + case "ISingleton": + { + chunk.length = 1; + chunk.depth = 0; + chunk.left = _empty; + chunk.right = _empty; + break; + } + case "ISlice": + { + chunk.length = backing.length; + chunk.depth = backing.chunk.depth + 1; + chunk.left = _empty; + chunk.right = _empty; + break; + } + } + return chunk; +}; +/** + * Checks if `u` is a `Chunk` + * + * @category constructors + * @since 2.0.0 + */ +const isChunk = u => (0, _Predicate.hasProperty)(u, TypeId); +exports.isChunk = isChunk; +const _empty = /*#__PURE__*/makeChunk({ + _tag: "IEmpty" +}); +/** + * @category constructors + * @since 2.0.0 + */ +const empty = () => _empty; +/** + * Builds a `NonEmptyChunk` from an non-empty collection of elements. + * + * @category constructors + * @since 2.0.0 + */ +exports.empty = empty; +const make = (...as) => unsafeFromNonEmptyArray(as); +/** + * Builds a `NonEmptyChunk` from a single element. + * + * @category constructors + * @since 2.0.0 + */ +exports.make = make; +const of = a => makeChunk({ + _tag: "ISingleton", + a +}); +/** + * Creates a new `Chunk` from an iterable collection of values. + * + * @category constructors + * @since 2.0.0 + */ +exports.of = of; +const fromIterable = self => isChunk(self) ? self : unsafeFromArray(RA.fromIterable(self)); +exports.fromIterable = fromIterable; +const copyToArray = (self, array, initial) => { + switch (self.backing._tag) { + case "IArray": + { + copy(self.backing.array, 0, array, initial, self.length); + break; + } + case "IConcat": + { + copyToArray(self.left, array, initial); + copyToArray(self.right, array, initial + self.left.length); + break; + } + case "ISingleton": + { + array[initial] = self.backing.a; + break; + } + case "ISlice": + { + let i = 0; + let j = initial; + while (i < self.length) { + array[j] = unsafeGet(self, i); + i += 1; + j += 1; + } + break; + } + } +}; +const toArray_ = self => toReadonlyArray(self).slice(); +/** + * Converts a `Chunk` into an `Array`. If the provided `Chunk` is non-empty + * (`NonEmptyChunk`), the function will return a `NonEmptyArray`, ensuring the + * non-empty property is preserved. + * + * @category conversions + * @since 2.0.0 + */ +const toArray = exports.toArray = toArray_; +const toReadonlyArray_ = self => { + switch (self.backing._tag) { + case "IEmpty": + { + return emptyArray; + } + case "IArray": + { + return self.backing.array; + } + default: + { + const arr = new Array(self.length); + copyToArray(self, arr, 0); + self.backing = { + _tag: "IArray", + array: arr + }; + self.left = _empty; + self.right = _empty; + self.depth = 0; + return arr; + } + } +}; +/** + * Converts a `Chunk` into a `ReadonlyArray`. If the provided `Chunk` is + * non-empty (`NonEmptyChunk`), the function will return a + * `NonEmptyReadonlyArray`, ensuring the non-empty property is preserved. + * + * @category conversions + * @since 2.0.0 + */ +const toReadonlyArray = exports.toReadonlyArray = toReadonlyArray_; +const reverseChunk = self => { + switch (self.backing._tag) { + case "IEmpty": + case "ISingleton": + return self; + case "IArray": + { + return makeChunk({ + _tag: "IArray", + array: RA.reverse(self.backing.array) + }); + } + case "IConcat": + { + return makeChunk({ + _tag: "IConcat", + left: reverse(self.backing.right), + right: reverse(self.backing.left) + }); + } + case "ISlice": + return unsafeFromArray(RA.reverse(toReadonlyArray(self))); + } +}; +/** + * Reverses the order of elements in a `Chunk`. + * Importantly, if the input chunk is a `NonEmptyChunk`, the reversed chunk will also be a `NonEmptyChunk`. + * + * **Example** + * + * ```ts + * import { Chunk } from "effect" + * + * const chunk = Chunk.make(1, 2, 3) + * const result = Chunk.reverse(chunk) + * + * console.log(result) + * // { _id: 'Chunk', values: [ 3, 2, 1 ] } + * ``` + * + * @since 2.0.0 + * @category elements + */ +const reverse = exports.reverse = reverseChunk; +/** + * This function provides a safe way to read a value at a particular index from a `Chunk`. + * + * @category elements + * @since 2.0.0 + */ +const get = exports.get = /*#__PURE__*/(0, _Function.dual)(2, (self, index) => index < 0 || index >= self.length ? O.none() : O.some(unsafeGet(self, index))); +/** + * Wraps an array into a chunk without copying, unsafe on mutable arrays + * + * @since 2.0.0 + * @category unsafe + */ +const unsafeFromArray = self => self.length === 0 ? empty() : self.length === 1 ? of(self[0]) : makeChunk({ + _tag: "IArray", + array: self +}); +/** + * Wraps an array into a chunk without copying, unsafe on mutable arrays + * + * @since 2.0.0 + * @category unsafe + */ +exports.unsafeFromArray = unsafeFromArray; +const unsafeFromNonEmptyArray = self => unsafeFromArray(self); +/** + * Gets an element unsafely, will throw on out of bounds + * + * @since 2.0.0 + * @category unsafe + */ +exports.unsafeFromNonEmptyArray = unsafeFromNonEmptyArray; +const unsafeGet = exports.unsafeGet = /*#__PURE__*/(0, _Function.dual)(2, (self, index) => { + switch (self.backing._tag) { + case "IEmpty": + { + throw new Error(`Index out of bounds`); + } + case "ISingleton": + { + if (index !== 0) { + throw new Error(`Index out of bounds`); + } + return self.backing.a; + } + case "IArray": + { + if (index >= self.length || index < 0) { + throw new Error(`Index out of bounds`); + } + return self.backing.array[index]; + } + case "IConcat": + { + return index < self.left.length ? unsafeGet(self.left, index) : unsafeGet(self.right, index - self.left.length); + } + case "ISlice": + { + return unsafeGet(self.backing.chunk, index + self.backing.offset); + } + } +}); +/** + * Appends the specified element to the end of the `Chunk`. + * + * @category concatenating + * @since 2.0.0 + */ +const append = exports.append = /*#__PURE__*/(0, _Function.dual)(2, (self, a) => appendAll(self, of(a))); +/** + * Prepend an element to the front of a `Chunk`, creating a new `NonEmptyChunk`. + * + * @category concatenating + * @since 2.0.0 + */ +const prepend = exports.prepend = /*#__PURE__*/(0, _Function.dual)(2, (self, elem) => appendAll(of(elem), self)); +/** + * Takes the first up to `n` elements from the chunk + * + * @since 2.0.0 + */ +const take = exports.take = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => { + if (n <= 0) { + return _empty; + } else if (n >= self.length) { + return self; + } else { + switch (self.backing._tag) { + case "ISlice": + { + return makeChunk({ + _tag: "ISlice", + chunk: self.backing.chunk, + length: n, + offset: self.backing.offset + }); + } + case "IConcat": + { + if (n > self.left.length) { + return makeChunk({ + _tag: "IConcat", + left: self.left, + right: take(self.right, n - self.left.length) + }); + } + return take(self.left, n); + } + default: + { + return makeChunk({ + _tag: "ISlice", + chunk: self, + offset: 0, + length: n + }); + } + } + } +}); +/** + * Drops the first up to `n` elements from the chunk + * + * @since 2.0.0 + */ +const drop = exports.drop = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => { + if (n <= 0) { + return self; + } else if (n >= self.length) { + return _empty; + } else { + switch (self.backing._tag) { + case "ISlice": + { + return makeChunk({ + _tag: "ISlice", + chunk: self.backing.chunk, + offset: self.backing.offset + n, + length: self.backing.length - n + }); + } + case "IConcat": + { + if (n > self.left.length) { + return drop(self.right, n - self.left.length); + } + return makeChunk({ + _tag: "IConcat", + left: drop(self.left, n), + right: self.right + }); + } + default: + { + return makeChunk({ + _tag: "ISlice", + chunk: self, + offset: n, + length: self.length - n + }); + } + } + } +}); +/** + * Drops the last `n` elements. + * + * @since 2.0.0 + */ +const dropRight = exports.dropRight = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => take(self, Math.max(0, self.length - n))); +/** + * Drops all elements so long as the predicate returns true. + * + * @since 2.0.0 + */ +const dropWhile = exports.dropWhile = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => { + const arr = toReadonlyArray(self); + const len = arr.length; + let i = 0; + while (i < len && predicate(arr[i])) { + i++; + } + return drop(self, i); +}); +/** + * Prepends the specified prefix chunk to the beginning of the specified chunk. + * If either chunk is non-empty, the result is also a non-empty chunk. + * + * **Example** + * + * ```ts + * import { Chunk } from "effect" + * + * const result = Chunk.make(1, 2).pipe(Chunk.prependAll(Chunk.make("a", "b")), Chunk.toArray) + * + * console.log(result) + * // [ "a", "b", 1, 2 ] + * ``` + * + * @category concatenating + * @since 2.0.0 + */ +const prependAll = exports.prependAll = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => appendAll(that, self)); +/** + * Concatenates two chunks, combining their elements. + * If either chunk is non-empty, the result is also a non-empty chunk. + * + * **Example** + * + * ```ts + * import { Chunk } from "effect" + * + * const result = Chunk.make(1, 2).pipe(Chunk.appendAll(Chunk.make("a", "b")), Chunk.toArray) + * + * console.log(result) + * // [ 1, 2, "a", "b" ] + * ``` + * + * @category concatenating + * @since 2.0.0 + */ +const appendAll = exports.appendAll = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => { + if (self.backing._tag === "IEmpty") { + return that; + } + if (that.backing._tag === "IEmpty") { + return self; + } + const diff = that.depth - self.depth; + if (Math.abs(diff) <= 1) { + return makeChunk({ + _tag: "IConcat", + left: self, + right: that + }); + } else if (diff < -1) { + if (self.left.depth >= self.right.depth) { + const nr = appendAll(self.right, that); + return makeChunk({ + _tag: "IConcat", + left: self.left, + right: nr + }); + } else { + const nrr = appendAll(self.right.right, that); + if (nrr.depth === self.depth - 3) { + const nr = makeChunk({ + _tag: "IConcat", + left: self.right.left, + right: nrr + }); + return makeChunk({ + _tag: "IConcat", + left: self.left, + right: nr + }); + } else { + const nl = makeChunk({ + _tag: "IConcat", + left: self.left, + right: self.right.left + }); + return makeChunk({ + _tag: "IConcat", + left: nl, + right: nrr + }); + } + } + } else { + if (that.right.depth >= that.left.depth) { + const nl = appendAll(self, that.left); + return makeChunk({ + _tag: "IConcat", + left: nl, + right: that.right + }); + } else { + const nll = appendAll(self, that.left.left); + if (nll.depth === that.depth - 3) { + const nl = makeChunk({ + _tag: "IConcat", + left: nll, + right: that.left.right + }); + return makeChunk({ + _tag: "IConcat", + left: nl, + right: that.right + }); + } else { + const nr = makeChunk({ + _tag: "IConcat", + left: that.left.right, + right: that.right + }); + return makeChunk({ + _tag: "IConcat", + left: nll, + right: nr + }); + } + } + } +}); +/** + * Returns a filtered and mapped subset of the elements. + * + * @since 2.0.0 + * @category filtering + */ +const filterMap = exports.filterMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => unsafeFromArray(RA.filterMap(self, f))); +/** + * Returns a filtered and mapped subset of the elements. + * + * @since 2.0.0 + * @category filtering + */ +const filter = exports.filter = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => unsafeFromArray(RA.filter(self, predicate))); +/** + * Transforms all elements of the chunk for as long as the specified function returns some value + * + * @since 2.0.0 + * @category filtering + */ +const filterMapWhile = exports.filterMapWhile = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => unsafeFromArray(RA.filterMapWhile(self, f))); +/** + * Filter out optional values + * + * @since 2.0.0 + * @category filtering + */ +const compact = self => filterMap(self, _Function.identity); +/** + * Applies a function to each element in a chunk and returns a new chunk containing the concatenated mapped elements. + * + * @since 2.0.0 + * @category sequencing + */ +exports.compact = compact; +const flatMap = exports.flatMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + if (self.backing._tag === "ISingleton") { + return f(self.backing.a, 0); + } + let out = _empty; + let i = 0; + for (const k of self) { + out = appendAll(out, f(k, i++)); + } + return out; +}); +/** + * Iterates over each element of a `Chunk` and applies a function to it. + * + * **Details** + * + * This function processes every element of the given `Chunk`, calling the + * provided function `f` on each element. It does not return a new value; + * instead, it is primarily used for side effects, such as logging or + * accumulating data in an external variable. + * + * @since 2.0.0 + * @category combinators + */ +const forEach = exports.forEach = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => toReadonlyArray(self).forEach(f)); +/** + * Flattens a chunk of chunks into a single chunk by concatenating all chunks. + * + * @since 2.0.0 + * @category sequencing + */ +const flatten = exports.flatten = /*#__PURE__*/flatMap(_Function.identity); +/** + * Groups elements in chunks of up to `n` elements. + * + * @since 2.0.0 + * @category elements + */ +const chunksOf = exports.chunksOf = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => { + const gr = []; + let current = []; + toReadonlyArray(self).forEach(a => { + current.push(a); + if (current.length >= n) { + gr.push(unsafeFromArray(current)); + current = []; + } + }); + if (current.length > 0) { + gr.push(unsafeFromArray(current)); + } + return unsafeFromArray(gr); +}); +/** + * Creates a Chunk of unique values that are included in all given Chunks. + * + * The order and references of result values are determined by the Chunk. + * + * @since 2.0.0 + * @category elements + */ +const intersection = exports.intersection = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => unsafeFromArray(RA.intersection(toReadonlyArray(self), toReadonlyArray(that)))); +/** + * Determines if the chunk is empty. + * + * @since 2.0.0 + * @category elements + */ +const isEmpty = self => self.length === 0; +/** + * Determines if the chunk is not empty. + * + * @since 2.0.0 + * @category elements + */ +exports.isEmpty = isEmpty; +const isNonEmpty = self => self.length > 0; +/** + * Returns the first element of this chunk if it exists. + * + * @since 2.0.0 + * @category elements + */ +exports.isNonEmpty = isNonEmpty; +const head = exports.head = /*#__PURE__*/get(0); +/** + * Returns the first element of this chunk. + * + * It will throw an error if the chunk is empty. + * + * @since 2.0.0 + * @category unsafe + */ +const unsafeHead = self => unsafeGet(self, 0); +/** + * Returns the first element of this non empty chunk. + * + * @since 2.0.0 + * @category elements + */ +exports.unsafeHead = unsafeHead; +const headNonEmpty = exports.headNonEmpty = unsafeHead; +/** + * Returns the last element of this chunk if it exists. + * + * @since 2.0.0 + * @category elements + */ +const last = self => get(self, self.length - 1); +/** + * Returns the last element of this chunk. + * + * It will throw an error if the chunk is empty. + * + * @since 2.0.0 + * @category unsafe + */ +exports.last = last; +const unsafeLast = self => unsafeGet(self, self.length - 1); +/** + * Returns the last element of this non empty chunk. + * + * @since 3.4.0 + * @category elements + */ +exports.unsafeLast = unsafeLast; +const lastNonEmpty = exports.lastNonEmpty = unsafeLast; +/** + * Transforms the elements of a chunk using the specified mapping function. + * If the input chunk is non-empty, the resulting chunk will also be non-empty. + * + * **Example** + * + * ```ts + * import { Chunk } from "effect" + * + * const result = Chunk.map(Chunk.make(1, 2), (n) => n + 1) + * + * console.log(result) + * // { _id: 'Chunk', values: [ 2, 3 ] } + * ``` + * + * @since 2.0.0 + * @category mapping + */ +const map = exports.map = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => self.backing._tag === "ISingleton" ? of(f(self.backing.a, 0)) : unsafeFromArray((0, _Function.pipe)(toReadonlyArray(self), RA.map((a, i) => f(a, i))))); +/** + * Statefully maps over the chunk, producing new elements of type `B`. + * + * @since 2.0.0 + * @category folding + */ +const mapAccum = exports.mapAccum = /*#__PURE__*/(0, _Function.dual)(3, (self, s, f) => { + const [s1, as] = RA.mapAccum(self, s, f); + return [s1, unsafeFromArray(as)]; +}); +/** + * Separate elements based on a predicate that also exposes the index of the element. + * + * @category filtering + * @since 2.0.0 + */ +const partition = exports.partition = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => (0, _Function.pipe)(RA.partition(toReadonlyArray(self), predicate), ([l, r]) => [unsafeFromArray(l), unsafeFromArray(r)])); +/** + * Partitions the elements of this chunk into two chunks using f. + * + * @category filtering + * @since 2.0.0 + */ +const partitionMap = exports.partitionMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => (0, _Function.pipe)(RA.partitionMap(toReadonlyArray(self), f), ([l, r]) => [unsafeFromArray(l), unsafeFromArray(r)])); +/** + * Partitions the elements of this chunk into two chunks. + * + * @category filtering + * @since 2.0.0 + */ +const separate = self => (0, _Function.pipe)(RA.separate(toReadonlyArray(self)), ([l, r]) => [unsafeFromArray(l), unsafeFromArray(r)]); +/** + * Retireves the size of the chunk + * + * @since 2.0.0 + * @category elements + */ +exports.separate = separate; +const size = self => self.length; +/** + * Sort the elements of a Chunk in increasing order, creating a new Chunk. + * + * @since 2.0.0 + * @category sorting + */ +exports.size = size; +const sort = exports.sort = /*#__PURE__*/(0, _Function.dual)(2, (self, O) => unsafeFromArray(RA.sort(toReadonlyArray(self), O))); +/** + * @since 2.0.0 + * @category sorting + */ +const sortWith = exports.sortWith = /*#__PURE__*/(0, _Function.dual)(3, (self, f, order) => sort(self, Order.mapInput(order, f))); +/** + * Returns two splits of this chunk at the specified index. + * + * @since 2.0.0 + * @category splitting + */ +const splitAt = exports.splitAt = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => [take(self, n), drop(self, n)]); +/** + * Splits a `NonEmptyChunk` into two segments, with the first segment containing a maximum of `n` elements. + * The value of `n` must be `>= 1`. + * + * @category splitting + * @since 2.0.0 + */ +const splitNonEmptyAt = exports.splitNonEmptyAt = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => { + const _n = Math.max(1, Math.floor(n)); + return _n >= self.length ? [self, empty()] : [take(self, _n), drop(self, _n)]; +}); +/** + * Splits this chunk into `n` equally sized chunks. + * + * @since 2.0.0 + * @category splitting + */ +const split = exports.split = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => chunksOf(self, Math.ceil(self.length / Math.floor(n)))); +/** + * Splits this chunk on the first element that matches this predicate. + * Returns a tuple containing two chunks: the first one is before the match, and the second one is from the match onward. + * + * @category splitting + * @since 2.0.0 + */ +const splitWhere = exports.splitWhere = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => { + let i = 0; + for (const a of toReadonlyArray(self)) { + if (predicate(a)) { + break; + } else { + i++; + } + } + return splitAt(self, i); +}); +/** + * Returns every elements after the first. + * + * @since 2.0.0 + * @category elements + */ +const tail = self => self.length > 0 ? O.some(drop(self, 1)) : O.none(); +/** + * Returns every elements after the first. + * + * @since 2.0.0 + * @category elements + */ +exports.tail = tail; +const tailNonEmpty = self => drop(self, 1); +/** + * Takes the last `n` elements. + * + * @since 2.0.0 + * @category elements + */ +exports.tailNonEmpty = tailNonEmpty; +const takeRight = exports.takeRight = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => drop(self, self.length - n)); +/** + * Takes all elements so long as the predicate returns true. + * + * @since 2.0.0 + * @category elements + */ +const takeWhile = exports.takeWhile = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => { + const out = []; + for (const a of toReadonlyArray(self)) { + if (predicate(a)) { + out.push(a); + } else { + break; + } + } + return unsafeFromArray(out); +}); +/** + * Creates a Chunks of unique values, in order, from all given Chunks. + * + * @since 2.0.0 + * @category elements + */ +const union = exports.union = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => unsafeFromArray(RA.union(toReadonlyArray(self), toReadonlyArray(that)))); +/** + * Remove duplicates from an array, keeping the first occurrence of an element. + * + * @since 2.0.0 + * @category elements + */ +const dedupe = self => unsafeFromArray(RA.dedupe(toReadonlyArray(self))); +/** + * Deduplicates adjacent elements that are identical. + * + * @since 2.0.0 + * @category filtering + */ +exports.dedupe = dedupe; +const dedupeAdjacent = self => unsafeFromArray(RA.dedupeAdjacent(self)); +/** + * Takes a `Chunk` of pairs and return two corresponding `Chunk`s. + * + * Note: The function is reverse of `zip`. + * + * @since 2.0.0 + * @category elements + */ +exports.dedupeAdjacent = dedupeAdjacent; +const unzip = self => { + const [left, right] = RA.unzip(self); + return [unsafeFromArray(left), unsafeFromArray(right)]; +}; +/** + * Zips this chunk pointwise with the specified chunk using the specified combiner. + * + * @since 2.0.0 + * @category zipping + */ +exports.unzip = unzip; +const zipWith = exports.zipWith = /*#__PURE__*/(0, _Function.dual)(3, (self, that, f) => unsafeFromArray(RA.zipWith(self, that, f))); +/** + * Zips this chunk pointwise with the specified chunk. + * + * @since 2.0.0 + * @category zipping + */ +const zip = exports.zip = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => zipWith(self, that, (a, b) => [a, b])); +/** + * Delete the element at the specified index, creating a new `Chunk`. + * + * @since 2.0.0 + */ +const remove = exports.remove = /*#__PURE__*/(0, _Function.dual)(2, (self, i) => { + if (i < 0 || i >= self.length) return self; + return unsafeFromArray(RA.remove(toReadonlyArray(self), i)); +}); +/** + * @since 3.16.0 + */ +const removeOption = exports.removeOption = /*#__PURE__*/(0, _Function.dual)(2, (self, i) => { + if (i < 0 || i >= self.length) return O.none(); + return O.some(unsafeFromArray(RA.remove(toReadonlyArray(self), i))); +}); +/** + * @since 2.0.0 + */ +const modifyOption = exports.modifyOption = /*#__PURE__*/(0, _Function.dual)(3, (self, i, f) => { + if (i < 0 || i >= self.length) return O.none(); + return O.some(unsafeFromArray(RA.modify(toReadonlyArray(self), i, f))); +}); +/** + * Apply a function to the element at the specified index, creating a new `Chunk`, + * or returning the input if the index is out of bounds. + * + * @since 2.0.0 + */ +const modify = exports.modify = /*#__PURE__*/(0, _Function.dual)(3, (self, i, f) => O.getOrElse(modifyOption(self, i, f), () => self)); +/** + * Change the element at the specified index, creating a new `Chunk`, + * or returning the input if the index is out of bounds. + * + * @since 2.0.0 + */ +const replace = exports.replace = /*#__PURE__*/(0, _Function.dual)(3, (self, i, b) => modify(self, i, () => b)); +/** + * @since 2.0.0 + */ +const replaceOption = exports.replaceOption = /*#__PURE__*/(0, _Function.dual)(3, (self, i, b) => modifyOption(self, i, () => b)); +/** + * Return a Chunk of length n with element i initialized with f(i). + * + * **Note**. `n` is normalized to an integer >= 1. + * + * @category constructors + * @since 2.0.0 + */ +const makeBy = exports.makeBy = /*#__PURE__*/(0, _Function.dual)(2, (n, f) => fromIterable(RA.makeBy(n, f))); +/** + * Create a non empty `Chunk` containing a range of integers, including both endpoints. + * + * @category constructors + * @since 2.0.0 + */ +const range = (start, end) => start <= end ? makeBy(end - start + 1, i => start + i) : of(start); +// ------------------------------------------------------------------------------------- +// re-exports from ReadonlyArray +// ------------------------------------------------------------------------------------- +/** + * Returns a function that checks if a `Chunk` contains a given value using the default `Equivalence`. + * + * @category elements + * @since 2.0.0 + */ +exports.range = range; +const contains = exports.contains = RA.contains; +/** + * Returns a function that checks if a `Chunk` contains a given value using a provided `isEquivalent` function. + * + * @category elements + * @since 2.0.0 + */ +const containsWith = exports.containsWith = RA.containsWith; +/** + * Returns the first element that satisfies the specified + * predicate, or `None` if no such element exists. + * + * @category elements + * @since 2.0.0 + */ +const findFirst = exports.findFirst = RA.findFirst; +/** + * Return the first index for which a predicate holds. + * + * @category elements + * @since 2.0.0 + */ +const findFirstIndex = exports.findFirstIndex = RA.findFirstIndex; +/** + * Find the last element for which a predicate holds. + * + * @category elements + * @since 2.0.0 + */ +const findLast = exports.findLast = RA.findLast; +/** + * Return the last index for which a predicate holds. + * + * @category elements + * @since 2.0.0 + */ +const findLastIndex = exports.findLastIndex = RA.findLastIndex; +/** + * Check if a predicate holds true for every `Chunk` element. + * + * @category elements + * @since 2.0.0 + */ +const every = exports.every = /*#__PURE__*/(0, _Function.dual)(2, (self, refinement) => RA.fromIterable(self).every(refinement)); +/** + * Check if a predicate holds true for some `Chunk` element. + * + * @category elements + * @since 2.0.0 + */ +const some = exports.some = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => RA.fromIterable(self).some(predicate)); +/** + * Joins the elements together with "sep" in the middle. + * + * @category folding + * @since 2.0.0 + */ +const join = exports.join = RA.join; +/** + * @category folding + * @since 2.0.0 + */ +const reduce = exports.reduce = RA.reduce; +/** + * @category folding + * @since 2.0.0 + */ +const reduceRight = exports.reduceRight = RA.reduceRight; +/** + * Creates a `Chunk` of values not included in the other given `Chunk` using the provided `isEquivalent` function. + * The order and references of result values are determined by the first `Chunk`. + * + * @since 3.2.0 + */ +const differenceWith = isEquivalent => { + return (0, _Function.dual)(2, (self, that) => unsafeFromArray(RA.differenceWith(isEquivalent)(that, self))); +}; +/** + * Creates a `Chunk` of values not included in the other given `Chunk`. + * The order and references of result values are determined by the first `Chunk`. + * + * @since 3.2.0 + */ +exports.differenceWith = differenceWith; +const difference = exports.difference = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => unsafeFromArray(RA.difference(that, self))); +//# sourceMappingURL=Chunk.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Clock.js b/backend/node_modules/effect/dist/cjs/Clock.js new file mode 100644 index 0000000000000000000000000000000000000000..f21e5d45840a51fd7d8f2ae15638e8f539fdcc9c --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Clock.js @@ -0,0 +1,45 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.sleep = exports.make = exports.currentTimeNanos = exports.currentTimeMillis = exports.clockWith = exports.ClockTypeId = exports.Clock = void 0; +var internal = _interopRequireWildcard(require("./internal/clock.js")); +var defaultServices = _interopRequireWildcard(require("./internal/defaultServices.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const ClockTypeId = exports.ClockTypeId = internal.ClockTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * @since 2.0.0 + * @category constructors + */ +const sleep = exports.sleep = defaultServices.sleep; +/** + * @since 2.0.0 + * @category constructors + */ +const currentTimeMillis = exports.currentTimeMillis = defaultServices.currentTimeMillis; +/** + * @since 2.0.0 + * @category constructors + */ +const currentTimeNanos = exports.currentTimeNanos = defaultServices.currentTimeNanos; +/** + * @since 2.0.0 + * @category constructors + */ +const clockWith = exports.clockWith = defaultServices.clockWith; +/** + * @since 2.0.0 + * @category context + */ +const Clock = exports.Clock = internal.clockTag; +//# sourceMappingURL=Clock.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Clock.js.map b/backend/node_modules/effect/dist/cjs/Clock.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ef23919c2988489acdf16be7c29ed9c2cdeb542c --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Clock.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Clock.js","names":["internal","_interopRequireWildcard","require","defaultServices","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ClockTypeId","exports","make","sleep","currentTimeMillis","currentTimeNanos","clockWith","Clock","clockTag"],"sources":["../../src/Clock.ts"],"sourcesContent":[null],"mappings":";;;;;;AAMA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAF,uBAAA,CAAAC,OAAA;AAAgE,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAEhE;;;;AAIO,MAAMkB,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAkBvB,QAAQ,CAACuB,WAAW;AA8D9D;;;;AAIO,MAAME,IAAI,GAAAD,OAAA,CAAAC,IAAA,GAAuBzB,QAAQ,CAACyB,IAAI;AAErD;;;;AAIO,MAAMC,KAAK,GAAAF,OAAA,CAAAE,KAAA,GAA8DvB,eAAe,CAACuB,KAAK;AAErG;;;;AAIO,MAAMC,iBAAiB,GAAAH,OAAA,CAAAG,iBAAA,GAA0BxB,eAAe,CAACwB,iBAAiB;AAEzF;;;;AAIO,MAAMC,gBAAgB,GAAAJ,OAAA,CAAAI,gBAAA,GAA0BzB,eAAe,CAACyB,gBAAgB;AAEvF;;;;AAIO,MAAMC,SAAS,GAAAL,OAAA,CAAAK,SAAA,GACpB1B,eAAe,CAAC0B,SAAS;AAE3B;;;;AAIO,MAAMC,KAAK,GAAAN,OAAA,CAAAM,KAAA,GAA8B9B,QAAQ,CAAC+B,QAAQ","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Config.js b/backend/node_modules/effect/dist/cjs/Config.js new file mode 100644 index 0000000000000000000000000000000000000000..81e2d141ea04bdc355d44d57dd1127fe8a319030 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Config.js @@ -0,0 +1,328 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.zipWith = exports.zip = exports.withDescription = exports.withDefault = exports.validate = exports.url = exports.unwrap = exports.sync = exports.suspend = exports.succeed = exports.string = exports.secret = exports.repeat = exports.redacted = exports.primitive = exports.port = exports.orElseIf = exports.orElse = exports.option = exports.number = exports.nonEmptyString = exports.nested = exports.mapOrFail = exports.mapAttempt = exports.map = exports.logLevel = exports.literal = exports.isConfig = exports.integer = exports.hashSet = exports.hashMap = exports.fail = exports.duration = exports.date = exports.chunk = exports.branded = exports.boolean = exports.array = exports.all = exports.ConfigTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/config.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const ConfigTypeId = exports.ConfigTypeId = internal.ConfigTypeId; +/** + * Constructs a config from a tuple / struct / arguments of configs. + * + * @since 2.0.0 + * @category constructors + */ +const all = exports.all = internal.all; +/** + * Constructs a config for an array of values. + * + * @since 2.0.0 + * @category constructors + */ +const array = exports.array = internal.array; +/** + * Constructs a config for a boolean value. + * + * @since 2.0.0 + * @category constructors + */ +const boolean = exports.boolean = internal.boolean; +/** + * Constructs a config for a network port [1, 65535]. + * + * @since 3.16.0 + * @category constructors + */ +const port = exports.port = internal.port; +/** + * Constructs a config for an URL value. + * + * @since 3.11.0 + * @category constructors + */ +const url = exports.url = internal.url; +/** + * Constructs a config for a sequence of values. + * + * @since 2.0.0 + * @category constructors + */ +const chunk = exports.chunk = internal.chunk; +/** + * Constructs a config for a date value. + * + * @since 2.0.0 + * @category constructors + */ +const date = exports.date = internal.date; +/** + * Constructs a config that fails with the specified message. + * + * @since 2.0.0 + * @category constructors + */ +const fail = exports.fail = internal.fail; +/** + * Constructs a config for a float value. + * + * @since 2.0.0 + * @category constructors + */ +const number = exports.number = internal.number; +/** + * Constructs a config for a integer value. + * + * @since 2.0.0 + * @category constructors + */ +const integer = exports.integer = internal.integer; +/** + * Constructs a config for a literal value. + * + * **Example** + * + * ```ts + * import { Config } from "effect" + * + * const config = Config.literal("http", "https")("PROTOCOL") + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const literal = exports.literal = internal.literal; +/** + * Constructs a config for a `LogLevel` value. + * + * @since 2.0.0 + * @category constructors + */ +const logLevel = exports.logLevel = internal.logLevel; +/** + * Constructs a config for a duration value. + * + * @since 2.5.0 + * @category constructors + */ +const duration = exports.duration = internal.duration; +/** + * This function returns `true` if the specified value is an `Config` value, + * `false` otherwise. + * + * This function can be useful for checking the type of a value before + * attempting to operate on it as an `Config` value. For example, you could + * use `isConfig` to check the type of a value before using it as an + * argument to a function that expects an `Config` value. + * + * @since 2.0.0 + * @category refinements + */ +const isConfig = exports.isConfig = internal.isConfig; +/** + * Returns a config whose structure is the same as this one, but which produces + * a different value, constructed using the specified function. + * + * @since 2.0.0 + * @category mapping + */ +const map = exports.map = internal.map; +/** + * Returns a config whose structure is the same as this one, but which may + * produce a different value, constructed using the specified function, which + * may throw exceptions that will be translated into validation errors. + * + * @since 2.0.0 + * @category utils + */ +const mapAttempt = exports.mapAttempt = internal.mapAttempt; +/** + * Returns a new config whose structure is the samea as this one, but which + * may produce a different value, constructed using the specified fallible + * function. + * + * @since 2.0.0 + * @category utils + */ +const mapOrFail = exports.mapOrFail = internal.mapOrFail; +/** + * Returns a config that has this configuration nested as a property of the + * specified name. + * + * @since 2.0.0 + * @category utils + */ +const nested = exports.nested = internal.nested; +/** + * Returns a config whose structure is preferentially described by this + * config, but which falls back to the specified config if there is an issue + * reading from this config. + * + * @since 2.0.0 + * @category utils + */ +const orElse = exports.orElse = internal.orElse; +/** + * Returns configuration which reads from this configuration, but which falls + * back to the specified configuration if reading from this configuration + * fails with an error satisfying the specified predicate. + * + * @since 2.0.0 + * @category utils + */ +const orElseIf = exports.orElseIf = internal.orElseIf; +/** + * Returns an optional version of this config, which will be `None` if the + * data is missing from configuration, and `Some` otherwise. + * + * @since 2.0.0 + * @category utils + */ +const option = exports.option = internal.option; +/** + * Constructs a new primitive config. + * + * @since 2.0.0 + * @category constructors + */ +const primitive = exports.primitive = internal.primitive; +/** + * Returns a config that describes a sequence of values, each of which has the + * structure of this config. + * + * @since 2.0.0 + * @category utils + */ +const repeat = exports.repeat = internal.repeat; +/** + * Constructs a config for a secret value. + * + * @since 2.0.0 + * @category constructors + * @deprecated + */ +const secret = exports.secret = internal.secret; +/** + * Constructs a config for a redacted value. + * + * @since 2.0.0 + * @category constructors + */ +const redacted = exports.redacted = internal.redacted; +/** + * Constructs a config for a branded value. + * + * @since 3.16.0 + * @category constructors + */ +const branded = exports.branded = internal.branded; +/** + * Constructs a config for a sequence of values. + * + * @since 2.0.0 + * @category constructors + */ +const hashSet = exports.hashSet = internal.hashSet; +/** + * Constructs a config for a string value. + * + * @since 2.0.0 + * @category constructors + */ +const string = exports.string = internal.string; +/** + * Constructs a config for a non-empty string value. + * + * @since 3.7.0 + * @category constructors + */ +const nonEmptyString = exports.nonEmptyString = internal.nonEmptyString; +/** + * Constructs a config which contains the specified value. + * + * @since 2.0.0 + * @category constructors + */ +const succeed = exports.succeed = internal.succeed; +/** + * Lazily constructs a config. + * + * @since 2.0.0 + * @category constructors + */ +const suspend = exports.suspend = internal.suspend; +/** + * Constructs a config which contains the specified lazy value. + * + * @since 2.0.0 + * @category constructors + */ +const sync = exports.sync = internal.sync; +/** + * Constructs a config for a sequence of values. + * + * @since 2.0.0 + * @category constructors + */ +const hashMap = exports.hashMap = internal.hashMap; +/** + * Constructs a config from some configuration wrapped with the `Wrap` utility type. + * + * For example: + * + * ``` + * import { Config, unwrap } from "./Config" + * + * interface Options { key: string } + * + * const makeConfig = (config: Config.Wrap): Config => unwrap(config) + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const unwrap = exports.unwrap = internal.unwrap; +/** + * Returns a config that describes the same structure as this one, but which + * performs validation during loading. + * + * @since 2.0.0 + * @category utils + */ +const validate = exports.validate = internal.validate; +/** + * Returns a config that describes the same structure as this one, but has the + * specified default value in case the information cannot be found. + * + * @since 2.0.0 + * @category utils + */ +const withDefault = exports.withDefault = internal.withDefault; +/** + * Adds a description to this configuration, which is intended for humans. + * + * @since 2.0.0 + * @category utils + */ +const withDescription = exports.withDescription = internal.withDescription; +/** + * Returns a config that is the composition of this config and the specified + * config. + * + * @since 2.0.0 + * @category zipping + */ +const zip = exports.zip = internal.zip; +/** + * Returns a config that is the composes this config and the specified config + * using the provided function. + * + * @since 2.0.0 + * @category zipping + */ +const zipWith = exports.zipWith = internal.zipWith; +//# sourceMappingURL=Config.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Config.js.map b/backend/node_modules/effect/dist/cjs/Config.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d56fccf44da19d73dd4d690ae7589dbfb85e63bb --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Config.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Config.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ConfigTypeId","exports","all","array","boolean","port","url","chunk","date","fail","number","integer","literal","logLevel","duration","isConfig","map","mapAttempt","mapOrFail","nested","orElse","orElseIf","option","primitive","repeat","secret","redacted","branded","hashSet","string","nonEmptyString","succeed","suspend","sync","hashMap","unwrap","validate","withDefault","withDescription","zip","zipWith"],"sources":["../../src/Config.ts"],"sourcesContent":[null],"mappings":";;;;;;AAYA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAgD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MA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A8B,OAAA,GAA+BrD,QAAQ,CAACqD,OAAO;AAEnE;;;;;;AAMO,MAAMC,OAAO,GAAA/B,OAAA,CAAA+B,OAAA,GAAiDtD,QAAQ,CAACsD,OAAO;AAErF;;;;;;AAMO,MAAMC,IAAI,GAAAhC,OAAA,CAAAgC,IAAA,GAAwCvD,QAAQ,CAACuD,IAAI;AAEtE;;;;;;AAMO,MAAMC,OAAO,GAAAjC,OAAA,CAAAiC,OAAA,GAAgFxD,QAAQ,CAACwD,OAAO;AAEpH;;;;;;;;;;;;;;;;AAgBO,MAAMC,MAAM,GAAAlC,OAAA,CAAAkC,MAAA,GAA8CzD,QAAQ,CAACyD,MAAM;AAEhF;;;;;;;AAOO,MAAMC,QAAQ,GAAAnC,OAAA,CAAAmC,QAAA,GAuDjB1D,QAAQ,CAAC0D,QAAQ;AAErB;;;;;;;AAOO,MAAMC,WAAW,GAAApC,OAAA,CAAAoC,WAAA,GAiBpB3D,QAAQ,CAAC2D,WAAW;AAExB;;;;;;AAMO,MAAMC,eAAe,GAAArC,OAAA,CAAAqC,eAAA,GAexB5D,QAAQ,CAAC4D,eAAe;AAE5B;;;;;;;AAOO,MAAMC,GAAG,GAAAtC,OAAA,CAAAsC,GAAA,GAiBZ7D,QAAQ,CAAC6D,GAAG;AAEhB;;;;;;;AAOO,MAAMC,OAAO,GAAAvC,OAAA,CAAAuC,OAAA,GAiBhB9D,QAAQ,CAAC8D,OAAO","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/ConfigError.js b/backend/node_modules/effect/dist/cjs/ConfigError.js new file mode 100644 index 0000000000000000000000000000000000000000..576d9d01d2075924fe447cbaf85c6b023a58dcd4 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/ConfigError.js @@ -0,0 +1,114 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.reduceWithContext = exports.prefixed = exports.isUnsupported = exports.isSourceUnavailable = exports.isOr = exports.isMissingDataOnly = exports.isMissingData = exports.isInvalidData = exports.isConfigError = exports.isAnd = exports.Unsupported = exports.SourceUnavailable = exports.Or = exports.MissingData = exports.InvalidData = exports.ConfigErrorTypeId = exports.And = void 0; +var internal = _interopRequireWildcard(require("./internal/configError.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const ConfigErrorTypeId = exports.ConfigErrorTypeId = internal.ConfigErrorTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +const And = exports.And = internal.And; +/** + * @since 2.0.0 + * @category constructors + */ +const Or = exports.Or = internal.Or; +/** + * @since 2.0.0 + * @category constructors + */ +const MissingData = exports.MissingData = internal.MissingData; +/** + * @since 2.0.0 + * @category constructors + */ +const InvalidData = exports.InvalidData = internal.InvalidData; +/** + * @since 2.0.0 + * @category constructors + */ +const SourceUnavailable = exports.SourceUnavailable = internal.SourceUnavailable; +/** + * @since 2.0.0 + * @category constructors + */ +const Unsupported = exports.Unsupported = internal.Unsupported; +/** + * Returns `true` if the specified value is a `ConfigError`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isConfigError = exports.isConfigError = internal.isConfigError; +/** + * Returns `true` if the specified `ConfigError` is an `And`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isAnd = exports.isAnd = internal.isAnd; +/** + * Returns `true` if the specified `ConfigError` is an `Or`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isOr = exports.isOr = internal.isOr; +/** + * Returns `true` if the specified `ConfigError` is an `InvalidData`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isInvalidData = exports.isInvalidData = internal.isInvalidData; +/** + * Returns `true` if the specified `ConfigError` is an `MissingData`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isMissingData = exports.isMissingData = internal.isMissingData; +/** + * Returns `true` if the specified `ConfigError` contains only `MissingData` errors, `false` otherwise. + * + * @since 2.0.0 + * @categer getters + */ +const isMissingDataOnly = exports.isMissingDataOnly = internal.isMissingDataOnly; +/** + * Returns `true` if the specified `ConfigError` is a `SourceUnavailable`, + * `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isSourceUnavailable = exports.isSourceUnavailable = internal.isSourceUnavailable; +/** + * Returns `true` if the specified `ConfigError` is an `Unsupported`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isUnsupported = exports.isUnsupported = internal.isUnsupported; +/** + * @since 2.0.0 + * @category utils + */ +const prefixed = exports.prefixed = internal.prefixed; +/** + * @since 2.0.0 + * @category folding + */ +const reduceWithContext = exports.reduceWithContext = internal.reduceWithContext; +//# sourceMappingURL=ConfigError.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/ConfigError.js.map b/backend/node_modules/effect/dist/cjs/ConfigError.js.map new file mode 100644 index 0000000000000000000000000000000000000000..3cc6cf6fc43bcc56d98b880111cd254aa3be8df8 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/ConfigError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ConfigError.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ConfigErrorTypeId","exports","And","Or","MissingData","InvalidData","SourceUnavailable","Unsupported","isConfigError","isAnd","isOr","isInvalidData","isMissingData","isMissingDataOnly","isSourceUnavailable","isUnsupported","prefixed","reduceWithContext"],"sources":["../../src/ConfigError.ts"],"sourc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B;;;;AAIO,MAAMC,iBAAiB,GAAAhB,OAAA,CAAAgB,iBAAA,GAW1BvC,QAAQ,CAACuC,iBAAiB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/ConfigProvider.js.map b/backend/node_modules/effect/dist/cjs/ConfigProvider.js.map new file mode 100644 index 0000000000000000000000000000000000000000..1d28e56f3d5dc8ce214d8790b30f383b7e5c204e --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/ConfigProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ConfigProvider.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ConfigProviderTypeId","exports","FlatConfigProviderTypeId","ConfigProvider","configProviderTag","make","makeFlat","fromEnv","fromFlat","fromJson","fromMap","constantCase","mapInputPath","kebabCase","lowerCase","nested","orElse","unnested","snakeCase","upperCase","within"],"sources":["../../src/ConfigProvider.ts"],"sourcesContent":[null],"mappings":";;;;;;AAUA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAwD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb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AClBhC,QAAQ,CAACgC,OAAO;AAElB;;;;;;;;;AASO,MAAMC,YAAY,GAAAV,OAAA,CAAAU,YAAA,GAA6CjC,QAAQ,CAACiC,YAAY;AAE3F;;;;;;;;;AASO,MAAMC,YAAY,GAAAX,OAAA,CAAAW,YAAA,GAqBrBlC,QAAQ,CAACkC,YAAY;AAEzB;;;;;;;;;AASO,MAAMC,SAAS,GAAAZ,OAAA,CAAAY,SAAA,GAA6CnC,QAAQ,CAACmC,SAAS;AAErF;;;;;;;;;AASO,MAAMC,SAAS,GAAAb,OAAA,CAAAa,SAAA,GAA6CpC,QAAQ,CAACoC,SAAS;AAErF;;;;;;;;;AASO,MAAMC,MAAM,GAAAd,OAAA,CAAAc,MAAA,GAqBfrC,QAAQ,CAACqC,MAAM;AAEnB;;;;;;;;AAQO,MAAMC,MAAM,GAAAf,OAAA,CAAAe,MAAA,GAmBftC,QAAQ,CAACsC,MAAM;AAEnB;;;;;;;;;AASO,MAAMC,QAAQ,GAAAhB,OAAA,CAAAgB,QAAA,GAqBjBvC,QAAQ,CAACuC,QAAQ;AAErB;;;;;;;;;AASO,MAAMC,SAAS,GAAAjB,OAAA,CAAAiB,SAAA,GAA6CxC,QAAQ,CAACwC,SAAS;AAErF;;;;;;;;;AASO,MAAMC,SAAS,GAAAlB,OAAA,CAAAkB,SAAA,GAA6CzC,QAAQ,CAACyC,SAAS;AAErF;;;;;;;AAOO,MAAMC,MAAM,GAAAnB,OAAA,CAAAmB,MAAA,GAqBf1C,QAAQ,CAAC0C,MAAM","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/ConfigProviderPathPatch.js b/backend/node_modules/effect/dist/cjs/ConfigProviderPathPatch.js new file mode 100644 index 0000000000000000000000000000000000000000..92942e340c662406b4e640ec792f8dc9d532906f --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/ConfigProviderPathPatch.js @@ -0,0 +1,38 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.unnested = exports.nested = exports.mapName = exports.empty = exports.andThen = void 0; +var internal = _interopRequireWildcard(require("./internal/configProvider/pathPatch.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * @since 2.0.0 + * @category constructors + */ +const empty = exports.empty = internal.empty; +/** + * @since 2.0.0 + * @category constructors + */ +const andThen = exports.andThen = internal.andThen; +/** + * @since 2.0.0 + * @category constructors + */ +const mapName = exports.mapName = internal.mapName; +/** + * @since 2.0.0 + * @category constructors + */ +const nested = exports.nested = internal.nested; +/** + * @since 2.0.0 + * @category constructors + */ +const unnested = exports.unnested = internal.unnested; +//# sourceMappingURL=ConfigProviderPathPatch.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/ConfigProviderPathPatch.js.map b/backend/node_modules/effect/dist/cjs/ConfigProviderPathPatch.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f385baf9931e08d5ab731dd1b9b17a187ea221d3 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/ConfigProviderPathPatch.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ConfigProviderPathPatch.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","empty","exports","andThen","mapName","nested","unnested"],"sources":["../../src/ConfigProviderPathPatch.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAA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ACyB,OAAO;AAEpB;;;;AAIO,MAAMC,MAAM,GAAAH,OAAA,CAAAG,MAAA,GAWf1B,QAAQ,CAAC0B,MAAM;AAEnB;;;;AAIO,MAAMC,QAAQ,GAAAJ,OAAA,CAAAI,QAAA,GAWjB3B,QAAQ,CAAC2B,QAAQ","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Console.js b/backend/node_modules/effect/dist/cjs/Console.js new file mode 100644 index 0000000000000000000000000000000000000000..f1508f182a1f3d86972746325386d01f54a972b8 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Console.js @@ -0,0 +1,125 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.withTime = exports.withGroup = exports.withConsole = exports.warn = exports.trace = exports.timeLog = exports.time = exports.table = exports.setConsole = exports.log = exports.info = exports.group = exports.error = exports.dirxml = exports.dir = exports.debug = exports.countReset = exports.count = exports.consoleWith = exports.clear = exports.assert = exports.TypeId = exports.Console = void 0; +var internal = _interopRequireWildcard(require("./internal/console.js")); +var defaultConsole = _interopRequireWildcard(require("./internal/defaultServices/console.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category type ids + */ +const TypeId = exports.TypeId = defaultConsole.TypeId; +/** + * @since 2.0.0 + * @category context + */ +const Console = exports.Console = defaultConsole.consoleTag; +/** + * @since 2.0.0 + * @category default services + */ +const withConsole = exports.withConsole = internal.withConsole; +/** + * @since 2.0.0 + * @category default services + */ +const setConsole = exports.setConsole = internal.setConsole; +/** + * @since 2.0.0 + * @category accessor + */ +const consoleWith = exports.consoleWith = internal.consoleWith; +/** + * @since 2.0.0 + * @category accessor + */ +const assert = exports.assert = internal.assert; +/** + * @since 2.0.0 + * @category accessor + */ +const clear = exports.clear = internal.clear; +/** + * @since 2.0.0 + * @category accessor + */ +const count = exports.count = internal.count; +/** + * @since 2.0.0 + * @category accessor + */ +const countReset = exports.countReset = internal.countReset; +/** + * @since 2.0.0 + * @category accessor + */ +const debug = exports.debug = internal.debug; +/** + * @since 2.0.0 + * @category accessor + */ +const dir = exports.dir = internal.dir; +/** + * @since 2.0.0 + * @category accessor + */ +const dirxml = exports.dirxml = internal.dirxml; +/** + * @since 2.0.0 + * @category accessor + */ +const error = exports.error = internal.error; +/** + * @since 2.0.0 + * @category accessor + */ +const group = exports.group = internal.group; +/** + * @since 2.0.0 + * @category accessor + */ +const info = exports.info = internal.info; +/** + * @since 2.0.0 + * @category accessor + */ +const log = exports.log = internal.log; +/** + * @since 2.0.0 + * @category accessor + */ +const table = exports.table = internal.table; +/** + * @since 2.0.0 + * @category accessor + */ +const time = exports.time = internal.time; +/** + * @since 2.0.0 + * @category accessor + */ +const timeLog = exports.timeLog = internal.timeLog; +/** + * @since 2.0.0 + * @category accessor + */ +const trace = exports.trace = internal.trace; +/** + * @since 2.0.0 + * @category accessor + */ +const warn = exports.warn = internal.warn; +/** + * @since 2.0.0 + * @category accessor + */ +const withGroup = exports.withGroup = internal.withGroup; +/** + * @since 2.0.0 + * @category accessor + */ +const withTime = exports.withTime = internal.withTime; +//# sourceMappingURL=Console.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Console.js.map b/backend/node_modules/effect/dist/cjs/Console.js.map new file mode 100644 index 0000000000000000000000000000000000000000..7ea0283cdb8457a9b62338ae575f6e5bae5ec487 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Console.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Console.js","names":["internal","_interopRequireWildcard","require","defaultConsole","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","exports","Console","consoleTag","withConsole","setConsole","consoleWith","assert","clear","count","countReset","debug","dir","dirxml","error","group","info","log","table","time","timeLog","trace","warn","withGroup","withTime"],"sources":["../../src/Console.ts"],"sourcesContent":[null],"mappings":";;;;;;AAKA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAF,uBAAA,CAAAC,OAAA;AAAuE,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CA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C,KAAK,GAAAd,OAAA,CAAAc,KAAA,GAEgBtC,QAAQ,CAACsC,KAAK;AAEhD;;;;AAIO,MAAMC,IAAI,GAAAf,OAAA,CAAAe,IAAA,GAAkDvC,QAAQ,CAACuC,IAAI;AAEhF;;;;AAIO,MAAMC,GAAG,GAAAhB,OAAA,CAAAgB,GAAA,GAAkDxC,QAAQ,CAACwC,GAAG;AAE9E;;;;AAIO,MAAMC,KAAK,GAAAjB,OAAA,CAAAiB,KAAA,GAA2EzC,QAAQ,CAACyC,KAAK;AAE3G;;;;AAIO,MAAMC,IAAI,GAAAlB,OAAA,CAAAkB,IAAA,GAA+D1C,QAAQ,CAAC0C,IAAI;AAE7F;;;;AAIO,MAAMC,OAAO,GAAAnB,OAAA,CAAAmB,OAAA,GAAkE3C,QAAQ,CAAC2C,OAAO;AAEtG;;;;AAIO,MAAMC,KAAK,GAAApB,OAAA,CAAAoB,KAAA,GAAkD5C,QAAQ,CAAC4C,KAAK;AAElF;;;;AAIO,MAAMC,IAAI,GAAArB,OAAA,CAAAqB,IAAA,GAAkD7C,QAAQ,CAAC6C,IAAI;AAEhF;;;;AAIO,MAAMC,SAAS,GAAAtB,OAAA,CAAAsB,SAAA,GAsBlB9C,QAAQ,CAAC8C,SAAS;AAEtB;;;;AAIO,MAAMC,QAAQ,GAAAvB,OAAA,CAAAuB,QAAA,GAWjB/C,QAAQ,CAAC+C,QAAQ","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Cron.js b/backend/node_modules/effect/dist/cjs/Cron.js new file mode 100644 index 0000000000000000000000000000000000000000..a75db63226eab1ff5fa28a6375f827da23f36d1e --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Cron.js @@ -0,0 +1,679 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.unsafeParse = exports.sequenceReverse = exports.sequence = exports.prev = exports.parse = exports.next = exports.match = exports.make = exports.isParseError = exports.isCron = exports.equals = exports.TypeId = exports.ParseErrorTypeId = exports.ParseError = exports.Equivalence = void 0; +var Arr = _interopRequireWildcard(require("./Array.js")); +var Data = _interopRequireWildcard(require("./Data.js")); +var Either = _interopRequireWildcard(require("./Either.js")); +var Equal = _interopRequireWildcard(require("./Equal.js")); +var equivalence = _interopRequireWildcard(require("./Equivalence.js")); +var _Function = require("./Function.js"); +var Hash = _interopRequireWildcard(require("./Hash.js")); +var _Inspectable = require("./Inspectable.js"); +var dateTime = _interopRequireWildcard(require("./internal/dateTime.js")); +var N = _interopRequireWildcard(require("./Number.js")); +var Option = _interopRequireWildcard(require("./Option.js")); +var _Pipeable = require("./Pipeable.js"); +var _Predicate = require("./Predicate.js"); +var String = _interopRequireWildcard(require("./String.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * @since 2.0.0 + * @category symbols + */ +const TypeId = exports.TypeId = /*#__PURE__*/Symbol.for("effect/Cron"); +const CronProto = { + [TypeId]: TypeId, + [Equal.symbol](that) { + return isCron(that) && equals(this, that); + }, + [Hash.symbol]() { + return (0, _Function.pipe)(Hash.hash(this.tz), Hash.combine(Hash.array(Arr.fromIterable(this.seconds))), Hash.combine(Hash.array(Arr.fromIterable(this.minutes))), Hash.combine(Hash.array(Arr.fromIterable(this.hours))), Hash.combine(Hash.array(Arr.fromIterable(this.days))), Hash.combine(Hash.array(Arr.fromIterable(this.months))), Hash.combine(Hash.array(Arr.fromIterable(this.weekdays))), Hash.cached(this)); + }, + toString() { + return (0, _Inspectable.format)(this.toJSON()); + }, + toJSON() { + return { + _id: "Cron", + tz: this.tz, + seconds: Arr.fromIterable(this.seconds), + minutes: Arr.fromIterable(this.minutes), + hours: Arr.fromIterable(this.hours), + days: Arr.fromIterable(this.days), + months: Arr.fromIterable(this.months), + weekdays: Arr.fromIterable(this.weekdays) + }; + }, + [_Inspectable.NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + } +}; +/** + * Checks if a given value is a `Cron` instance. + * + * @since 2.0.0 + * @category guards + */ +const isCron = u => (0, _Predicate.hasProperty)(u, TypeId); +/** + * Creates a `Cron` instance. + * + * @since 2.0.0 + * @category constructors + */ +exports.isCron = isCron; +const make = values => { + const o = Object.create(CronProto); + o.seconds = new Set(Arr.sort(values.seconds ?? [0], N.Order)); + o.minutes = new Set(Arr.sort(values.minutes, N.Order)); + o.hours = new Set(Arr.sort(values.hours, N.Order)); + o.days = new Set(Arr.sort(values.days, N.Order)); + o.months = new Set(Arr.sort(values.months, N.Order)); + o.weekdays = new Set(Arr.sort(values.weekdays, N.Order)); + o.tz = Option.fromNullable(values.tz); + const seconds = Array.from(o.seconds); + const minutes = Array.from(o.minutes); + const hours = Array.from(o.hours); + const days = Array.from(o.days); + const months = Array.from(o.months); + const weekdays = Array.from(o.weekdays); + o.first = { + second: seconds[0] ?? 0, + minute: minutes[0] ?? 0, + hour: hours[0] ?? 0, + day: days[0] ?? 1, + month: (months[0] ?? 1) - 1, + weekday: weekdays[0] ?? 0 + }; + o.last = { + second: seconds[seconds.length - 1] ?? 59, + minute: minutes[minutes.length - 1] ?? 59, + hour: hours[hours.length - 1] ?? 23, + day: days[days.length - 1] ?? 31, + month: (months[months.length - 1] ?? 12) - 1, + weekday: weekdays[weekdays.length - 1] ?? 6 + }; + o.next = { + second: lookupTable(seconds, 60, "next"), + minute: lookupTable(minutes, 60, "next"), + hour: lookupTable(hours, 24, "next"), + day: lookupTable(days, 32, "next"), + month: lookupTable(months, 13, "next"), + weekday: lookupTable(weekdays, 7, "next") + }; + o.prev = { + second: lookupTable(seconds, 60, "prev"), + minute: lookupTable(minutes, 60, "prev"), + hour: lookupTable(hours, 24, "prev"), + day: lookupTable(days, 32, "prev"), + month: lookupTable(months, 13, "prev"), + weekday: lookupTable(weekdays, 7, "prev") + }; + return o; +}; +exports.make = make; +const lookupTable = (values, size, dir) => { + const result = new Array(size).fill(undefined); + if (values.length === 0) { + return result; + } + let current = undefined; + if (dir === "next") { + let index = values.length - 1; + for (let i = size - 1; i >= 0; i--) { + while (index >= 0 && values[index] >= i) { + current = values[index--]; + } + result[i] = current; + } + } else { + let index = 0; + for (let i = 0; i < size; i++) { + while (index < values.length && values[index] <= i) { + current = values[index++]; + } + result[i] = current; + } + } + return result; +}; +/** + * @since 2.0.0 + * @category symbol + */ +const ParseErrorTypeId = exports.ParseErrorTypeId = /*#__PURE__*/Symbol.for("effect/Cron/errors/ParseError"); +/** + * Represents a checked exception which occurs when decoding fails. + * + * @since 2.0.0 + * @category models + */ +class ParseError extends /*#__PURE__*/Data.TaggedError("CronParseError") { + /** + * @since 2.0.0 + */ + [ParseErrorTypeId] = ParseErrorTypeId; +} +/** + * Returns `true` if the specified value is an `ParseError`, `false` otherwise. + * + * @since 2.0.0 + * @category guards + */ +exports.ParseError = ParseError; +const isParseError = u => (0, _Predicate.hasProperty)(u, ParseErrorTypeId); +/** + * Parses a cron expression into a `Cron` instance. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Cron, Either } from "effect" + * + * // At 04:00 on every day-of-month from 8 through 14. + * assert.deepStrictEqual(Cron.parse("0 0 4 8-14 * *"), Either.right(Cron.make({ + * seconds: [0], + * minutes: [0], + * hours: [4], + * days: [8, 9, 10, 11, 12, 13, 14], + * months: [], + * weekdays: [] + * }))) + * ``` + * + * @since 2.0.0 + * @category constructors + */ +exports.isParseError = isParseError; +const parse = (cron, tz) => { + const segments = cron.split(" ").filter(String.isNonEmpty); + if (segments.length !== 5 && segments.length !== 6) { + return Either.left(new ParseError({ + message: `Invalid number of segments in cron expression`, + input: cron + })); + } + if (segments.length === 5) { + segments.unshift("0"); + } + const [seconds, minutes, hours, days, months, weekdays] = segments; + const zone = tz === undefined || dateTime.isTimeZone(tz) ? Either.right(tz) : Either.fromOption(dateTime.zoneFromString(tz), () => new ParseError({ + message: `Invalid time zone in cron expression`, + input: tz + })); + return Either.all({ + tz: zone, + seconds: parseSegment(seconds, secondOptions), + minutes: parseSegment(minutes, minuteOptions), + hours: parseSegment(hours, hourOptions), + days: parseSegment(days, dayOptions), + months: parseSegment(months, monthOptions), + weekdays: parseSegment(weekdays, weekdayOptions) + }).pipe(Either.map(make)); +}; +/** + * Parses a cron expression into a `Cron` instance. + * + * **Details** + * + * This function takes a cron expression as a string and attempts to parse it + * into a `Cron` instance. If the expression is valid, the resulting `Cron` + * instance will represent the schedule defined by the cron expression. + * + * If the expression is invalid, the function throws a `ParseError`. + * + * You can optionally provide a time zone (`tz`) to interpret the cron + * expression in a specific time zone. If no time zone is provided, the cron + * expression will use the default time zone. + * + * @example + * ```ts + * import { Cron } from "effect" + * + * // At 04:00 on every day-of-month from 8 through 14. + * console.log(Cron.unsafeParse("0 4 8-14 * *")) + * // Output: + * // { + * // _id: 'Cron', + * // tz: { _id: 'Option', _tag: 'None' }, + * // seconds: [ 0 ], + * // minutes: [ 0 ], + * // hours: [ 4 ], + * // days: [ + * // 8, 9, 10, 11, + * // 12, 13, 14 + * // ], + * // months: [], + * // weekdays: [] + * // } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +exports.parse = parse; +const unsafeParse = (cron, tz) => Either.getOrThrowWith(parse(cron, tz), _Function.identity); +/** + * Checks if a given `Date` falls within an active `Cron` time window. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Cron, Either } from "effect" + * + * const cron = Either.getOrThrow(Cron.parse("0 4 8-14 * *")) + * assert.deepStrictEqual(Cron.match(cron, new Date("2021-01-08 04:00:00")), true) + * assert.deepStrictEqual(Cron.match(cron, new Date("2021-01-08 05:00:00")), false) + * ``` + * + * @throws `IllegalArgumentException` if the given `DateTime.Input` is invalid. + * + * @since 2.0.0 + */ +exports.unsafeParse = unsafeParse; +const match = (cron, date) => { + const parts = dateTime.unsafeMakeZoned(date, { + timeZone: Option.getOrUndefined(cron.tz) + }).pipe(dateTime.toParts); + if (cron.seconds.size !== 0 && !cron.seconds.has(parts.seconds)) { + return false; + } + if (cron.minutes.size !== 0 && !cron.minutes.has(parts.minutes)) { + return false; + } + if (cron.hours.size !== 0 && !cron.hours.has(parts.hours)) { + return false; + } + if (cron.months.size !== 0 && !cron.months.has(parts.month)) { + return false; + } + if (cron.days.size === 0 && cron.weekdays.size === 0) { + return true; + } + if (cron.weekdays.size === 0) { + return cron.days.has(parts.day); + } + if (cron.days.size === 0) { + return cron.weekdays.has(parts.weekDay); + } + return cron.days.has(parts.day) || cron.weekdays.has(parts.weekDay); +}; +exports.match = match; +const daysInMonth = date => new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth() + 1, 0)).getUTCDate(); +/** + * Returns the next run `Date` for the given `Cron` instance. + * + * Uses the current time as a starting point if no value is provided for `startFrom`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Cron, Either } from "effect" + * + * const after = new Date("2021-01-01 00:00:00") + * const cron = Either.getOrThrow(Cron.parse("0 4 8-14 * *")) + * assert.deepStrictEqual(Cron.next(cron, after), new Date("2021-01-08 04:00:00")) + * ``` + * + * @throws `IllegalArgumentException` if the given `DateTime.Input` is invalid. + * @throws `Error` if the next run date cannot be found within 10,000 iterations. + * + * @since 2.0.0 + */ +const next = (cron, startFrom) => { + return stepCron(cron, startFrom, "next"); +}; +/** + * Returns the previous run `Date` for the given `Cron` instance. + * + * Uses the current time as a starting point if no value is provided for `startFrom`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Cron, Either } from "effect" + * + * const before = new Date("2021-01-15 00:00:00") + * const cron = Either.getOrThrow(Cron.parse("0 4 8-14 * *")) + * assert.deepStrictEqual(Cron.prev(cron, before), new Date("2021-01-14 04:00:00")) + * ``` + * + * @throws `IllegalArgumentException` if the given `DateTime.Input` is invalid. + * @throws `Error` if the previous run date cannot be found within 10,000 iterations. + * + * @since 3.20.0 + */ +exports.next = next; +const prev = (cron, startFrom) => { + return stepCron(cron, startFrom, "prev"); +}; +/** @internal */ +exports.prev = prev; +const stepCron = (cron, startFrom, direction) => { + const tz = Option.getOrUndefined(cron.tz); + const zoned = dateTime.unsafeMakeZoned(startFrom ?? new Date(), { + timeZone: tz + }); + const prev = direction === "prev"; + const tick = prev ? -1 : 1; + const table = cron[direction]; + const boundary = prev ? cron.last : cron.first; + const needsStep = prev ? (next, current) => next < current : (next, current) => next > current; + const utc = tz !== undefined && dateTime.isTimeZoneNamed(tz) && tz.id === "UTC"; + const adjustDst = utc ? _Function.constVoid : current => { + const adjusted = dateTime.unsafeMakeZoned(current, { + timeZone: zoned.zone, + adjustForTimeZone: true, + disambiguation: prev ? "later" : undefined + }).pipe(dateTime.toDate); + const drift = current.getTime() - adjusted.getTime(); + if (prev ? drift !== 0 : drift > 0) { + current.setTime(adjusted.getTime()); + } + }; + const result = dateTime.mutate(zoned, current => { + current.setUTCSeconds(current.getUTCSeconds() + tick, 0); + for (let i = 0; i < 10_000; i++) { + if (cron.seconds.size !== 0) { + const currentSecond = current.getUTCSeconds(); + const nextSecond = table.second[currentSecond]; + if (nextSecond === undefined) { + current.setUTCMinutes(current.getUTCMinutes() + tick, boundary.second); + adjustDst(current); + continue; + } + if (needsStep(nextSecond, currentSecond)) { + current.setUTCSeconds(nextSecond); + adjustDst(current); + continue; + } + } + if (cron.minutes.size !== 0) { + const currentMinute = current.getUTCMinutes(); + const nextMinute = table.minute[currentMinute]; + if (nextMinute === undefined) { + current.setUTCHours(current.getUTCHours() + tick, boundary.minute, boundary.second); + adjustDst(current); + continue; + } + if (needsStep(nextMinute, currentMinute)) { + current.setUTCMinutes(nextMinute, boundary.second); + adjustDst(current); + continue; + } + } + if (cron.hours.size !== 0) { + const currentHour = current.getUTCHours(); + const nextHour = table.hour[currentHour]; + if (nextHour === undefined) { + current.setUTCDate(current.getUTCDate() + tick); + current.setUTCHours(boundary.hour, boundary.minute, boundary.second); + adjustDst(current); + continue; + } + if (needsStep(nextHour, currentHour)) { + current.setUTCHours(nextHour, boundary.minute, boundary.second); + adjustDst(current); + continue; + } + } + if (cron.weekdays.size !== 0 || cron.days.size !== 0) { + let a = prev ? -Infinity : Infinity; + let b = prev ? -Infinity : Infinity; + if (cron.weekdays.size !== 0) { + const currentWeekday = current.getUTCDay(); + const nextWeekday = table.weekday[currentWeekday]; + if (nextWeekday === undefined) { + a = prev ? currentWeekday - 7 + boundary.weekday : 7 - currentWeekday + boundary.weekday; + } else { + a = nextWeekday - currentWeekday; + } + } + // Only check day-of-month if weekday constraint not already satisfied (they're OR'd) + if (cron.days.size !== 0 && a !== 0) { + const currentDay = current.getUTCDate(); + const nextDay = table.day[currentDay]; + if (nextDay === undefined) { + if (prev) { + // When wrapping to previous month, calculate days back: + // Current day offset + gap from end of prev month to target day + // Example: June 3 → May 20 with boundary.day=20: -(3 + (31 - 20)) = -14 + const prevMonthDays = daysInMonth(new Date(Date.UTC(current.getUTCFullYear(), current.getUTCMonth(), 0))); + b = -(currentDay + (prevMonthDays - boundary.day)); + } else { + b = daysInMonth(current) - currentDay + boundary.day; + } + } else { + b = nextDay - currentDay; + } + } + const addDays = prev ? Math.max(a, b) : Math.min(a, b); + if (addDays !== 0) { + current.setUTCDate(current.getUTCDate() + addDays); + current.setUTCHours(boundary.hour, boundary.minute, boundary.second); + adjustDst(current); + continue; + } + } + if (cron.months.size !== 0) { + const currentMonth = current.getUTCMonth() + 1; + const nextMonth = table.month[currentMonth]; + const clampBoundaryDay = targetMonthIndex => { + if (cron.days.size !== 0) { + return boundary.day; + } + const maxDayInMonth = daysInMonth(new Date(Date.UTC(current.getUTCFullYear(), targetMonthIndex, 1))); + return Math.min(boundary.day, maxDayInMonth); + }; + if (nextMonth === undefined) { + current.setUTCFullYear(current.getUTCFullYear() + tick); + current.setUTCMonth(boundary.month, clampBoundaryDay(boundary.month)); + current.setUTCHours(boundary.hour, boundary.minute, boundary.second); + adjustDst(current); + continue; + } + if (needsStep(nextMonth, currentMonth)) { + const targetMonthIndex = nextMonth - 1; + current.setUTCMonth(targetMonthIndex, clampBoundaryDay(targetMonthIndex)); + current.setUTCHours(boundary.hour, boundary.minute, boundary.second); + adjustDst(current); + continue; + } + } + return; + } + throw new Error("Unable to find next cron date"); + }); + return dateTime.toDateUtc(result); +}; +/** + * Returns an `IterableIterator` which yields the sequence of `Date`s that match the `Cron` instance. + * + * @since 2.0.0 + */ +const sequence = function* (cron, startFrom) { + while (true) { + yield startFrom = next(cron, startFrom); + } +}; +/** + * Returns an `IterableIterator` which yields the sequence of `Date`s that match the `Cron` instance, + * in reverse direction. + * + * @since 3.20.0 + */ +exports.sequence = sequence; +const sequenceReverse = function* (cron, startFrom) { + while (true) { + yield startFrom = prev(cron, startFrom); + } +}; +/** + * @category instances + * @since 2.0.0 + */ +exports.sequenceReverse = sequenceReverse; +const Equivalence = exports.Equivalence = /*#__PURE__*/equivalence.make((self, that) => restrictionsEquals(self.seconds, that.seconds) && restrictionsEquals(self.minutes, that.minutes) && restrictionsEquals(self.hours, that.hours) && restrictionsEquals(self.days, that.days) && restrictionsEquals(self.months, that.months) && restrictionsEquals(self.weekdays, that.weekdays)); +const restrictionsArrayEquals = /*#__PURE__*/equivalence.array(equivalence.number); +const restrictionsEquals = (self, that) => restrictionsArrayEquals(Arr.fromIterable(self), Arr.fromIterable(that)); +/** + * Checks if two `Cron`s are equal. + * + * @since 2.0.0 + * @category predicates + */ +const equals = exports.equals = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => Equivalence(self, that)); +const secondOptions = { + min: 0, + max: 59 +}; +const minuteOptions = { + min: 0, + max: 59 +}; +const hourOptions = { + min: 0, + max: 23 +}; +const dayOptions = { + min: 1, + max: 31 +}; +const monthOptions = { + min: 1, + max: 12, + aliases: { + jan: 1, + feb: 2, + mar: 3, + apr: 4, + may: 5, + jun: 6, + jul: 7, + aug: 8, + sep: 9, + oct: 10, + nov: 11, + dec: 12 + } +}; +const weekdayOptions = { + min: 0, + max: 6, + aliases: { + sun: 0, + mon: 1, + tue: 2, + wed: 3, + thu: 4, + fri: 5, + sat: 6 + } +}; +const parseSegment = (input, options) => { + const capacity = options.max - options.min + 1; + const values = new Set(); + const fields = input.split(","); + for (const field of fields) { + const [raw, step] = splitStep(field); + if (raw === "*" && step === undefined) { + return Either.right(new Set()); + } + if (step !== undefined) { + if (!Number.isInteger(step)) { + return Either.left(new ParseError({ + message: `Expected step value to be a positive integer`, + input + })); + } + if (step < 1) { + return Either.left(new ParseError({ + message: `Expected step value to be greater than 0`, + input + })); + } + if (step > options.max) { + return Either.left(new ParseError({ + message: `Expected step value to be less than ${options.max}`, + input + })); + } + } + if (raw === "*") { + for (let i = options.min; i <= options.max; i += step ?? 1) { + values.add(i); + } + } else { + const [left, right] = splitRange(raw, options.aliases); + if (!Number.isInteger(left)) { + return Either.left(new ParseError({ + message: `Expected a positive integer`, + input + })); + } + if (left < options.min || left > options.max) { + return Either.left(new ParseError({ + message: `Expected a value between ${options.min} and ${options.max}`, + input + })); + } + if (right === undefined) { + values.add(left); + } else { + if (!Number.isInteger(right)) { + return Either.left(new ParseError({ + message: `Expected a positive integer`, + input + })); + } + if (right < options.min || right > options.max) { + return Either.left(new ParseError({ + message: `Expected a value between ${options.min} and ${options.max}`, + input + })); + } + if (left > right) { + return Either.left(new ParseError({ + message: `Invalid value range`, + input + })); + } + for (let i = left; i <= right; i += step ?? 1) { + values.add(i); + } + } + } + if (values.size >= capacity) { + return Either.right(new Set()); + } + } + return Either.right(values); +}; +const splitStep = input => { + const seperator = input.indexOf("/"); + if (seperator !== -1) { + return [input.slice(0, seperator), Number(input.slice(seperator + 1))]; + } + return [input, undefined]; +}; +const splitRange = (input, aliases) => { + const seperator = input.indexOf("-"); + if (seperator !== -1) { + return [aliasOrValue(input.slice(0, seperator), aliases), aliasOrValue(input.slice(seperator + 1), aliases)]; + } + return [aliasOrValue(input, aliases), undefined]; +}; +function aliasOrValue(field, aliases) { + return aliases?.[field.toLocaleLowerCase()] ?? Number(field); +} +//# sourceMappingURL=Cron.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Cron.js.map b/backend/node_modules/effect/dist/cjs/Cron.js.map new file mode 100644 index 0000000000000000000000000000000000000000..3e7d0a8ff84a794f5978b2b20872073cf8e76c91 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Cron.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Cron.js","names":["Arr","_interopRequireWildcard","require","Data","Either","Equal","equivalence","_Function","Hash","_Inspectable","dateTime","N","Option","_Pipeable","_Predicate","String","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","exports","Symbol","for","CronProto","symbol","that","isCron","equals","pipe","hash","tz","combine","array","fromIterable","seconds","minutes","hours","days","months","weekdays","cached","toString","format","toJSON","_id","NodeInspectSymbol","pipeArguments","arguments","u","hasProperty","make","values","create","Set","sort","Order","fromNullable","Array","from","first","second","minute","hour","day","month","weekday","last","length","next","lookupTable","prev","size","dir","result","fill","undefined","current","index","ParseErrorTypeId","ParseError","TaggedError","isParseError","parse","cron","segments","split","filter","isNonEmpty","left","message","input","unshift","zone","isTimeZone","right","fromOption","zoneFromString","all","parseSegment","secondOptions","minuteOptions","hourOptions","dayOptions","monthOptions","weekdayOptions","map","unsafeParse","getOrThrowWith","identity","match","date","parts","unsafeMakeZoned","timeZone","getOrUndefined","toParts","weekDay","daysInMonth","Date","UTC","getUTCFullYear","getUTCMonth","getUTCDate","startFrom","stepCron","direction","zoned","tick","table","boundary","needsStep","utc","isTimeZoneNamed","id","adjustDst","constVoid","adjusted","adjustForTimeZone","disambiguation","toDate","drift","getTime","setTime","mutate","setUTCSeconds","getUTCSeconds","currentSecond","nextSecond","setUTCMinutes","getUTCMinutes","currentMinute","nextMinute","setUTCHours","getUTCHours","currentHour","nextHour","setUTCDate","a","Infinity","b","currentWeekday","getUTCDay","nextWeekday","currentDay","nextDay","prevMonthDays","addDays","Math","max","min","currentMonth","nextMonth","clampBoundaryDay","targetMonthIndex","maxDayInMonth","setUTCFullYear","setUTCMonth","Error","toDateUtc","sequence","sequenceReverse","Equivalence","self","restrictionsEquals","restrictionsArrayEquals","number","dual","aliases","jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec","sun","mon","tue","wed","thu","fri","sat","options","capacity","fields","field","raw","step","splitStep","Number","isInteger","add","splitRange","seperator","indexOf","slice","aliasOrValue","toLocaleLowerCase"],"sources":["../../src/Cron.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,GAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAF,uBAAA,CAAAC,OAAA;AAEA,IAAAE,MAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,KAAA,GAAAJ,uBAAA,CAAAC,OAAA;AACA,IAAAI,WAAA,GAAAL,uBAAA,CAAAC,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,IAAA,GAAAP,uBAAA,CAAAC,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAT,uBAAA,CAAAC,OAAA;AACA,IAAAS,CAAA,GAAAV,uBAAA,CAAAC,OAAA;AACA,IAAAU,MAAA,GAAAX,uBAAA,CAAAC,OAAA;AACA,IAAAW,SAAA,GAAAX,OAAA;AACA,IAAAY,UAAA,GAAAZ,OAAA;AACA,IAAAa,MAAA,GAAAd,uBAAA,CAAAC,OAAA;AAAqC,SAAAD,wBAAAe,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAjB,uBAAA,YAAAA,CAAAe,CA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CAAC,CAAC,CAAC;EACxE;EAEA,OAAO,CAAChI,KAAK,EAAEf,SAAS,CAAC;AAC3B,CAAC;AAED,MAAM8I,UAAU,GAAGA,CAAC/H,KAAa,EAAEiG,OAAgC,KAAkC;EACnG,MAAM+B,SAAS,GAAGhI,KAAK,CAACiI,OAAO,CAAC,GAAG,CAAC;EACpC,IAAID,SAAS,KAAK,CAAC,CAAC,EAAE;IACpB,OAAO,CAACG,YAAY,CAACnI,KAAK,CAACkI,KAAK,CAAC,CAAC,EAAEF,SAAS,CAAC,EAAE/B,OAAO,CAAC,EAAEkC,YAAY,CAACnI,KAAK,CAACkI,KAAK,CAACF,SAAS,GAAG,CAAC,CAAC,EAAE/B,OAAO,CAAC,CAAC;EAC9G;EAEA,OAAO,CAACkC,YAAY,CAACnI,KAAK,EAAEiG,OAAO,CAAC,EAAEhH,SAAS,CAAC;AAClD,CAAC;AAED,SAASkJ,YAAYA,CAACX,KAAa,EAAEvB,OAAgC;EACnE,OAAOA,OAAO,GAAGuB,KAAK,CAACY,iBAAiB,EAAE,CAAC,IAAIR,MAAM,CAACJ,KAAK,CAAC;AAC9D","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Data.js b/backend/node_modules/effect/dist/cjs/Data.js new file mode 100644 index 0000000000000000000000000000000000000000..e74ffee42cff5dab31f8c21b32d5ef6107f27204 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Data.js @@ -0,0 +1,291 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.unsafeStruct = exports.unsafeArray = exports.tuple = exports.taggedEnum = exports.tagged = exports.struct = exports.case = exports.array = exports.TaggedError = exports.TaggedClass = exports.Structural = exports.Error = exports.Class = void 0; +var core = _interopRequireWildcard(require("./internal/core.js")); +var internal = _interopRequireWildcard(require("./internal/data.js")); +var _effectable = require("./internal/effectable.js"); +var Predicate = _interopRequireWildcard(require("./Predicate.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { Data, Equal } from "effect" + * + * const alice = Data.struct({ name: "Alice", age: 30 }) + * + * const bob = Data.struct({ name: "Bob", age: 40 }) + * + * assert.deepStrictEqual(Equal.equals(alice, alice), true) + * assert.deepStrictEqual(Equal.equals(alice, Data.struct({ name: "Alice", age: 30 })), true) + * + * assert.deepStrictEqual(Equal.equals(alice, { name: "Alice", age: 30 }), false) + * assert.deepStrictEqual(Equal.equals(alice, bob), false) + * ``` + * + * @category constructors + * @since 2.0.0 + */ +const struct = exports.struct = internal.struct; +/** + * @category constructors + * @since 2.0.0 + */ +const unsafeStruct = as => Object.setPrototypeOf(as, _effectable.StructuralPrototype); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { Data, Equal } from "effect" + * + * const alice = Data.tuple("Alice", 30) + * + * const bob = Data.tuple("Bob", 40) + * + * assert.deepStrictEqual(Equal.equals(alice, alice), true) + * assert.deepStrictEqual(Equal.equals(alice, Data.tuple("Alice", 30)), true) + * + * assert.deepStrictEqual(Equal.equals(alice, ["Alice", 30]), false) + * assert.deepStrictEqual(Equal.equals(alice, bob), false) + * ``` + * + * @category constructors + * @since 2.0.0 + */ +exports.unsafeStruct = unsafeStruct; +const tuple = (...as) => unsafeArray(as); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { Data, Equal } from "effect" + * + * const alice = Data.struct({ name: "Alice", age: 30 }) + * const bob = Data.struct({ name: "Bob", age: 40 }) + * + * const persons = Data.array([alice, bob]) + * + * assert.deepStrictEqual( + * Equal.equals( + * persons, + * Data.array([ + * Data.struct({ name: "Alice", age: 30 }), + * Data.struct({ name: "Bob", age: 40 }) + * ]) + * ), + * true + * ) + * ``` + * + * @category constructors + * @since 2.0.0 + */ +exports.tuple = tuple; +const array = as => unsafeArray(as.slice(0)); +/** + * @category constructors + * @since 2.0.0 + */ +exports.array = array; +const unsafeArray = as => Object.setPrototypeOf(as, internal.ArrayProto); +exports.unsafeArray = unsafeArray; +const _case = () => args => args === undefined ? Object.create(_effectable.StructuralPrototype) : struct(args); +exports.case = _case; +/** + * Provides a tagged constructor for the specified `Case`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Data } from "effect" + * + * interface Person { + * readonly _tag: "Person" // the tag + * readonly name: string + * } + * + * const Person = Data.tagged("Person") + * + * const mike = Person({ name: "Mike" }) + * + * assert.deepEqual(mike, { _tag: "Person", name: "Mike" }) + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const tagged = tag => args => { + const value = args === undefined ? Object.create(_effectable.StructuralPrototype) : struct(args); + value._tag = tag; + return value; +}; +/** + * Provides a constructor for a Case Class. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Data, Equal } from "effect" + * + * class Person extends Data.Class<{ readonly name: string }> {} + * + * // Creating instances of Person + * const mike1 = new Person({ name: "Mike" }) + * const mike2 = new Person({ name: "Mike" }) + * const john = new Person({ name: "John" }) + * + * // Checking equality + * assert.deepStrictEqual(Equal.equals(mike1, mike2), true) + * assert.deepStrictEqual(Equal.equals(mike1, john), false) + * ``` + * + * @since 2.0.0 + * @category constructors + */ +exports.tagged = tagged; +const Class = exports.Class = internal.Structural; +/** + * Provides a Tagged constructor for a Case Class. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Data, Equal } from "effect" + * + * class Person extends Data.TaggedClass("Person")<{ readonly name: string }> {} + * + * // Creating instances of Person + * const mike1 = new Person({ name: "Mike" }) + * const mike2 = new Person({ name: "Mike" }) + * const john = new Person({ name: "John" }) + * + * // Checking equality + * assert.deepStrictEqual(Equal.equals(mike1, mike2), true) + * assert.deepStrictEqual(Equal.equals(mike1, john), false) + * + * assert.deepStrictEqual(mike1._tag, "Person") + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const TaggedClass = tag => { + class Base extends Class { + _tag = tag; + } + return Base; +}; +/** + * @since 2.0.0 + * @category constructors + */ +exports.TaggedClass = TaggedClass; +const Structural = exports.Structural = internal.Structural; +/** + * Create a constructor for a tagged union of `Data` structs. + * + * You can also pass a `TaggedEnum.WithGenerics` if you want to add generics to + * the constructor. + * + * @example + * ```ts + * import { Data } from "effect" + * + * const { BadRequest, NotFound } = Data.taggedEnum< + * | { readonly _tag: "BadRequest"; readonly status: 400; readonly message: string } + * | { readonly _tag: "NotFound"; readonly status: 404; readonly message: string } + * >() + * + * const notFound = NotFound({ status: 404, message: "Not Found" }) + * ``` + * + * @example + * import { Data } from "effect" + * + * type MyResult = Data.TaggedEnum<{ + * Failure: { readonly error: E } + * Success: { readonly value: A } + * }> + * interface MyResultDefinition extends Data.TaggedEnum.WithGenerics<2> { + * readonly taggedEnum: MyResult + * } + * const { Failure, Success } = Data.taggedEnum() + * + * const success = Success({ value: 1 }) + * + * @category constructors + * @since 2.0.0 + */ +const taggedEnum = () => new Proxy({}, { + get(_target, tag, _receiver) { + if (tag === "$is") { + return Predicate.isTagged; + } else if (tag === "$match") { + return taggedMatch; + } + return tagged(tag); + } +}); +exports.taggedEnum = taggedEnum; +function taggedMatch() { + if (arguments.length === 1) { + const cases = arguments[0]; + return function (value) { + return cases[value._tag](value); + }; + } + const value = arguments[0]; + const cases = arguments[1]; + return cases[value._tag](value); +} +/** + * Provides a constructor for a Case Class. + * + * @since 2.0.0 + * @category constructors + */ +const Error = exports.Error = /*#__PURE__*/function () { + const plainArgsSymbol = /*#__PURE__*/Symbol.for("effect/Data/Error/plainArgs"); + const O = { + BaseEffectError: class extends core.YieldableError { + constructor(args) { + super(args?.message, args?.cause ? { + cause: args.cause + } : undefined); + if (args) { + Object.assign(this, args); + // @effect-diagnostics-next-line floatingEffect:off + Object.defineProperty(this, plainArgsSymbol, { + value: args, + enumerable: false + }); + } + } + toJSON() { + return { + ...this[plainArgsSymbol], + ...this + }; + } + } + }; + return O.BaseEffectError; +}(); +/** + * @since 2.0.0 + * @category constructors + */ +const TaggedError = tag => { + const O = { + BaseEffectError: class extends Error { + _tag = tag; + } + }; + O.BaseEffectError.prototype.name = tag; + return O.BaseEffectError; +}; +exports.TaggedError = TaggedError; +//# sourceMappingURL=Data.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Data.js.map b/backend/node_modules/effect/dist/cjs/Data.js.map new file mode 100644 index 0000000000000000000000000000000000000000..049c415bb5cb4176e674acb95994fad20e3289a1 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Data.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Data.js","names":["core","_interopRequireWildcard","require","internal","_effectable","Predicate","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","struct","exports","unsafeStruct","as","setPrototypeOf","StructuralPrototype","tuple","unsafeArray","array","slice","ArrayProto","_case","args","undefined","create","case","tagged","tag","value","_tag","Class","Structural","TaggedClass","Base","taggedEnum","Proxy","_target","_receiver","isTagged","taggedMatch","arguments","length","cases","Error","plainArgsSymbol","Symbol","for","O","BaseEffectError","YieldableError","constructor","message","cause","assign","enumerable","toJSON","TaggedError","prototype","name"],"sources":["../../src/Data.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,IAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAA2C,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD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AE9B,IAAI,CAAC8B;QAAK,CAAE,GAAG7B,SAAS,CAAC;QACrE,IAAID,IAAI,EAAE;UACRf,MAAM,CAAC8C,MAAM,CAAC,IAAI,EAAE/B,IAAI,CAAC;UACzB;UACAf,MAAM,CAACC,cAAc,CAAC,IAAI,EAAEoC,eAAe,EAAE;YAAEhB,KAAK,EAAEN,IAAI;YAAEgC,UAAU,EAAE;UAAK,CAAE,CAAC;QAClF;MACF;MACAC,MAAMA,CAAA;QACJ,OAAO;UAAE,GAAI,IAAY,CAACX,eAAe,CAAC;UAAE,GAAG;QAAI,CAAE;MACvD;;GAEH;EACD,OAAOG,CAAC,CAACC,eAAe;AAC1B,CAAC,CAAC,CAAE;AAEJ;;;;AAIO,MAAMQ,WAAW,GAAwB7B,GAAQ,IAEW;EACjE,MAAMoB,CAAC,GAAG;IACRC,eAAe,EAAE,cAAcL,KAAS;MAC7Bd,IAAI,GAAGF,GAAG;;GAEtB;EACCoB,CAAC,CAACC,eAAe,CAACS,SAAiB,CAACC,IAAI,GAAG/B,GAAG;EAChD,OAAOoB,CAAC,CAACC,eAAsB;AACjC,CAAC;AAAArC,OAAA,CAAA6C,WAAA,GAAAA,WAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/DateTime.js b/backend/node_modules/effect/dist/cjs/DateTime.js new file mode 100644 index 0000000000000000000000000000000000000000..b86f6391230f5964950c9fdc3f10618936b901a6 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/DateTime.js @@ -0,0 +1,1084 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.zonedOffsetIso = exports.zonedOffset = exports.zoneUnsafeMakeNamed = exports.zoneToString = exports.zoneMakeOffset = exports.zoneMakeNamedEffect = exports.zoneMakeNamed = exports.zoneMakeLocal = exports.zoneFromString = exports.withDateUtc = exports.withDate = exports.withCurrentZoneOffset = exports.withCurrentZoneNamed = exports.withCurrentZoneLocal = exports.withCurrentZone = exports.unsafeSetZoneNamed = exports.unsafeNow = exports.unsafeMakeZoned = exports.unsafeMake = exports.unsafeIsPast = exports.unsafeIsFuture = exports.unsafeFromDate = exports.toUtc = exports.toPartsUtc = exports.toParts = exports.toEpochMillis = exports.toDateUtc = exports.toDate = exports.subtractDuration = exports.subtract = exports.startOf = exports.setZoneOffset = exports.setZoneNamed = exports.setZoneCurrent = exports.setZone = exports.setPartsUtc = exports.setParts = exports.removeTime = exports.nowInCurrentZone = exports.nowAsDate = exports.now = exports.nearest = exports.mutateUtc = exports.mutate = exports.min = exports.max = exports.match = exports.mapEpochMillis = exports.makeZonedFromString = exports.makeZoned = exports.make = exports.lessThanOrEqualTo = exports.lessThan = exports.layerCurrentZoneOffset = exports.layerCurrentZoneNamed = exports.layerCurrentZoneLocal = exports.layerCurrentZone = exports.isZoned = exports.isUtc = exports.isTimeZoneOffset = exports.isTimeZoneNamed = exports.isTimeZone = exports.isPast = exports.isFuture = exports.isDateTime = exports.greaterThanOrEqualTo = exports.greaterThan = exports.getPartUtc = exports.getPart = exports.formatUtc = exports.formatLocal = exports.formatIsoZoned = exports.formatIsoOffset = exports.formatIsoDateUtc = exports.formatIsoDate = exports.formatIso = exports.formatIntl = exports.format = exports.endOf = exports.distanceDurationEither = exports.distanceDuration = exports.distance = exports.clamp = exports.between = exports.addDuration = exports.add = exports.TypeId = exports.TimeZoneTypeId = exports.Order = exports.Equivalence = exports.CurrentTimeZone = void 0; +var Context = _interopRequireWildcard(require("./Context.js")); +var Effect = _interopRequireWildcard(require("./Effect.js")); +var _Function = require("./Function.js"); +var Internal = _interopRequireWildcard(require("./internal/dateTime.js")); +var Layer = _interopRequireWildcard(require("./Layer.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 3.6.0 + * @category type ids + */ +const TypeId = exports.TypeId = Internal.TypeId; +/** + * @since 3.6.0 + * @category type ids + */ +const TimeZoneTypeId = exports.TimeZoneTypeId = Internal.TimeZoneTypeId; +// ============================================================================= +// guards +// ============================================================================= +/** + * @since 3.6.0 + * @category guards + */ +const isDateTime = exports.isDateTime = Internal.isDateTime; +/** + * @since 3.6.0 + * @category guards + */ +const isTimeZone = exports.isTimeZone = Internal.isTimeZone; +/** + * @since 3.6.0 + * @category guards + */ +const isTimeZoneOffset = exports.isTimeZoneOffset = Internal.isTimeZoneOffset; +/** + * @since 3.6.0 + * @category guards + */ +const isTimeZoneNamed = exports.isTimeZoneNamed = Internal.isTimeZoneNamed; +/** + * @since 3.6.0 + * @category guards + */ +const isUtc = exports.isUtc = Internal.isUtc; +/** + * @since 3.6.0 + * @category guards + */ +const isZoned = exports.isZoned = Internal.isZoned; +// ============================================================================= +// instances +// ============================================================================= +/** + * @since 3.6.0 + * @category instances + */ +const Equivalence = exports.Equivalence = Internal.Equivalence; +/** + * @since 3.6.0 + * @category instances + */ +const Order = exports.Order = Internal.Order; +/** + * @since 3.6.0 + */ +const clamp = exports.clamp = Internal.clamp; +// ============================================================================= +// constructors +// ============================================================================= +/** + * Create a `DateTime` from a `Date`. + * + * If the `Date` is invalid, an `IllegalArgumentException` will be thrown. + * + * @since 3.6.0 + * @category constructors + */ +const unsafeFromDate = exports.unsafeFromDate = Internal.unsafeFromDate; +/** + * Create a `DateTime` from one of the following: + * + * - A `DateTime` + * - A `Date` instance (invalid dates will throw an `IllegalArgumentException`) + * - The `number` of milliseconds since the Unix epoch + * - An object with the parts of a date + * - A `string` that can be parsed by `Date.parse` + * + * @since 3.6.0 + * @category constructors + * @example + * ```ts + * import { DateTime } from "effect" + * + * // from Date + * DateTime.unsafeMake(new Date()) + * + * // from parts + * DateTime.unsafeMake({ year: 2024 }) + * + * // from string + * DateTime.unsafeMake("2024-01-01") + * ``` + */ +const unsafeMake = exports.unsafeMake = Internal.unsafeMake; +/** + * Create a `DateTime.Zoned` using `DateTime.unsafeMake` and a time zone. + * + * The input is treated as UTC and then the time zone is attached, unless + * `adjustForTimeZone` is set to `true`. In that case, the input is treated as + * already in the time zone. + * + * When `adjustForTimeZone` is true and ambiguous times occur during DST transitions, + * the `disambiguation` option controls how to resolve the ambiguity: + * - `compatible` (default): Choose earlier time for repeated times, later for gaps + * - `earlier`: Always choose the earlier of two possible times + * - `later`: Always choose the later of two possible times + * - `reject`: Throw an error when ambiguous times are encountered + * + * @since 3.6.0 + * @category constructors + * @example + * ```ts + * import { DateTime } from "effect" + * + * DateTime.unsafeMakeZoned(new Date(), { timeZone: "Europe/London" }) + * ``` + */ +const unsafeMakeZoned = exports.unsafeMakeZoned = Internal.unsafeMakeZoned; +/** + * Create a `DateTime.Zoned` using `DateTime.make` and a time zone. + * + * The input is treated as UTC and then the time zone is attached, unless + * `adjustForTimeZone` is set to `true`. In that case, the input is treated as + * already in the time zone. + * + * When `adjustForTimeZone` is true and ambiguous times occur during DST transitions, + * the `disambiguation` option controls how to resolve the ambiguity: + * - `compatible` (default): Choose earlier time for repeated times, later for gaps + * - `earlier`: Always choose the earlier of two possible times + * - `later`: Always choose the later of two possible times + * - `reject`: Throw an error when ambiguous times are encountered + * + * If the date time input or time zone is invalid, `None` will be returned. + * + * @since 3.6.0 + * @category constructors + * @example + * ```ts + * import { DateTime } from "effect" + * + * DateTime.makeZoned(new Date(), { timeZone: "Europe/London" }) + * ``` + */ +const makeZoned = exports.makeZoned = Internal.makeZoned; +/** + * Create a `DateTime` from one of the following: + * + * - A `DateTime` + * - A `Date` instance (invalid dates will throw an `IllegalArgumentException`) + * - The `number` of milliseconds since the Unix epoch + * - An object with the parts of a date + * - A `string` that can be parsed by `Date.parse` + * + * If the input is invalid, `None` will be returned. + * + * @since 3.6.0 + * @category constructors + * @example + * ```ts + * import { DateTime } from "effect" + * + * // from Date + * DateTime.make(new Date()) + * + * // from parts + * DateTime.make({ year: 2024 }) + * + * // from string + * DateTime.make("2024-01-01") + * ``` + */ +const make = exports.make = Internal.make; +/** + * Create a `DateTime.Zoned` from a string. + * + * It uses the format: `YYYY-MM-DDTHH:mm:ss.sss+HH:MM[Time/Zone]`. + * + * @since 3.6.0 + * @category constructors + */ +const makeZonedFromString = exports.makeZonedFromString = Internal.makeZonedFromString; +/** + * Get the current time using the `Clock` service and convert it to a `DateTime`. + * + * @since 3.6.0 + * @category constructors + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * const now = yield* DateTime.now + * }) + * ``` + */ +const now = exports.now = Internal.now; +/** + * Get the current time using the `Clock` service. + * + * @since 3.14.0 + * @category constructors + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * const now = yield* DateTime.nowAsDate + * }) + * ``` + */ +const nowAsDate = exports.nowAsDate = Internal.nowAsDate; +/** + * Get the current time using `Date.now`. + * + * @since 3.6.0 + * @category constructors + */ +const unsafeNow = exports.unsafeNow = Internal.unsafeNow; +// ============================================================================= +// time zones +// ============================================================================= +/** + * For a `DateTime` returns a new `DateTime.Utc`. + * + * @since 3.13.0 + * @category time zones + * @example + * ```ts + * import { DateTime } from "effect" + * + * const now = DateTime.unsafeMakeZoned({ year: 2024 }, { timeZone: "Europe/London" }) + * + * // set as UTC + * const utc: DateTime.Utc = DateTime.toUtc(now) + * ``` + */ +const toUtc = exports.toUtc = Internal.toUtc; +/** + * Set the time zone of a `DateTime`, returning a new `DateTime.Zoned`. + * + * @since 3.6.0 + * @category time zones + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * const now = yield* DateTime.now + * const zone = DateTime.zoneUnsafeMakeNamed("Europe/London") + * + * // set the time zone + * const zoned: DateTime.Zoned = DateTime.setZone(now, zone) + * }) + * ``` + */ +const setZone = exports.setZone = Internal.setZone; +/** + * Add a fixed offset time zone to a `DateTime`. + * + * The offset is in milliseconds. + * + * @since 3.6.0 + * @category time zones + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * const now = yield* DateTime.now + * + * // set the offset time zone in milliseconds + * const zoned: DateTime.Zoned = DateTime.setZoneOffset(now, 3 * 60 * 60 * 1000) + * }) + * ``` + */ +const setZoneOffset = exports.setZoneOffset = Internal.setZoneOffset; +/** + * Attempt to create a named time zone from a IANA time zone identifier. + * + * If the time zone is invalid, an `IllegalArgumentException` will be thrown. + * + * @since 3.6.0 + * @category time zones + */ +const zoneUnsafeMakeNamed = exports.zoneUnsafeMakeNamed = Internal.zoneUnsafeMakeNamed; +/** + * Create a fixed offset time zone. + * + * @since 3.6.0 + * @category time zones + */ +const zoneMakeOffset = exports.zoneMakeOffset = Internal.zoneMakeOffset; +/** + * Create a named time zone from a IANA time zone identifier. If the time zone + * is invalid, `None` will be returned. + * + * @since 3.6.0 + * @category time zones + */ +const zoneMakeNamed = exports.zoneMakeNamed = Internal.zoneMakeNamed; +/** + * Create a named time zone from a IANA time zone identifier. If the time zone + * is invalid, it will fail with an `IllegalArgumentException`. + * + * @since 3.6.0 + * @category time zones + */ +const zoneMakeNamedEffect = exports.zoneMakeNamedEffect = Internal.zoneMakeNamedEffect; +/** + * Create a named time zone from the system's local time zone. + * + * @since 3.6.0 + * @category time zones + */ +const zoneMakeLocal = exports.zoneMakeLocal = Internal.zoneMakeLocal; +/** + * Try parse a TimeZone from a string + * + * @since 3.6.0 + * @category time zones + */ +const zoneFromString = exports.zoneFromString = Internal.zoneFromString; +/** + * Format a `TimeZone` as a string. + * + * @since 3.6.0 + * @category time zones + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * // Outputs "+03:00" + * DateTime.zoneToString(DateTime.zoneMakeOffset(3 * 60 * 60 * 1000)) + * + * // Outputs "Europe/London" + * DateTime.zoneToString(DateTime.zoneUnsafeMakeNamed("Europe/London")) + * ``` + */ +const zoneToString = exports.zoneToString = Internal.zoneToString; +/** + * Set the time zone of a `DateTime` from an IANA time zone identifier. If the + * time zone is invalid, `None` will be returned. + * + * @since 3.6.0 + * @category time zones + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * const now = yield* DateTime.now + * // set the time zone, returns an Option + * DateTime.setZoneNamed(now, "Europe/London") + * }) + * ``` + */ +const setZoneNamed = exports.setZoneNamed = Internal.setZoneNamed; +/** + * Set the time zone of a `DateTime` from an IANA time zone identifier. If the + * time zone is invalid, an `IllegalArgumentException` will be thrown. + * + * @since 3.6.0 + * @category time zones + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * const now = yield* DateTime.now + * // set the time zone + * DateTime.unsafeSetZoneNamed(now, "Europe/London") + * }) + * ``` + */ +const unsafeSetZoneNamed = exports.unsafeSetZoneNamed = Internal.unsafeSetZoneNamed; +// ============================================================================= +// comparisons +// ============================================================================= +/** + * Calulate the difference between two `DateTime` values, returning the number + * of milliseconds the `other` DateTime is from `self`. + * + * If `other` is *after* `self`, the result will be a positive number. + * + * @since 3.6.0 + * @category comparisons + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * const now = yield* DateTime.now + * const other = DateTime.add(now, { minutes: 1 }) + * + * // returns 60000 + * DateTime.distance(now, other) + * }) + * ``` + */ +const distance = exports.distance = Internal.distance; +/** + * Calulate the difference between two `DateTime` values. + * + * If the `other` DateTime is before `self`, the result will be a negative + * `Duration`, returned as a `Left`. + * + * If the `other` DateTime is after `self`, the result will be a positive + * `Duration`, returned as a `Right`. + * + * @since 3.6.0 + * @category comparisons + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * const now = yield* DateTime.now + * const other = DateTime.add(now, { minutes: 1 }) + * + * // returns Either.right(Duration.minutes(1)) + * DateTime.distanceDurationEither(now, other) + * + * // returns Either.left(Duration.minutes(1)) + * DateTime.distanceDurationEither(other, now) + * }) + * ``` + */ +const distanceDurationEither = exports.distanceDurationEither = Internal.distanceDurationEither; +/** + * Calulate the distance between two `DateTime` values. + * + * @since 3.6.0 + * @category comparisons + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * const now = yield* DateTime.now + * const other = DateTime.add(now, { minutes: 1 }) + * + * // returns Duration.minutes(1) + * DateTime.distanceDuration(now, other) + * }) + * ``` + */ +const distanceDuration = exports.distanceDuration = Internal.distanceDuration; +/** + * @since 3.6.0 + * @category comparisons + */ +const min = exports.min = Internal.min; +/** + * @since 3.6.0 + * @category comparisons + */ +const max = exports.max = Internal.max; +/** + * @since 3.6.0 + * @category comparisons + */ +const greaterThan = exports.greaterThan = Internal.greaterThan; +/** + * @since 3.6.0 + * @category comparisons + */ +const greaterThanOrEqualTo = exports.greaterThanOrEqualTo = Internal.greaterThanOrEqualTo; +/** + * @since 3.6.0 + * @category comparisons + */ +const lessThan = exports.lessThan = Internal.lessThan; +/** + * @since 3.6.0 + * @category comparisons + */ +const lessThanOrEqualTo = exports.lessThanOrEqualTo = Internal.lessThanOrEqualTo; +/** + * @since 3.6.0 + * @category comparisons + */ +const between = exports.between = Internal.between; +/** + * @since 3.6.0 + * @category comparisons + */ +const isFuture = exports.isFuture = Internal.isFuture; +/** + * @since 3.6.0 + * @category comparisons + */ +const unsafeIsFuture = exports.unsafeIsFuture = Internal.unsafeIsFuture; +/** + * @since 3.6.0 + * @category comparisons + */ +const isPast = exports.isPast = Internal.isPast; +/** + * @since 3.6.0 + * @category comparisons + */ +const unsafeIsPast = exports.unsafeIsPast = Internal.unsafeIsPast; +// ============================================================================= +// conversions +// ============================================================================= +/** + * Get the UTC `Date` of a `DateTime`. + * + * @since 3.6.0 + * @category conversions + */ +const toDateUtc = exports.toDateUtc = Internal.toDateUtc; +/** + * Convert a `DateTime` to a `Date`, applying the time zone first. + * + * @since 3.6.0 + * @category conversions + */ +const toDate = exports.toDate = Internal.toDate; +/** + * Calculate the time zone offset of a `DateTime.Zoned` in milliseconds. + * + * @since 3.6.0 + * @category conversions + */ +const zonedOffset = exports.zonedOffset = Internal.zonedOffset; +/** + * Calculate the time zone offset of a `DateTime` in milliseconds. + * + * The offset is formatted as "±HH:MM". + * + * @since 3.6.0 + * @category conversions + */ +const zonedOffsetIso = exports.zonedOffsetIso = Internal.zonedOffsetIso; +/** + * Get the milliseconds since the Unix epoch of a `DateTime`. + * + * @since 3.6.0 + * @category conversions + */ +const toEpochMillis = exports.toEpochMillis = Internal.toEpochMillis; +/** + * Remove the time aspect of a `DateTime`, first adjusting for the time + * zone. It will return a `DateTime.Utc` only containing the date. + * + * @since 3.6.0 + * @category conversions + * @example + * ```ts + * import { DateTime } from "effect" + * + * // returns "2024-01-01T00:00:00Z" + * DateTime.unsafeMakeZoned("2024-01-01T05:00:00Z", { + * timeZone: "Pacific/Auckland", + * adjustForTimeZone: true + * }).pipe( + * DateTime.removeTime, + * DateTime.formatIso + * ) + * ``` + */ +const removeTime = exports.removeTime = Internal.removeTime; +// ============================================================================= +// parts +// ============================================================================= +/** + * Get the different parts of a `DateTime` as an object. + * + * The parts will be time zone adjusted. + * + * @since 3.6.0 + * @category parts + */ +const toParts = exports.toParts = Internal.toParts; +/** + * Get the different parts of a `DateTime` as an object. + * + * The parts will be in UTC. + * + * @since 3.6.0 + * @category parts + */ +const toPartsUtc = exports.toPartsUtc = Internal.toPartsUtc; +/** + * Get a part of a `DateTime` as a number. + * + * The part will be in the UTC time zone. + * + * @since 3.6.0 + * @category parts + * @example + * ```ts + * import * as assert from "node:assert" + * import { DateTime } from "effect" + * + * const now = DateTime.unsafeMake({ year: 2024 }) + * const year = DateTime.getPartUtc(now, "year") + * assert.strictEqual(year, 2024) + * ``` + */ +const getPartUtc = exports.getPartUtc = Internal.getPartUtc; +/** + * Get a part of a `DateTime` as a number. + * + * The part will be time zone adjusted. + * + * @since 3.6.0 + * @category parts + * @example + * ```ts + * import * as assert from "node:assert" + * import { DateTime } from "effect" + * + * const now = DateTime.unsafeMakeZoned({ year: 2024 }, { timeZone: "Europe/London" }) + * const year = DateTime.getPart(now, "year") + * assert.strictEqual(year, 2024) + * ``` + */ +const getPart = exports.getPart = Internal.getPart; +/** + * Set the different parts of a `DateTime` as an object. + * + * The Date will be time zone adjusted. + * + * @since 3.6.0 + * @category parts + */ +const setParts = exports.setParts = Internal.setParts; +/** + * Set the different parts of a `DateTime` as an object. + * + * @since 3.6.0 + * @category parts + */ +const setPartsUtc = exports.setPartsUtc = Internal.setPartsUtc; +// ============================================================================= +// current time zone +// ============================================================================= +/** + * @since 3.11.0 + * @category current time zone + */ +class CurrentTimeZone extends /*#__PURE__*/Context.Tag("effect/DateTime/CurrentTimeZone")() {} +/** + * Set the time zone of a `DateTime` to the current time zone, which is + * determined by the `CurrentTimeZone` service. + * + * @since 3.6.0 + * @category current time zone + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * const now = yield* DateTime.now + * + * // set the time zone to "Europe/London" + * const zoned = yield* DateTime.setZoneCurrent(now) + * }).pipe(DateTime.withCurrentZoneNamed("Europe/London")) + * ``` + */ +exports.CurrentTimeZone = CurrentTimeZone; +const setZoneCurrent = self => Effect.map(CurrentTimeZone, zone => setZone(self, zone)); +/** + * Provide the `CurrentTimeZone` to an effect. + * + * @since 3.6.0 + * @category current time zone + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * const zone = DateTime.zoneUnsafeMakeNamed("Europe/London") + * + * Effect.gen(function* () { + * const now = yield* DateTime.nowInCurrentZone + * }).pipe(DateTime.withCurrentZone(zone)) + * ``` + */ +exports.setZoneCurrent = setZoneCurrent; +const withCurrentZone = exports.withCurrentZone = /*#__PURE__*/(0, _Function.dual)(2, (effect, zone) => Effect.provideService(effect, CurrentTimeZone, zone)); +/** + * Provide the `CurrentTimeZone` to an effect, using the system's local time + * zone. + * + * @since 3.6.0 + * @category current time zone + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * // will use the system's local time zone + * const now = yield* DateTime.nowInCurrentZone + * }).pipe(DateTime.withCurrentZoneLocal) + * ``` + */ +const withCurrentZoneLocal = effect => Effect.provideServiceEffect(effect, CurrentTimeZone, Effect.sync(zoneMakeLocal)); +/** + * Provide the `CurrentTimeZone` to an effect, using a offset. + * + * @since 3.6.0 + * @category current time zone + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * // will use the system's local time zone + * const now = yield* DateTime.nowInCurrentZone + * }).pipe(DateTime.withCurrentZoneOffset(3 * 60 * 60 * 1000)) + * ``` + */ +exports.withCurrentZoneLocal = withCurrentZoneLocal; +const withCurrentZoneOffset = exports.withCurrentZoneOffset = /*#__PURE__*/(0, _Function.dual)(2, (effect, offset) => Effect.provideService(effect, CurrentTimeZone, zoneMakeOffset(offset))); +/** + * Provide the `CurrentTimeZone` to an effect using an IANA time zone + * identifier. + * + * If the time zone is invalid, it will fail with an `IllegalArgumentException`. + * + * @since 3.6.0 + * @category current time zone + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * // will use the "Europe/London" time zone + * const now = yield* DateTime.nowInCurrentZone + * }).pipe(DateTime.withCurrentZoneNamed("Europe/London")) + * ``` + */ +const withCurrentZoneNamed = exports.withCurrentZoneNamed = /*#__PURE__*/(0, _Function.dual)(2, (effect, zone) => Effect.provideServiceEffect(effect, CurrentTimeZone, zoneMakeNamedEffect(zone))); +/** + * Get the current time as a `DateTime.Zoned`, using the `CurrentTimeZone`. + * + * @since 3.6.0 + * @category current time zone + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * // will use the "Europe/London" time zone + * const now = yield* DateTime.nowInCurrentZone + * }).pipe(DateTime.withCurrentZoneNamed("Europe/London")) + * ``` + */ +const nowInCurrentZone = exports.nowInCurrentZone = /*#__PURE__*/Effect.flatMap(now, setZoneCurrent); +// ============================================================================= +// mapping +// ============================================================================= +/** + * Modify a `DateTime` by applying a function to a cloned `Date` instance. + * + * The `Date` will first have the time zone applied if possible, and then be + * converted back to a `DateTime` within the same time zone. + * + * Supports `disambiguation` when the new wall clock time is ambiguous. + * + * @since 3.6.0 + * @category mapping + */ +const mutate = exports.mutate = Internal.mutate; +/** + * Modify a `DateTime` by applying a function to a cloned UTC `Date` instance. + * + * @since 3.6.0 + * @category mapping + */ +const mutateUtc = exports.mutateUtc = Internal.mutateUtc; +/** + * Transform a `DateTime` by applying a function to the number of milliseconds + * since the Unix epoch. + * + * @since 3.6.0 + * @category mapping + * @example + * ```ts + * import { DateTime } from "effect" + * + * // add 10 milliseconds + * DateTime.unsafeMake(0).pipe( + * DateTime.mapEpochMillis((millis) => millis + 10) + * ) + * ``` + */ +const mapEpochMillis = exports.mapEpochMillis = Internal.mapEpochMillis; +/** + * Using the time zone adjusted `Date`, apply a function to the `Date` and + * return the result. + * + * @since 3.6.0 + * @category mapping + * @example + * ```ts + * import { DateTime } from "effect" + * + * // get the time zone adjusted date in milliseconds + * DateTime.unsafeMakeZoned(0, { timeZone: "Europe/London" }).pipe( + * DateTime.withDate((date) => date.getTime()) + * ) + * ``` + */ +const withDate = exports.withDate = Internal.withDate; +/** + * Using the time zone adjusted `Date`, apply a function to the `Date` and + * return the result. + * + * @since 3.6.0 + * @category mapping + * @example + * ```ts + * import { DateTime } from "effect" + * + * // get the date in milliseconds + * DateTime.unsafeMake(0).pipe( + * DateTime.withDateUtc((date) => date.getTime()) + * ) + * ``` + */ +const withDateUtc = exports.withDateUtc = Internal.withDateUtc; +/** + * @since 3.6.0 + * @category mapping + */ +const match = exports.match = Internal.match; +// ============================================================================= +// math +// ============================================================================= +/** + * Add the given `Duration` to a `DateTime`. + * + * @since 3.6.0 + * @category math + * @example + * ```ts + * import { DateTime } from "effect" + * + * // add 5 minutes + * DateTime.unsafeMake(0).pipe( + * DateTime.addDuration("5 minutes") + * ) + * ``` + */ +const addDuration = exports.addDuration = Internal.addDuration; +/** + * Subtract the given `Duration` from a `DateTime`. + * + * @since 3.6.0 + * @category math + * @example + * ```ts + * import { DateTime } from "effect" + * + * // subtract 5 minutes + * DateTime.unsafeMake(0).pipe( + * DateTime.subtractDuration("5 minutes") + * ) + * ``` + */ +const subtractDuration = exports.subtractDuration = Internal.subtractDuration; +/** + * Add the given `amount` of `unit`'s to a `DateTime`. + * + * The time zone is taken into account when adding days, weeks, months, and + * years. + * + * @since 3.6.0 + * @category math + * @example + * ```ts + * import { DateTime } from "effect" + * + * // add 5 minutes + * DateTime.unsafeMake(0).pipe( + * DateTime.add({ minutes: 5 }) + * ) + * ``` + */ +const add = exports.add = Internal.add; +/** + * Subtract the given `amount` of `unit`'s from a `DateTime`. + * + * @since 3.6.0 + * @category math + * @example + * ```ts + * import { DateTime } from "effect" + * + * // subtract 5 minutes + * DateTime.unsafeMake(0).pipe( + * DateTime.subtract({ minutes: 5 }) + * ) + * ``` + */ +const subtract = exports.subtract = Internal.subtract; +/** + * Converts a `DateTime` to the start of the given `part`. + * + * If the part is `week`, the `weekStartsOn` option can be used to specify the + * day of the week that the week starts on. The default is 0 (Sunday). + * + * @since 3.6.0 + * @category math + * @example + * ```ts + * import { DateTime } from "effect" + * + * // returns "2024-01-01T00:00:00Z" + * DateTime.unsafeMake("2024-01-01T12:00:00Z").pipe( + * DateTime.startOf("day"), + * DateTime.formatIso + * ) + * ``` + */ +const startOf = exports.startOf = Internal.startOf; +/** + * Converts a `DateTime` to the end of the given `part`. + * + * If the part is `week`, the `weekStartsOn` option can be used to specify the + * day of the week that the week starts on. The default is 0 (Sunday). + * + * @since 3.6.0 + * @category math + * @example + * ```ts + * import { DateTime } from "effect" + * + * // returns "2024-01-01T23:59:59.999Z" + * DateTime.unsafeMake("2024-01-01T12:00:00Z").pipe( + * DateTime.endOf("day"), + * DateTime.formatIso + * ) + * ``` + */ +const endOf = exports.endOf = Internal.endOf; +/** + * Converts a `DateTime` to the nearest given `part`. + * + * If the part is `week`, the `weekStartsOn` option can be used to specify the + * day of the week that the week starts on. The default is 0 (Sunday). + * + * @since 3.6.0 + * @category math + * @example + * ```ts + * import { DateTime } from "effect" + * + * // returns "2024-01-02T00:00:00Z" + * DateTime.unsafeMake("2024-01-01T12:01:00Z").pipe( + * DateTime.nearest("day"), + * DateTime.formatIso + * ) + * ``` + */ +const nearest = exports.nearest = Internal.nearest; +// ============================================================================= +// formatting +// ============================================================================= +/** + * Format a `DateTime` as a string using the `DateTimeFormat` API. + * + * The `timeZone` option is set to the offset of the time zone. + * + * Note: On Node versions < 22, fixed "Offset" zones will set the time zone to + * "UTC" and use the adjusted `Date`. + * + * @since 3.6.0 + * @category formatting + */ +const format = exports.format = Internal.format; +/** + * Format a `DateTime` as a string using the `DateTimeFormat` API. + * + * It will use the system's local time zone & locale. + * + * @since 3.6.0 + * @category formatting + */ +const formatLocal = exports.formatLocal = Internal.formatLocal; +/** + * Format a `DateTime` as a string using the `DateTimeFormat` API. + * + * This forces the time zone to be UTC. + * + * @since 3.6.0 + * @category formatting + */ +const formatUtc = exports.formatUtc = Internal.formatUtc; +/** + * Format a `DateTime` as a string using the `DateTimeFormat` API. + * + * @since 3.6.0 + * @category formatting + */ +const formatIntl = exports.formatIntl = Internal.formatIntl; +/** + * Format a `DateTime` as a UTC ISO string. + * + * @since 3.6.0 + * @category formatting + */ +const formatIso = exports.formatIso = Internal.formatIso; +/** + * Format a `DateTime` as a time zone adjusted ISO date string. + * + * @since 3.6.0 + * @category formatting + */ +const formatIsoDate = exports.formatIsoDate = Internal.formatIsoDate; +/** + * Format a `DateTime` as a UTC ISO date string. + * + * @since 3.6.0 + * @category formatting + */ +const formatIsoDateUtc = exports.formatIsoDateUtc = Internal.formatIsoDateUtc; +/** + * Format a `DateTime.Zoned` as a ISO string with an offset. + * + * @since 3.6.0 + * @category formatting + */ +const formatIsoOffset = exports.formatIsoOffset = Internal.formatIsoOffset; +/** + * Format a `DateTime.Zoned` as a string. + * + * It uses the format: `YYYY-MM-DDTHH:mm:ss.sss+HH:MM[Time/Zone]`. + * + * @since 3.6.0 + * @category formatting + */ +const formatIsoZoned = exports.formatIsoZoned = Internal.formatIsoZoned; +/** + * Create a Layer from the given time zone. + * + * @since 3.6.0 + * @category current time zone + */ +const layerCurrentZone = zone => Layer.succeed(CurrentTimeZone, zone); +/** + * Create a Layer from the given time zone offset. + * + * @since 3.6.0 + * @category current time zone + */ +exports.layerCurrentZone = layerCurrentZone; +const layerCurrentZoneOffset = offset => Layer.succeed(CurrentTimeZone, Internal.zoneMakeOffset(offset)); +/** + * Create a Layer from the given IANA time zone identifier. + * + * @since 3.6.0 + * @category current time zone + */ +exports.layerCurrentZoneOffset = layerCurrentZoneOffset; +const layerCurrentZoneNamed = zoneId => Layer.effect(CurrentTimeZone, Internal.zoneMakeNamedEffect(zoneId)); +/** + * Create a Layer from the systems local time zone. + * + * @since 3.6.0 + * @category current time zone + */ +exports.layerCurrentZoneNamed = layerCurrentZoneNamed; +const layerCurrentZoneLocal = exports.layerCurrentZoneLocal = /*#__PURE__*/Layer.sync(CurrentTimeZone, zoneMakeLocal); +//# sourceMappingURL=DateTime.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/DateTime.js.map b/backend/node_modules/effect/dist/cjs/DateTime.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f084382b820b8c4334de6b2f872d4fd224f30a4c --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/DateTime.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DateTime.js","names":["Context","_interopRequireWildcard","require","Effect","_Function","Internal","Layer","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","exports","TimeZoneTypeId","isDateTime","isTimeZone","isTimeZoneOffset","isTimeZoneNamed","isUtc","isZoned","Equivalence","Order","clamp","unsafeFromDate","unsafeMake","unsafeMakeZoned","makeZoned","make","makeZonedFromString","now","nowAsDate","unsafeNow","toUtc","setZone","setZoneOffset","zoneUnsafeMakeNamed","zoneMakeOffset","zoneMakeNamed","zoneMakeNamedEffect","zoneMakeLocal","zoneFromString","zoneToString","setZoneNamed","unsafeSetZoneNamed","distance","distanceDurationEither","distanceDuration","min","max","greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo","between","isFuture","unsafeIsFuture","isPast","unsafeIsPast","toDateUtc","toDate","zonedOffset","zonedOffsetIso","toEpochMillis","removeTime","toParts","toPartsUtc","getPartUtc","getPart","setParts","setPartsUtc","CurrentTimeZone","Tag","setZoneCurrent","self","map","zone","withCurrentZone","dual","effect","provideService","withCurrentZoneLocal","provideServiceEffect","sync","withCurrentZoneOffset","offset","withCurrentZoneNamed","nowInCurrentZone","flatMap","mutate","mutateUtc","mapEpochMillis","withDate","withDateUtc","match","addDuration","subtractDuration","add","subtract","startOf","endOf","nearest","format","formatLocal","formatUtc","formatIntl","formatIso","formatIsoDate","formatIsoDateUtc","formatIsoOffset","formatIsoZoned","layerCurrentZone","succeed","layerCurrentZoneOffset","layerCurrentZoneNamed","zoneId","layerCurrentZoneLocal"],"sources":["../../src/DateTime.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,OAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAF,uBAAA,CAAAC,OAAA;AAGA,IAAAE,SAAA,GAAAF,OAAA;AAEA,IAAAG,QAAA,GAAAJ,uBAAA,CAAAC,OAAA;AACA,IAAAI,KAAA,GAAAL,uBAAA,CAAAC,OAAA;AAAmC,SAAAD,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,CAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,E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AAErF;;;;;;AAMO,MAAMC,eAAe,GAAAhG,OAAA,CAAAgG,eAAA,GAA+BtH,QAAQ,CAACsH,eAAe;AAEnF;;;;;;;;AAQO,MAAMC,cAAc,GAAAjG,OAAA,CAAAiG,cAAA,GAA4BvH,QAAQ,CAACuH,cAAc;AAE9E;;;;;;AAMO,MAAMC,gBAAgB,GAAInC,IAAc,IAAmCpF,KAAK,CAACwH,OAAO,CAACzC,eAAe,EAAEK,IAAI,CAAC;AAEtH;;;;;;AAAA/D,OAAA,CAAAkG,gBAAA,GAAAA,gBAAA;AAMO,MAAME,sBAAsB,GAAI5B,MAAc,IACnD7F,KAAK,CAACwH,OAAO,CAACzC,eAAe,EAAEhF,QAAQ,CAAC8C,cAAc,CAACgD,MAAM,CAAC,CAAC;AAEjE;;;;;;AAAAxE,OAAA,CAAAoG,sBAAA,GAAAA,sBAAA;AAMO,MAAMC,qBAAqB,GAChCC,MAAc,IAEd3H,KAAK,CAACuF,MAAM,CAACR,eAAe,EAAEhF,QAAQ,CAACgD,mBAAmB,CAAC4E,MAAM,CAAC,CAAC;AAErE;;;;;;AAAAtG,OAAA,CAAAqG,qBAAA,GAAAA,qBAAA;AAMO,MAAME,qBAAqB,GAAAvG,OAAA,CAAAuG,qBAAA,gBAAiC5H,KAAK,CAAC2F,IAAI,CAACZ,eAAe,EAAE/B,aAAa,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Deferred.js.map b/backend/node_modules/effect/dist/cjs/Deferred.js.map new file mode 100644 index 0000000000000000000000000000000000000000..7dc857f15543f62e27629b1539021b1137960d91 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Deferred.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Deferred.js","names":["core","_interopRequireWildcard","require","internal","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","DeferredTypeId","exports","make","deferredMake","makeAs","deferredMakeAs","_await","await","deferredAwait","complete","deferredComplete","completeWith","deferredCompleteWith","done","deferredDone","fail","deferredFail","failSync","deferredFailSync","failCause","deferredFailCause","failCauseSync","deferredFailCauseSync","die","deferredDie","dieSync","deferredDieSync","interrupt","deferredInterrupt","interruptWith","deferredInterruptWith","isDone","deferredIsDone","poll","deferredPoll","succeed","deferredSucceed","sync","deferredSync","unsafeMake","deferredUnsafeMake","unsafeDone","deferredUnsafeDone"],"sources":["../../src/Deferred.ts"],"sourcesContent":[null],"mappings":";;;;;;AAQA,IAAAA,IAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,uBAAA,CAAAC,OAAA;AAAkD,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA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;;;;;AAOO,MAAMC,OAAO,GAAAxB,OAAA,CAAAwB,OAAA,GAiBhBhD,IAAI,CAACiD,eAAe;AAExB;;;;;;;;AAQO,MAAMC,SAAS,GAAA1B,OAAA,CAAA0B,SAAA,GAA2DlD,IAAI,CAACmD,iBAAiB;AAEvG;;;;;;;AAOO,MAAMC,aAAa,GAAA5B,OAAA,CAAA4B,aAAA,GAiBtBpD,IAAI,CAACqD,qBAAqB;AAE9B;;;;;;;AAOO,MAAMC,MAAM,GAAA9B,OAAA,CAAA8B,MAAA,GAA2DtD,IAAI,CAACuD,cAAc;AAEjG;;;;;;;AAOO,MAAMC,IAAI,GAAAhC,OAAA,CAAAgC,IAAA,GAEwCxD,IAAI,CAACyD,YAAY;AAE1E;;;;;;AAMO,MAAMC,OAAO,GAAAlC,OAAA,CAAAkC,OAAA,GAehB1D,IAAI,CAAC2D,eAAe;AAExB;;;;;;AAMO,MAAMC,IAAI,GAAApC,OAAA,CAAAoC,IAAA,GAeb5D,IAAI,CAAC6D,YAAY;AAErB;;;;;;AAMO,MAAMC,UAAU,GAAAtC,OAAA,CAAAsC,UAAA,GAA+D9D,IAAI,CAAC+D,kBAAkB;AAE7G;;;;;;;AAOO,MAAMC,UAAU,GAAAxC,OAAA,CAAAwC,UAAA,GAAsEhE,IAAI,CAACiE,kBAAkB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Differ.js b/backend/node_modules/effect/dist/cjs/Differ.js new file mode 100644 index 0000000000000000000000000000000000000000..d3db9c4655c39af420cf7f43bb2bbcad8181569a --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Differ.js @@ -0,0 +1,140 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.zip = exports.updateWith = exports.update = exports.transform = exports.readonlyArray = exports.patch = exports.orElseEither = exports.make = exports.hashSet = exports.hashMap = exports.environment = exports.empty = exports.diff = exports.combine = exports.chunk = exports.TypeId = void 0; +var Dual = _interopRequireWildcard(require("./Function.js")); +var internal = _interopRequireWildcard(require("./internal/differ.js")); +var ChunkPatch = _interopRequireWildcard(require("./internal/differ/chunkPatch.js")); +var ContextPatch = _interopRequireWildcard(require("./internal/differ/contextPatch.js")); +var HashMapPatch = _interopRequireWildcard(require("./internal/differ/hashMapPatch.js")); +var HashSetPatch = _interopRequireWildcard(require("./internal/differ/hashSetPatch.js")); +var OrPatch = _interopRequireWildcard(require("./internal/differ/orPatch.js")); +var ReadonlyArrayPatch = _interopRequireWildcard(require("./internal/differ/readonlyArrayPatch.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbol + */ +const TypeId = exports.TypeId = internal.DifferTypeId; +const ChunkPatchTypeId = ChunkPatch.ChunkPatchTypeId; +const ContextPatchTypeId = ContextPatch.ContextPatchTypeId; +const HashMapPatchTypeId = HashMapPatch.HashMapPatchTypeId; +const HashSetPatchTypeId = HashSetPatch.HashSetPatchTypeId; +const OrPatchTypeId = OrPatch.OrPatchTypeId; +const ReadonlyArrayPatchTypeId = ReadonlyArrayPatch.ReadonlyArrayPatchTypeId; +/** + * An empty patch that describes no changes. + * + * @since 2.0.0 + * @category patch + */ +const empty = self => self.empty; +/** + * @since 2.0.0 + * @category patch + */ +exports.empty = empty; +const diff = exports.diff = /*#__PURE__*/Dual.dual(3, (self, oldValue, newValue) => self.diff(oldValue, newValue)); +/** + * Combines two patches to produce a new patch that describes the updates of + * the first patch and then the updates of the second patch. The combine + * operation should be associative. In addition, if the combine operation is + * commutative then joining multiple fibers concurrently will result in + * deterministic `FiberRef` values. + * + * @since 2.0.0 + * @category patch + */ +const combine = exports.combine = /*#__PURE__*/Dual.dual(3, (self, first, second) => self.combine(first, second)); +/** + * Applies a patch to an old value to produce a new value that is equal to the + * old value with the updates described by the patch. + * + * @since 2.0.0 + * @category patch + */ +const patch = exports.patch = /*#__PURE__*/Dual.dual(3, (self, patch, oldValue) => self.patch(patch, oldValue)); +/** + * Constructs a new `Differ`. + * + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * Constructs a differ that knows how to diff `Env` values. + * + * @since 2.0.0 + * @category constructors + */ +const environment = exports.environment = internal.environment; +/** + * Constructs a differ that knows how to diff a `Chunk` of values given a + * differ that knows how to diff the values. + * + * @since 2.0.0 + * @category constructors + */ +const chunk = exports.chunk = internal.chunk; +/** + * Constructs a differ that knows how to diff a `HashMap` of keys and values given + * a differ that knows how to diff the values. + * + * @since 2.0.0 + * @category constructors + */ +const hashMap = exports.hashMap = internal.hashMap; +/** + * Constructs a differ that knows how to diff a `HashSet` of values. + * + * @since 2.0.0 + * @category constructors + */ +const hashSet = exports.hashSet = internal.hashSet; +/** + * Combines this differ and the specified differ to produce a differ that + * knows how to diff the sum of their values. + * + * @since 2.0.0 + */ +const orElseEither = exports.orElseEither = internal.orElseEither; +/** + * Constructs a differ that knows how to diff a `ReadonlyArray` of values. + * + * @since 2.0.0 + * @category constructors + */ +const readonlyArray = exports.readonlyArray = internal.readonlyArray; +/** + * Transforms the type of values that this differ knows how to differ using + * the specified functions that map the new and old value types to each other. + * + * @since 2.0.0 + */ +const transform = exports.transform = internal.transform; +/** + * Constructs a differ that just diffs two values by returning a function that + * sets the value to the new value. This differ does not support combining + * multiple updates to the value compositionally and should only be used when + * there is no compositional way to update them. + * + * @since 2.0.0 + */ +const update = exports.update = internal.update; +/** + * A variant of `update` that allows specifying the function that will be used + * to combine old values with new values. + * + * @since 2.0.0 + */ +const updateWith = exports.updateWith = internal.updateWith; +/** + * Combines this differ and the specified differ to produce a new differ that + * knows how to diff the product of their values. + * + * @since 2.0.0 + */ +const zip = exports.zip = internal.zip; +//# sourceMappingURL=Differ.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Duration.js b/backend/node_modules/effect/dist/cjs/Duration.js new file mode 100644 index 0000000000000000000000000000000000000000..95e8439ff319034c40b407dcbd11b58c491f61f6 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Duration.js @@ -0,0 +1,737 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.zero = exports.weeks = exports.unsafeToNanos = exports.unsafeFormatIso = exports.unsafeDivide = exports.toWeeks = exports.toSeconds = exports.toNanos = exports.toMinutes = exports.toMillis = exports.toHrTime = exports.toHours = exports.toDays = exports.times = exports.sum = exports.subtract = exports.seconds = exports.parts = exports.nanos = exports.minutes = exports.min = exports.millis = exports.micros = exports.max = exports.matchWith = exports.match = exports.lessThanOrEqualTo = exports.lessThan = exports.isZero = exports.isFinite = exports.isDuration = exports.infinity = exports.hours = exports.greaterThanOrEqualTo = exports.greaterThan = exports.fromIso = exports.formatIso = exports.format = exports.equals = exports.divide = exports.decodeUnknown = exports.decode = exports.days = exports.clamp = exports.between = exports.Order = exports.Equivalence = void 0; +var Equal = _interopRequireWildcard(require("./Equal.js")); +var _Function = require("./Function.js"); +var Hash = _interopRequireWildcard(require("./Hash.js")); +var _Inspectable = require("./Inspectable.js"); +var Option = _interopRequireWildcard(require("./Option.js")); +var order = _interopRequireWildcard(require("./Order.js")); +var _Pipeable = require("./Pipeable.js"); +var _Predicate = require("./Predicate.js"); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +const TypeId = /*#__PURE__*/Symbol.for("effect/Duration"); +const bigint0 = /*#__PURE__*/BigInt(0); +const bigint24 = /*#__PURE__*/BigInt(24); +const bigint60 = /*#__PURE__*/BigInt(60); +const bigint1e3 = /*#__PURE__*/BigInt(1_000); +const bigint1e6 = /*#__PURE__*/BigInt(1_000_000); +const bigint1e9 = /*#__PURE__*/BigInt(1_000_000_000); +const DURATION_REGEX = /^(-?\d+(?:\.\d+)?)\s+(nanos?|micros?|millis?|seconds?|minutes?|hours?|days?|weeks?)$/; +/** + * @since 2.0.0 + */ +const decode = input => { + if (isDuration(input)) { + return input; + } else if ((0, _Predicate.isNumber)(input)) { + return millis(input); + } else if ((0, _Predicate.isBigInt)(input)) { + return nanos(input); + } else if (Array.isArray(input) && input.length === 2 && input.every(_Predicate.isNumber)) { + if (input[0] === -Infinity || input[1] === -Infinity || Number.isNaN(input[0]) || Number.isNaN(input[1])) { + return zero; + } + if (input[0] === Infinity || input[1] === Infinity) { + return infinity; + } + return nanos(BigInt(Math.round(input[0] * 1_000_000_000)) + BigInt(Math.round(input[1]))); + } else if ((0, _Predicate.isString)(input)) { + const match = DURATION_REGEX.exec(input); + if (match) { + const [_, valueStr, unit] = match; + const value = Number(valueStr); + switch (unit) { + case "nano": + case "nanos": + return nanos(BigInt(valueStr)); + case "micro": + case "micros": + return micros(BigInt(valueStr)); + case "milli": + case "millis": + return millis(value); + case "second": + case "seconds": + return seconds(value); + case "minute": + case "minutes": + return minutes(value); + case "hour": + case "hours": + return hours(value); + case "day": + case "days": + return days(value); + case "week": + case "weeks": + return weeks(value); + } + } + } + throw new Error("Invalid DurationInput"); +}; +/** + * @since 2.5.0 + */ +exports.decode = decode; +const decodeUnknown = exports.decodeUnknown = /*#__PURE__*/Option.liftThrowable(decode); +const zeroValue = { + _tag: "Millis", + millis: 0 +}; +const infinityValue = { + _tag: "Infinity" +}; +const DurationProto = { + [TypeId]: TypeId, + [Hash.symbol]() { + return Hash.cached(this, Hash.structure(this.value)); + }, + [Equal.symbol](that) { + return isDuration(that) && equals(this, that); + }, + toString() { + return `Duration(${format(this)})`; + }, + toJSON() { + switch (this.value._tag) { + case "Millis": + return { + _id: "Duration", + _tag: "Millis", + millis: this.value.millis + }; + case "Nanos": + return { + _id: "Duration", + _tag: "Nanos", + hrtime: toHrTime(this) + }; + case "Infinity": + return { + _id: "Duration", + _tag: "Infinity" + }; + } + }, + [_Inspectable.NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + } +}; +const make = input => { + const duration = Object.create(DurationProto); + if ((0, _Predicate.isNumber)(input)) { + if (isNaN(input) || input <= 0) { + duration.value = zeroValue; + } else if (!Number.isFinite(input)) { + duration.value = infinityValue; + } else if (!Number.isInteger(input)) { + duration.value = { + _tag: "Nanos", + nanos: BigInt(Math.round(input * 1_000_000)) + }; + } else { + duration.value = { + _tag: "Millis", + millis: input + }; + } + } else if (input <= bigint0) { + duration.value = zeroValue; + } else { + duration.value = { + _tag: "Nanos", + nanos: input + }; + } + return duration; +}; +/** + * @since 2.0.0 + * @category guards + */ +const isDuration = u => (0, _Predicate.hasProperty)(u, TypeId); +/** + * @since 2.0.0 + * @category guards + */ +exports.isDuration = isDuration; +const isFinite = self => self.value._tag !== "Infinity"; +/** + * @since 3.5.0 + * @category guards + */ +exports.isFinite = isFinite; +const isZero = self => { + switch (self.value._tag) { + case "Millis": + { + return self.value.millis === 0; + } + case "Nanos": + { + return self.value.nanos === bigint0; + } + case "Infinity": + { + return false; + } + } +}; +/** + * @since 2.0.0 + * @category constructors + */ +exports.isZero = isZero; +const zero = exports.zero = /*#__PURE__*/make(0); +/** + * @since 2.0.0 + * @category constructors + */ +const infinity = exports.infinity = /*#__PURE__*/make(Infinity); +/** + * @since 2.0.0 + * @category constructors + */ +const nanos = nanos => make(nanos); +/** + * @since 2.0.0 + * @category constructors + */ +exports.nanos = nanos; +const micros = micros => make(micros * bigint1e3); +/** + * @since 2.0.0 + * @category constructors + */ +exports.micros = micros; +const millis = millis => make(millis); +/** + * @since 2.0.0 + * @category constructors + */ +exports.millis = millis; +const seconds = seconds => make(seconds * 1000); +/** + * @since 2.0.0 + * @category constructors + */ +exports.seconds = seconds; +const minutes = minutes => make(minutes * 60_000); +/** + * @since 2.0.0 + * @category constructors + */ +exports.minutes = minutes; +const hours = hours => make(hours * 3_600_000); +/** + * @since 2.0.0 + * @category constructors + */ +exports.hours = hours; +const days = days => make(days * 86_400_000); +/** + * @since 2.0.0 + * @category constructors + */ +exports.days = days; +const weeks = weeks => make(weeks * 604_800_000); +/** + * @since 2.0.0 + * @category getters + */ +exports.weeks = weeks; +const toMillis = self => match(self, { + onMillis: millis => millis, + onNanos: nanos => Number(nanos) / 1_000_000 +}); +/** + * @since 2.0.0 + * @category getters + */ +exports.toMillis = toMillis; +const toSeconds = self => match(self, { + onMillis: millis => millis / 1_000, + onNanos: nanos => Number(nanos) / 1_000_000_000 +}); +/** + * @since 3.8.0 + * @category getters + */ +exports.toSeconds = toSeconds; +const toMinutes = self => match(self, { + onMillis: millis => millis / 60_000, + onNanos: nanos => Number(nanos) / 60_000_000_000 +}); +/** + * @since 3.8.0 + * @category getters + */ +exports.toMinutes = toMinutes; +const toHours = self => match(self, { + onMillis: millis => millis / 3_600_000, + onNanos: nanos => Number(nanos) / 3_600_000_000_000 +}); +/** + * @since 3.8.0 + * @category getters + */ +exports.toHours = toHours; +const toDays = self => match(self, { + onMillis: millis => millis / 86_400_000, + onNanos: nanos => Number(nanos) / 86_400_000_000_000 +}); +/** + * @since 3.8.0 + * @category getters + */ +exports.toDays = toDays; +const toWeeks = self => match(self, { + onMillis: millis => millis / 604_800_000, + onNanos: nanos => Number(nanos) / 604_800_000_000_000 +}); +/** + * Get the duration in nanoseconds as a bigint. + * + * If the duration is infinite, returns `Option.none()` + * + * @since 2.0.0 + * @category getters + */ +exports.toWeeks = toWeeks; +const toNanos = self => { + const _self = decode(self); + switch (_self.value._tag) { + case "Infinity": + return Option.none(); + case "Nanos": + return Option.some(_self.value.nanos); + case "Millis": + return Option.some(BigInt(Math.round(_self.value.millis * 1_000_000))); + } +}; +/** + * Get the duration in nanoseconds as a bigint. + * + * If the duration is infinite, it throws an error. + * + * @since 2.0.0 + * @category getters + */ +exports.toNanos = toNanos; +const unsafeToNanos = self => { + const _self = decode(self); + switch (_self.value._tag) { + case "Infinity": + throw new Error("Cannot convert infinite duration to nanos"); + case "Nanos": + return _self.value.nanos; + case "Millis": + return BigInt(Math.round(_self.value.millis * 1_000_000)); + } +}; +/** + * @since 2.0.0 + * @category getters + */ +exports.unsafeToNanos = unsafeToNanos; +const toHrTime = self => { + const _self = decode(self); + switch (_self.value._tag) { + case "Infinity": + return [Infinity, 0]; + case "Nanos": + return [Number(_self.value.nanos / bigint1e9), Number(_self.value.nanos % bigint1e9)]; + case "Millis": + return [Math.floor(_self.value.millis / 1000), Math.round(_self.value.millis % 1000 * 1_000_000)]; + } +}; +/** + * @since 2.0.0 + * @category pattern matching + */ +exports.toHrTime = toHrTime; +const match = exports.match = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => { + const _self = decode(self); + switch (_self.value._tag) { + case "Nanos": + return options.onNanos(_self.value.nanos); + case "Infinity": + return options.onMillis(Infinity); + case "Millis": + return options.onMillis(_self.value.millis); + } +}); +/** + * @since 2.0.0 + * @category pattern matching + */ +const matchWith = exports.matchWith = /*#__PURE__*/(0, _Function.dual)(3, (self, that, options) => { + const _self = decode(self); + const _that = decode(that); + if (_self.value._tag === "Infinity" || _that.value._tag === "Infinity") { + return options.onMillis(toMillis(_self), toMillis(_that)); + } else if (_self.value._tag === "Nanos" || _that.value._tag === "Nanos") { + const selfNanos = _self.value._tag === "Nanos" ? _self.value.nanos : BigInt(Math.round(_self.value.millis * 1_000_000)); + const thatNanos = _that.value._tag === "Nanos" ? _that.value.nanos : BigInt(Math.round(_that.value.millis * 1_000_000)); + return options.onNanos(selfNanos, thatNanos); + } + return options.onMillis(_self.value.millis, _that.value.millis); +}); +/** + * @category instances + * @since 2.0.0 + */ +const Order = exports.Order = /*#__PURE__*/order.make((self, that) => matchWith(self, that, { + onMillis: (self, that) => self < that ? -1 : self > that ? 1 : 0, + onNanos: (self, that) => self < that ? -1 : self > that ? 1 : 0 +})); +/** + * Checks if a `Duration` is between a `minimum` and `maximum` value. + * + * @category predicates + * @since 2.0.0 + */ +const between = exports.between = /*#__PURE__*/order.between(/*#__PURE__*/order.mapInput(Order, decode)); +/** + * @category instances + * @since 2.0.0 + */ +const Equivalence = (self, that) => matchWith(self, that, { + onMillis: (self, that) => self === that, + onNanos: (self, that) => self === that +}); +exports.Equivalence = Equivalence; +const _min = /*#__PURE__*/order.min(Order); +/** + * @since 2.0.0 + */ +const min = exports.min = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => _min(decode(self), decode(that))); +const _max = /*#__PURE__*/order.max(Order); +/** + * @since 2.0.0 + * @category order + */ +const max = exports.max = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => _max(decode(self), decode(that))); +const _clamp = /*#__PURE__*/order.clamp(Order); +/** + * @since 2.0.0 + * @category order + */ +const clamp = exports.clamp = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => _clamp(decode(self), { + minimum: decode(options.minimum), + maximum: decode(options.maximum) +})); +/** + * @since 2.4.19 + * @category math + */ +const divide = exports.divide = /*#__PURE__*/(0, _Function.dual)(2, (self, by) => match(self, { + onMillis: millis => { + if (by === 0 || isNaN(by) || !Number.isFinite(by)) { + return Option.none(); + } + return Option.some(make(millis / by)); + }, + onNanos: nanos => { + if (isNaN(by) || by <= 0 || !Number.isFinite(by)) { + return Option.none(); + } + try { + return Option.some(make(nanos / BigInt(by))); + } catch { + return Option.none(); + } + } +})); +/** + * @since 2.4.19 + * @category math + */ +const unsafeDivide = exports.unsafeDivide = /*#__PURE__*/(0, _Function.dual)(2, (self, by) => match(self, { + onMillis: millis => make(millis / by), + onNanos: nanos => { + if (isNaN(by) || by < 0 || Object.is(by, -0)) { + return zero; + } else if (Object.is(by, 0) || !Number.isFinite(by)) { + return infinity; + } + return make(nanos / BigInt(by)); + } +})); +/** + * @since 2.0.0 + * @category math + */ +const times = exports.times = /*#__PURE__*/(0, _Function.dual)(2, (self, times) => match(self, { + onMillis: millis => make(millis * times), + onNanos: nanos => make(nanos * BigInt(times)) +})); +/** + * @since 2.0.0 + * @category math + */ +const subtract = exports.subtract = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => matchWith(self, that, { + onMillis: (self, that) => make(self - that), + onNanos: (self, that) => make(self - that) +})); +/** + * @since 2.0.0 + * @category math + */ +const sum = exports.sum = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => matchWith(self, that, { + onMillis: (self, that) => make(self + that), + onNanos: (self, that) => make(self + that) +})); +/** + * @since 2.0.0 + * @category predicates + */ +const lessThan = exports.lessThan = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => matchWith(self, that, { + onMillis: (self, that) => self < that, + onNanos: (self, that) => self < that +})); +/** + * @since 2.0.0 + * @category predicates + */ +const lessThanOrEqualTo = exports.lessThanOrEqualTo = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => matchWith(self, that, { + onMillis: (self, that) => self <= that, + onNanos: (self, that) => self <= that +})); +/** + * @since 2.0.0 + * @category predicates + */ +const greaterThan = exports.greaterThan = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => matchWith(self, that, { + onMillis: (self, that) => self > that, + onNanos: (self, that) => self > that +})); +/** + * @since 2.0.0 + * @category predicates + */ +const greaterThanOrEqualTo = exports.greaterThanOrEqualTo = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => matchWith(self, that, { + onMillis: (self, that) => self >= that, + onNanos: (self, that) => self >= that +})); +/** + * @since 2.0.0 + * @category predicates + */ +const equals = exports.equals = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => Equivalence(decode(self), decode(that))); +/** + * Converts a `Duration` to its parts. + * + * @since 3.8.0 + * @category conversions + */ +const parts = self => { + const duration = decode(self); + if (duration.value._tag === "Infinity") { + return { + days: Infinity, + hours: Infinity, + minutes: Infinity, + seconds: Infinity, + millis: Infinity, + nanos: Infinity + }; + } + const nanos = unsafeToNanos(duration); + const ms = nanos / bigint1e6; + const sec = ms / bigint1e3; + const min = sec / bigint60; + const hr = min / bigint60; + const days = hr / bigint24; + return { + days: Number(days), + hours: Number(hr % bigint24), + minutes: Number(min % bigint60), + seconds: Number(sec % bigint60), + millis: Number(ms % bigint1e3), + nanos: Number(nanos % bigint1e6) + }; +}; +/** + * Converts a `Duration` to a human readable string. + * + * @since 2.0.0 + * @category conversions + * @example + * ```ts + * import { Duration } from "effect" + * + * Duration.format(Duration.millis(1000)) // "1s" + * Duration.format(Duration.millis(1001)) // "1s 1ms" + * ``` + */ +exports.parts = parts; +const format = self => { + const duration = decode(self); + if (duration.value._tag === "Infinity") { + return "Infinity"; + } + if (isZero(duration)) { + return "0"; + } + const fragments = parts(duration); + const pieces = []; + if (fragments.days !== 0) { + pieces.push(`${fragments.days}d`); + } + if (fragments.hours !== 0) { + pieces.push(`${fragments.hours}h`); + } + if (fragments.minutes !== 0) { + pieces.push(`${fragments.minutes}m`); + } + if (fragments.seconds !== 0) { + pieces.push(`${fragments.seconds}s`); + } + if (fragments.millis !== 0) { + pieces.push(`${fragments.millis}ms`); + } + if (fragments.nanos !== 0) { + pieces.push(`${fragments.nanos}ns`); + } + return pieces.join(" "); +}; +/** + * Formats a Duration into an ISO8601 duration string. + * + * Months are assumed to be 30 days and years are assumed to be 365 days. + * + * Milliseconds and nanoseconds are expressed as fractional seconds. + * + * @example + * ```ts + * import { Duration } from "effect" + * + * Duration.unsafeFormatIso(Duration.days(1)) // => "P1D" + * Duration.unsafeFormatIso(Duration.minutes(90)) // => "PT1H30M" + * Duration.unsafeFormatIso(Duration.millis(1500)) // => "PT1.5S" + * ``` + * + * @throws `RangeError` If the duration is not finite. + * + * @since 3.13.0 + * @category conversions + */ +exports.format = format; +const unsafeFormatIso = self => { + const duration = decode(self); + if (!isFinite(duration)) { + throw new RangeError("Cannot format infinite duration"); + } + const fragments = []; + const { + days, + hours, + millis, + minutes, + nanos, + seconds + } = parts(duration); + let rest = days; + if (rest >= 365) { + const years = Math.floor(rest / 365); + rest %= 365; + fragments.push(`${years}Y`); + } + if (rest >= 30) { + const months = Math.floor(rest / 30); + rest %= 30; + fragments.push(`${months}M`); + } + if (rest >= 7) { + const weeks = Math.floor(rest / 7); + rest %= 7; + fragments.push(`${weeks}W`); + } + if (rest > 0) { + fragments.push(`${rest}D`); + } + if (hours !== 0 || minutes !== 0 || seconds !== 0 || millis !== 0 || nanos !== 0) { + fragments.push("T"); + if (hours !== 0) { + fragments.push(`${hours}H`); + } + if (minutes !== 0) { + fragments.push(`${minutes}M`); + } + if (seconds !== 0 || millis !== 0 || nanos !== 0) { + const total = BigInt(seconds) * bigint1e9 + BigInt(millis) * bigint1e6 + BigInt(nanos); + const str = (Number(total) / 1e9).toFixed(9).replace(/\.?0+$/, ""); + fragments.push(`${str}S`); + } + } + return `P${fragments.join("") || "T0S"}`; +}; +/** + * Formats a Duration into an ISO8601 duration string. + * + * Months are assumed to be 30 days and years are assumed to be 365 days. + * + * Returns `Option.none()` if the duration is infinite. + * + * @example + * ```ts + * import { Duration, Option } from "effect" + * + * Duration.formatIso(Duration.days(1)) // => Option.some("P1D") + * Duration.formatIso(Duration.minutes(90)) // => Option.some("PT1H30M") + * Duration.formatIso(Duration.millis(1500)) // => Option.some("PT1.5S") + * Duration.formatIso(Duration.infinity) // => Option.none() + * ``` + * + * @since 3.13.0 + * @category conversions + */ +exports.unsafeFormatIso = unsafeFormatIso; +const formatIso = self => { + const duration = decode(self); + return isFinite(duration) ? Option.some(unsafeFormatIso(duration)) : Option.none(); +}; +/** + * Parses an ISO8601 duration string into a `Duration`. + * + * Months are assumed to be 30 days and years are assumed to be 365 days. + * + * @example + * ```ts + * import { Duration, Option } from "effect" + * + * Duration.fromIso("P1D") // => Option.some(Duration.days(1)) + * Duration.fromIso("PT1H") // => Option.some(Duration.hours(1)) + * Duration.fromIso("PT1M") // => Option.some(Duration.minutes(1)) + * Duration.fromIso("PT1.5S") // => Option.some(Duration.seconds(1.5)) + * ``` + * + * @since 3.13.0 + * @category conversions + */ +exports.formatIso = formatIso; +const fromIso = iso => { + const result = DURATION_ISO_REGEX.exec(iso); + if (result == null) { + return Option.none(); + } + const [years, months, weeks, days, hours, mins, secs] = result.slice(1, 8).map(_ => _ ? Number(_) : 0); + const value = years * 365 * 24 * 60 * 60 + months * 30 * 24 * 60 * 60 + weeks * 7 * 24 * 60 * 60 + days * 24 * 60 * 60 + hours * 60 * 60 + mins * 60 + secs; + return Option.some(seconds(value)); +}; +exports.fromIso = fromIso; +const DURATION_ISO_REGEX = /^P(?!$)(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?!$)(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?)?$/; +//# sourceMappingURL=Duration.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Duration.js.map b/backend/node_modules/effect/dist/cjs/Duration.js.map new file mode 100644 index 0000000000000000000000000000000000000000..6fbb5f5c815596aa326911e2978b6f10b1974f04 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Duration.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Duration.js","names":["Equal","_interopRequireWildcard","require","_Function","Hash","_Inspectable","Option","order","_Pipeable","_Predicate","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","Symbol","for","bigint0","BigInt","bigint24","bigint60","bigint1e3","bigint1e6","bigint1e9","DURATION_REGEX","decode","input","isDuration","isNumber","millis","isBigInt","nanos","Array","isArray","length","every","Infinity","Number","isNaN","zero","infinity","Math","round","isString","match","exec","_","valueStr","unit","value","micros","seconds","minutes","hours","days","weeks","Error","exports","decodeUnknown","liftThrowable","zeroValue","_tag","infinityValue","DurationProto","symbol","cached","structure","that","equals","toString","format","toJSON","_id","hrtime","toHrTime","NodeInspectSymbol","pipe","pipeArguments","arguments","make","duration","create","isFinite","isInteger","u","hasProperty","self","isZero","toMillis","onMillis","onNanos","toSeconds","toMinutes","toHours","toDays","toWeeks","toNanos","_self","none","some","unsafeToNanos","floor","dual","options","matchWith","_that","selfNanos","thatNanos","Order","between","mapInput","Equivalence","_min","min","_max","max","_clamp","clamp","minimum","maximum","divide","by","unsafeDivide","is","times","subtract","sum","lessThan","lessThanOrEqualTo","greaterThan","greaterThanOrEqualTo","parts","ms","sec","hr","fragments","pieces","push","join","unsafeFormatIso","RangeError","rest","years","months","total","str","toFixed","replace","formatIso","fromIso","iso","result","DURATION_ISO_REGEX","mins","secs","slice","map"],"sources":["../../src/Duration.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,IAAA,GAAAH,uBAAA,CAAAC,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAL,uBAAA,CAAAC,OAAA;AACA,IAAAK,KAAA,GAAAN,uBAAA,CAAAC,OAAA;AAEA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AAA0E,SAAAD,wBAAAS,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAX,uBAAA,YAAAA,CAAAS,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAA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I,EAAE;IAClB,OAAOhK,MAAM,CAAC2G,IAAI,EAAE;EACtB;EAEA,MAAM,CAAC4C,KAAK,EAAEC,MAAM,EAAExF,KAAK,EAAED,IAAI,EAAED,KAAK,EAAEoG,IAAI,EAAEC,IAAI,CAAC,GAAGH,MAAM,CAACI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAACC,GAAG,CAAE9G,CAAC,IAAKA,CAAC,GAAGT,MAAM,CAACS,CAAC,CAAC,GAAG,CAAC,CAAC;EACxG,MAAMG,KAAK,GAAG6F,KAAK,GAAG,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GACtCC,MAAM,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAC1BxF,KAAK,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GACxBD,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GACnBD,KAAK,GAAG,EAAE,GAAG,EAAE,GACfoG,IAAI,GAAG,EAAE,GACTC,IAAI;EAEN,OAAOnK,MAAM,CAAC4G,IAAI,CAAChD,OAAO,CAACF,KAAK,CAAC,CAAC;AACpC,CAAC;AAAAQ,OAAA,CAAA4F,OAAA,GAAAA,OAAA;AAED,MAAMG,kBAAkB,GACtB,4GAA4G","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Effect.js b/backend/node_modules/effect/dist/cjs/Effect.js new file mode 100644 index 0000000000000000000000000000000000000000..65089579aa7e9fb92f3793212ba7f5ef93b8c75f --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Effect.js @@ -0,0 +1,10722 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.flip = exports.flatten = exports.flatMap = exports.firstSuccessOf = exports.findFirst = exports.finalizersMask = exports.filterOrFail = exports.filterOrElse = exports.filterOrDieMessage = exports.filterOrDie = exports.filterMap = exports.filterEffectOrFail = exports.filterEffectOrElse = exports.filter = exports.fiberIdWith = exports.fiberId = exports.failSync = exports.failCauseSync = exports.failCause = exports.fail = exports.exit = exports.exists = exports.every = exports.eventually = exports.ensuringChildren = exports.ensuringChild = exports.ensuring = exports.ensureSuccessType = exports.ensureRequirementsType = exports.ensureErrorType = exports.either = exports.dropWhile = exports.dropUntil = exports.disconnect = exports.diffFiberRefs = exports.dieSync = exports.dieMessage = exports.die = exports.descriptorWith = exports.descriptor = exports.delay = exports.daemonChildren = exports.custom = exports.currentSpan = exports.currentPropagatedSpan = exports.currentParentSpan = exports.contextWithEffect = exports.contextWith = exports.context = exports.consoleWith = exports.console = exports.configProviderWith = exports.clockWith = exports.clock = exports.checkInterruptible = exports.cause = exports.catchTags = exports.catchTag = exports.catchSomeDefect = exports.catchSomeCause = exports.catchSome = exports.catchIf = exports.catchAllDefect = exports.catchAllCause = exports.catchAll = exports.catch = exports.cachedWithTTL = exports.cachedInvalidateWithTTL = exports.cachedFunction = exports.cached = exports.cacheRequestResult = exports.blocked = exports.bindTo = exports.bindAll = exports.bind = exports.awaitAllChildren = exports.asyncEffect = exports.async = exports.asVoid = exports.asSomeError = exports.asSome = exports.as = exports.ap = exports.annotateSpans = exports.annotateLogsScoped = exports.annotateLogs = exports.annotateCurrentSpan = exports.andThen = exports.allowInterrupt = exports.allWith = exports.allSuccesses = exports.all = exports.addFinalizer = exports.acquireUseRelease = exports.acquireReleaseInterruptible = exports.acquireRelease = exports.Tag = exports.Service = exports.EffectTypeId = exports.Do = void 0; +exports.reduceEffect = exports.reduce = exports.randomWith = exports.random = exports.raceWith = exports.raceFirst = exports.raceAll = exports.race = exports.provideServiceEffect = exports.provideService = exports.provide = exports.promise = exports.patchRuntimeFlags = exports.patchFiberRefs = exports.partition = exports.parallelFinalizers = exports.parallelErrors = exports.orElseSucceed = exports.orElseFail = exports.orElse = exports.orDieWith = exports.orDie = exports.optionFromOptional = exports.option = exports.once = exports.onInterrupt = exports.onExit = exports.onError = exports.none = exports.never = exports.negate = exports.metricLabels = exports.mergeAll = exports.merge = exports.matchEffect = exports.matchCauseEffect = exports.matchCause = exports.match = exports.mapInputContext = exports.mapErrorCause = exports.mapError = exports.mapBoth = exports.mapAccum = exports.map = exports.makeSpanScoped = exports.makeSpan = exports.makeSemaphore = exports.makeLatch = exports.loop = exports.logWithLevel = exports.logWarning = exports.logTrace = exports.logInfo = exports.logFatal = exports.logError = exports.logDebug = exports.logAnnotations = exports.log = exports.locallyWith = exports.locallyScopedWith = exports.locallyScoped = exports.locally = exports.linkSpans = exports.linkSpanCurrent = exports.liftPredicate = exports.let = exports.labelMetricsScoped = exports.labelMetrics = exports.iterate = exports.isSuccess = exports.isFailure = exports.isEffect = exports.intoDeferred = exports.interruptibleMask = exports.interruptible = exports.interruptWith = exports.interrupt = exports.inheritFiberRefs = exports.ignoreLogged = exports.ignore = exports.if = exports.head = exports.getRuntimeFlags = exports.getFiberRefs = exports.gen = exports.functionWithSpan = exports.fromNullable = exports.fromFiberEffect = exports.fromFiber = exports.forkWithErrorHandler = exports.forkScoped = exports.forkIn = exports.forkDaemon = exports.forkAll = exports.fork = exports.forever = exports.forEach = exports.fnUntraced = exports.fn = exports.flipWith = void 0; +exports.withConsole = exports.withConfigProviderScoped = exports.withConfigProvider = exports.withConcurrency = exports.withClockScoped = exports.withClock = exports.whileLoop = exports.whenRef = exports.whenLogLevel = exports.whenFiberRef = exports.whenEffect = exports.when = exports.void = exports.validateWith = exports.validateFirst = exports.validateAll = exports.validate = exports.using = exports.useSpan = exports.updateService = exports.updateFiberRefs = exports.unsandbox = exports.unsafeMakeSemaphore = exports.unsafeMakeLatch = exports.unlessEffect = exports.unless = exports.uninterruptibleMask = exports.uninterruptible = exports.tryPromise = exports.tryMapPromise = exports.tryMap = exports.try = exports.transposeOption = exports.transposeMapOption = exports.transplant = exports.tracerWith = exports.tracer = exports.timeoutTo = exports.timeoutOption = exports.timeoutFailCause = exports.timeoutFail = exports.timeout = exports.timedWith = exports.timed = exports.tapErrorTag = exports.tapErrorCause = exports.tapError = exports.tapDefect = exports.tapBoth = exports.tap = exports.takeWhile = exports.takeUntil = exports.tagMetricsScoped = exports.tagMetrics = exports.sync = exports.suspend = exports.supervised = exports.summarized = exports.succeedSome = exports.succeedNone = exports.succeed = exports.step = exports.spanLinks = exports.spanAnnotations = exports.sleep = exports.setFiberRefs = exports.serviceOptional = exports.serviceOption = exports.serviceMembers = exports.serviceFunctions = exports.serviceFunctionEffect = exports.serviceFunction = exports.serviceConstants = exports.sequentialFinalizers = exports.scopedWith = exports.scoped = exports.scopeWith = exports.scope = exports.scheduleFrom = exports.scheduleForked = exports.schedule = exports.sandbox = exports.runtime = exports.runSyncExit = exports.runSync = exports.runRequestBlock = exports.runPromiseExit = exports.runPromise = exports.runFork = exports.runCallback = exports.retryOrElse = exports.retry = exports.request = exports.replicateEffect = exports.replicate = exports.repeatOrElse = exports.repeatN = exports.repeat = exports.reduceWhile = exports.reduceRight = void 0; +exports.zipWith = exports.zipRight = exports.zipLeft = exports.zip = exports.yieldNow = exports.withUnhandledErrorLogLevel = exports.withTracerTiming = exports.withTracerScoped = exports.withTracerEnabled = exports.withTracer = exports.withSpanScoped = exports.withSpan = exports.withSchedulingPriority = exports.withScheduler = exports.withRuntimeFlagsPatchScoped = exports.withRuntimeFlagsPatch = exports.withRequestCaching = exports.withRequestCache = exports.withRequestBatching = exports.withRandomScoped = exports.withRandomFixed = exports.withRandom = exports.withParentSpan = exports.withMetric = exports.withMaxOpsBeforeYield = exports.withLogSpan = exports.withFiberRuntime = exports.withExecutionPlan = exports.withEarlyRelease = exports.withConsoleScoped = void 0; +var _Function = require("./Function.js"); +var internalCause = _interopRequireWildcard(require("./internal/cause.js")); +var console_ = _interopRequireWildcard(require("./internal/console.js")); +var _context = require("./internal/context.js"); +var effect = _interopRequireWildcard(require("./internal/core-effect.js")); +var core = _interopRequireWildcard(require("./internal/core.js")); +var defaultServices = _interopRequireWildcard(require("./internal/defaultServices.js")); +var circular = _interopRequireWildcard(require("./internal/effect/circular.js")); +var internalExecutionPlan = _interopRequireWildcard(require("./internal/executionPlan.js")); +var fiberRuntime = _interopRequireWildcard(require("./internal/fiberRuntime.js")); +var layer = _interopRequireWildcard(require("./internal/layer.js")); +var option_ = _interopRequireWildcard(require("./internal/option.js")); +var query = _interopRequireWildcard(require("./internal/query.js")); +var runtime_ = _interopRequireWildcard(require("./internal/runtime.js")); +var schedule_ = _interopRequireWildcard(require("./internal/schedule.js")); +var internalTracer = _interopRequireWildcard(require("./internal/tracer.js")); +var Random = _interopRequireWildcard(require("./Random.js")); +var Request = _interopRequireWildcard(require("./Request.js")); +var Scheduler = _interopRequireWildcard(require("./Scheduler.js")); +var _Utils = require("./Utils.js"); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category Symbols + */ +const EffectTypeId = exports.EffectTypeId = core.EffectTypeId; +/** + * Checks if a given value is an `Effect` value. + * + * **When to Use** + * + * This function can be useful for checking the type of a value before + * attempting to operate on it as an `Effect` value. For example, you could use + * `Effect.isEffect` to check the type of a value before using it as an argument + * to a function that expects an `Effect` value. + * + * @since 2.0.0 + * @category Guards + */ +const isEffect = exports.isEffect = core.isEffect; +/** + * Returns an effect that caches its result for a specified `Duration`, + * known as "timeToLive" (TTL). + * + * **Details** + * + * This function is used to cache the result of an effect for a specified amount + * of time. This means that the first time the effect is evaluated, its result + * is computed and stored. + * + * If the effect is evaluated again within the specified `timeToLive`, the + * cached result will be used, avoiding recomputation. + * + * After the specified duration has passed, the cache expires, and the effect + * will be recomputed upon the next evaluation. + * + * **When to Use** + * + * Use this function when you have an effect that involves costly operations or + * computations, and you want to avoid repeating them within a short time frame. + * + * It's ideal for scenarios where the result of an effect doesn't change + * frequently and can be reused for a specified duration. + * + * By caching the result, you can improve efficiency and reduce unnecessary + * computations, especially in performance-critical applications. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * let i = 1 + * const expensiveTask = Effect.promise(() => { + * console.log("expensive task...") + * return new Promise((resolve) => { + * setTimeout(() => { + * resolve(`result ${i++}`) + * }, 100) + * }) + * }) + * + * const program = Effect.gen(function* () { + * const cached = yield* Effect.cachedWithTTL(expensiveTask, "150 millis") + * yield* cached.pipe(Effect.andThen(Console.log)) + * yield* cached.pipe(Effect.andThen(Console.log)) + * yield* Effect.sleep("100 millis") + * yield* cached.pipe(Effect.andThen(Console.log)) + * }) + * + * Effect.runFork(program) + * // Output: + * // expensive task... + * // result 1 + * // result 1 + * // expensive task... + * // result 2 + * ``` + * + * @see {@link cached} for a similar function that caches the result + * indefinitely. + * @see {@link cachedInvalidateWithTTL} for a similar function that includes an + * additional effect for manually invalidating the cached value. + * + * @since 2.0.0 + * @category Caching + */ +const cachedWithTTL = exports.cachedWithTTL = circular.cached; +/** + * Caches an effect's result for a specified duration and allows manual + * invalidation before expiration. + * + * **Details** + * + * This function behaves similarly to {@link cachedWithTTL} by caching the + * result of an effect for a specified period of time. However, it introduces an + * additional feature: it provides an effect that allows you to manually + * invalidate the cached result before it naturally expires. + * + * This gives you more control over the cache, allowing you to refresh the + * result when needed, even if the original cache has not yet expired. + * + * Once the cache is invalidated, the next time the effect is evaluated, the + * result will be recomputed, and the cache will be refreshed. + * + * **When to Use** + * + * Use this function when you have an effect whose result needs to be cached for + * a certain period, but you also want the option to refresh the cache manually + * before the expiration time. + * + * This is useful when you need to ensure that the cached data remains valid for + * a certain period but still want to invalidate it if the underlying data + * changes or if you want to force a recomputation. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * let i = 1 + * const expensiveTask = Effect.promise(() => { + * console.log("expensive task...") + * return new Promise((resolve) => { + * setTimeout(() => { + * resolve(`result ${i++}`) + * }, 100) + * }) + * }) + * + * const program = Effect.gen(function* () { + * const [cached, invalidate] = yield* Effect.cachedInvalidateWithTTL( + * expensiveTask, + * "1 hour" + * ) + * yield* cached.pipe(Effect.andThen(Console.log)) + * yield* cached.pipe(Effect.andThen(Console.log)) + * yield* invalidate + * yield* cached.pipe(Effect.andThen(Console.log)) + * }) + * + * Effect.runFork(program) + * // Output: + * // expensive task... + * // result 1 + * // result 1 + * // expensive task... + * // result 2 + * ``` + * + * @see {@link cached} for a similar function that caches the result + * indefinitely. + * @see {@link cachedWithTTL} for a similar function that caches the result for + * a specified duration but does not include an effect for manual invalidation. + * + * @since 2.0.0 + * @category Caching + */ +const cachedInvalidateWithTTL = exports.cachedInvalidateWithTTL = circular.cachedInvalidateWithTTL; +/** + * Returns an effect that lazily computes a result and caches it for subsequent + * evaluations. + * + * **Details** + * + * This function wraps an effect and ensures that its result is computed only + * once. Once the result is computed, it is cached, meaning that subsequent + * evaluations of the same effect will return the cached result without + * re-executing the logic. + * + * **When to Use** + * + * Use this function when you have an expensive or time-consuming operation that + * you want to avoid repeating. The first evaluation will compute the result, + * and all following evaluations will immediately return the cached value, + * improving performance and reducing unnecessary work. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * let i = 1 + * const expensiveTask = Effect.promise(() => { + * console.log("expensive task...") + * return new Promise((resolve) => { + * setTimeout(() => { + * resolve(`result ${i++}`) + * }, 100) + * }) + * }) + * + * const program = Effect.gen(function* () { + * console.log("non-cached version:") + * yield* expensiveTask.pipe(Effect.andThen(Console.log)) + * yield* expensiveTask.pipe(Effect.andThen(Console.log)) + * console.log("cached version:") + * const cached = yield* Effect.cached(expensiveTask) + * yield* cached.pipe(Effect.andThen(Console.log)) + * yield* cached.pipe(Effect.andThen(Console.log)) + * }) + * + * Effect.runFork(program) + * // Output: + * // non-cached version: + * // expensive task... + * // result 1 + * // expensive task... + * // result 2 + * // cached version: + * // expensive task... + * // result 3 + * // result 3 + * ``` + * + * @see {@link cachedWithTTL} for a similar function that includes a + * time-to-live duration for the cached value. + * @see {@link cachedInvalidateWithTTL} for a similar function that includes an + * additional effect for manually invalidating the cached value. + * + * @since 2.0.0 + * @category Caching + */ +const cached = exports.cached = effect.memoize; +/** + * Returns a memoized version of a function with effects, reusing results for + * the same inputs. + * + * **Details** + * + * This function creates a memoized version of a given function that performs an + * effect. Memoization ensures that once a result is computed for a specific + * input, it is stored and reused for subsequent calls with the same input, + * reducing the need to recompute the result. + * + * The function can optionally take an `Equivalence` parameter to + * determine how inputs are compared for caching purposes. + * + * **When to Use** + * + * Use this function when you have a function that performs an effect and you + * want to avoid recomputing the result for the same input multiple times. + * + * It's ideal for functions that produce deterministic results based on their + * inputs, and you want to improve performance by caching the output. + * + * This is particularly useful in scenarios where the function involves + * expensive calculations or operations that should be avoided after the first + * execution with the same parameters. + * + * **Example** + * + * ```ts + * import { Effect, Random } from "effect" + * + * const program = Effect.gen(function* () { + * const randomNumber = (n: number) => Random.nextIntBetween(1, n) + * console.log("non-memoized version:") + * console.log(yield* randomNumber(10)) + * console.log(yield* randomNumber(10)) + * + * console.log("memoized version:") + * const memoized = yield* Effect.cachedFunction(randomNumber) + * console.log(yield* memoized(10)) + * console.log(yield* memoized(10)) + * }) + * + * Effect.runFork(program) + * // Example Output: + * // non-memoized version: + * // 2 + * // 8 + * // memoized version: + * // 5 + * // 5 + * ``` + * + * @since 2.0.0 + * @category Caching + */ +const cachedFunction = exports.cachedFunction = circular.cachedFunction; +/** + * Returns an effect that executes only once, regardless of how many times it's + * called. + * + * **Details** + * + * This function ensures that a specific effect is executed only a single time, + * no matter how many times it is invoked. The result of the effect will be + * cached, and subsequent calls to the effect will immediately return the cached + * result without re-executing the original logic. + * + * **When to Use** + * + * Use this function when you need to perform a task only once, regardless of + * how many times the effect is triggered. It's particularly useful when you + * have initialization tasks, logging, or other one-time actions that should not + * be repeated. This can help optimize performance and avoid redundant actions. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * const program = Effect.gen(function* () { + * const task1 = Console.log("task1") + * yield* Effect.repeatN(task1, 2) + * const task2 = yield* Effect.once(Console.log("task2")) + * yield* Effect.repeatN(task2, 2) + * }) + * + * Effect.runFork(program) + * // Output: + * // task1 + * // task1 + * // task1 + * // task2 + * ``` + * + * @since 2.0.0 + * @category Caching + */ +const once = exports.once = effect.once; +/** + * Combines multiple effects into one, returning results based on the input + * structure. + * + * **Details** + * + * Use this function when you need to run multiple effects and combine their + * results into a single output. It supports tuples, iterables, structs, and + * records, making it flexible for different input types. + * + * For instance, if the input is a tuple: + * + * ```ts skip-type-checking + * // ┌─── a tuple of effects + * // ▼ + * Effect.all([effect1, effect2, ...]) + * ``` + * + * the effects are executed sequentially, and the result is a new effect + * containing the results as a tuple. The results in the tuple match the order + * of the effects passed to `Effect.all`. + * + * **Concurrency** + * + * You can control the execution order (e.g., sequential vs. concurrent) using + * the `concurrency` option. + * + * **Short-Circuiting Behavior** + * + * This function stops execution on the first error it encounters, this is + * called "short-circuiting". If any effect in the collection fails, the + * remaining effects will not run, and the error will be propagated. To change + * this behavior, you can use the `mode` option, which allows all effects to run + * and collect results as `Either` or `Option`. + * + * **The `mode` option** + * + * The `{ mode: "either" }` option changes the behavior of `Effect.all` to + * ensure all effects run, even if some fail. Instead of stopping on the first + * failure, this mode collects both successes and failures, returning an array + * of `Either` instances where each result is either a `Right` (success) or a + * `Left` (failure). + * + * Similarly, the `{ mode: "validate" }` option uses `Option` to indicate + * success or failure. Each effect returns `None` for success and `Some` with + * the error for failure. + * + * **Example** (Combining Effects in Tuples) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const tupleOfEffects = [ + * Effect.succeed(42).pipe(Effect.tap(Console.log)), + * Effect.succeed("Hello").pipe(Effect.tap(Console.log)) + * ] as const + * + * // ┌─── Effect<[number, string], never, never> + * // ▼ + * const resultsAsTuple = Effect.all(tupleOfEffects) + * + * Effect.runPromise(resultsAsTuple).then(console.log) + * // Output: + * // 42 + * // Hello + * // [ 42, 'Hello' ] + * ``` + * + * **Example** (Combining Effects in Iterables) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const iterableOfEffects: Iterable> = [1, 2, 3].map( + * (n) => Effect.succeed(n).pipe(Effect.tap(Console.log)) + * ) + * + * // ┌─── Effect + * // ▼ + * const resultsAsArray = Effect.all(iterableOfEffects) + * + * Effect.runPromise(resultsAsArray).then(console.log) + * // Output: + * // 1 + * // 2 + * // 3 + * // [ 1, 2, 3 ] + * ``` + * + * **Example** (Combining Effects in Structs) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const structOfEffects = { + * a: Effect.succeed(42).pipe(Effect.tap(Console.log)), + * b: Effect.succeed("Hello").pipe(Effect.tap(Console.log)) + * } + * + * // ┌─── Effect<{ a: number; b: string; }, never, never> + * // ▼ + * const resultsAsStruct = Effect.all(structOfEffects) + * + * Effect.runPromise(resultsAsStruct).then(console.log) + * // Output: + * // 42 + * // Hello + * // { a: 42, b: 'Hello' } + * ``` + * + * **Example** (Combining Effects in Records) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const recordOfEffects: Record> = { + * key1: Effect.succeed(1).pipe(Effect.tap(Console.log)), + * key2: Effect.succeed(2).pipe(Effect.tap(Console.log)) + * } + * + * // ┌─── Effect<{ [x: string]: number; }, never, never> + * // ▼ + * const resultsAsRecord = Effect.all(recordOfEffects) + * + * Effect.runPromise(resultsAsRecord).then(console.log) + * // Output: + * // 1 + * // 2 + * // { key1: 1, key2: 2 } + * ``` + * + * **Example** (Short-Circuiting Behavior) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const program = Effect.all([ + * Effect.succeed("Task1").pipe(Effect.tap(Console.log)), + * Effect.fail("Task2: Oh no!").pipe(Effect.tap(Console.log)), + * // Won't execute due to earlier failure + * Effect.succeed("Task3").pipe(Effect.tap(Console.log)) + * ]) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // Task1 + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { _id: 'Cause', _tag: 'Fail', failure: 'Task2: Oh no!' } + * // } + * ``` + * + * **Example** (Collecting Results with `mode: "either"`) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const effects = [ + * Effect.succeed("Task1").pipe(Effect.tap(Console.log)), + * Effect.fail("Task2: Oh no!").pipe(Effect.tap(Console.log)), + * Effect.succeed("Task3").pipe(Effect.tap(Console.log)) + * ] + * + * const program = Effect.all(effects, { mode: "either" }) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // Task1 + * // Task3 + * // { + * // _id: 'Exit', + * // _tag: 'Success', + * // value: [ + * // { _id: 'Either', _tag: 'Right', right: 'Task1' }, + * // { _id: 'Either', _tag: 'Left', left: 'Task2: Oh no!' }, + * // { _id: 'Either', _tag: 'Right', right: 'Task3' } + * // ] + * // } + * ``` + * + * **Example** (Collecting Results with `mode: "validate"`) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const effects = [ + * Effect.succeed("Task1").pipe(Effect.tap(Console.log)), + * Effect.fail("Task2: Oh no!").pipe(Effect.tap(Console.log)), + * Effect.succeed("Task3").pipe(Effect.tap(Console.log)) + * ] + * + * const program = Effect.all(effects, { mode: "validate" }) + * + * Effect.runPromiseExit(program).then((result) => console.log("%o", result)) + * // Output: + * // Task1 + * // Task3 + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { + * // _id: 'Cause', + * // _tag: 'Fail', + * // failure: [ + * // { _id: 'Option', _tag: 'None' }, + * // { _id: 'Option', _tag: 'Some', value: 'Task2: Oh no!' }, + * // { _id: 'Option', _tag: 'None' } + * // ] + * // } + * // } + * ``` + * + * @see {@link forEach} for iterating over elements and applying an effect. + * @see {@link allWith} for a data-last version of this function. + * + * @since 2.0.0 + * @category Collecting + */ +const all = exports.all = fiberRuntime.all; +/** + * A data-last version of {@link all}, designed for use in pipelines. + * + * **When to Use** + * + * This function enables you to combine multiple effects and customize execution + * options such as concurrency levels. This version is useful in functional + * pipelines where you first define your data and then apply operations to it. + * + * **Example** + * + * ```ts + * import { Effect, pipe } from "effect" + * + * const task1 = Effect.succeed(1).pipe( + * Effect.delay("200 millis"), + * Effect.tap(Effect.log("task1 done")) + * ) + * + * const task2 = Effect.succeed("hello").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Effect.log("task2 done")) + * ) + * + * const program = pipe( + * [task1, task2], + * // Run both effects concurrently using the concurrent option + * Effect.allWith({ concurrency: 2 }) + * ) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // timestamp=... level=INFO fiber=#3 message="task2 done" + * // timestamp=... level=INFO fiber=#2 message="task1 done" + * // [ 1, 'hello' ] + * ``` + * + * @since 2.0.0 + * @category Collecting + */ +const allWith = exports.allWith = fiberRuntime.allWith; +/** + * Evaluates and runs each effect in the iterable, collecting only the + * successful results while discarding failures. + * + * **Details** + * + * This function function processes an iterable of effects and runs each one. If + * an effect is successful, its result is collected; if it fails, the result is + * discarded. This ensures that only successful outcomes are kept. + * + * **Options** + * + * The function also allows you to customize how the effects are handled by + * specifying options such as concurrency, batching, and how finalizers behave. + * These options provide flexibility in running the effects concurrently or + * adjusting other execution details. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const tasks = [ + * Effect.succeed(1), + * Effect.fail("Error 1"), + * Effect.succeed(2), + * Effect.fail("Error 2") + * ] + * + * const program = Effect.gen(function*() { + * const successfulResults = yield* Effect.allSuccesses(tasks) + * console.log(successfulResults) + * }) + * + * Effect.runFork(program) + * // Output: [1, 2] + * + * ``` + * + * @since 2.0.0 + * @category Collecting + */ +const allSuccesses = exports.allSuccesses = fiberRuntime.allSuccesses; +/** + * Drops elements until the effectful predicate returns `true`. + * + * **Details** + * + * This function processes a collection of elements and uses an effectful + * predicate to determine when to stop dropping elements. It drops elements from + * the beginning of the collection until the predicate returns `true`. + * + * The predicate is a function that takes an element and its index in the + * collection and returns an effect that evaluates to a boolean. + * + * Once the predicate returns `true`, the remaining elements of the collection + * are returned. + * + * **Note**: The first element for which the predicate returns `true` is also + * dropped. + * + * **When to Use** + * + * This function allows you to conditionally skip over a part of the collection + * based on some criteria defined in the predicate. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const numbers = [1, 2, 3, 4, 5, 6] + * const predicate = (n: number, i: number) => Effect.succeed(n > 3) + * + * const program = Effect.gen(function*() { + * const result = yield* Effect.dropUntil(numbers, predicate) + * console.log(result) + * }) + * + * Effect.runFork(program) + * // Output: [5, 6] + * ``` + * + * @see {@link dropWhile} for a similar function that drops elements while the + * predicate returns `true`. + * + * @since 2.0.0 + * @category Collecting + */ +const dropUntil = exports.dropUntil = effect.dropUntil; +/** + * Drops elements as long as the predicate returns `true`. + * + * **Details** + * + * This function processes a collection of elements and uses a predicate to + * decide whether to drop an element. + * + * The predicate is a function that takes an element and its index, and it + * returns an effect that evaluates to a boolean. + * + * As long as the predicate returns `true`, elements will continue to be dropped + * from the collection. + * + * Once the predicate returns `false`, the remaining elements are kept. + * + * **When to Use** + * + * This function allows you to discard elements from the start of a collection + * based on a condition, and only keep the rest when the condition no longer + * holds. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const numbers = [1, 2, 3, 4, 5, 6] + * const predicate = (n: number, i: number) => Effect.succeed(n <= 3) + * + * const program = Effect.gen(function*() { + * const result = yield* Effect.dropWhile(numbers, predicate) + * console.log(result) + * }) + * + * Effect.runFork(program) + * // Output: [4, 5, 6] + * ``` + * + * @see {@link dropUntil} for a similar function that drops elements until the + * predicate returns `true`. + * + * @since 2.0.0 + * @category Collecting + */ +const dropWhile = exports.dropWhile = effect.dropWhile; +/** + * Takes elements from a collection until the effectful predicate returns + * `true`. + * + * **Details** + * + * This function processes a collection of elements and uses an effectful + * predicate to decide when to stop taking elements. The elements are taken from + * the beginning of the collection until the predicate returns `true`. + * + * The predicate is a function that takes an element and its index in the + * collection, and returns an effect that resolves to a boolean. + * + * Once the predicate returns `true`, the remaining elements of the collection + * are discarded, and the function stops taking more elements. + * + * **Note**: The first element for which the predicate returns `true` is also + * included in the result. + * + * **When to Use** + * + * Use this function when you want to conditionally take elements from a + * collection based on a dynamic condition. For example, you may want to collect + * numbers from a list until a certain threshold is reached, or gather items + * until a specific condition is met. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const numbers = [1, 2, 3, 4, 5, 6] + * const predicate = (n: number, i: number) => Effect.succeed(n > 3) + * + * const program = Effect.gen(function*() { + * const result = yield* Effect.takeUntil(numbers, predicate) + * console.log(result) + * }) + * + * Effect.runFork(program) + * // Output: [ 1, 2, 3, 4 ] + * ``` + * + * @see {@link takeWhile} for a similar function that takes elements while the + * predicate returns `true`. + * + * @since 2.0.0 + * @category Collecting + */ +const takeUntil = exports.takeUntil = effect.takeUntil; +/** + * Takes elements as long as the predicate returns `true`. + * + * **Details** + * + * This function processes a collection of elements and uses a predicate to + * decide whether to take an element. + * + * The predicate is a function that takes an element and its index, and it + * returns an effect that evaluates to a boolean. + * + * As long as the predicate returns `true`, elements will continue to be taken + * from the collection. + * + * Once the predicate returns `false`, the remaining elements are discarded. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const numbers = [1, 2, 3, 4, 5, 6] + * const predicate = (n: number, i: number) => Effect.succeed(n <= 3) + * + * const program = Effect.gen(function*() { + * const result = yield* Effect.takeWhile(numbers, predicate) + * console.log(result) + * }) + * + * Effect.runFork(program) + * // Output: [1, 2, 3] + * ``` + * + * @see {@link takeUntil} for a similar function that takes elements until the predicate returns `true`. + * + * @since 2.0.0 + * @category Collecting + */ +const takeWhile = exports.takeWhile = effect.takeWhile; +/** + * Determines whether all elements of the iterable satisfy the effectful + * predicate. + * + * **Details** + * + * This function checks whether every element in a given collection (an + * iterable) satisfies a condition defined by an effectful predicate. + * + * The predicate is a function that takes an element and its index, and it + * returns an effect that evaluates to a boolean. + * + * The function will process each element and return `true` if all elements + * satisfy the predicate; otherwise, it returns `false`. + * + * **When to Use** + * + * This function is useful when you need to verify that all items in a + * collection meet certain criteria, even when the evaluation of each item + * involves effects, such as asynchronous checks or complex computations. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const numbers = [2, 4, 6, 8] + * const predicate = (n: number, i: number) => Effect.succeed(n % 2 === 0) + * + * const program = Effect.gen(function*() { + * const allEven = yield* Effect.every(numbers, predicate) + * console.log(allEven) + * }) + * + * Effect.runFork(program) + * // Output: true + * ``` + * + * @see {@link exists} for a similar function that returns a boolean indicating + * whether **any** element satisfies the predicate. + * + * @since 2.0.0 + * @category Condition Checking + */ +const every = exports.every = effect.every; +/** + * Determines whether any element of the iterable satisfies the effectual + * predicate. + * + * **Details** + * + * This function checks whether any element in a given collection (an iterable) + * satisfies a condition defined by an effectful predicate. + * + * The predicate is a function that takes an element and its index, and it + * returns an effect that evaluates to a boolean. + * + * The function will process each element, and if any element satisfies the + * predicate (returns `true`), the function will immediately return `true`. + * + * If none of the elements satisfy the condition, it will return `false`. + * + * **When to Use** + * + * This function allows you to quickly check for a condition in a collection + * without having to manually iterate over it. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const numbers = [1, 2, 3, 4] + * const predicate = (n: number, i: number) => Effect.succeed(n > 2) + * + * const program = Effect.gen(function*() { + * const hasLargeNumber = yield* Effect.exists(numbers, predicate) + * console.log(hasLargeNumber) + * }) + * + * Effect.runFork(program) + * // Output: true + * ``` + * + * @see {@link every} for a similar function that checks if **all** elements + * satisfy the predicate. + * + * @since 2.0.0 + * @category Condition Checking + */ +const exists = exports.exists = fiberRuntime.exists; +/** + * Filters an iterable using the specified effectful predicate. + * + * **Details** + * + * This function filters a collection (an iterable) by applying an effectful + * predicate. + * + * The predicate is a function that takes an element and its index, and it + * returns an effect that evaluates to a boolean. + * + * The function processes each element in the collection and keeps only those + * that satisfy the condition defined by the predicate. + * + * **Options** + * + * You can also adjust the behavior with options such as concurrency, batching, + * or whether to negate the condition. + * + * **When to Use** + * + * This function allows you to selectively keep or remove elements based on a + * condition that may involve asynchronous or side-effect-causing operations. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const numbers = [1, 2, 3, 4, 5] + * const predicate = (n: number, i: number) => Effect.succeed(n % 2 === 0) + * + * const program = Effect.gen(function*() { + * const result = yield* Effect.filter(numbers, predicate) + * console.log(result) + * }) + * + * Effect.runFork(program) + * // Output: [2, 4] + * ``` + * + * @since 2.0.0 + * @category Filtering + */ +const filter = exports.filter = fiberRuntime.filter; +/** + * Filters and maps elements sequentially in one operation. + * + * This function processes each element one by one. It applies a function that + * returns an `Option` to each element. If the function returns `Some`, the + * element is kept; if it returns `None`, the element is removed. The operation + * is done sequentially for each element. + * + * **Example** + * + * ```ts + * import { Console, Effect, Option } from "effect" + * + * const task = (n: number) => + * Effect.succeed(n).pipe( + * Effect.delay(1000 - (n * 100)), + * Effect.tap(Console.log(`task${n} done`)) + * ) + * + * const program = Effect.filterMap( + * [task(1), task(2), task(3), task(4)], + * (n) => n % 2 === 0 ? Option.some(n) : Option.none() + * ) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // task1 done + * // task2 done + * // task3 done + * // task4 done + * // [ 2, 4 ] + * ``` + * + * @since 2.0.0 + * @category Filtering + */ +const filterMap = exports.filterMap = effect.filterMap; +/** + * Returns the first element that satisfies the effectful predicate. + * + * **Details** + * + * This function processes a collection of elements and applies an effectful + * predicate to each element. + * + * The predicate is a function that takes an element and its index in the + * collection, and it returns an effect that evaluates to a boolean. + * + * The function stops as soon as it finds the first element for which the + * predicate returns `true` and returns that element wrapped in an `Option`. + * + * If no element satisfies the predicate, the result will be `None`. + * + * **When to Use** + * + * This function allows you to efficiently find an element that meets a specific + * condition, even when the evaluation involves effects like asynchronous + * operations or side effects. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const numbers = [1, 2, 3, 4, 5] + * const predicate = (n: number, i: number) => Effect.succeed(n > 3) + * + * const program = Effect.gen(function*() { + * const result = yield* Effect.findFirst(numbers, predicate) + * console.log(result) + * }) + * + * Effect.runFork(program) + * // Output: { _id: 'Option', _tag: 'Some', value: 4 } + * ``` + * + * @since 2.0.0 + * @category Collecting + */ +const findFirst = exports.findFirst = effect.findFirst; +/** + * Executes an effectful operation for each element in an `Iterable`. + * + * **Details** + * + * This function applies a provided operation to each element in the iterable, + * producing a new effect that returns an array of results. + * + * If any effect fails, the iteration stops immediately (short-circuiting), and + * the error is propagated. + * + * **Concurrency** + * + * The `concurrency` option controls how many operations are performed + * concurrently. By default, the operations are performed sequentially. + * + * **Discarding Results** + * + * If the `discard` option is set to `true`, the intermediate results are not + * collected, and the final result of the operation is `void`. + * + * **Example** (Applying Effects to Iterable Elements) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const result = Effect.forEach([1, 2, 3, 4, 5], (n, index) => + * Console.log(`Currently at index ${index}`).pipe(Effect.as(n * 2)) + * ) + * + * Effect.runPromise(result).then(console.log) + * // Output: + * // Currently at index 0 + * // Currently at index 1 + * // Currently at index 2 + * // Currently at index 3 + * // Currently at index 4 + * // [ 2, 4, 6, 8, 10 ] + * ``` + * + * **Example** (Discarding Results) + * + * ```ts + * import { Effect, Console } from "effect" + * + * // Apply effects but discard the results + * const result = Effect.forEach( + * [1, 2, 3, 4, 5], + * (n, index) => + * Console.log(`Currently at index ${index}`).pipe(Effect.as(n * 2)), + * { discard: true } + * ) + * + * Effect.runPromise(result).then(console.log) + * // Output: + * // Currently at index 0 + * // Currently at index 1 + * // Currently at index 2 + * // Currently at index 3 + * // Currently at index 4 + * // undefined + * ``` + * + * @see {@link all} for combining multiple effects into one. + * + * @since 2.0.0 + * @category Looping + */ +const forEach = exports.forEach = fiberRuntime.forEach; +/** + * Returns the first element of the iterable if the collection is non-empty, or + * fails with the error `NoSuchElementException` if the collection is empty. + * + * **When to Use** + * + * This function is useful when you need to retrieve the first item from a + * collection and want to handle the case where the collection might be empty + * without causing an unhandled exception. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * // Simulate an async operation + * const fetchNumbers = Effect.succeed([1, 2, 3]).pipe(Effect.delay("100 millis")) + * + * const program = Effect.gen(function*() { + * const firstElement = yield* Effect.head(fetchNumbers) + * console.log(firstElement) + * }) + * + * Effect.runFork(program) + * // Output: 1 + * ``` + * + * @since 2.0.0 + * @category Collecting + */ +const head = exports.head = effect.head; +/** + * Merges an `Iterable>` to a single effect. + * + * **Details** + * + * This function takes an iterable of effects and combines them into a single + * effect. It does this by iterating over each effect in the collection and + * applying a function that accumulates results into a "zero" value, which + * starts with an initial value and is updated with each effect's success. + * + * The provided function `f` is called for each element in the iterable, + * allowing you to specify how to combine the results. + * + * **Options** + * + * The function also allows you to customize how the effects are handled by + * specifying options such as concurrency, batching, and how finalizers behave. + * These options provide flexibility in running the effects concurrently or + * adjusting other execution details. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const numbers = [Effect.succeed(1), Effect.succeed(2), Effect.succeed(3)] + * const add = (sum: number, value: number, i: number) => sum + value + * const zero = 0 + * + * const program = Effect.gen(function*() { + * const total = yield* Effect.mergeAll(numbers, zero, add) + * console.log(total) + * }) + * + * Effect.runFork(program) + * // Output: 6 + * ``` + * + * @since 2.0.0 + * @category Collecting + */ +const mergeAll = exports.mergeAll = fiberRuntime.mergeAll; +/** + * Processes an iterable and applies an effectful function to each element, + * categorizing the results into successes and failures. + * + * **Details** + * + * This function processes each element in the provided iterable by applying an + * effectful function to it. The results are then categorized into two separate + * lists: one for failures and another for successes. This separation allows you + * to handle the two categories differently. Failures are collected in a list + * without interrupting the processing of the remaining elements, so the + * operation continues even if some elements fail. This is particularly useful + * when you need to handle both successful and failed results separately, + * without stopping the entire process on encountering a failure. + * + * **When to Use** + * + * Use this function when you want to process a collection of items and handle + * errors or failures without interrupting the processing of other items. It's + * useful when you need to distinguish between successful and failed results and + * process them separately, for example, when logging errors while continuing to + * work with valid data. The function ensures that failures are captured, while + * successes are processed normally. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * // ┌─── Effect<[string[], number[]], never, never> + * // ▼ + * const program = Effect.partition([0, 1, 2, 3, 4], (n) => { + * if (n % 2 === 0) { + * return Effect.succeed(n) + * } else { + * return Effect.fail(`${n} is not even`) + * } + * }) + * + * Effect.runPromise(program).then(console.log, console.error) + * // Output: + * // [ [ '1 is not even', '3 is not even' ], [ 0, 2, 4 ] ] + * ``` + * + * @see {@link validateAll} for a function that either collects all failures or all successes. + * @see {@link validateFirst} for a function that stops at the first success. + * + * @since 2.0.0 + * @category Error Accumulation + */ +const partition = exports.partition = fiberRuntime.partition; +/** + * Reduces an `Iterable` using an effectual function `f`, working + * sequentially from left to right. + * + * **Details** + * + * This function takes an iterable and applies a function `f` to each element in + * the iterable. The function works sequentially, starting with an initial value + * `zero` and then combining it with each element in the collection. The + * provided function `f` is called for each element in the iterable, allowing + * you to accumulate a result based on the current value and the element being + * processed. + * + * **When to Use** + * + * The function is often used for operations like summing a collection of + * numbers or combining results from multiple tasks. It ensures that operations + * are performed one after the other, maintaining the order of the elements. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * const processOrder = (id: number) => + * Effect.succeed({ id, price: 100 * id }) + * .pipe(Effect.tap(() => Console.log(`Order ${id} processed`)), Effect.delay(500 - (id * 100))) + * + * const program = Effect.reduce( + * [1, 2, 3, 4], + * 0, + * (acc, id, i) => + * processOrder(id) + * .pipe(Effect.map((order) => acc + order.price)) + * ) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // Order 1 processed + * // Order 2 processed + * // Order 3 processed + * // Order 4 processed + * // 1000 + * ``` + * + * @see {@link reduceWhile} for a similar function that stops the process based on a predicate. + * @see {@link reduceRight} for a similar function that works from right to left. + * + * @since 2.0.0 + * @category Collecting + */ +const reduce = exports.reduce = effect.reduce; +/** + * Reduces an `Iterable` using an effectual function `body`, working + * sequentially from left to right, stopping the process early when the + * predicate `while` is not satisfied. + * + * **Details** + * + * This function processes a collection of elements, applying a function `body` + * to reduce them to a single value, starting from the first element. It checks + * the value of the accumulator against a predicate (`while`). If at any point + * the predicate returns `false`, the reduction stops, and the accumulated + * result is returned. + * + * **When to Use** + * + * Use this function when you need to reduce a collection of elements, but only + * continue the process as long as a certain condition holds true. For example, + * if you want to sum values in a list but stop as soon as the sum exceeds a + * certain threshold, you can use this function. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * const processOrder = (id: number) => + * Effect.succeed({ id, price: 100 * id }) + * .pipe(Effect.tap(() => Console.log(`Order ${id} processed`)), Effect.delay(500 - (id * 100))) + * + * const program = Effect.reduceWhile( + * [1, 2, 3, 4], + * 0, + * { + * body: (acc, id, i) => + * processOrder(id) + * .pipe(Effect.map((order) => acc + order.price)), + * while: (acc) => acc < 500 + * } + * ) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // Order 1 processed + * // Order 2 processed + * // Order 3 processed + * // 600 + * ``` + * + * @since 2.0.0 + * @category Collecting + */ +const reduceWhile = exports.reduceWhile = effect.reduceWhile; +/** + * Reduces an `Iterable` using an effectual function `f`, working + * sequentially from right to left. + * + * **Details** + * + * This function takes an iterable and applies a function `f` to each element in + * the iterable. The function works sequentially, starting with an initial value + * `zero` and then combining it with each element in the collection. The + * provided function `f` is called for each element in the iterable, allowing + * you to accumulate a result based on the current value and the element being + * processed. + * + * **When to Use** + * + * The function is often used for operations like summing a collection of + * numbers or combining results from multiple tasks. It ensures that operations + * are performed one after the other, maintaining the order of the elements. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * const processOrder = (id: number) => + * Effect.succeed({ id, price: 100 * id }) + * .pipe(Effect.tap(() => Console.log(`Order ${id} processed`)), Effect.delay(500 - (id * 100))) + * + * const program = Effect.reduceRight( + * [1, 2, 3, 4], + * 0, + * (id, acc, i) => + * processOrder(id) + * .pipe(Effect.map((order) => acc + order.price)) + * ) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // Order 4 processed + * // Order 3 processed + * // Order 2 processed + * // Order 1 processed + * // 1000 + * ``` + * + * @see {@link reduce} for a similar function that works from left to right. + * + * @since 2.0.0 + * @category Collecting + */ +const reduceRight = exports.reduceRight = effect.reduceRight; +/** + * Reduces an `Iterable>` to a single effect. + * + * **Details** + * + * This function processes a collection of effects and combines them into one + * single effect. It starts with an initial effect (`zero`) and applies a + * function `f` to each element in the collection. + * + * **Options** + * + * The function also allows you to customize how the effects are handled by + * specifying options such as concurrency, batching, and how finalizers behave. + * These options provide flexibility in running the effects concurrently or + * adjusting other execution details. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * const processOrder = (id: number) => + * Effect.succeed({ id, price: 100 * id }) + * .pipe(Effect.tap(() => Console.log(`Order ${id} processed`)), Effect.delay(500 - (id * 100))) + * + * const program = Effect.reduceEffect( + * [processOrder(1), processOrder(2), processOrder(3), processOrder(4)], + * Effect.succeed(0), + * (acc, order, i) => acc + order.price + * ) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // Order 1 processed + * // Order 2 processed + * // Order 3 processed + * // Order 4 processed + * // 1000 + * ``` + * + * @since 2.0.0 + * @category Collecting + */ +const reduceEffect = exports.reduceEffect = fiberRuntime.reduceEffect; +/** + * Replicates the given effect `n` times. + * + * **Details** + * + * This function takes an effect and replicates it a specified number of times + * (`n`). The result is an array of `n` effects, each of which is identical to + * the original effect. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * const task = Effect.succeed("Hello, World!").pipe( + * Effect.tap(Console.log) + * ) + * + * const program = Effect.gen(function*() { + * // Replicate the task 3 times + * const tasks = Effect.replicate(task, 3) + * for (const t of tasks) { + * // Run each task + * yield* t + * } + * }) + * + * Effect.runFork(program) + * // Output: + * // Hello, World! + * // Hello, World! + * // Hello, World! + * ``` + * + * @since 2.0.0 + */ +const replicate = exports.replicate = fiberRuntime.replicate; +/** + * Performs this effect the specified number of times and collects the results. + * + * **Details** + * + * This function repeats an effect multiple times and collects the results into + * an array. You specify how many times to execute the effect, and it runs that + * many times, either in sequence or concurrently depending on the provided + * options. + * + * **Options** + * + * If the `discard` option is set to `true`, the intermediate results are not + * collected, and the final result of the operation is `void`. + * + * The function also allows you to customize how the effects are handled by + * specifying options such as concurrency, batching, and how finalizers behave. + * These options provide flexibility in running the effects concurrently or + * adjusting other execution details. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * let counter = 0 + * + * const task = Effect.sync(() => ++counter).pipe( + * Effect.tap(() => Console.log(`Task completed`)) + * ) + * + * const program = Effect.gen(function*() { + * // Replicate the task 3 times and collect the results + * const results = yield* Effect.replicateEffect(task, 3) + * yield* Console.log(`Results: ${results.join(", ")}`) + * }) + * + * Effect.runFork(program) + * // Output: + * // Task completed + * // Task completed + * // Task completed + * // Results: 1, 2, 3 + * ``` + * + * @since 2.0.0 + * @category Collecting + */ +const replicateEffect = exports.replicateEffect = fiberRuntime.replicateEffect; +/** + * Applies an effectful operation to each element in a collection while + * collecting both successes and failures. + * + * **Details** + * + * This function allows you to apply an effectful operation to every item in a + * collection. + * + * Unlike {@link forEach}, which would stop at the first error, this function + * continues processing all elements, accumulating both successes and failures. + * + * **When to Use** + * + * Use this function when you want to process every item in a collection, even + * if some items fail. This is particularly useful when you need to perform + * operations on all elements without halting due to an error. + * + * Keep in mind that if there are any failures, **all successes will be lost**, + * so this function is not suitable when you need to keep the successful results + * in case of errors. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * // ┌─── Effect + * // ▼ + * const program = Effect.validateAll([1, 2, 3, 4, 5], (n) => { + * if (n < 4) { + * return Console.log(`item ${n}`).pipe(Effect.as(n)) + * } else { + * return Effect.fail(`${n} is not less that 4`) + * } + * }) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // item 1 + * // item 2 + * // item 3 + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { + * // _id: 'Cause', + * // _tag: 'Fail', + * // failure: [ '4 is not less that 4', '5 is not less that 4' ] + * // } + * // } + * ``` + * + * @see {@link forEach} for a similar function that stops at the first error. + * @see {@link partition} when you need to separate successes and failures + * instead of losing successes with errors. + * + * @since 2.0.0 + * @category Error Accumulation + */ +const validateAll = exports.validateAll = fiberRuntime.validateAll; +/** + * This function is similar to {@link validateAll} but with a key difference: it + * returns the first successful result or all errors if none of the operations + * succeed. + * + * **Details** + * + * This function processes a collection of elements and applies an effectful + * operation to each. Unlike {@link validateAll}, which accumulates both + * successes and failures, `Effect.validateFirst` stops and returns the first + * success it encounters. If no success occurs, it returns all accumulated + * errors. This can be useful when you are interested in the first successful + * result and want to avoid processing further once a valid result is found. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * // ┌─── Effect + * // ▼ + * const program = Effect.validateFirst([1, 2, 3, 4, 5], (n) => { + * if (n < 4) { + * return Effect.fail(`${n} is not less that 4`) + * } else { + * return Console.log(`item ${n}`).pipe(Effect.as(n)) + * } + * }) + * + * Effect.runPromise(program).then(console.log, console.error) + * // Output: + * // item 4 + * // 4 + * ``` + * + * @see {@link validateAll} for a similar function that accumulates all results. + * @see {@link firstSuccessOf} for a similar function that processes multiple + * effects and returns the first successful one or the last error. + * + * @since 2.0.0 + * @category Error Accumulation + */ +const validateFirst = exports.validateFirst = fiberRuntime.validateFirst; +/** + * Creates an `Effect` from a callback-based asynchronous function. + * + * **Details** + * + * The `resume` function: + * - Must be called exactly once. Any additional calls will be ignored. + * - Can return an optional `Effect` that will be run if the `Fiber` executing + * this `Effect` is interrupted. This can be useful in scenarios where you + * need to handle resource cleanup if the operation is interrupted. + * - Can receive an `AbortSignal` to handle interruption if needed. + * + * The `FiberId` of the fiber that may complete the async callback may also be + * specified using the `blockingOn` argument. This is called the "blocking + * fiber" because it suspends the fiber executing the `async` effect (i.e. + * semantically blocks the fiber from making progress). Specifying this fiber id + * in cases where it is known will improve diagnostics, but not affect the + * behavior of the returned effect. + * + * **When to Use** + * + * Use `Effect.async` when dealing with APIs that use callback-style instead of + * `async/await` or `Promise`. + * + * **Example** (Wrapping a Callback API) + * + * ```ts + * import { Effect } from "effect" + * import * as NodeFS from "node:fs" + * + * const readFile = (filename: string) => + * Effect.async((resume) => { + * NodeFS.readFile(filename, (error, data) => { + * if (error) { + * // Resume with a failed Effect if an error occurs + * resume(Effect.fail(error)) + * } else { + * // Resume with a succeeded Effect if successful + * resume(Effect.succeed(data)) + * } + * }) + * }) + * + * // ┌─── Effect + * // ▼ + * const program = readFile("example.txt") + * ``` + * + * **Example** (Handling Interruption with Cleanup) + * + * ```ts + * import { Effect, Fiber } from "effect" + * import * as NodeFS from "node:fs" + * + * // Simulates a long-running operation to write to a file + * const writeFileWithCleanup = (filename: string, data: string) => + * Effect.async((resume) => { + * const writeStream = NodeFS.createWriteStream(filename) + * + * // Start writing data to the file + * writeStream.write(data) + * + * // When the stream is finished, resume with success + * writeStream.on("finish", () => resume(Effect.void)) + * + * // In case of an error during writing, resume with failure + * writeStream.on("error", (err) => resume(Effect.fail(err))) + * + * // Handle interruption by returning a cleanup effect + * return Effect.sync(() => { + * console.log(`Cleaning up ${filename}`) + * NodeFS.unlinkSync(filename) + * }) + * }) + * + * const program = Effect.gen(function* () { + * const fiber = yield* Effect.fork( + * writeFileWithCleanup("example.txt", "Some long data...") + * ) + * // Simulate interrupting the fiber after 1 second + * yield* Effect.sleep("1 second") + * yield* Fiber.interrupt(fiber) // This will trigger the cleanup + * }) + * + * // Run the program + * Effect.runPromise(program) + * // Output: + * // Cleaning up example.txt + * ``` + * + * **Example** (Handling Interruption with AbortSignal) + * + * ```ts + * import { Effect, Fiber } from "effect" + * + * // A task that supports interruption using AbortSignal + * const interruptibleTask = Effect.async((resume, signal) => { + * // Handle interruption + * signal.addEventListener("abort", () => { + * console.log("Abort signal received") + * clearTimeout(timeoutId) + * }) + * + * // Simulate a long-running task + * const timeoutId = setTimeout(() => { + * console.log("Operation completed") + * resume(Effect.void) + * }, 2000) + * }) + * + * const program = Effect.gen(function* () { + * const fiber = yield* Effect.fork(interruptibleTask) + * // Simulate interrupting the fiber after 1 second + * yield* Effect.sleep("1 second") + * yield* Fiber.interrupt(fiber) + * }) + * + * // Run the program + * Effect.runPromise(program) + * // Output: + * // Abort signal received + * ``` + * + * @since 2.0.0 + * @category Creating Effects + */ +const async = exports.async = core.async; +/** + * A variant of {@link async} where the registration function may return an `Effect`. + * + * @since 2.0.0 + * @category Creating Effects + */ +const asyncEffect = exports.asyncEffect = runtime_.asyncEffect; +/** + * Low level constructor that enables for custom stack tracing cutpoints. + * + * It is meant to be called with a bag of instructions that become available in + * the "this" of the effect. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const throwingFunction = () => { throw new Error() } + * const blowUp = Effect.custom(throwingFunction, function() { + * return Effect.succeed(this.effect_instruction_i0()) + * }) + * ``` + * + * @since 2.0.0 + * @category Creating Effects + */ +const custom = exports.custom = core.custom; +/** + * @since 2.0.0 + * @category Creating Effects + */ +const withFiberRuntime = exports.withFiberRuntime = core.withFiberRuntime; +/** + * Creates an `Effect` that represents a recoverable error. + * + * **When to Use** + * + * Use this function to explicitly signal an error in an `Effect`. The error + * will keep propagating unless it is handled. You can handle the error with + * functions like {@link catchAll} or {@link catchTag}. + * + * **Example** (Creating a Failed Effect) + * + * ```ts + * import { Effect } from "effect" + * + * // ┌─── Effect + * // ▼ + * const failure = Effect.fail( + * new Error("Operation failed due to network error") + * ) + * ``` + * + * @see {@link succeed} to create an effect that represents a successful value. + * + * @since 2.0.0 + * @category Creating Effects + */ +const fail = exports.fail = core.fail; +/** + * Creates an `Effect` that fails with the specified error, evaluated lazily. + * + * @since 2.0.0 + * @category Creating Effects + */ +const failSync = exports.failSync = core.failSync; +/** + * Creates an `Effect` that fails with the specified `Cause`. + * + * @since 2.0.0 + * @category Creating Effects + */ +const failCause = exports.failCause = core.failCause; +/** + * Creates an `Effect` that fails with the specified `Cause`, evaluated lazily. + * + * @since 2.0.0 + * @category Creating Effects + */ +const failCauseSync = exports.failCauseSync = core.failCauseSync; +/** + * Creates an effect that terminates a fiber with a specified error. + * + * **Details** + * + * This function is used to signal a defect, which represents a critical and + * unexpected error in the code. When invoked, it produces an effect that does + * not handle the error and instead terminates the fiber. + * + * The error channel of the resulting effect is of type `never`, indicating that + * it cannot recover from this failure. + * + * **When to Use** + * + * Use this function when encountering unexpected conditions in your code that + * should not be handled as regular errors but instead represent unrecoverable + * defects. + * + * **Example** (Terminating on Division by Zero with a Specified Error) + * + * ```ts + * import { Effect } from "effect" + * + * const divide = (a: number, b: number) => + * b === 0 + * ? Effect.die(new Error("Cannot divide by zero")) + * : Effect.succeed(a / b) + * + * // ┌─── Effect + * // ▼ + * const program = divide(1, 0) + * + * Effect.runPromise(program).catch(console.error) + * // Output: + * // (FiberFailure) Error: Cannot divide by zero + * // ...stack trace... + * ``` + * + * @see {@link dieSync} for a variant that throws a specified error, evaluated + * lazily. + * @see {@link dieMessage} for a variant that throws a `RuntimeException` with a + * message. + * + * @since 2.0.0 + * @category Creating Effects + */ +const die = exports.die = core.die; +/** + * Creates an effect that terminates a fiber with a `RuntimeException` + * containing the specified message. + * + * **Details** + * + * This function is used to signal a defect, representing a critical and + * unexpected error in the code. When invoked, it produces an effect that + * terminates the fiber with a `RuntimeException` carrying the given message. + * + * The resulting effect has an error channel of type `never`, indicating it does + * not handle or recover from the error. + * + * **When to Use** + * + * Use this function when you want to terminate a fiber due to an unrecoverable + * defect and include a clear explanation in the message. + * + * **Example** (Terminating on Division by Zero with a Specified Message) + * + * ```ts + * import { Effect } from "effect" + * + * const divide = (a: number, b: number) => + * b === 0 + * ? Effect.dieMessage("Cannot divide by zero") + * : Effect.succeed(a / b) + * + * // ┌─── Effect + * // ▼ + * const program = divide(1, 0) + * + * Effect.runPromise(program).catch(console.error) + * // Output: + * // (FiberFailure) RuntimeException: Cannot divide by zero + * // ...stack trace... + * ``` + * + * @see {@link die} for a variant that throws a specified error. + * @see {@link dieSync} for a variant that throws a specified error, evaluated + * lazily. + * + * @since 2.0.0 + * @category Creating Effects + */ +const dieMessage = exports.dieMessage = core.dieMessage; +/** + * Creates an effect that dies with the specified error, evaluated lazily. + * + * **Details** + * + * This function allows you to create an effect that will terminate with a fatal error. + * The error is provided as a lazy argument, meaning it will only be evaluated when the effect runs. + * + * @see {@link die} if you don't need to evaluate the error lazily. + * + * @since 2.0.0 + * @category Creating Effects + */ +const dieSync = exports.dieSync = core.dieSync; +/** + * Provides a way to write effectful code using generator functions, simplifying + * control flow and error handling. + * + * **When to Use** + * + * `Effect.gen` allows you to write code that looks and behaves like synchronous + * code, but it can handle asynchronous tasks, errors, and complex control flow + * (like loops and conditions). It helps make asynchronous code more readable + * and easier to manage. + * + * The generator functions work similarly to `async/await` but with more + * explicit control over the execution of effects. You can `yield*` values from + * effects and return the final result at the end. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const addServiceCharge = (amount: number) => amount + 1 + * + * const applyDiscount = ( + * total: number, + * discountRate: number + * ): Effect.Effect => + * discountRate === 0 + * ? Effect.fail(new Error("Discount rate cannot be zero")) + * : Effect.succeed(total - (total * discountRate) / 100) + * + * const fetchTransactionAmount = Effect.promise(() => Promise.resolve(100)) + * + * const fetchDiscountRate = Effect.promise(() => Promise.resolve(5)) + * + * export const program = Effect.gen(function* () { + * const transactionAmount = yield* fetchTransactionAmount + * const discountRate = yield* fetchDiscountRate + * const discountedAmount = yield* applyDiscount( + * transactionAmount, + * discountRate + * ) + * const finalAmount = addServiceCharge(discountedAmount) + * return `Final amount to charge: ${finalAmount}` + * }) + * ``` + * + * @since 2.0.0 + * @category Creating Effects + */ +const gen = exports.gen = core.gen; +/** + * An effect that that runs indefinitely and never produces any result. The + * moral equivalent of `while(true) {}`, only without the wasted CPU cycles. + * + * **When to Use** + * + * It could be useful for long-running background tasks or to simulate waiting + * behavior without actually consuming resources. This effect is ideal for cases + * where you want to keep the program alive or in a certain state without + * performing any active work. + * + * @since 2.0.0 + * @category Creating Effects + */ +const never = exports.never = core.never; +/** + * Ensures the `Option` is `None`, returning `void`. Otherwise, raises a + * `NoSuchElementException`. + * + * **Details** + * + * This function checks if the provided `Option` is `None`. If it is, it returns + * an effect that produces no result (i.e., `void`). If the `Option` is not + * `None` (i.e., it contains a value), the function will raise a + * `NoSuchElementException` error. + * + * **When to Use** + * + * This is useful when you want to ensure that a certain value is absent (i.e., + * `None`) before continuing execution, and to handle cases where the value is + * unexpectedly present. + * + * @since 2.0.0 + */ +const none = exports.none = effect.none; +/** + * Creates an `Effect` that represents an asynchronous computation guaranteed to + * succeed. + * + * **Details** + * + * The provided function (`thunk`) returns a `Promise` that should never reject; if it does, the error + * will be treated as a "defect". + * + * This defect is not a standard error but indicates a flaw in the logic that + * was expected to be error-free. You can think of it similar to an unexpected + * crash in the program, which can be further managed or logged using tools like + * {@link catchAllDefect}. + * + * **Interruptions** + * + * An optional `AbortSignal` can be provided to allow for interruption of the + * wrapped `Promise` API. + * + * **When to Use** + * + * Use this function when you are sure the operation will not reject. + * + * **Example** (Delayed Message) + * + * ```ts + * import { Effect } from "effect" + * + * const delay = (message: string) => + * Effect.promise( + * () => + * new Promise((resolve) => { + * setTimeout(() => { + * resolve(message) + * }, 2000) + * }) + * ) + * + * // ┌─── Effect + * // ▼ + * const program = delay("Async operation completed successfully!") + * ``` + * + * @see {@link tryPromise} for a version that can handle failures. + * + * @since 2.0.0 + * @category Creating Effects + */ +const promise = exports.promise = effect.promise; +/** + * Creates an `Effect` that always succeeds with a given value. + * + * **When to Use** + * + * Use this function when you need an effect that completes successfully with a + * specific value without any errors or external dependencies. + * + * **Example** (Creating a Successful Effect) + * + * ```ts + * import { Effect } from "effect" + * + * // Creating an effect that represents a successful scenario + * // + * // ┌─── Effect + * // ▼ + * const success = Effect.succeed(42) + * ``` + * + * @see {@link fail} to create an effect that represents a failure. + * + * @since 2.0.0 + * @category Creating Effects + */ +const succeed = exports.succeed = core.succeed; +/** + * Returns an effect which succeeds with `None`. + * + * **When to Use** + * + * Use this function when you need to represent the absence of a value in your + * code, especially when working with optional data. This can be helpful when + * you want to indicate that no result is available without throwing an error or + * performing additional logic. + * + * @see {@link succeedSome} to create an effect that succeeds with a `Some` value. + * + * @since 2.0.0 + * @category Creating Effects + */ +const succeedNone = exports.succeedNone = effect.succeedNone; +/** + * Returns an effect which succeeds with the value wrapped in a `Some`. + * + * @see {@link succeedNone} for a similar function that returns `None` when the value is absent. + * + * @since 2.0.0 + * @category Creating Effects + */ +const succeedSome = exports.succeedSome = effect.succeedSome; +/** + * Delays the creation of an `Effect` until it is actually needed. + * + * **Details** + * + * The `Effect.suspend` function takes a thunk that represents the effect and + * wraps it in a suspended effect. This means the effect will not be created + * until it is explicitly needed, which is helpful in various scenarios: + * - **Lazy Evaluation**: Helps optimize performance by deferring computations, + * especially when the effect might not be needed, or when its computation is + * expensive. This also ensures that any side effects or scoped captures are + * re-executed on each invocation. + * - **Handling Circular Dependencies**: Useful in managing circular + * dependencies, such as recursive functions that need to avoid eager + * evaluation to prevent stack overflow. + * - **Unifying Return Types**: Can help TypeScript unify return types in + * situations where multiple branches of logic return different effects, + * simplifying type inference. + * + * **When to Use** + * + * Use this function when you need to defer the evaluation of an effect until it + * is required. This is particularly useful for optimizing expensive + * computations, managing circular dependencies, or resolving type inference + * issues. + * + * **Example** (Lazy Evaluation with Side Effects) + * + * ```ts + * import { Effect } from "effect" + * + * let i = 0 + * + * const bad = Effect.succeed(i++) + * + * const good = Effect.suspend(() => Effect.succeed(i++)) + * + * console.log(Effect.runSync(bad)) // Output: 0 + * console.log(Effect.runSync(bad)) // Output: 0 + * + * console.log(Effect.runSync(good)) // Output: 1 + * console.log(Effect.runSync(good)) // Output: 2 + * ``` + * + * **Example** (Recursive Fibonacci) + * + * ```ts + * import { Effect } from "effect" + * + * const blowsUp = (n: number): Effect.Effect => + * n < 2 + * ? Effect.succeed(1) + * : Effect.zipWith(blowsUp(n - 1), blowsUp(n - 2), (a, b) => a + b) + * + * console.log(Effect.runSync(blowsUp(32))) + * // crash: JavaScript heap out of memory + * + * const allGood = (n: number): Effect.Effect => + * n < 2 + * ? Effect.succeed(1) + * : Effect.zipWith( + * Effect.suspend(() => allGood(n - 1)), + * Effect.suspend(() => allGood(n - 2)), + * (a, b) => a + b + * ) + * + * console.log(Effect.runSync(allGood(32))) + * // Output: 3524578 + * ``` + * + * **Example** (Using Effect.suspend to Help TypeScript Infer Types) + * + * ```ts + * import { Effect } from "effect" + * + * // Without suspend, TypeScript may struggle with type inference. + * // Inferred type: + * // (a: number, b: number) => + * // Effect | Effect + * const withoutSuspend = (a: number, b: number) => + * b === 0 + * ? Effect.fail(new Error("Cannot divide by zero")) + * : Effect.succeed(a / b) + * + * // Using suspend to unify return types. + * // Inferred type: + * // (a: number, b: number) => Effect + * const withSuspend = (a: number, b: number) => + * Effect.suspend(() => + * b === 0 + * ? Effect.fail(new Error("Cannot divide by zero")) + * : Effect.succeed(a / b) + * ) + * ``` + * + * @since 2.0.0 + * @category Creating Effects + */ +const suspend = exports.suspend = core.suspend; +/** + * Creates an `Effect` that represents a synchronous side-effectful computation. + * + * **Details** + * + * The provided function (`thunk`) must not throw errors; if it does, the error + * will be treated as a "defect". + * + * This defect is not a standard error but indicates a flaw in the logic that + * was expected to be error-free. You can think of it similar to an unexpected + * crash in the program, which can be further managed or logged using tools like + * {@link catchAllDefect}. + * + * **When to Use** + * + * Use this function when you are sure the operation will not fail. + * + * **Example** (Logging a Message) + * + * ```ts + * import { Effect } from "effect" + * + * const log = (message: string) => + * Effect.sync(() => { + * console.log(message) // side effect + * }) + * + * // ┌─── Effect + * // ▼ + * const program = log("Hello, World!") + * ``` + * + * @see {@link try_ | try} for a version that can handle failures. + * + * @since 2.0.0 + * @category Creating Effects + */ +const sync = exports.sync = core.sync; +const _void = exports.void = core.void; +/** + * @since 2.0.0 + * @category Creating Effects + */ +const yieldNow = exports.yieldNow = core.yieldNow; +const _catch = exports.catch = effect._catch; +/** + * Handles all errors in an effect by providing a fallback effect. + * + * **Details** + * + * This function catches any errors that may occur during the execution of an + * effect and allows you to handle them by specifying a fallback effect. This + * ensures that the program continues without failing by recovering from errors + * using the provided fallback logic. + * + * **Note**: This function only handles recoverable errors. It will not recover + * from unrecoverable defects. + * + * **Example** (Providing Recovery Logic for Recoverable Errors) + * + * ```ts + * import { Effect, Random } from "effect" + * + * class HttpError { + * readonly _tag = "HttpError" + * } + * + * class ValidationError { + * readonly _tag = "ValidationError" + * } + * + * // ┌─── Effect + * // ▼ + * const program = Effect.gen(function* () { + * const n1 = yield* Random.next + * const n2 = yield* Random.next + * if (n1 < 0.5) { + * yield* Effect.fail(new HttpError()) + * } + * if (n2 < 0.5) { + * yield* Effect.fail(new ValidationError()) + * } + * return "some result" + * }) + * + * // ┌─── Effect + * // ▼ + * const recovered = program.pipe( + * Effect.catchAll((error) => + * Effect.succeed(`Recovering from ${error._tag}`) + * ) + * ) + * ``` + * + * @see {@link catchAllCause} for a version that can recover from both + * recoverable and unrecoverable errors. + * + * @since 2.0.0 + * @category Error handling + */ +const catchAll = exports.catchAll = core.catchAll; +/** + * Handles both recoverable and unrecoverable errors by providing a recovery + * effect. + * + * **When to Use** + * + * The `catchAllCause` function allows you to handle all errors, including + * unrecoverable defects, by providing a recovery effect. The recovery logic is + * based on the `Cause` of the error, which provides detailed information about + * the failure. + * + * **When to Recover from Defects** + * + * Defects are unexpected errors that typically shouldn't be recovered from, as + * they often indicate serious issues. However, in some cases, such as + * dynamically loaded plugins, controlled recovery might be needed. + * + * **Example** (Recovering from All Errors) + * + * ```ts + * import { Cause, Effect } from "effect" + * + * // Define an effect that may fail with a recoverable or unrecoverable error + * const program = Effect.fail("Something went wrong!") + * + * // Recover from all errors by examining the cause + * const recovered = program.pipe( + * Effect.catchAllCause((cause) => + * Cause.isFailure(cause) + * ? Effect.succeed("Recovered from a regular error") + * : Effect.succeed("Recovered from a defect") + * ) + * ) + * + * Effect.runPromise(recovered).then(console.log) + * // Output: "Recovered from a regular error" + * ``` + * + * @since 2.0.0 + * @category Error handling + */ +const catchAllCause = exports.catchAllCause = core.catchAllCause; +/** + * Recovers from all defects using a provided recovery function. + * + * **When to Use** + * + * There is no sensible way to recover from defects. This method should be used + * only at the boundary between Effect and an external system, to transmit + * information on a defect for diagnostic or explanatory purposes. + * + * **Details** + * + * `catchAllDefect` allows you to handle defects, which are unexpected errors + * that usually cause the program to terminate. This function lets you recover + * from these defects by providing a function that handles the error. However, + * it does not handle expected errors (like those from {@link fail}) or + * execution interruptions (like those from {@link interrupt}). + * + * **When to Recover from Defects** + * + * Defects are unexpected errors that typically shouldn't be recovered from, as + * they often indicate serious issues. However, in some cases, such as + * dynamically loaded plugins, controlled recovery might be needed. + * + * **Example** (Handling All Defects) + * + * ```ts + * import { Effect, Cause, Console } from "effect" + * + * // Simulating a runtime error + * const task = Effect.dieMessage("Boom!") + * + * const program = Effect.catchAllDefect(task, (defect) => { + * if (Cause.isRuntimeException(defect)) { + * return Console.log( + * `RuntimeException defect caught: ${defect.message}` + * ) + * } + * return Console.log("Unknown defect caught.") + * }) + * + * // We get an Exit.Success because we caught all defects + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // RuntimeException defect caught: Boom! + * // { + * // _id: "Exit", + * // _tag: "Success", + * // value: undefined + * // } + * ``` + * + * @since 2.0.0 + * @category Error handling + */ +const catchAllDefect = exports.catchAllDefect = effect.catchAllDefect; +/** + * Recovers from specific errors based on a predicate. + * + * **When to Use** + * + * `catchIf` works similarly to {@link catchSome}, but it allows you to + * recover from errors by providing a predicate function. If the predicate + * matches the error, the recovery effect is applied. This function doesn't + * alter the error type, so the resulting effect still carries the original + * error type unless a user-defined type guard is used to narrow the type. + * + * **Example** (Catching Specific Errors with a Predicate) + * + * ```ts + * import { Effect, Random } from "effect" + * + * class HttpError { + * readonly _tag = "HttpError" + * } + * + * class ValidationError { + * readonly _tag = "ValidationError" + * } + * + * // ┌─── Effect + * // ▼ + * const program = Effect.gen(function* () { + * const n1 = yield* Random.next + * const n2 = yield* Random.next + * if (n1 < 0.5) { + * yield* Effect.fail(new HttpError()) + * } + * if (n2 < 0.5) { + * yield* Effect.fail(new ValidationError()) + * } + * return "some result" + * }) + * + * // ┌─── Effect + * // ▼ + * const recovered = program.pipe( + * Effect.catchIf( + * // Only handle HttpError errors + * (error) => error._tag === "HttpError", + * () => Effect.succeed("Recovering from HttpError") + * ) + * ) + * ``` + * + * @since 2.0.0 + * @category Error handling + */ +const catchIf = exports.catchIf = core.catchIf; +/** + * Catches and recovers from specific types of errors, allowing you to attempt + * recovery only for certain errors. + * + * **Details** + * + * `catchSome` lets you selectively catch and handle errors of certain + * types by providing a recovery effect for specific errors. If the error + * matches a condition, recovery is attempted; if not, it doesn't affect the + * program. This function doesn't alter the error type, meaning the error type + * remains the same as in the original effect. + * + * **Example** (Handling Specific Errors with Effect.catchSome) + * + * ```ts + * import { Effect, Random, Option } from "effect" + * + * class HttpError { + * readonly _tag = "HttpError" + * } + * + * class ValidationError { + * readonly _tag = "ValidationError" + * } + * + * // ┌─── Effect + * // ▼ + * const program = Effect.gen(function* () { + * const n1 = yield* Random.next + * const n2 = yield* Random.next + * if (n1 < 0.5) { + * yield* Effect.fail(new HttpError()) + * } + * if (n2 < 0.5) { + * yield* Effect.fail(new ValidationError()) + * } + * return "some result" + * }) + * + * // ┌─── Effect + * // ▼ + * const recovered = program.pipe( + * Effect.catchSome((error) => { + * // Only handle HttpError errors + * if (error._tag === "HttpError") { + * return Option.some(Effect.succeed("Recovering from HttpError")) + * } else { + * return Option.none() + * } + * }) + * ) + * ``` + * + * @see {@link catchIf} for a version that allows you to recover from errors based on a predicate. + * + * @since 2.0.0 + * @category Error handling + */ +const catchSome = exports.catchSome = core.catchSome; +/** + * Recovers from specific causes using a provided partial function. + * + * @see {@link catchSome} for a version that allows you to recover from errors. + * @see {@link catchSomeDefect} for a version that allows you to recover from defects. + * + * @since 2.0.0 + * @category Error handling + */ +const catchSomeCause = exports.catchSomeCause = effect.catchSomeCause; +/** + * Recovers from specific defects using a provided partial function. + * + * **Details** + * + * `catchSomeDefect` allows you to handle specific defects, which are + * unexpected errors that can cause the program to stop. It uses a partial + * function to catch only certain defects and ignores others. The function does + * not handle expected errors (such as those caused by {@link fail}) or + * interruptions in execution (like those caused by {@link interrupt}). + * + * This function provides a way to handle certain types of defects while + * allowing others to propagate and cause failure in the program. + * + * **Note**: There is no sensible way to recover from defects. This method + * should be used only at the boundary between Effect and an external system, to + * transmit information on a defect for diagnostic or explanatory purposes. + * + * **How the Partial Function Works** + * + * The function provided to `catchSomeDefect` acts as a filter and a handler for defects: + * - It receives the defect as an input. + * - If the defect matches a specific condition (e.g., a certain error type), the function returns + * an `Option.some` containing the recovery logic. + * - If the defect does not match, the function returns `Option.none`, allowing the defect to propagate. + * + * **Example** (Handling Specific Defects) + * + * ```ts + * import { Effect, Cause, Option, Console } from "effect" + * + * // Simulating a runtime error + * const task = Effect.dieMessage("Boom!") + * + * const program = Effect.catchSomeDefect(task, (defect) => { + * if (Cause.isIllegalArgumentException(defect)) { + * return Option.some( + * Console.log( + * `Caught an IllegalArgumentException defect: ${defect.message}` + * ) + * ) + * } + * return Option.none() + * }) + * + * // Since we are only catching IllegalArgumentException + * // we will get an Exit.Failure because we simulated a runtime error. + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { + * // _id: 'Cause', + * // _tag: 'Die', + * // defect: { _tag: 'RuntimeException' } + * // } + * // } + * ``` + * + * @since 2.0.0 + * @category Error handling + */ +const catchSomeDefect = exports.catchSomeDefect = effect.catchSomeDefect; +/** + * Catches and handles specific errors by their `_tag` field, which is used as a + * discriminator. + * + * **When to Use** + * + * `catchTag` is useful when your errors are tagged with a readonly `_tag` field + * that identifies the error type. You can use this function to handle specific + * error types by matching the `_tag` value. This allows for precise error + * handling, ensuring that only specific errors are caught and handled. + * + * The error type must have a readonly `_tag` field to use `catchTag`. This + * field is used to identify and match errors. + * + * **Example** (Handling Errors by Tag) + * + * ```ts + * import { Effect, Random } from "effect" + * + * class HttpError { + * readonly _tag = "HttpError" + * } + * + * class ValidationError { + * readonly _tag = "ValidationError" + * } + * + * // ┌─── Effect + * // ▼ + * const program = Effect.gen(function* () { + * const n1 = yield* Random.next + * const n2 = yield* Random.next + * if (n1 < 0.5) { + * yield* Effect.fail(new HttpError()) + * } + * if (n2 < 0.5) { + * yield* Effect.fail(new ValidationError()) + * } + * return "some result" + * }) + * + * // ┌─── Effect + * // ▼ + * const recovered = program.pipe( + * // Only handle HttpError errors + * Effect.catchTag("HttpError", (_HttpError) => + * Effect.succeed("Recovering from HttpError") + * ) + * ) + * ``` + * + * @see {@link catchTags} for a version that allows you to handle multiple error + * types at once. + * + * @since 2.0.0 + * @category Error handling + */ +const catchTag = exports.catchTag = effect.catchTag; +/** + * Handles multiple errors in a single block of code using their `_tag` field. + * + * **When to Use** + * + * `catchTags` is a convenient way to handle multiple error types at + * once. Instead of using {@link catchTag} multiple times, you can pass an + * object where each key is an error type's `_tag`, and the value is the handler + * for that specific error. This allows you to catch and recover from multiple + * error types in a single call. + * + * The error type must have a readonly `_tag` field to use `catchTag`. This + * field is used to identify and match errors. + * + * **Example** (Handling Multiple Tagged Error Types at Once) + * + * ```ts + * import { Effect, Random } from "effect" + * + * class HttpError { + * readonly _tag = "HttpError" + * } + * + * class ValidationError { + * readonly _tag = "ValidationError" + * } + * + * // ┌─── Effect + * // ▼ + * const program = Effect.gen(function* () { + * const n1 = yield* Random.next + * const n2 = yield* Random.next + * if (n1 < 0.5) { + * yield* Effect.fail(new HttpError()) + * } + * if (n2 < 0.5) { + * yield* Effect.fail(new ValidationError()) + * } + * return "some result" + * }) + * + * // ┌─── Effect + * // ▼ + * const recovered = program.pipe( + * Effect.catchTags({ + * HttpError: (_HttpError) => + * Effect.succeed(`Recovering from HttpError`), + * ValidationError: (_ValidationError) => + * Effect.succeed(`Recovering from ValidationError`) + * }) + * ) + * ``` + * + * @since 2.0.0 + * @category Error handling + */ +const catchTags = exports.catchTags = effect.catchTags; +/** + * Retrieves the cause of a failure in an effect. + * + * **Details** + * + * This function allows you to expose the detailed cause of an effect, which + * includes a more precise representation of failures, such as error messages + * and defects. + * + * **When to Use** + * + * This function is helpful when you need to inspect the cause of a failure in + * an effect, giving you more information than just the error message. It can be + * used to log, handle, or analyze failures in more detail, including + * distinguishing between different types of defects (e.g., runtime exceptions, + * interruptions, etc.). + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * // ┌─── Effect + * // ▼ + * const program = Effect.fail("Oh uh!").pipe(Effect.as(2)) + * + * // ┌─── Effect + * // ▼ + * const recovered = Effect.gen(function* () { + * const cause = yield* Effect.cause(program) + * yield* Console.log(cause) + * }) + * ``` + * + * @since 2.0.0 + * @category Error handling + */ +const cause = exports.cause = effect.cause; +/** + * Runs an effect repeatedly until it succeeds, ignoring errors. + * + * **Details** + * + * This function takes an effect and runs it repeatedly until the effect + * successfully completes. If the effect fails, it will ignore the error and + * retry the operation. This is useful when you need to perform a task that may + * fail occasionally, but you want to keep trying until it eventually succeeds. + * It works by repeatedly executing the effect until it no longer throws an + * error. + * + * **When to Use** + * + * Use this function when you want to retry an operation multiple times until it + * succeeds. It is helpful in cases where the operation may fail temporarily + * (e.g., a network request), and you want to keep trying without handling or + * worrying about the errors. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * let counter = 0 + * + * const effect = Effect.try(() => { + * counter++ + * if (counter < 3) { + * console.log("running effect") + * throw new Error("error") + * } else { + * console.log("effect done") + * return "some result" + * } + * }) + * + * const program = Effect.eventually(effect) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // running effect + * // running effect + * // effect done + * // some result + * ``` + * + * @since 2.0.0 + * @category Error handling + */ +const eventually = exports.eventually = effect.eventually; +/** + * Discards both the success and failure values of an effect. + * + * **When to Use** + * + * `ignore` allows you to run an effect without caring about its result, whether + * it succeeds or fails. This is useful when you only care about the side + * effects of the effect and do not need to handle or process its outcome. + * + * **Example** (Using Effect.ignore to Discard Values) + * + * ```ts + * import { Effect } from "effect" + * + * // ┌─── Effect + * // ▼ + * const task = Effect.fail("Uh oh!").pipe(Effect.as(5)) + * + * // ┌─── Effect + * // ▼ + * const program = Effect.ignore(task) + * ``` + * + * @see {@link ignoreLogged} to log failures while ignoring them. + * + * @since 2.0.0 + * @category Error handling + */ +const ignore = exports.ignore = effect.ignore; +/** + * Ignores the result of an effect but logs any failures. + * + * **Details** + * + * This function takes an effect and returns a new effect that ignores whether + * the original effect succeeds or fails. However, if the effect fails, it will + * log the failure at the Debug level, so you can keep track of any issues that + * arise. + * + * **When to Use** + * + * This is useful in scenarios where you want to continue with your program + * regardless of the result of the effect, but you still want to be aware of + * potential failures that may need attention later. + * + * @since 2.0.0 + * @category Error handling + */ +const ignoreLogged = exports.ignoreLogged = effect.ignoreLogged; +/** + * Combines all errors from concurrent operations into a single error. + * + * **Details** + * + * This function is used when you have multiple operations running at the same + * time, and you want to capture all the errors that occur across those + * operations. Instead of handling each error separately, it combines all the + * errors into one unified error. + * + * **When to Use** + * + * When using this function, any errors that occur in the concurrently running + * operations will be grouped together into a single error. This helps simplify + * error handling in cases where you don't need to differentiate between each + * failure, but simply want to know that multiple failures occurred. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const fail1 = Effect.fail("Oh uh!") + * const fail2 = Effect.fail("Oh no!") + * const die = Effect.dieMessage("Boom!") + * + * // Run all effects concurrently and capture all errors + * const program = Effect.all([fail1, fail2, die], { + * concurrency: "unbounded" + * }).pipe(Effect.asVoid, Effect.parallelErrors) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { _id: 'Cause', _tag: 'Fail', failure: [ 'Oh uh!', 'Oh no!' ] } + * // } + * ``` + * + * @since 2.0.0 + * @category Error handling + */ +const parallelErrors = exports.parallelErrors = effect.parallelErrors; +/** + * Transforms an effect to expose detailed error causes. + * + * **Details** + * + * This function enhances an effect by providing detailed information about any + * error, defect, or interruption that may occur during its execution. It + * modifies the error channel of the effect so that it includes a full cause of + * the failure, wrapped in a `Cause` type. + * + * After applying this function, you can use operators like {@link catchAll} and + * {@link catchTags} to handle specific types of errors. + * + * If you no longer need the detailed cause information, you can revert the + * changes using {@link unsandbox} to return to the original error-handling + * behavior. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * // ┌─── Effect + * // ▼ + * const task = Effect.fail(new Error("Oh uh!")).pipe( + * Effect.as("primary result") + * ) + * + * // ┌─── Effect, never> + * // ▼ + * const sandboxed = Effect.sandbox(task) + * + * const program = Effect.catchTags(sandboxed, { + * Die: (cause) => + * Console.log(`Caught a defect: ${cause.defect}`).pipe( + * Effect.as("fallback result on defect") + * ), + * Interrupt: (cause) => + * Console.log(`Caught a defect: ${cause.fiberId}`).pipe( + * Effect.as("fallback result on fiber interruption") + * ), + * Fail: (cause) => + * Console.log(`Caught a defect: ${cause.error}`).pipe( + * Effect.as("fallback result on failure") + * ) + * }) + * + * // Restore the original error handling with unsandbox + * const main = Effect.unsandbox(program) + * + * Effect.runPromise(main).then(console.log) + * // Output: + * // Caught a defect: Oh uh! + * // fallback result on failure + * ``` + * + * @see {@link unsandbox} to restore the original error handling. + * + * @since 2.0.0 + * @category Error handling + */ +const sandbox = exports.sandbox = effect.sandbox; +/** + * Retries a failing effect based on a defined retry policy. + * + * **Details** + * + * The `Effect.retry` function takes an effect and a {@link Schedule} policy, + * and will automatically retry the effect if it fails, following the rules of + * the policy. + * + * If the effect ultimately succeeds, the result will be returned. + * + * If the maximum retries are exhausted and the effect still fails, the failure + * is propagated. + * + * **When to Use** + * + * This can be useful when dealing with intermittent failures, such as network + * issues or temporary resource unavailability. By defining a retry policy, you + * can control the number of retries, the delay between them, and when to stop + * retrying. + * + * **Example** (Retrying with a Fixed Delay) + * + * ```ts + * import { Effect, Schedule } from "effect" + * + * let count = 0 + * + * // Simulates an effect with possible failures + * const task = Effect.async((resume) => { + * if (count <= 2) { + * count++ + * console.log("failure") + * resume(Effect.fail(new Error())) + * } else { + * console.log("success") + * resume(Effect.succeed("yay!")) + * } + * }) + * + * // Define a repetition policy using a fixed delay between retries + * const policy = Schedule.fixed("100 millis") + * + * const repeated = Effect.retry(task, policy) + * + * Effect.runPromise(repeated).then(console.log) + * // Output: + * // failure + * // failure + * // failure + * // success + * // yay! + * ``` + * + * **Example** (Retrying a Task up to 5 times) + * + * ```ts + * import { Effect } from "effect" + * + * let count = 0 + * + * // Simulates an effect with possible failures + * const task = Effect.async((resume) => { + * if (count <= 2) { + * count++ + * console.log("failure") + * resume(Effect.fail(new Error())) + * } else { + * console.log("success") + * resume(Effect.succeed("yay!")) + * } + * }) + * + * // Retry the task up to 5 times + * Effect.runPromise(Effect.retry(task, { times: 5 })).then(console.log) + * // Output: + * // failure + * // failure + * // failure + * // success + * ``` + * + * **Example** (Retrying Until a Specific Condition is Met) + * + * ```ts + * import { Effect } from "effect" + * + * let count = 0 + * + * // Define an effect that simulates varying error on each invocation + * const action = Effect.failSync(() => { + * console.log(`Action called ${++count} time(s)`) + * return `Error ${count}` + * }) + * + * // Retry the action until a specific condition is met + * const program = Effect.retry(action, { + * until: (err) => err === "Error 3" + * }) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // Action called 1 time(s) + * // Action called 2 time(s) + * // Action called 3 time(s) + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { _id: 'Cause', _tag: 'Fail', failure: 'Error 3' } + * // } + * ``` + * + * @see {@link retryOrElse} for a version that allows you to run a fallback. + * @see {@link repeat} if your retry condition is based on successful outcomes rather than errors. + * + * @since 2.0.0 + * @category Error handling + */ +const retry = exports.retry = schedule_.retry_combined; +/** + * Apply an `ExecutionPlan` to the effect, which allows you to fallback to + * different resources in case of failure. + * + * @since 3.16.0 + * @category Error handling + * @experimental + */ +const withExecutionPlan = exports.withExecutionPlan = internalExecutionPlan.withExecutionPlan; +/** + * Retries a failing effect and runs a fallback effect if retries are exhausted. + * + * **Details** + * + * The `Effect.retryOrElse` function attempts to retry a failing effect multiple + * times according to a defined {@link Schedule} policy. + * + * If the retries are exhausted and the effect still fails, it runs a fallback + * effect instead. + * + * **When to Use** + * + * This function is useful when you want to handle failures gracefully by + * specifying an alternative action after repeated failures. + * + * **Example** (Retrying with Fallback) + * + * ```ts + * import { Effect, Schedule, Console } from "effect" + * + * let count = 0 + * + * // Simulates an effect with possible failures + * const task = Effect.async((resume) => { + * if (count <= 2) { + * count++ + * console.log("failure") + * resume(Effect.fail(new Error())) + * } else { + * console.log("success") + * resume(Effect.succeed("yay!")) + * } + * }) + * + * // Retry the task with a delay between retries and a maximum of 2 retries + * const policy = Schedule.addDelay(Schedule.recurs(2), () => "100 millis") + * + * // If all retries fail, run the fallback effect + * const repeated = Effect.retryOrElse( + * task, + * policy, + * // fallback + * () => Console.log("orElse").pipe(Effect.as("default value")) + * ) + * + * Effect.runPromise(repeated).then(console.log) + * // Output: + * // failure + * // failure + * // failure + * // orElse + * // default value + * ``` + * + * @see {@link retry} for a version that does not run a fallback effect. + * + * @since 2.0.0 + * @category Error handling + */ +const retryOrElse = exports.retryOrElse = schedule_.retryOrElse_Effect; +const try_ = exports.try = effect.try_; +/** + * Returns an effect that maps its success using the specified side-effecting + * `try` function, converting any errors into typed failed effects using the + * `catch` function. + * + * @see {@link tryPromise} for a version that works with asynchronous computations. + * + * @since 2.0.0 + * @category Error handling + */ +const tryMap = exports.tryMap = effect.tryMap; +/** + * Returns an effect that maps its success using the specified side-effecting + * `try` function, converting any promise rejections into typed failed effects + * using the `catch` function. + * + * An optional `AbortSignal` can be provided to allow for interruption of the + * wrapped `Promise` API. + * + * @see {@link tryMap} for a version that works with synchronous computations. + * + * @since 2.0.0 + * @category Error handling + */ +const tryMapPromise = exports.tryMapPromise = effect.tryMapPromise; +/** + * Creates an `Effect` that represents an asynchronous computation that might + * fail. + * + * **When to Use** + * + * In situations where you need to perform asynchronous operations that might + * fail, such as fetching data from an API, you can use the `tryPromise` + * constructor. This constructor is designed to handle operations that could + * throw exceptions by capturing those exceptions and transforming them into + * manageable errors. + * + * **Error Handling** + * + * There are two ways to handle errors with `tryPromise`: + * + * 1. If you don't provide a `catch` function, the error is caught and the + * effect fails with an `UnknownException`. + * 2. If you provide a `catch` function, the error is caught and the `catch` + * function maps it to an error of type `E`. + * + * **Interruptions** + * + * An optional `AbortSignal` can be provided to allow for interruption of the + * wrapped `Promise` API. + * + * **Example** (Fetching a TODO Item) + * + * ```ts + * import { Effect } from "effect" + * + * const getTodo = (id: number) => + * // Will catch any errors and propagate them as UnknownException + * Effect.tryPromise(() => + * fetch(`https://jsonplaceholder.typicode.com/todos/${id}`) + * ) + * + * // ┌─── Effect + * // ▼ + * const program = getTodo(1) + * ``` + * + * **Example** (Custom Error Handling) + * + * ```ts + * import { Effect } from "effect" + * + * const getTodo = (id: number) => + * Effect.tryPromise({ + * try: () => fetch(`https://jsonplaceholder.typicode.com/todos/${id}`), + * // remap the error + * catch: (unknown) => new Error(`something went wrong ${unknown}`) + * }) + * + * // ┌─── Effect + * // ▼ + * const program = getTodo(1) + * ``` + * + * @see {@link promise} if the effectful computation is asynchronous and does not throw errors. + * + * @since 2.0.0 + * @category Creating Effects + */ +const tryPromise = exports.tryPromise = effect.tryPromise; +/** + * The `unsandbox` function is used to revert an effect that has been + * sandboxed by {@link sandbox}. When you apply `unsandbox`, the + * effect's error channel is restored to its original state, without the + * detailed `Cause` information. This means that any underlying causes of + * errors, defects, or fiber interruptions are no longer exposed in the error + * channel. + * + * This function is useful when you want to remove the detailed error tracking + * provided by `sandbox` and return to the standard error handling for + * your effect. Once unsandboxed, the effect behaves as if `sandbox` was + * never applied. + * + * @see {@link sandbox} to expose the full cause of failures, defects, or interruptions. + * + * @since 2.0.0 + * @category Error handling + */ +const unsandbox = exports.unsandbox = effect.unsandbox; +/** + * Allows interruption of the current fiber, even in uninterruptible regions. + * + * **Details** + * + * This effect checks whether any other fibers are attempting to interrupt the + * current fiber. If so, it allows the current fiber to perform a + * self-interruption. + * + * **When to Use** + * + * This is useful in situations where you want to allow interruption to happen + * even in regions of the code that are normally uninterruptible. + * + * @since 2.0.0 + * @category Interruption + */ +const allowInterrupt = exports.allowInterrupt = effect.allowInterrupt; +/** + * Checks if interruption is allowed and executes a callback accordingly. + * + * **Details** + * + * This function checks the current interrupt status of the running fiber. It + * then calls the provided callback, passing a boolean indicating whether + * interruption is allowed. + * + * **When to Use** + * + * This is useful for handling specific logic based on whether the current + * operation can be interrupted, such as when performing asynchronous operations + * or handling cancellation. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * const program = Effect.gen(function*() { + * yield* Effect.checkInterruptible((isInterruptible) => { + * if (isInterruptible) { + * return Console.log("You can interrupt this operation.") + * } else { + * return Console.log("This operation cannot be interrupted.") + * } + * }) + * }) + * + * Effect.runPromise(program) + * // Output: You can interrupt this operation. + * + * Effect.runPromise(program.pipe(Effect.uninterruptible)) + * // Output: This operation cannot be interrupted. + * + * ``` + * + * @since 2.0.0 + * @category Interruption + */ +const checkInterruptible = exports.checkInterruptible = core.checkInterruptible; +/** + * Provides a way to handle timeouts in uninterruptible effects, allowing them + * to continue in the background while the main control flow proceeds with the + * timeout error. + * + * **Details** + * + * The `disconnect` function allows an uninterruptible effect to continue + * running in the background, while enabling the main control flow to + * immediately recognize a timeout condition. This is useful when you want to + * avoid blocking the program due to long-running tasks, especially when those + * tasks do not need to affect the flow of the rest of the program. + * + * Without `disconnect`, an uninterruptible effect will ignore the + * timeout and continue executing until it completes. The timeout error will + * only be assessed after the effect finishes, which can cause delays in + * recognizing a timeout. + * + * With `disconnect`, the uninterruptible effect proceeds in the + * background while the main program flow can immediately handle the timeout + * error or trigger alternative logic. This enables faster timeout handling + * without waiting for the completion of the long-running task. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const longRunningTask = Effect.gen(function* () { + * console.log("Start heavy processing...") + * yield* Effect.sleep("5 seconds") // Simulate a long process + * console.log("Heavy processing done.") + * return "Data processed" + * }) + * + * const timedEffect = longRunningTask.pipe( + * Effect.uninterruptible, + * // Allows the task to finish in the background if it times out + * Effect.disconnect, + * Effect.timeout("1 second") + * ) + * + * Effect.runPromiseExit(timedEffect).then(console.log) + * // Output: + * // Start heavy processing... + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { + * // _id: 'Cause', + * // _tag: 'Fail', + * // failure: { _tag: 'TimeoutException' } + * // } + * // } + * // Heavy processing done. + * ``` + * + * @see {@link timeout} for a version that interrupts the effect. + * @see {@link uninterruptible} for creating an uninterruptible effect. + * + * @since 2.0.0 + * @category Interruption + */ +const disconnect = exports.disconnect = fiberRuntime.disconnect; +/** + * Represents an effect that interrupts the current fiber. + * + * **Details** + * + * This effect models the explicit interruption of the fiber in which it runs. + * When executed, it causes the fiber to stop its operation immediately, + * capturing the interruption details such as the fiber's ID and its start time. + * The resulting interruption can be observed in the `Exit` type if the effect + * is run with functions like {@link runPromiseExit}. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const program = Effect.gen(function* () { + * console.log("start") + * yield* Effect.sleep("2 seconds") + * yield* Effect.interrupt + * console.log("done") + * return "some result" + * }) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // start + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { + * // _id: 'Cause', + * // _tag: 'Interrupt', + * // fiberId: { + * // _id: 'FiberId', + * // _tag: 'Runtime', + * // id: 0, + * // startTimeMillis: ... + * // } + * // } + * // } + * ``` + * + * @since 2.0.0 + * @category Interruption + */ +const interrupt = exports.interrupt = core.interrupt; +/** + * @since 2.0.0 + * @category Interruption + */ +const interruptWith = exports.interruptWith = core.interruptWith; +/** + * Marks an effect as interruptible. + * + * @since 2.0.0 + * @category Interruption + */ +const interruptible = exports.interruptible = core.interruptible; +/** + * This function behaves like {@link interruptible}, but it also provides a + * `restore` function. This function can be used to restore the interruptibility + * of any specific region of code. + * + * @since 2.0.0 + * @category Interruption + */ +const interruptibleMask = exports.interruptibleMask = core.interruptibleMask; +/** + * Registers a cleanup effect to run when an effect is interrupted. + * + * **Details** + * + * This function allows you to specify an effect to run when the fiber is + * interrupted. This effect will be executed when the fiber is interrupted, + * allowing you to perform cleanup or other actions. + * + * **Example** (Running a Cleanup Action on Interruption) + * + * ```ts + * import { Console, Effect } from "effect" + * + * // This handler is executed when the fiber is interrupted + * const handler = Effect.onInterrupt((_fibers) => Console.log("Cleanup completed")) + * + * const success = Console.log("Task completed").pipe(Effect.as("some result"), handler) + * + * Effect.runFork(success) + * // Output: + * // Task completed + * + * const failure = Console.log("Task failed").pipe(Effect.andThen(Effect.fail("some error")), handler) + * + * Effect.runFork(failure) + * // Output: + * // Task failed + * + * const interruption = Console.log("Task interrupted").pipe(Effect.andThen(Effect.interrupt), handler) + * + * Effect.runFork(interruption) + * // Output: + * // Task interrupted + * // Cleanup completed + * ``` + * + * @since 2.0.0 + * @category Interruption + */ +const onInterrupt = exports.onInterrupt = core.onInterrupt; +/** + * Marks an effect as uninterruptible. + * + * @since 2.0.0 + * @category Interruption + */ +const uninterruptible = exports.uninterruptible = core.uninterruptible; +/** + * This function behaves like {@link uninterruptible}, but it also provides a + * `restore` function. This function can be used to restore the interruptibility + * of any specific region of code. + * + * @since 2.0.0 + * @category Interruption + */ +const uninterruptibleMask = exports.uninterruptibleMask = core.uninterruptibleMask; +/** + * Transforms a `Predicate` function into an `Effect` returning the input value if the predicate returns `true` + * or failing with specified error if the predicate fails + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const isPositive = (n: number): boolean => n > 0 + * + * // succeeds with `1` + * Effect.liftPredicate(1, isPositive, n => `${n} is not positive`) + * + * // fails with `"0 is not positive"` + * Effect.liftPredicate(0, isPositive, n => `${n} is not positive`) + * ``` + * + * @category Condition Checking + * @since 3.4.0 + */ +const liftPredicate = exports.liftPredicate = effect.liftPredicate; +/** + * Replaces the value inside an effect with a constant value. + * + * **Details** + * + * This function allows you to ignore the original value inside an effect and + * replace it with a constant value. + * + * **When to Use** + * + * It is useful when you no longer need the value produced by an effect but want + * to ensure that the effect completes successfully with a specific constant + * result instead. For instance, you can replace the value produced by a + * computation with a predefined value, ignoring what was calculated before. + * + * **Example** (Replacing a Value) + * + * ```ts + * import { pipe, Effect } from "effect" + * + * // Replaces the value 5 with the constant "new value" + * const program = pipe(Effect.succeed(5), Effect.as("new value")) + * + * Effect.runPromise(program).then(console.log) + * // Output: "new value" + * ``` + * + * @since 2.0.0 + * @category Mapping + */ +const as = exports.as = core.as; +/** + * This function maps the success value of an `Effect` value to a `Some` value + * in an `Option` value. If the original `Effect` value fails, the returned + * `Effect` value will also fail. + * + * @category Mapping + * @since 2.0.0 + */ +const asSome = exports.asSome = effect.asSome; +/** + * This function maps the error value of an `Effect` value to a `Some` value + * in an `Option` value. If the original `Effect` value succeeds, the returned + * `Effect` value will also succeed. + * + * @category Mapping + * @since 2.0.0 + */ +const asSomeError = exports.asSomeError = effect.asSomeError; +/** + * This function maps the success value of an `Effect` value to `void`. If the + * original `Effect` value succeeds, the returned `Effect` value will also + * succeed. If the original `Effect` value fails, the returned `Effect` value + * will fail with the same error. + * + * @since 2.0.0 + * @category Mapping + */ +const asVoid = exports.asVoid = core.asVoid; +/** + * Swaps the success and error channels of an effect. + * + * **Details** + * + * This function reverses the flow of an effect by swapping its success and + * error channels. The success value becomes an error, and the error value + * becomes a success. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * // ┌─── Effect + * // ▼ + * const program = Effect.fail("Oh uh!").pipe(Effect.as(2)) + * + * // ┌─── Effect + * // ▼ + * const flipped = Effect.flip(program) + * ``` + * + * @since 2.0.0 + * @category Mapping + */ +const flip = exports.flip = core.flip; +/** + * Swaps the error/value parameters, applies the function `f` and flips the + * parameters back + * + * @since 2.0.0 + * @category Mapping + */ +const flipWith = exports.flipWith = effect.flipWith; +/** + * Transforms the value inside an effect by applying a function to it. + * + * **Syntax** + * + * ```ts skip-type-checking + * const mappedEffect = pipe(myEffect, Effect.map(transformation)) + * // or + * const mappedEffect = Effect.map(myEffect, transformation) + * // or + * const mappedEffect = myEffect.pipe(Effect.map(transformation)) + * ``` + * + * **Details** + * + * `map` takes a function and applies it to the value contained within an + * effect, creating a new effect with the transformed value. + * + * It's important to note that effects are immutable, meaning that the original + * effect is not modified. Instead, a new effect is returned with the updated + * value. + * + * **Example** (Adding a Service Charge) + * + * ```ts + * import { pipe, Effect } from "effect" + * + * const addServiceCharge = (amount: number) => amount + 1 + * + * const fetchTransactionAmount = Effect.promise(() => Promise.resolve(100)) + * + * const finalAmount = pipe( + * fetchTransactionAmount, + * Effect.map(addServiceCharge) + * ) + * + * Effect.runPromise(finalAmount).then(console.log) + * // Output: 101 + * ``` + * + * @see {@link mapError} for a version that operates on the error channel. + * @see {@link mapBoth} for a version that operates on both channels. + * @see {@link flatMap} or {@link andThen} for a version that can return a new effect. + * + * @since 2.0.0 + * @category Mapping + */ +const map = exports.map = core.map; +/** + * Applies a stateful transformation to each element of a collection, producing + * new elements along with an updated state. + * + * **When to Use** + * + * Use `mapAccum` when you need to process each element of a collection while + * keeping track of some state across iterations. + * + * **Details** + * + * `mapAccum` takes an initial state (`initial`) and a function (`f`) that is + * applied to each element. This function returns a new state and a transformed + * element. The final effect produces both the accumulated state and the + * transformed collection. + * + * If the input collection is a non-empty array, the return type will match the + * input collection type. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * // Define an initial state and a transformation function + * const initialState = 0 + * + * const transformation = (state: number, element: string) => + * Effect.succeed<[number, string]>([state + element.length, element.toUpperCase()]) + * + * // Apply mapAccum to transform an array of strings + * const program = Effect.mapAccum(["a", "bb", "ccc"], initialState, transformation) + * + * Effect.runPromise(program).then(([finalState, transformedCollection]) => { + * console.log(finalState) + * console.log(transformedCollection) + * }) + * // Output: + * // 6 + * // [ 'A', 'BB', 'CCC' ] + * ``` + * + * @since 2.0.0 + * @category Mapping + */ +const mapAccum = exports.mapAccum = effect.mapAccum; +/** + * Applies transformations to both the success and error channels of an effect. + * + * **Details** + * + * This function takes two map functions as arguments: one for the error channel + * and one for the success channel. You can use it when you want to modify both + * the error and the success values without altering the overall success or + * failure status of the effect. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * // ┌─── Effect + * // ▼ + * const simulatedTask = Effect.fail("Oh no!").pipe(Effect.as(1)) + * + * // ┌─── Effect + * // ▼ + * const modified = Effect.mapBoth(simulatedTask, { + * onFailure: (message) => new Error(message), + * onSuccess: (n) => n > 0 + * }) + * ``` + * + * @see {@link map} for a version that operates on the success channel. + * @see {@link mapError} for a version that operates on the error channel. + * + * @since 2.0.0 + * @category Mapping + */ +const mapBoth = exports.mapBoth = core.mapBoth; +/** + * Transforms or modifies the error produced by an effect without affecting its + * success value. + * + * **When to Use** + * + * This function is helpful when you want to enhance the error with additional + * information, change the error type, or apply custom error handling while + * keeping the original behavior of the effect's success values intact. It only + * operates on the error channel and leaves the success channel unchanged. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * // ┌─── Effect + * // ▼ + * const simulatedTask = Effect.fail("Oh no!").pipe(Effect.as(1)) + * + * // ┌─── Effect + * // ▼ + * const mapped = Effect.mapError( + * simulatedTask, + * (message) => new Error(message) + * ) + * ``` + * + * @see {@link map} for a version that operates on the success channel. + * @see {@link mapBoth} for a version that operates on both channels. + * @see {@link orElseFail} if you want to replace the error with a new one. + * + * @since 2.0.0 + * @category Mapping + */ +const mapError = exports.mapError = core.mapError; +/** + * Maps the cause of failure of an effect using a specified function. + * + * @see {@link sandbox} for a version that exposes the full cause of failures, defects, or interruptions. + * @see {@link catchAllCause} for a version that can recover from all types of defects. + * + * @since 2.0.0 + * @category Mapping + */ +const mapErrorCause = exports.mapErrorCause = effect.mapErrorCause; +/** + * Combines both success and error channels of an effect into a single outcome. + * + * **Details** + * + * This function transforms an effect that may fail into one that always returns + * a value, where both success and failure outcomes are handled as values in the + * success channel. + * + * **When to Use** + * + * This can be useful when you want to continue execution regardless of the + * error type and still capture both successful results and errors as part of + * the outcome. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * // ┌─── Effect + * // ▼ + * const program = Effect.fail("Oh uh!").pipe(Effect.as(2)) + * + * // ┌─── Effect + * // ▼ + * const recovered = Effect.merge(program) + * ``` + * + * @since 2.0.0 + * @category Mapping + */ +const merge = exports.merge = effect.merge; +/** + * Returns a new effect with the boolean value of this effect negated. + * + * @since 2.0.0 + * @category Mapping + */ +const negate = exports.negate = effect.negate; +/** + * Creates a scoped resource using an `acquire` and `release` effect. + * + * **Details** + * + * This function helps manage resources by combining two `Effect` values: one + * for acquiring the resource and one for releasing it. + * + * `acquireRelease` does the following: + * + * 1. Ensures that the effect that acquires the resource will not be + * interrupted. Note that acquisition may still fail due to internal + * reasons (such as an uncaught exception). + * 2. Ensures that the `release` effect will not be interrupted, and will be + * executed as long as the acquisition effect successfully acquires the + * resource. + * + * If the `acquire` function succeeds, the `release` function is added to the + * list of finalizers for the scope. This ensures that the release will happen + * automatically when the scope is closed. + * + * Both `acquire` and `release` run uninterruptibly, meaning they cannot be + * interrupted while they are executing. + * + * Additionally, the `release` function can be influenced by the exit value when + * the scope closes, allowing for custom handling of how the resource is + * released based on the execution outcome. + * + * **When to Use** + * + * This function is used to ensure that an effect that represents the + * acquisition of a resource (for example, opening a file, launching a thread, + * etc.) will not be interrupted, and that the resource will always be released + * when the `Effect` completes execution. + * + * **Example** (Defining a Simple Resource) + * + * ```ts + * import { Effect } from "effect" + * + * // Define an interface for a resource + * interface MyResource { + * readonly contents: string + * readonly close: () => Promise + * } + * + * // Simulate resource acquisition + * const getMyResource = (): Promise => + * Promise.resolve({ + * contents: "lorem ipsum", + * close: () => + * new Promise((resolve) => { + * console.log("Resource released") + * resolve() + * }) + * }) + * + * // Define how the resource is acquired + * const acquire = Effect.tryPromise({ + * try: () => + * getMyResource().then((res) => { + * console.log("Resource acquired") + * return res + * }), + * catch: () => new Error("getMyResourceError") + * }) + * + * // Define how the resource is released + * const release = (res: MyResource) => Effect.promise(() => res.close()) + * + * // Create the resource management workflow + * // + * // ┌─── Effect + * // ▼ + * const resource = Effect.acquireRelease(acquire, release) + * ``` + * + * @see {@link acquireUseRelease} for a version that automatically handles the scoping of resources. + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +const acquireRelease = exports.acquireRelease = fiberRuntime.acquireRelease; +/** + * Creates a scoped resource with an interruptible acquire action. + * + * **Details** + * + * This function is similar to {@link acquireRelease}, but it allows the + * acquisition of the resource to be interrupted. The `acquire` effect, which + * represents the process of obtaining the resource, can be interrupted if + * necessary. + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +const acquireReleaseInterruptible = exports.acquireReleaseInterruptible = fiberRuntime.acquireReleaseInterruptible; +/** + * Many real-world operations involve working with resources that must be released when no longer needed, such as: + * + * - Database connections + * - File handles + * - Network requests + * + * This function ensures that a resource is: + * + * 1. **Acquired** properly. + * 2. **Used** for its intended purpose. + * 3. **Released** even if an error occurs. + * + * **Example** (Automatically Managing Resource Lifetime) + * + * ```ts + * import { Effect, Console } from "effect" + * + * // Define an interface for a resource + * interface MyResource { + * readonly contents: string + * readonly close: () => Promise + * } + * + * // Simulate resource acquisition + * const getMyResource = (): Promise => + * Promise.resolve({ + * contents: "lorem ipsum", + * close: () => + * new Promise((resolve) => { + * console.log("Resource released") + * resolve() + * }) + * }) + * + * // Define how the resource is acquired + * const acquire = Effect.tryPromise({ + * try: () => + * getMyResource().then((res) => { + * console.log("Resource acquired") + * return res + * }), + * catch: () => new Error("getMyResourceError") + * }) + * + * // Define how the resource is released + * const release = (res: MyResource) => Effect.promise(() => res.close()) + * + * const use = (res: MyResource) => Console.log(`content is ${res.contents}`) + * + * // ┌─── Effect + * // ▼ + * const program = Effect.acquireUseRelease(acquire, use, release) + * + * Effect.runPromise(program) + * // Output: + * // Resource acquired + * // content is lorem ipsum + * // Resource released + * ``` + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +const acquireUseRelease = exports.acquireUseRelease = core.acquireUseRelease; +/** + * Ensures a finalizer is added to the scope of the calling effect, guaranteeing + * it runs when the scope is closed. + * + * **Details** + * + * This function adds a finalizer that will execute whenever the scope of the + * effect is closed, regardless of whether the effect succeeds, fails, or is + * interrupted. The finalizer receives the `Exit` value of the effect's scope, + * allowing it to react differently depending on how the effect concludes. + * + * Finalizers are a reliable way to manage resource cleanup, ensuring that + * resources such as file handles, network connections, or database transactions + * are properly closed even in the event of an unexpected interruption or error. + * + * Finalizers operate in conjunction with Effect's scoped resources. If an + * effect with a finalizer is wrapped in a scope, the finalizer will execute + * automatically when the scope ends. + * + * **Example** (Adding a Finalizer on Success) + * + * ```ts + * import { Effect, Console } from "effect" + * + * // ┌─── Effect + * // ▼ + * const program = Effect.gen(function* () { + * yield* Effect.addFinalizer((exit) => + * Console.log(`Finalizer executed. Exit status: ${exit._tag}`) + * ) + * return "some result" + * }) + * + * // Wrapping the effect in a scope + * // + * // ┌─── Effect + * // ▼ + * const runnable = Effect.scoped(program) + * + * Effect.runPromiseExit(runnable).then(console.log) + * // Output: + * // Finalizer executed. Exit status: Success + * // { _id: 'Exit', _tag: 'Success', value: 'some result' } + * ``` + * + * **Example** (Adding a Finalizer on Failure) + * + * ```ts + * import { Effect, Console } from "effect" + * + * // ┌─── Effect + * // ▼ + * const program = Effect.gen(function* () { + * yield* Effect.addFinalizer((exit) => + * Console.log(`Finalizer executed. Exit status: ${exit._tag}`) + * ) + * return yield* Effect.fail("Uh oh!") + * }) + * + * // Wrapping the effect in a scope + * // + * // ┌─── Effect + * // ▼ + * const runnable = Effect.scoped(program) + * + * Effect.runPromiseExit(runnable).then(console.log) + * // Output: + * // Finalizer executed. Exit status: Failure + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { _id: 'Cause', _tag: 'Fail', failure: 'Uh oh!' } + * // } + * ``` + * + * **Example** (Adding a Finalizer on Interruption) + * + * ```ts + * import { Effect, Console } from "effect" + * + * // ┌─── Effect + * // ▼ + * const program = Effect.gen(function* () { + * yield* Effect.addFinalizer((exit) => + * Console.log(`Finalizer executed. Exit status: ${exit._tag}`) + * ) + * return yield* Effect.interrupt + * }) + * + * // Wrapping the effect in a scope + * // + * // ┌─── Effect + * // ▼ + * const runnable = Effect.scoped(program) + * + * Effect.runPromiseExit(runnable).then(console.log) + * // Output: + * // Finalizer executed. Exit status: Failure + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { + * // _id: 'Cause', + * // _tag: 'Interrupt', + * // fiberId: { + * // _id: 'FiberId', + * // _tag: 'Runtime', + * // id: 0, + * // startTimeMillis: ... + * // } + * // } + * // } + * ``` + * + * @see {@link onExit} for attaching a finalizer directly to an effect. + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +const addFinalizer = exports.addFinalizer = fiberRuntime.addFinalizer; +/** + * Guarantees the execution of a finalizer when an effect starts execution. + * + * **Details** + * + * This function allows you to specify a `finalizer` effect that will always be + * run once the effect starts execution, regardless of whether the effect + * succeeds, fails, or is interrupted. + * + * **When to Use** + * + * This is useful when you need to ensure that certain cleanup or final steps + * are executed in all cases, such as releasing resources or performing + * necessary logging. + * + * While this function provides strong guarantees about executing the finalizer, + * it is considered a low-level tool, which may not be ideal for more complex + * resource management. For higher-level resource management with automatic + * acquisition and release, see the {@link acquireRelease} family of functions. + * For use cases where you need access to the result of an effect, consider + * using {@link onExit}. + * + * **Example** (Running a Finalizer in All Outcomes) + * + * ```ts + * import { Console, Effect } from "effect" + * + * // Define a cleanup effect + * const handler = Effect.ensuring(Console.log("Cleanup completed")) + * + * // Define a successful effect + * const success = Console.log("Task completed").pipe( + * Effect.as("some result"), + * handler + * ) + * + * Effect.runFork(success) + * // Output: + * // Task completed + * // Cleanup completed + * + * // Define a failing effect + * const failure = Console.log("Task failed").pipe( + * Effect.andThen(Effect.fail("some error")), + * handler + * ) + * + * Effect.runFork(failure) + * // Output: + * // Task failed + * // Cleanup completed + * + * // Define an interrupted effect + * const interruption = Console.log("Task interrupted").pipe( + * Effect.andThen(Effect.interrupt), + * handler + * ) + * + * Effect.runFork(interruption) + * // Output: + * // Task interrupted + * // Cleanup completed + * ``` + * + * @see {@link onExit} for a version that provides access to the result of an + * effect. + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +const ensuring = exports.ensuring = fiberRuntime.ensuring; +/** + * Ensures a cleanup effect runs whenever the calling effect fails, providing + * the failure cause to the cleanup effect. + * + * **Details** + * + * This function allows you to attach a cleanup effect that runs whenever the + * calling effect fails. The cleanup effect receives the cause of the failure, + * allowing you to perform actions such as logging, releasing resources, or + * executing additional recovery logic based on the error. The cleanup effect + * will execute even if the failure is due to interruption. + * + * Importantly, the cleanup effect itself is uninterruptible, ensuring that it + * completes regardless of external interruptions. + * + * **Example** (Running Cleanup Only on Failure) + * + * ```ts + * import { Console, Effect } from "effect" + * + * // This handler logs the failure cause when the effect fails + * const handler = Effect.onError((cause) => + * Console.log(`Cleanup completed: ${cause}`) + * ) + * + * // Define a successful effect + * const success = Console.log("Task completed").pipe( + * Effect.as("some result"), + * handler + * ) + * + * Effect.runFork(success) + * // Output: + * // Task completed + * + * // Define a failing effect + * const failure = Console.log("Task failed").pipe( + * Effect.andThen(Effect.fail("some error")), + * handler + * ) + * + * Effect.runFork(failure) + * // Output: + * // Task failed + * // Cleanup completed: Error: some error + * + * // Define a failing effect + * const defect = Console.log("Task failed with defect").pipe( + * Effect.andThen(Effect.die("Boom!")), + * handler + * ) + * + * Effect.runFork(defect) + * // Output: + * // Task failed with defect + * // Cleanup completed: Error: Boom! + * + * // Define an interrupted effect + * const interruption = Console.log("Task interrupted").pipe( + * Effect.andThen(Effect.interrupt), + * handler + * ) + * + * Effect.runFork(interruption) + * // Output: + * // Task interrupted + * // Cleanup completed: All fibers interrupted without errors. + * ``` + * + * @see {@link ensuring} for attaching a cleanup effect that runs on both success and failure. + * @see {@link onExit} for attaching a cleanup effect that runs on all possible exits. + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +const onError = exports.onError = core.onError; +/** + * Guarantees that a cleanup function runs regardless of whether the effect + * succeeds, fails, or is interrupted. + * + * **Details** + * + * This function ensures that a provided cleanup function is executed after the + * effect completes, regardless of the outcome. The cleanup function is given + * the `Exit` value of the effect, which provides detailed information about the + * result: + * - If the effect succeeds, the `Exit` contains the success value. + * - If the effect fails, the `Exit` contains the error or failure cause. + * - If the effect is interrupted, the `Exit` reflects the interruption. + * + * The cleanup function is guaranteed to run uninterruptibly, ensuring reliable + * resource management even in complex or high-concurrency scenarios. + * + * **Example** (Running a Cleanup Function with the Effect’s Result) + * + * ```ts + * import { Console, Effect, Exit } from "effect" + * + * // Define a cleanup effect that logs the result + * const handler = Effect.onExit((exit) => + * Console.log(`Cleanup completed: ${Exit.getOrElse(exit, String)}`) + * ) + * + * // Define a successful effect + * const success = Console.log("Task completed").pipe( + * Effect.as("some result"), + * handler + * ) + * + * Effect.runFork(success) + * // Output: + * // Task completed + * // Cleanup completed: some result + * + * // Define a failing effect + * const failure = Console.log("Task failed").pipe( + * Effect.andThen(Effect.fail("some error")), + * handler + * ) + * + * Effect.runFork(failure) + * // Output: + * // Task failed + * // Cleanup completed: Error: some error + * + * // Define an interrupted effect + * const interruption = Console.log("Task interrupted").pipe( + * Effect.andThen(Effect.interrupt), + * handler + * ) + * + * Effect.runFork(interruption) + * // Output: + * // Task interrupted + * // Cleanup completed: All fibers interrupted without errors. + * ``` + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +const onExit = exports.onExit = core.onExit; +/** + * Ensures that finalizers are run concurrently when the scope of an effect is + * closed. + * + * **Details** + * + * This function modifies the behavior of finalizers within a scoped workflow to + * allow them to run concurrently when the scope is closed. + * + * By default, finalizers are executed sequentially in reverse order of their + * addition, but this function changes that behavior to execute all finalizers + * concurrently. + * + * **When to Use** + * + * Running finalizers concurrently can improve performance when multiple + * independent cleanup tasks need to be performed. However, it requires that + * these tasks do not depend on the order of execution or introduce race + * conditions. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * // Define a program that adds multiple finalizers + * const program = Effect.gen(function*() { + * yield* Effect.addFinalizer(() => Console.log("Finalizer 1 executed").pipe(Effect.delay("300 millis"))) + * yield* Effect.addFinalizer(() => Console.log("Finalizer 2 executed").pipe(Effect.delay("100 millis"))) + * yield* Effect.addFinalizer(() => Console.log("Finalizer 3 executed").pipe(Effect.delay("200 millis"))) + * return "some result" + * }) + * + * // Modify the program to ensure finalizers run in parallel + * const modified = program.pipe(Effect.parallelFinalizers) + * + * const runnable = Effect.scoped(modified) + * + * Effect.runFork(runnable) + * // Output: + * // Finalizer 2 executed + * // Finalizer 3 executed + * // Finalizer 1 executed + * ``` + * + * @see {@link sequentialFinalizers} for a version that ensures finalizers are run sequentially. + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +const parallelFinalizers = exports.parallelFinalizers = fiberRuntime.parallelFinalizers; +/** + * Ensures that finalizers are run sequentially in reverse order of their + * addition. + * + * **Details** + * + * This function modifies the behavior of finalizers within a scoped workflow to + * ensure they are run sequentially in reverse order when the scope is closed. + * + * By default, finalizers are executed sequentially, so this only changes the + * behavior if the scope is configured to run finalizers concurrently. + * + * @see {@link parallelFinalizers} for a version that ensures finalizers are run concurrently. + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +const sequentialFinalizers = exports.sequentialFinalizers = fiberRuntime.sequentialFinalizers; +/** + * Applies a custom execution strategy to finalizers within a scoped workflow. + * + * **Details** + * + * This function allows you to control how finalizers are executed in a scope by + * applying a specified `ExecutionStrategy`. The `strategy` can dictate whether + * finalizers run (e.g., sequentially or in parallel). + * + * Additionally, the function provides a `restore` operation, which ensures that + * the effect passed to it is executed under the default execution strategy. + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +const finalizersMask = exports.finalizersMask = fiberRuntime.finalizersMask; +/** + * Provides access to the current scope in a scoped workflow. + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +const scope = exports.scope = fiberRuntime.scope; +/** + * Accesses the current scope and uses it to perform the specified effect. + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +const scopeWith = exports.scopeWith = fiberRuntime.scopeWith; +/** + * Creates a `Scope`, passes it to the specified effectful function, and closes + * the scope when the effect completes (whether through success, failure, or + * interruption). + * + * @since 3.11.0 + * @category Scoping, Resources & Finalization + */ +const scopedWith = exports.scopedWith = fiberRuntime.scopedWith; +/** + * Scopes all resources used in an effect to the lifetime of the effect. + * + * **Details** + * + * This function ensures that all resources used within an effect are tied to + * its lifetime. Finalizers for these resources are executed automatically when + * the effect completes, whether through success, failure, or interruption. This + * guarantees proper resource cleanup without requiring explicit management. + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +const scoped = exports.scoped = fiberRuntime.scopedEffect; +/** + * Scopes all resources acquired by one effect to the lifetime of another + * effect. + * + * **Details** + * + * This function allows you to scope the resources acquired by one effect + * (`self`) to the lifetime of another effect (`use`). This ensures that the + * resources are cleaned up as soon as the `use` effect completes, regardless of + * how the `use` effect ends (success, failure, or interruption). + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * const acquire = Console.log("Acquiring resource").pipe( + * Effect.as(1), + * Effect.tap(Effect.addFinalizer(() => Console.log("Releasing resource"))) + * ) + * const use = (resource: number) => Console.log(`Using resource: ${resource}`) + * + * const program = acquire.pipe(Effect.using(use)) + * + * Effect.runFork(program) + * // Output: + * // Acquiring resource + * // Using resource: 1 + * // Releasing resource + * ``` + * + * @see {@link scopedWith} Manage scoped operations with a temporary scope. + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +const using = exports.using = fiberRuntime.using; +/** + * Returns the result of the effect and a finalizer to close its scope. + * + * **Details** + * + * This function allows you to retrieve both the result of an effect and a + * finalizer that can be used to manually close its scope. This is useful for + * workflows where you need early access to the result while retaining control + * over the resource cleanup process. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * const acquire = Console.log("Acquiring resource").pipe( + * Effect.as(1), + * Effect.tap(Effect.addFinalizer(() => Console.log("Releasing resource"))) + * ) + * const program = Effect.gen(function*() { + * const [finalizer, resource] = yield* Effect.withEarlyRelease(acquire) + * console.log(`Using resource: ${resource}`) + * yield* Effect.sleep("1 second") + * yield* finalizer + * }) + * + * Effect.runFork(program.pipe(Effect.scoped)) + * // Output: + * // Acquiring resource + * // Using resource: 1 + * // Releasing resource + * ``` + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +const withEarlyRelease = exports.withEarlyRelease = fiberRuntime.withEarlyRelease; +/** + * Returns a new effect that will not succeed with its value before first + * waiting for the end of all child fibers forked by the effect. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +const awaitAllChildren = exports.awaitAllChildren = circular.awaitAllChildren; +/** + * Returns a new workflow that will not supervise any fibers forked by this + * workflow. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +const daemonChildren = exports.daemonChildren = fiberRuntime.daemonChildren; +/** + * Constructs an effect with information about the current `Fiber`. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +const descriptor = exports.descriptor = effect.descriptor; +/** + * Constructs an effect based on information about the current `Fiber`. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +const descriptorWith = exports.descriptorWith = effect.descriptorWith; +/** + * Returns a new workflow that executes this one and captures the changes in + * `FiberRef` values. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +const diffFiberRefs = exports.diffFiberRefs = effect.diffFiberRefs; +/** + * Acts on the children of this fiber (collected into a single fiber), + * guaranteeing the specified callback will be invoked, whether or not this + * effect succeeds. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +const ensuringChild = exports.ensuringChild = circular.ensuringChild; +/** + * Acts on the children of this fiber, guaranteeing the specified callback + * will be invoked, whether or not this effect succeeds. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +const ensuringChildren = exports.ensuringChildren = circular.ensuringChildren; +/** + * @since 2.0.0 + * @category Supervision & Fibers + */ +const fiberId = exports.fiberId = core.fiberId; +/** + * @since 2.0.0 + * @category Supervision & Fibers + */ +const fiberIdWith = exports.fiberIdWith = core.fiberIdWith; +/** + * Creates a new fiber to run an effect concurrently. + * + * **Details** + * + * This function takes an effect and forks it into a separate fiber, allowing it + * to run concurrently without blocking the original effect. The new fiber + * starts execution immediately after being created, and the fiber object is + * returned immediately without waiting for the effect to begin. This is useful + * when you want to run tasks concurrently while continuing other tasks in the + * parent fiber. + * + * The forked fiber is attached to the parent fiber's scope. This means that + * when the parent fiber terminates, the child fiber will also be terminated + * automatically. This feature, known as "auto supervision," ensures that no + * fibers are left running unintentionally. If you prefer not to have this auto + * supervision behavior, you can use {@link forkDaemon} or {@link forkIn}. + * + * **When to Use** + * + * Use this function when you need to run an effect concurrently without + * blocking the current execution flow. For example, you might use it to launch + * background tasks or concurrent computations. However, working with fibers can + * be complex, so before using this function directly, you might want to explore + * higher-level functions like {@link raceWith}, {@link zip}, or others that can + * manage concurrency for you. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const fib = (n: number): Effect.Effect => + * n < 2 + * ? Effect.succeed(n) + * : Effect.zipWith(fib(n - 1), fib(n - 2), (a, b) => a + b) + * + * // ┌─── Effect, never, never> + * // ▼ + * const fib10Fiber = Effect.fork(fib(10)) + * ``` + * + * @see {@link forkWithErrorHandler} for a version that allows you to handle errors. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +const fork = exports.fork = fiberRuntime.fork; +/** + * Creates a long-running background fiber that is independent of its parent. + * + * **Details** + * + * This function creates a "daemon" fiber that runs in the background and is not + * tied to the lifecycle of its parent fiber. Unlike normal fibers that stop + * when the parent fiber terminates, a daemon fiber will continue running until + * the global scope closes or the fiber completes naturally. This makes it + * useful for tasks that need to run in the background independently, such as + * periodic logging, monitoring, or background data processing. + * + * **Example** (Creating a Daemon Fiber) + * + * ```ts + * import { Effect, Console, Schedule } from "effect" + * + * // Daemon fiber that logs a message repeatedly every second + * const daemon = Effect.repeat( + * Console.log("daemon: still running!"), + * Schedule.fixed("1 second") + * ) + * + * const parent = Effect.gen(function* () { + * console.log("parent: started!") + * // Daemon fiber running independently + * yield* Effect.forkDaemon(daemon) + * yield* Effect.sleep("3 seconds") + * console.log("parent: finished!") + * }) + * + * Effect.runFork(parent) + * // Output: + * // parent: started! + * // daemon: still running! + * // daemon: still running! + * // daemon: still running! + * // parent: finished! + * // daemon: still running! + * // daemon: still running! + * // daemon: still running! + * // daemon: still running! + * // daemon: still running! + * // ...etc... + * ``` + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +const forkDaemon = exports.forkDaemon = fiberRuntime.forkDaemon; +/** + * Returns an effect that forks all of the specified values, and returns a + * composite fiber that produces a list of their results, in order. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +const forkAll = exports.forkAll = circular.forkAll; +/** + * Forks an effect in a specific scope, allowing finer control over its + * execution. + * + * **Details** + * + * There are some cases where we need more fine-grained control, so we want to + * fork a fiber in a specific scope. We can use the `Effect.forkIn` operator + * which takes the target scope as an argument. + * + * The fiber will be interrupted when the scope is closed. + * + * **Example** (Forking a Fiber in a Specific Scope) + * + * In this example, the child fiber is forked into the outerScope, + * allowing it to outlive the inner scope but still be terminated + * when the outerScope is closed. + * + * ```ts + * import { Console, Effect, Schedule } from "effect" + * + * // Child fiber that logs a message repeatedly every second + * const child = Effect.repeat( + * Console.log("child: still running!"), + * Schedule.fixed("1 second") + * ) + * + * const program = Effect.scoped( + * Effect.gen(function* () { + * yield* Effect.addFinalizer(() => + * Console.log("The outer scope is about to be closed!") + * ) + * + * // Capture the outer scope + * const outerScope = yield* Effect.scope + * + * // Create an inner scope + * yield* Effect.scoped( + * Effect.gen(function* () { + * yield* Effect.addFinalizer(() => + * Console.log("The inner scope is about to be closed!") + * ) + * // Fork the child fiber in the outer scope + * yield* Effect.forkIn(child, outerScope) + * yield* Effect.sleep("3 seconds") + * }) + * ) + * + * yield* Effect.sleep("5 seconds") + * }) + * ) + * + * Effect.runFork(program) + * // Output: + * // child: still running! + * // child: still running! + * // child: still running! + * // The inner scope is about to be closed! + * // child: still running! + * // child: still running! + * // child: still running! + * // child: still running! + * // child: still running! + * // child: still running! + * // The outer scope is about to be closed! + * ``` + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +const forkIn = exports.forkIn = circular.forkIn; +/** + * Forks a fiber in a local scope, ensuring it outlives its parent. + * + * **Details** + * + * This function is used to create fibers that are tied to a local scope, + * meaning they are not dependent on their parent fiber's lifecycle. Instead, + * they will continue running until the scope they were created in is closed. + * This is particularly useful when you need a fiber to run independently of the + * parent fiber, but still want it to be terminated when the scope ends. + * + * Fibers created with this function are isolated from the parent fiber’s + * termination, so they can run for a longer period. This behavior is different + * from fibers created with {@link fork}, which are terminated when the parent fiber + * terminates. With `forkScoped`, the child fiber will keep running until the + * local scope ends, regardless of the state of the parent fiber. + * + * **Example** (Forking a Fiber in a Local Scope) + * + * In this example, the child fiber continues to run beyond the lifetime of the parent fiber. + * The child fiber is tied to the local scope and will be terminated only when the scope ends. + * + * ```ts + * import { Effect, Console, Schedule } from "effect" + * + * // Child fiber that logs a message repeatedly every second + * const child = Effect.repeat( + * Console.log("child: still running!"), + * Schedule.fixed("1 second") + * ) + * + * // ┌─── Effect + * // ▼ + * const parent = Effect.gen(function* () { + * console.log("parent: started!") + * // Child fiber attached to local scope + * yield* Effect.forkScoped(child) + * yield* Effect.sleep("3 seconds") + * console.log("parent: finished!") + * }) + * + * // Program runs within a local scope + * const program = Effect.scoped( + * Effect.gen(function* () { + * console.log("Local scope started!") + * yield* Effect.fork(parent) + * // Scope lasts for 5 seconds + * yield* Effect.sleep("5 seconds") + * console.log("Leaving the local scope!") + * }) + * ) + * + * Effect.runFork(program) + * // Output: + * // Local scope started! + * // parent: started! + * // child: still running! + * // child: still running! + * // child: still running! + * // parent: finished! + * // child: still running! + * // child: still running! + * // Leaving the local scope! + * ``` + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +const forkScoped = exports.forkScoped = circular.forkScoped; +/** + * Like {@link fork} but handles an error with the provided handler. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +const forkWithErrorHandler = exports.forkWithErrorHandler = fiberRuntime.forkWithErrorHandler; +/** + * Creates an `Effect` value that represents the exit value of the specified + * fiber. + * + * @see {@link fromFiberEffect} for creating an effect from a fiber obtained from an effect. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +const fromFiber = exports.fromFiber = circular.fromFiber; +/** + * Creates an `Effect` value that represents the exit value of a fiber obtained + * from an effect. + * + * @see {@link fromFiber} for creating an effect from a fiber. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +const fromFiberEffect = exports.fromFiberEffect = circular.fromFiberEffect; +/** + * Supervises child fibers by reporting them to a specified supervisor. + * + * **Details** + * + * This function takes a supervisor as an argument and returns an effect where + * all child fibers forked within it are supervised by the provided supervisor. + * This enables you to capture detailed information about these child fibers, + * such as their status, through the supervisor. + * + * **Example** (Monitoring Fiber Count) + * + * ```ts + * import { Effect, Supervisor, Schedule, Fiber, FiberStatus } from "effect" + * + * // Main program that monitors fibers while calculating a Fibonacci number + * const program = Effect.gen(function* () { + * // Create a supervisor to track child fibers + * const supervisor = yield* Supervisor.track + * + * // Start a Fibonacci calculation, supervised by the supervisor + * const fibFiber = yield* fib(20).pipe( + * Effect.supervised(supervisor), + * // Fork the Fibonacci effect into a fiber + * Effect.fork + * ) + * + * // Define a schedule to periodically monitor the fiber count every 500ms + * const policy = Schedule.spaced("500 millis").pipe( + * Schedule.whileInputEffect((_) => + * Fiber.status(fibFiber).pipe( + * // Continue while the Fibonacci fiber is not done + * Effect.andThen((status) => status !== FiberStatus.done) + * ) + * ) + * ) + * + * // Start monitoring the fibers, using the supervisor to track the count + * const monitorFiber = yield* monitorFibers(supervisor).pipe( + * // Repeat the monitoring according to the schedule + * Effect.repeat(policy), + * // Fork the monitoring into its own fiber + * Effect.fork + * ) + * + * // Join the monitor and Fibonacci fibers to ensure they complete + * yield* Fiber.join(monitorFiber) + * const result = yield* Fiber.join(fibFiber) + * + * console.log(`fibonacci result: ${result}`) + * }) + * + * // Function to monitor and log the number of active fibers + * const monitorFibers = ( + * supervisor: Supervisor.Supervisor>> + * ): Effect.Effect => + * Effect.gen(function* () { + * const fibers = yield* supervisor.value // Get the current set of fibers + * console.log(`number of fibers: ${fibers.length}`) + * }) + * + * // Recursive Fibonacci calculation, spawning fibers for each recursive step + * const fib = (n: number): Effect.Effect => + * Effect.gen(function* () { + * if (n <= 1) { + * return 1 + * } + * yield* Effect.sleep("500 millis") // Simulate work by delaying + * + * // Fork two fibers for the recursive Fibonacci calls + * const fiber1 = yield* Effect.fork(fib(n - 2)) + * const fiber2 = yield* Effect.fork(fib(n - 1)) + * + * // Join the fibers to retrieve their results + * const v1 = yield* Fiber.join(fiber1) + * const v2 = yield* Fiber.join(fiber2) + * + * return v1 + v2 // Combine the results + * }) + * + * Effect.runPromise(program) + * // Output: + * // number of fibers: 0 + * // number of fibers: 2 + * // number of fibers: 6 + * // number of fibers: 14 + * // number of fibers: 30 + * // number of fibers: 62 + * // number of fibers: 126 + * // number of fibers: 254 + * // number of fibers: 510 + * // number of fibers: 1022 + * // number of fibers: 2034 + * // number of fibers: 3795 + * // number of fibers: 5810 + * // number of fibers: 6474 + * // number of fibers: 4942 + * // number of fibers: 2515 + * // number of fibers: 832 + * // number of fibers: 170 + * // number of fibers: 18 + * // number of fibers: 0 + * // fibonacci result: 10946 + * ``` + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +const supervised = exports.supervised = circular.supervised; +/** + * Transplants specified effects so that when those effects fork other + * effects, the forked effects will be governed by the scope of the fiber that + * executes this effect. + * + * This can be used to "graft" deep grandchildren onto a higher-level scope, + * effectively extending their lifespans into the parent scope. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +const transplant = exports.transplant = core.transplant; +/** + * @since 2.0.0 + * @category Supervision & Fibers + */ +const withConcurrency = exports.withConcurrency = core.withConcurrency; +/** + * Sets the provided scheduler for usage in the wrapped effect + * + * @since 2.0.0 + * @category Scheduler + */ +const withScheduler = exports.withScheduler = Scheduler.withScheduler; +/** + * Sets the scheduling priority used when yielding + * + * @since 2.0.0 + * @category Scheduler + */ +const withSchedulingPriority = exports.withSchedulingPriority = core.withSchedulingPriority; +/** + * Sets the maximum number of operations before yield by the default schedulers + * + * @since 2.0.0 + * @category Scheduler + */ +const withMaxOpsBeforeYield = exports.withMaxOpsBeforeYield = core.withMaxOpsBeforeYield; +/** + * Retrieves the `Clock` service from the context. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const program = Effect.gen(function*() { + * const clock = yield* Effect.clock + * const currentTime = yield* clock.currentTimeMillis + * console.log(`Current time in milliseconds: ${currentTime}`) + * }) + * + * Effect.runFork(program) + * // Example Output: + * // Current time in milliseconds: 1735484796134 + * ``` + * + * @since 2.0.0 + * @category Clock + */ +const clock = exports.clock = effect.clock; +/** + * Retrieves the `Clock` service from the context and provides it to the + * specified effectful function. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * const program = Effect.clockWith((clock) => + * clock.currentTimeMillis.pipe( + * Effect.map((currentTime) => `Current time is: ${currentTime}`), + * Effect.tap(Console.log) + * ) + * ) + * + * Effect.runFork(program) + * // Example Output: + * // Current time is: 1735484929744 + * ``` + * + * @since 2.0.0 + * @category Clock + */ +const clockWith = exports.clockWith = effect.clockWith; +/** + * Sets the implementation of the `Clock` service to the specified value and + * restores it to its original value when the scope is closed. + * + * @since 2.0.0 + * @category Clock + */ +const withClockScoped = exports.withClockScoped = fiberRuntime.withClockScoped; +/** + * Executes the specified workflow with the specified implementation of the + * `Clock` service. + * + * @since 2.0.0 + * @category Clock + */ +const withClock = exports.withClock = defaultServices.withClock; +/** + * Retreives the `Console` service from the context + * + * @since 2.0.0 + * @category Console + */ +const console = exports.console = console_.console; +/** + * Retreives the `Console` service from the context and provides it to the + * specified effectful function. + * + * @since 2.0.0 + * @category Console + */ +const consoleWith = exports.consoleWith = console_.consoleWith; +/** + * Sets the implementation of the console service to the specified value and + * restores it to its original value when the scope is closed. + * + * @since 2.0.0 + * @category Creating Effects + */ +const withConsoleScoped = exports.withConsoleScoped = console_.withConsoleScoped; +/** + * Executes the specified workflow with the specified implementation of the + * console service. + * + * @since 2.0.0 + * @category Console + */ +const withConsole = exports.withConsole = console_.withConsole; +/** + * Delays the execution of an effect by a specified `Duration`. + * + * **Details + * + * This function postpones the execution of the provided effect by the specified + * duration. The duration can be provided in various formats supported by the + * `Duration` module. + * + * Internally, this function does not block the thread; instead, it uses an + * efficient, non-blocking mechanism to introduce the delay. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * const task = Console.log("Task executed") + * + * const program = Console.log("start").pipe( + * Effect.andThen( + * // Delays the log message by 2 seconds + * task.pipe(Effect.delay("2 seconds")) + * ) + * ) + * + * Effect.runFork(program) + * // Output: + * // start + * // Task executed + * ``` + * + * @since 2.0.0 + * @category Delays & Timeouts + */ +const delay = exports.delay = effect.delay; +/** + * Suspends the execution of an effect for a specified `Duration`. + * + * **Details** + * + * This function pauses the execution of an effect for a given duration. It is + * asynchronous, meaning that it does not block the fiber executing the effect. + * Instead, the fiber is suspended during the delay period and can resume once + * the specified time has passed. + * + * The duration can be specified using various formats supported by the + * `Duration` module, such as a string (`"2 seconds"`) or numeric value + * representing milliseconds. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const program = Effect.gen(function*() { + * console.log("Starting task...") + * yield* Effect.sleep("3 seconds") // Waits for 3 seconds + * console.log("Task completed!") + * }) + * + * Effect.runFork(program) + * // Output: + * // Starting task... + * // Task completed! + * ``` + * + * @since 2.0.0 + * @category Delays & Timeouts + */ +const sleep = exports.sleep = effect.sleep; +/** + * Executes an effect and measures the time it takes to complete. + * + * **Details** + * + * This function wraps the provided effect and returns a new effect that, when + * executed, performs the original effect and calculates its execution duration. + * + * The result of the new effect includes both the execution time (as a + * `Duration`) and the original effect's result. This is useful for monitoring + * performance or gaining insights into the time taken by specific operations. + * + * The original effect's behavior (success, failure, or interruption) remains + * unchanged, and the timing information is provided alongside the result in a + * tuple. + * + * **Example** + * + * ```ts + * import { Duration, Effect } from "effect" + * + * const task = Effect.gen(function*() { + * yield* Effect.sleep("2 seconds") // Simulates some work + * return "some result" + * }) + * + * const timedTask = task.pipe(Effect.timed) + * + * const program = Effect.gen(function*() { + * const [duration, result] = yield* timedTask + * console.log(`Task completed in ${Duration.toMillis(duration)} ms with result: ${result}`) + * }) + * + * Effect.runFork(program) + * // Output: Task completed in 2003.749125 ms with result: some result + * ``` + * + * @since 2.0.0 + * @category Delays & Timeouts + */ +const timed = exports.timed = effect.timed; +/** + * Executes an effect and measures its execution time using a custom clock. + * + * **Details** + * + * This function extends the functionality of {@link timed} by allowing you to + * specify a custom clock for measuring the execution duration. The provided + * effect (`nanoseconds`) represents the clock and should return the current + * time in nanoseconds. The timing information is computed using this custom + * clock instead of the default system clock. + * + * @since 2.0.0 + * @category Delays & Timeouts + */ +const timedWith = exports.timedWith = effect.timedWith; +/** + * Adds a time limit to an effect, triggering a timeout if the effect exceeds + * the duration. + * + * **Details** + * + * This function allows you to enforce a time limit on the execution of an + * effect. If the effect does not complete within the given duration, it fails + * with a `TimeoutException`. This is useful for preventing tasks from hanging + * indefinitely, especially in scenarios where responsiveness or resource limits + * are critical. + * + * The returned effect will either: + * - Succeed with the original effect's result if it completes within the + * specified duration. + * - Fail with a `TimeoutException` if the time limit is exceeded. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const task = Effect.gen(function* () { + * console.log("Start processing...") + * yield* Effect.sleep("2 seconds") // Simulates a delay in processing + * console.log("Processing complete.") + * return "Result" + * }) + * + * // Output will show a TimeoutException as the task takes longer + * // than the specified timeout duration + * const timedEffect = task.pipe(Effect.timeout("1 second")) + * + * Effect.runPromiseExit(timedEffect).then(console.log) + * // Output: + * // Start processing... + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { + * // _id: 'Cause', + * // _tag: 'Fail', + * // failure: { _tag: 'TimeoutException' } + * // } + * // } + * ``` + * + * @see {@link timeoutFail} for a version that raises a custom error. + * @see {@link timeoutFailCause} for a version that raises a custom defect. + * @see {@link timeoutTo} for a version that allows specifying both success and + * timeout handlers. + * + * @since 2.0.0 + * @category Delays & Timeouts + */ +const timeout = exports.timeout = circular.timeout; +/** + * Gracefully handles timeouts by returning an `Option` that represents either + * the result or a timeout. + * + * **Details** + * + * This function wraps the outcome of an effect in an `Option` type. If the + * effect completes within the specified duration, it returns a `Some` + * containing the result. If the effect times out, it returns a `None`. Unlike + * other timeout methods, this approach does not raise errors or exceptions; + * instead, it allows you to treat timeouts as a regular outcome, simplifying + * the logic for handling delays. + * + * **When to Use** + * + * This is useful when you want to handle timeouts without causing the program + * to fail, making it easier to manage situations where you expect tasks might + * take too long but want to continue executing other tasks. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const task = Effect.gen(function* () { + * console.log("Start processing...") + * yield* Effect.sleep("2 seconds") // Simulates a delay in processing + * console.log("Processing complete.") + * return "Result" + * }) + * + * const timedOutEffect = Effect.all([ + * task.pipe(Effect.timeoutOption("3 seconds")), + * task.pipe(Effect.timeoutOption("1 second")) + * ]) + * + * Effect.runPromise(timedOutEffect).then(console.log) + * // Output: + * // Start processing... + * // Processing complete. + * // Start processing... + * // [ + * // { _id: 'Option', _tag: 'Some', value: 'Result' }, + * // { _id: 'Option', _tag: 'None' } + * // ] + * ``` + * + * @see {@link timeout} for a version that raises a `TimeoutException`. + * @see {@link timeoutFail} for a version that raises a custom error. + * @see {@link timeoutFailCause} for a version that raises a custom defect. + * @see {@link timeoutTo} for a version that allows specifying both success and + * timeout handlers. + * + * @since 3.1.0 + * @category Delays & Timeouts + */ +const timeoutOption = exports.timeoutOption = circular.timeoutOption; +/** + * Specifies a custom error to be produced when a timeout occurs. + * + * **Details** + * + * This function allows you to handle timeouts in a customized way by defining a + * specific error to be raised when an effect exceeds the given duration. Unlike + * default timeout behaviors that use generic exceptions, this function gives + * you the flexibility to specify a meaningful error type that aligns with your + * application's needs. + * + * When you apply this function, you provide: + * - A `duration`: The time limit for the effect. + * - An `onTimeout` function: A lazy evaluation function that generates the + * custom error if the timeout occurs. + * + * If the effect completes within the time limit, its result is returned + * normally. Otherwise, the `onTimeout` function is triggered, and its output is + * used as the error for the effect. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const task = Effect.gen(function* () { + * console.log("Start processing...") + * yield* Effect.sleep("2 seconds") // Simulates a delay in processing + * console.log("Processing complete.") + * return "Result" + * }) + * + * class MyTimeoutError { + * readonly _tag = "MyTimeoutError" + * } + * + * const program = task.pipe( + * Effect.timeoutFail({ + * duration: "1 second", + * onTimeout: () => new MyTimeoutError() // Custom timeout error + * }) + * ) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // Start processing... + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { + * // _id: 'Cause', + * // _tag: 'Fail', + * // failure: MyTimeoutError { _tag: 'MyTimeoutError' } + * // } + * // } + * ``` + * + * @see {@link timeout} for a version that raises a `TimeoutException`. + * @see {@link timeoutFailCause} for a version that raises a custom defect. + * @see {@link timeoutTo} for a version that allows specifying both success and + * timeout handlers. + * + * @since 2.0.0 + * @category Delays & Timeouts + */ +const timeoutFail = exports.timeoutFail = circular.timeoutFail; +/** + * Specifies a custom defect to be thrown when a timeout occurs. + * + * **Details** + * + * This function allows you to handle timeouts as exceptional cases by + * generating a custom defect when an effect exceeds the specified duration. You + * provide: + * - A `duration`: The time limit for the effect. + * - An `onTimeout` function: A lazy evaluation function that generates the + * custom defect (typically created using `Cause.die`). + * + * If the effect completes within the time limit, its result is returned + * normally. Otherwise, the custom defect is triggered, and the effect fails + * with that defect. + * + * **When to Use** + * + * This is especially useful when you need to treat timeouts as critical + * failures in your application and wish to include meaningful information in + * the defect. + * + * **Example** + * + * ```ts + * import { Effect, Cause } from "effect" + * + * const task = Effect.gen(function* () { + * console.log("Start processing...") + * yield* Effect.sleep("2 seconds") // Simulates a delay in processing + * console.log("Processing complete.") + * return "Result" + * }) + * + * const program = task.pipe( + * Effect.timeoutFailCause({ + * duration: "1 second", + * onTimeout: () => Cause.die("Timed out!") // Custom defect for timeout + * }) + * ) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // Start processing... + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { _id: 'Cause', _tag: 'Die', defect: 'Timed out!' } + * // } + * ``` + * + * @see {@link timeout} for a version that raises a `TimeoutException`. + * @see {@link timeoutFail} for a version that raises a custom error. + * @see {@link timeoutTo} for a version that allows specifying both success and + * timeout handlers. + * + * @since 2.0.0 + * @category Delays & Timeouts + */ +const timeoutFailCause = exports.timeoutFailCause = circular.timeoutFailCause; +/** + * Provides custom behavior for successful and timed-out operations. + * + * **Details** + * + * This function allows you to define distinct outcomes for an effect depending + * on whether it completes within a specified time frame or exceeds the timeout + * duration. You can provide: + * - `onSuccess`: A handler for processing the result of the effect if it + * completes successfully within the time limit. + * - `onTimeout`: A handler for generating a result when the effect times out. + * - `duration`: The maximum allowed time for the effect to complete. + * + * **When to Use** + * + * Unlike {@link timeout}, which raises an exception for timeouts, this function + * gives you full control over the behavior for both success and timeout + * scenarios. It is particularly useful when you want to encapsulate timeouts + * and successes into a specific data structure, like an `Either` type, to + * represent these outcomes in a meaningful way. + * + * **Example** + * + * ```ts + * import { Effect, Either } from "effect" + * + * const task = Effect.gen(function* () { + * console.log("Start processing...") + * yield* Effect.sleep("2 seconds") // Simulates a delay in processing + * console.log("Processing complete.") + * return "Result" + * }) + * + * const program = task.pipe( + * Effect.timeoutTo({ + * duration: "1 second", + * onSuccess: (result): Either.Either => + * Either.right(result), + * onTimeout: (): Either.Either => + * Either.left("Timed out!") + * }) + * ) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // Start processing... + * // { + * // _id: "Either", + * // _tag: "Left", + * // left: "Timed out!" + * // } + * ``` + * + * @see {@link timeout} for a version that raises a `TimeoutException`. + * @see {@link timeoutFail} for a version that raises a custom error. + * @see {@link timeoutFailCause} for a version that raises a custom defect. + * + * @since 2.0.0 + * @category Delays & Timeouts + */ +const timeoutTo = exports.timeoutTo = circular.timeoutTo; +/** + * Allows working with the default configuration provider. + * + * **Details** + * + * This function retrieves the default configuration provider and passes it to + * the provided function, which can use it to perform computations or retrieve + * configuration values. The function can return an effect that leverages the + * configuration provider for its operations. + * + * @since 2.0.0 + * @category Config + */ +const configProviderWith = exports.configProviderWith = defaultServices.configProviderWith; +/** + * Executes an effect using a specific configuration provider. + * + * **Details** + * + * This function lets you run an effect with a specified configuration provider. + * The custom provider will override the default configuration provider for the + * duration of the effect's execution. + * + * **When to Use** + * + * This is particularly useful when you need to use a different set of + * configuration values or sources for specific parts of your application. + * + * **Example** + * + * ```ts + * import { Config, ConfigProvider, Effect } from "effect" + * + * const customProvider: ConfigProvider.ConfigProvider = ConfigProvider.fromMap( + * new Map([["custom-key", "custom-value"]]) + * ) + * + * const program = Effect.withConfigProvider(customProvider)( + * Effect.gen(function*() { + * const value = yield* Config.string("custom-key") + * console.log(`Config value: ${value}`) + * }) + * ) + * + * Effect.runPromise(program) + * // Output: + * // Config value: custom-value + * ``` + * + * @since 2.0.0 + * @category Config + */ +const withConfigProvider = exports.withConfigProvider = defaultServices.withConfigProvider; +/** + * Sets a configuration provider within a scope. + * + * **Details** + * + * This function sets the configuration provider to a specified value and + * ensures that it is restored to its original value when the scope is closed. + * + * @since 2.0.0 + * @category Config + */ +const withConfigProviderScoped = exports.withConfigProviderScoped = fiberRuntime.withConfigProviderScoped; +/** + * Accesses the full context of the effect. + * + * **Details** + * + * This function provides the ability to access the entire context required by + * an effect. The context is a container that holds dependencies or environment + * values needed by an effect to run. By using this function, you can retrieve + * and work with the context directly within an effect. + * + * @since 2.0.0 + * @category Context + */ +const context = exports.context = core.context; +/** + * Accesses the context and applies a transformation function. + * + * **Details** + * + * This function retrieves the context of the effect and applies a pure + * transformation function to it. The result of the transformation is then + * returned within the effect. + * + * @see {@link contextWithEffect} for a version that allows effectful transformations. + * + * @since 2.0.0 + * @category Context + */ +const contextWith = exports.contextWith = effect.contextWith; +/** + * Accesses the context and performs an effectful transformation. + * + * **Details** + * + * This function retrieves the context and allows you to transform it + * effectually using another effect. It is useful when the transformation + * involves asynchronous or effectful operations. + * + * @see {@link contextWith} for a version that allows pure transformations. + * + * @since 2.0.0 + * @category Context + */ +const contextWithEffect = exports.contextWithEffect = core.contextWithEffect; +/** + * Provides part of the required context while leaving the rest unchanged. + * + * **Details** + * + * This function allows you to transform the context required by an effect, + * providing part of the context and leaving the rest to be fulfilled later. + * + * **Example** + * + * ```ts + * import { Context, Effect } from "effect" + * + * class Service1 extends Context.Tag("Service1")() {} + * class Service2 extends Context.Tag("Service2")() {} + * + * const program = Effect.gen(function*() { + * const service1 = yield* Service1 + * console.log(service1.port) + * const service2 = yield* Service2 + * console.log(service2.connection) + * return "some result" + * }) + * + * // ┌─── Effect + * // ▼ + * const programWithService1 = Effect.mapInputContext( + * program, + * (ctx: Context.Context) => Context.add(ctx, Service1, { port: 3000 }) + * ) + * + * const runnable = programWithService1.pipe( + * Effect.provideService(Service2, { connection: "localhost" }), + * Effect.provideService(Service1, { port: 3001 }) + * ) + * + * Effect.runPromise(runnable) + * // Output: + * // 3000 + * // localhost + * ``` + * + * @since 2.0.0 + * @category Context + */ +const mapInputContext = exports.mapInputContext = core.mapInputContext; +/** + * Provides necessary dependencies to an effect, removing its environmental + * requirements. + * + * **Details** + * + * This function allows you to supply the required environment for an effect. + * The environment can be provided in the form of one or more `Layer`s, a + * `Context`, a `Runtime`, or a `ManagedRuntime`. Once the environment is + * provided, the effect can run without requiring external dependencies. + * + * You can compose layers to create a modular and reusable way of setting up the + * environment for effects. For example, layers can be used to configure + * databases, logging services, or any other required dependencies. + * + * **Example** + * + * ```ts + * import { Context, Effect, Layer } from "effect" + * + * class Database extends Context.Tag("Database")< + * Database, + * { readonly query: (sql: string) => Effect.Effect> } + * >() {} + * + * const DatabaseLive = Layer.succeed( + * Database, + * { + * // Simulate a database query + * query: (sql: string) => Effect.log(`Executing query: ${sql}`).pipe(Effect.as([])) + * } + * ) + * + * // ┌─── Effect + * // ▼ + * const program = Effect.gen(function*() { + * const database = yield* Database + * const result = yield* database.query("SELECT * FROM users") + * return result + * }) + * + * // ┌─── Effect + * // ▼ + * const runnable = Effect.provide(program, DatabaseLive) + * + * Effect.runPromise(runnable).then(console.log) + * // Output: + * // timestamp=... level=INFO fiber=#0 message="Executing query: SELECT * FROM users" + * // [] + * ``` + * + * @see {@link provideService} for providing a service to an effect. + * + * @since 2.0.0 + * @category Context + */ +const provide = exports.provide = layer.effect_provide; +/** + * Provides an implementation for a service in the context of an effect. + * + * **Details** + * + * This function allows you to supply a specific implementation for a service + * required by an effect. Services are typically defined using `Context.Tag`, + * which acts as a unique identifier for the service. By using this function, + * you link the service to its concrete implementation, enabling the effect to + * execute successfully without additional requirements. + * + * For example, you can use this function to provide a random number generator, + * a logger, or any other service your effect depends on. Once the service is + * provided, all parts of the effect that rely on the service will automatically + * use the implementation you supplied. + * + * **Example** + * + * ```ts + * import { Effect, Context } from "effect" + * + * // Declaring a tag for a service that generates random numbers + * class Random extends Context.Tag("MyRandomService")< + * Random, + * { readonly next: Effect.Effect } + * >() {} + * + * // Using the service + * const program = Effect.gen(function* () { + * const random = yield* Random + * const randomNumber = yield* random.next + * console.log(`random number: ${randomNumber}`) + * }) + * + * // Providing the implementation + * // + * // ┌─── Effect + * // ▼ + * const runnable = Effect.provideService(program, Random, { + * next: Effect.sync(() => Math.random()) + * }) + * + * // Run successfully + * Effect.runPromise(runnable) + * // Example Output: + * // random number: 0.8241872233134417 + * ``` + * + * @see {@link provide} for providing multiple layers to an effect. + * + * @since 2.0.0 + * @category Context + */ +const provideService = exports.provideService = effect.provideService; +/** + * Dynamically provides an implementation for a service using an effect. + * + * **Details** + * + * This function allows you to provide an implementation for a service + * dynamically by using another effect. The provided effect is executed to + * produce the service implementation, which is then made available to the + * consuming effect. This is particularly useful when the service implementation + * itself requires asynchronous or resource-intensive initialization. + * + * For example, you can use this function to lazily initialize a database + * connection or fetch configuration values from an external source before + * making the service available to your effect. + * + * @since 2.0.0 + * @category Context + */ +const provideServiceEffect = exports.provideServiceEffect = effect.provideServiceEffect; +/** + * Creates a function that uses a service from the context to produce a value. + * + * @see {@link serviceFunctionEffect} for a version that returns an effect. + * + * @since 2.0.0 + * @category Context + */ +const serviceFunction = exports.serviceFunction = effect.serviceFunction; +/** + * Creates a function that uses a service from the context to produce an effect. + * + * @see {@link serviceFunction} for a version that returns a value. + * + * @since 2.0.0 + * @category Context + */ +const serviceFunctionEffect = exports.serviceFunctionEffect = effect.serviceFunctionEffect; +/** + * @since 2.0.0 + * @category Context + */ +const serviceFunctions = exports.serviceFunctions = effect.serviceFunctions; +/** + * @since 2.0.0 + * @category Context + */ +const serviceConstants = exports.serviceConstants = effect.serviceConstants; +/** + * @since 2.0.0 + * @category Context + */ +const serviceMembers = exports.serviceMembers = effect.serviceMembers; +/** + * Retrieves an optional service from the context as an `Option`. + * + * **Details** + * + * This function retrieves a service from the context and wraps it in an + * `Option`. If the service is available, it returns a `Some` containing the + * service. If the service is not found, it returns a `None`. This approach is + * useful when you want to handle the absence of a service gracefully without + * causing an error. + * + * **When to Use** + * + * Use this function when: + * - You need to access a service that may or may not be present in the context. + * - You want to handle the absence of a service using the `Option` type instead + * of throwing an error. + * + * @see {@link serviceOptional} for a version that throws an error if the service is missing. + * + * @since 2.0.0 + * @category Context + */ +const serviceOption = exports.serviceOption = effect.serviceOption; +/** + * Retrieves a service from the context, throwing an error if it is missing. + * + * **Details** + * + * This function retrieves a required service from the context. If the service + * is available, it returns the service. If the service is missing, it throws a + * `NoSuchElementException`, which can be handled using Effect's error-handling + * mechanisms. This is useful for services that are critical to the execution of + * your effect. + * + * @see {@link serviceOption} for a version that returns an `Option` instead of throwing an error. + * + * @since 2.0.0 + * @category Context + */ +const serviceOptional = exports.serviceOptional = effect.serviceOptional; +/** + * Updates a service in the context with a new implementation. + * + * **Details** + * + * This function modifies the existing implementation of a service in the + * context. It retrieves the current service, applies the provided + * transformation function `f`, and replaces the old service with the + * transformed one. + * + * **When to Use** + * + * This is useful for adapting or extending a service's behavior during the + * execution of an effect. + * + * @since 2.0.0 + * @category Context + */ +const updateService = exports.updateService = effect.updateService; +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Effect` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * + * **Example** + * + * ```ts + * import * as assert from "node:assert" + * import { Effect, pipe } from "effect" + * + * const result = pipe( + * Effect.Do, + * Effect.bind("x", () => Effect.succeed(2)), + * Effect.bind("y", () => Effect.succeed(3)), + * Effect.let("sum", ({ x, y }) => x + y) + * ) + * assert.deepStrictEqual(Effect.runSync(result), { x: 2, y: 3, sum: 5 }) + * ``` + * + * @see {@link bind} + * @see {@link bindTo} + * @see {@link let_ let} + * + * @category Do notation + * @since 2.0.0 + */ +const Do = exports.Do = effect.Do; +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Effect` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * + * **Example** + * + * ```ts + * import * as assert from "node:assert" + * import { Effect, pipe } from "effect" + * + * const result = pipe( + * Effect.Do, + * Effect.bind("x", () => Effect.succeed(2)), + * Effect.bind("y", () => Effect.succeed(3)), + * Effect.let("sum", ({ x, y }) => x + y) + * ) + * assert.deepStrictEqual(Effect.runSync(result), { x: 2, y: 3, sum: 5 }) + * ``` + * + * @see {@link Do} + * @see {@link bindTo} + * @see {@link let_ let} + * + * @category Do notation + * @since 2.0.0 + */ +const bind = exports.bind = effect.bind; +/** + * `bindAll` combines `all` with `bind`. It is useful + * when you want to concurrently run multiple effects and then combine their + * results in a Do notation pipeline. + * + * **Example** + * + * ```ts + * import * as assert from "node:assert" + * import { Effect, Either, pipe } from "effect" + * + * const result = pipe( + * Effect.Do, + * Effect.bind("x", () => Effect.succeed(2)), + * Effect.bindAll(({ x }) => ({ + * a: Effect.succeed(x), + * b: Effect.fail("oops"), + * }), { concurrency: 2, mode: "either" }) + * ) + * assert.deepStrictEqual(Effect.runSync(result), { x: 2, a: Either.right(2), b: Either.left("oops") }) + * ``` + * + * @category Do notation + * @since 3.7.0 + */ +const bindAll = exports.bindAll = circular.bindAll; +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Effect` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * + * **Example** + * + * ```ts + * import * as assert from "node:assert" + * import { Effect, pipe } from "effect" + * + * const result = pipe( + * Effect.Do, + * Effect.bind("x", () => Effect.succeed(2)), + * Effect.bind("y", () => Effect.succeed(3)), + * Effect.let("sum", ({ x, y }) => x + y) + * ) + * assert.deepStrictEqual(Effect.runSync(result), { x: 2, y: 3, sum: 5 }) + * ``` + * + * @see {@link Do} + * @see {@link bind} + * @see {@link let_ let} + * + * @category Do notation + * @since 2.0.0 + */ +const bindTo = exports.bindTo = effect.bindTo; +const let_ = exports.let = effect.let_; +/** + * Encapsulates the result of an effect in an `Option`. + * + * **Details** + * + * This function wraps the outcome of an effect in an `Option` type. If the + * original effect succeeds, the success value is wrapped in `Option.some`. If + * the effect fails, the failure is converted to `Option.none`. + * + * This is particularly useful for scenarios where you want to represent the + * absence of a value explicitly, without causing the resulting effect to fail. + * The resulting effect has an error type of `never`, meaning it cannot fail + * directly. However, unrecoverable errors, also referred to as defects, are + * not captured and will still result in failure. + * + * **Example** (Using Effect.option to Handle Errors) + * + * ```ts + * import { Effect } from "effect" + * + * const maybe1 = Effect.option(Effect.succeed(1)) + * + * Effect.runPromiseExit(maybe1).then(console.log) + * // Output: + * // { + * // _id: 'Exit', + * // _tag: 'Success', + * // value: { _id: 'Option', _tag: 'Some', value: 1 } + * // } + * + * const maybe2 = Effect.option(Effect.fail("Uh oh!")) + * + * Effect.runPromiseExit(maybe2).then(console.log) + * // Output: + * // { + * // _id: 'Exit', + * // _tag: 'Success', + * // value: { _id: 'Option', _tag: 'None' } + * // } + * + * const maybe3 = Effect.option(Effect.die("Boom!")) + * + * Effect.runPromiseExit(maybe3).then(console.log) + * // Output: + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { _id: 'Cause', _tag: 'Die', defect: 'Boom!' } + * // } + * ``` + * + * @see {@link either} for a version that uses `Either` instead. + * @see {@link exit} for a version that encapsulates both recoverable errors and defects in an `Exit`. + * + * @since 2.0.0 + * @category Outcome Encapsulation + */ +const option = exports.option = effect.option; +/** + * Encapsulates both success and failure of an `Effect` into an `Either` type. + * + * **Details** + * + * This function converts an effect that may fail into an effect that always + * succeeds, wrapping the outcome in an `Either` type. The result will be + * `Either.Left` if the effect fails, containing the recoverable error, or + * `Either.Right` if it succeeds, containing the result. + * + * Using this function, you can handle recoverable errors explicitly without + * causing the effect to fail. This is particularly useful in scenarios where + * you want to chain effects and manage both success and failure in the same + * logical flow. + * + * It's important to note that unrecoverable errors, often referred to as + * "defects," are still thrown and not captured within the `Either` type. Only + * failures that are explicitly represented as recoverable errors in the effect + * are encapsulated. + * + * The resulting effect cannot fail directly because all recoverable failures + * are represented inside the `Either` type. + * + * **Example** + * + * ```ts + * import { Effect, Either, Random } from "effect" + * + * class HttpError { + * readonly _tag = "HttpError" + * } + * + * class ValidationError { + * readonly _tag = "ValidationError" + * } + * + * // ┌─── Effect + * // ▼ + * const program = Effect.gen(function* () { + * const n1 = yield* Random.next + * const n2 = yield* Random.next + * if (n1 < 0.5) { + * yield* Effect.fail(new HttpError()) + * } + * if (n2 < 0.5) { + * yield* Effect.fail(new ValidationError()) + * } + * return "some result" + * }) + * + * // ┌─── Effect + * // ▼ + * const recovered = Effect.gen(function* () { + * // ┌─── Either + * // ▼ + * const failureOrSuccess = yield* Effect.either(program) + * return Either.match(failureOrSuccess, { + * onLeft: (error) => `Recovering from ${error._tag}`, + * onRight: (value) => value // Do nothing in case of success + * }) + * }) + * ``` + * + * @see {@link option} for a version that uses `Option` instead. + * @see {@link exit} for a version that encapsulates both recoverable errors and defects in an `Exit`. + * + * @since 2.0.0 + * @category Outcome Encapsulation + */ +const either = exports.either = core.either; +/** + * Encapsulates both success and failure of an `Effect` using the `Exit` type. + * + * **Details** + * + * This function converts an effect into one that always succeeds, wrapping its + * outcome in the `Exit` type. The `Exit` type provides explicit handling of + * both success (`Exit.Success`) and failure (`Exit.Failure`) cases, including + * defects (unrecoverable errors). + * + * Unlike {@link either} or {@link option}, this function also encapsulates + * defects, which are typically unrecoverable and would otherwise terminate the + * effect. With the `Exit` type, defects are represented in `Exit.Failure`, + * allowing for detailed introspection and structured error handling. + * + * This makes the resulting effect robust and incapable of direct failure (its + * error type is `never`). It is particularly useful for workflows where all + * outcomes, including unexpected defects, must be managed and analyzed. + * + * **Example** + * + * ```ts + * import { Effect, Cause, Console, Exit } from "effect" + * + * // Simulating a runtime error + * const task = Effect.dieMessage("Boom!") + * + * const program = Effect.gen(function* () { + * const exit = yield* Effect.exit(task) + * if (Exit.isFailure(exit)) { + * const cause = exit.cause + * if ( + * Cause.isDieType(cause) && + * Cause.isRuntimeException(cause.defect) + * ) { + * yield* Console.log( + * `RuntimeException defect caught: ${cause.defect.message}` + * ) + * } else { + * yield* Console.log("Unknown failure caught.") + * } + * } + * }) + * + * // We get an Exit.Success because we caught all failures + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // RuntimeException defect caught: Boom! + * // { + * // _id: "Exit", + * // _tag: "Success", + * // value: undefined + * // } + * ``` + * + * @see {@link option} for a version that uses `Option` instead. + * @see {@link either} for a version that uses `Either` instead. + * + * @since 2.0.0 + * @category Outcome Encapsulation + */ +const exit = exports.exit = core.exit; +/** + * Converts an `Effect` into an operation that completes a `Deferred` with its result. + * + * **Details** + * + * The `intoDeferred` function takes an effect and a `Deferred` and ensures that the `Deferred` + * is completed based on the outcome of the effect. If the effect succeeds, the `Deferred` is + * completed with the success value. If the effect fails, the `Deferred` is completed with the + * failure. Additionally, if the effect is interrupted, the `Deferred` will also be interrupted. + * + * **Example** + * + * ```ts + * import { Deferred, Effect } from "effect" + * + * // Define an effect that succeeds + * const successEffect = Effect.succeed(42) + * + * const program = Effect.gen(function*() { + * // Create a deferred + * const deferred = yield* Deferred.make() + * + * // Complete the deferred using the successEffect + * const isCompleted = yield* Effect.intoDeferred(successEffect, deferred) + * + * // Access the value of the deferred + * const value = yield* Deferred.await(deferred) + * console.log(value) + * + * return isCompleted + * }) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // 42 + * // true + * ``` + * + * @since 2.0.0 + * @category Synchronization Utilities + */ +const intoDeferred = exports.intoDeferred = core.intoDeferred; +const if_ = exports.if = core.if_; +/** + * Filters an effect, dying with a custom defect if the predicate fails. + * + * **Details** + * + * This function applies a predicate to the result of an effect. If the + * predicate evaluates to `false`, the effect dies with a custom defect + * generated by the `orDieWith` function. + * + * **When to Use** + * + * This is useful for enforcing constraints on values and treating violations as + * fatal program errors. + * + * @since 2.0.0 + * @category Filtering + */ +const filterOrDie = exports.filterOrDie = effect.filterOrDie; +/** + * Filters an effect, dying with a custom message if the predicate fails. + * + * **Details** + * + * This function works like {@link filterOrDie} but allows you to specify a + * custom error message to describe the reason for the failure. The message is + * included in the defect when the predicate evaluates to `false`. + * + * @since 2.0.0 + * @category Filtering + */ +const filterOrDieMessage = exports.filterOrDieMessage = effect.filterOrDieMessage; +/** + * Filters an effect, providing an alternative effect if the predicate fails. + * + * **Details** + * + * This function applies a predicate to the result of an effect. If the + * predicate evaluates to `false`, it executes the `orElse` effect instead. The + * `orElse` effect can produce an alternative value or perform additional + * computations. + * + * @since 2.0.0 + * @category Filtering + */ +const filterOrElse = exports.filterOrElse = effect.filterOrElse; +/** + * Filters an effect, failing with a custom error if the predicate fails. + * + * **Details** + * + * This function applies a predicate to the result of an effect. If the + * predicate evaluates to `false`, the effect fails with a custom error + * generated by the `orFailWith` function. + * + * **When to Use** + * + * This is useful for enforcing constraints and treating violations as + * recoverable errors. + * + * **Providing a Guard** + * + * In addition to the filtering capabilities discussed earlier, you have the + * option to further refine and narrow down the type of the success channel by + * providing a [user-defined type + * guard](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates). + * Let's explore this concept through an example: + * + * **Example** + * + * ```ts + * import { Effect, pipe } from "effect" + * + * // Define a user interface + * interface User { + * readonly name: string + * } + * + * // Simulate an asynchronous authentication function + * declare const auth: () => Promise + * + * const program = pipe( + * Effect.promise(() => auth()), + * // Use filterOrFail with a custom type guard to ensure user is not null + * Effect.filterOrFail( + * (user): user is User => user !== null, // Type guard + * () => new Error("Unauthorized") + * ), + * // 'user' now has the type `User` (not `User | null`) + * Effect.andThen((user) => user.name) + * ) + * ``` + * + * @since 2.0.0 + * @category Filtering + */ +const filterOrFail = exports.filterOrFail = effect.filterOrFail; +/** + * Filters an effect with an effectful predicate, falling back to an alternative + * effect if the predicate fails. + * + * **Details** + * + * This function applies a predicate to the result of an effect. If the + * predicate evaluates to `false`, the effect falls back to the `orElse` + * effect. The `orElse` effect can produce an alternative value or perform + * additional computations. + * + * **Example** + * + * ```ts + * import { Effect, pipe } from "effect" + * + * // Define a user interface + * interface User { + * readonly name: string + * } + * + * // Simulate an asynchronous authentication function + * declare const auth: () => Promise + * + * const program = pipe( + * Effect.promise(() => auth()), + * // Use filterEffectOrElse with an effectful predicate + * Effect.filterEffectOrElse({ + * predicate: (user) => Effect.succeed(user !== null), + * orElse: (user) => Effect.fail(new Error(`Unauthorized user: ${user}`)) + * }), + * ) + * ``` + * + * @since 3.13.0 + * @category Filtering + */ +const filterEffectOrElse = exports.filterEffectOrElse = core.filterEffectOrElse; +/** + * Filters an effect with an effectful predicate, failing with a custom error if the predicate fails. + * + * **Details** + * + * This function applies a predicate to the result of an effect. If the + * predicate evaluates to `false`, the effect fails with a custom error + * generated by the `orFailWith` function. + * + * **When to Use** + * + * This is useful for enforcing constraints and treating violations as + * recoverable errors. + * + * **Example** + * + * ```ts + * import { Effect, pipe } from "effect" + * + * // Define a user interface + * interface User { + * readonly name: string + * } + * + * // Simulate an asynchronous authentication function + * declare const auth: () => Promise + * + * const program = pipe( + * Effect.promise(() => auth()), + * // Use filterEffectOrFail with an effectful predicate + * Effect.filterEffectOrFail({ + * predicate: (user) => Effect.succeed(user !== null), + * orFailWith: () => new Error("Unauthorized") + * }), + * ) + * ``` + * + * @since 3.13.0 + * @category Filtering + */ +const filterEffectOrFail = exports.filterEffectOrFail = core.filterEffectOrFail; +/** + * Executes an effect only if the condition is `false`. + * + * @see {@link unlessEffect} for a version that allows the condition to be an effect. + * @see {@link when} for a version that executes the effect when the condition is `true`. + * + * @since 2.0.0 + * @category Conditional Operators + */ +const unless = exports.unless = effect.unless; +/** + * Conditionally execute an effect based on the result of another effect. + * + * @see {@link unless} for a version that allows the condition to be a boolean. + * @see {@link whenEffect} for a version that executes the effect when the condition is `true`. + * + * @since 2.0.0 + * @category Conditional Operators + */ +const unlessEffect = exports.unlessEffect = effect.unlessEffect; +/** + * Conditionally executes an effect based on a boolean condition. + * + * **Details** + * + * This function allows you to run an effect only if a given condition evaluates + * to `true`. If the condition is `true`, the effect is executed, and its result + * is wrapped in an `Option.some`. If the condition is `false`, the effect is + * skipped, and the result is `Option.none`. + * + * **When to Use** + * + * This function is useful for scenarios where you need to dynamically decide + * whether to execute an effect based on runtime logic, while also representing + * the skipped case explicitly. + * + * **Example** (Conditional Effect Execution) + * + * ```ts + * import { Effect, Option } from "effect" + * + * const validateWeightOption = ( + * weight: number + * ): Effect.Effect> => + * // Conditionally execute the effect if the weight is non-negative + * Effect.succeed(weight).pipe(Effect.when(() => weight >= 0)) + * + * // Run with a valid weight + * Effect.runPromise(validateWeightOption(100)).then(console.log) + * // Output: + * // { + * // _id: "Option", + * // _tag: "Some", + * // value: 100 + * // } + * + * // Run with an invalid weight + * Effect.runPromise(validateWeightOption(-5)).then(console.log) + * // Output: + * // { + * // _id: "Option", + * // _tag: "None" + * // } + * ``` + * + * @see {@link whenEffect} for a version that allows the condition to be an effect. + * @see {@link unless} for a version that executes the effect when the condition is `false`. + * + * @since 2.0.0 + * @category Conditional Operators + */ +const when = exports.when = effect.when; +/** + * Conditionally executes an effect based on the result of another effect. + * + * **Details** + * + * This function allows you to run an effect only if a conditional effect + * evaluating to a boolean resolves to `true`. If the conditional effect + * evaluates to `true`, the specified effect is executed, and its result is + * wrapped in `Option.some`. If the conditional effect evaluates to `false`, the + * effect is skipped, and the result is `Option.none`. + * + * **When to Use** + * + * This function is particularly useful when the decision to execute an effect + * depends on the result of another effect, such as a random value, a + * user-provided input, or a network request result. + * + * **Example** (Using an Effect as a Condition) + * + * ```ts + * import { Effect, Random } from "effect" + * + * const randomIntOption = Random.nextInt.pipe( + * Effect.whenEffect(Random.nextBoolean) + * ) + * + * console.log(Effect.runSync(randomIntOption)) + * // Example Output: + * // { _id: 'Option', _tag: 'Some', value: 8609104974198840 } + * ``` + * + * @see {@link when} for a version that allows the condition to be a boolean. + * @see {@link unlessEffect} for a version that executes the effect when the condition is `false`. + * + * @since 2.0.0 + * @category Conditional Operators + */ +const whenEffect = exports.whenEffect = core.whenEffect; +/** + * Executes an effect conditionally based on the value of a `FiberRef` that + * satisfies a predicate. + * + * **Details** + * + * This function enables you to execute an effect only when the value of a + * specified `FiberRef` meets a certain condition defined by a predicate. If the + * value satisfies the predicate, the effect is executed, and the result is + * wrapped in an `Option.some`. If the predicate is not satisfied, the effect is + * skipped, and the result is `Option.none`. In both cases, the current value of + * the `FiberRef` is included in the result. + * + * @since 2.0.0 + * @category Conditional Operators + */ +const whenFiberRef = exports.whenFiberRef = effect.whenFiberRef; +/** + * Executes an effect conditionally based on the value of a `Ref` that satisfies + * a predicate. + * + * **Details** + * + * This function allows you to execute an effect only when the value of a + * specified `Ref` meets a condition defined by a predicate. If the value + * satisfies the predicate, the effect is executed, and the result is wrapped in + * an `Option.some`. If the predicate is not satisfied, the effect is skipped, + * and the result is `Option.none`. In both cases, the current value of the + * `Ref` is included in the result. + * + * @since 2.0.0 + * @category Conditional Operators + */ +const whenRef = exports.whenRef = effect.whenRef; +/** + * Chains effects to produce new `Effect` instances, useful for combining + * operations that depend on previous results. + * + * **Syntax** + * + * ```ts skip-type-checking + * const flatMappedEffect = pipe(myEffect, Effect.flatMap(transformation)) + * // or + * const flatMappedEffect = Effect.flatMap(myEffect, transformation) + * // or + * const flatMappedEffect = myEffect.pipe(Effect.flatMap(transformation)) + * ``` + * + * **Details** + * + * `flatMap` lets you sequence effects so that the result of one effect can be + * used in the next step. It is similar to `flatMap` used with arrays but works + * specifically with `Effect` instances, allowing you to avoid deeply nested + * effect structures. + * + * Since effects are immutable, `flatMap` always returns a new effect instead of + * changing the original one. + * + * **When to Use** + * + * Use `flatMap` when you need to chain multiple effects, ensuring that each + * step produces a new `Effect` while flattening any nested effects that may + * occur. + * + * **Example** + * + * ```ts + * import { pipe, Effect } from "effect" + * + * // Function to apply a discount safely to a transaction amount + * const applyDiscount = ( + * total: number, + * discountRate: number + * ): Effect.Effect => + * discountRate === 0 + * ? Effect.fail(new Error("Discount rate cannot be zero")) + * : Effect.succeed(total - (total * discountRate) / 100) + * + * // Simulated asynchronous task to fetch a transaction amount from database + * const fetchTransactionAmount = Effect.promise(() => Promise.resolve(100)) + * + * // Chaining the fetch and discount application using `flatMap` + * const finalAmount = pipe( + * fetchTransactionAmount, + * Effect.flatMap((amount) => applyDiscount(amount, 5)) + * ) + * + * Effect.runPromise(finalAmount).then(console.log) + * // Output: 95 + * ``` + * + * @see {@link tap} for a version that ignores the result of the effect. + * + * @since 2.0.0 + * @category Sequencing + */ +const flatMap = exports.flatMap = core.flatMap; +/** + * Chains two actions, where the second action can depend on the result of the + * first. + * + * **Syntax** + * + * ```ts skip-type-checking + * const transformedEffect = pipe(myEffect, Effect.andThen(anotherEffect)) + * // or + * const transformedEffect = Effect.andThen(myEffect, anotherEffect) + * // or + * const transformedEffect = myEffect.pipe(Effect.andThen(anotherEffect)) + * ``` + * + * **When to Use** + * + * Use `andThen` when you need to run multiple actions in sequence, with the + * second action depending on the result of the first. This is useful for + * combining effects or handling computations that must happen in order. + * + * **Details** + * + * The second action can be: + * + * - A constant value (similar to {@link as}) + * - A function returning a value (similar to {@link map}) + * - A `Promise` + * - A function returning a `Promise` + * - An `Effect` + * - A function returning an `Effect` (similar to {@link flatMap}) + * + * **Note:** `andThen` works well with both `Option` and `Either` types, + * treating them as effects. + * + * **Example** (Applying a Discount Based on Fetched Amount) + * + * ```ts + * import { pipe, Effect } from "effect" + * + * // Function to apply a discount safely to a transaction amount + * const applyDiscount = ( + * total: number, + * discountRate: number + * ): Effect.Effect => + * discountRate === 0 + * ? Effect.fail(new Error("Discount rate cannot be zero")) + * : Effect.succeed(total - (total * discountRate) / 100) + * + * // Simulated asynchronous task to fetch a transaction amount from database + * const fetchTransactionAmount = Effect.promise(() => Promise.resolve(100)) + * + * // Using Effect.map and Effect.flatMap + * const result1 = pipe( + * fetchTransactionAmount, + * Effect.map((amount) => amount * 2), + * Effect.flatMap((amount) => applyDiscount(amount, 5)) + * ) + * + * Effect.runPromise(result1).then(console.log) + * // Output: 190 + * + * // Using Effect.andThen + * const result2 = pipe( + * fetchTransactionAmount, + * Effect.andThen((amount) => amount * 2), + * Effect.andThen((amount) => applyDiscount(amount, 5)) + * ) + * + * Effect.runPromise(result2).then(console.log) + * // Output: 190 + * ``` + * + * @since 2.0.0 + * @category Sequencing + */ +const andThen = exports.andThen = core.andThen; +/** + * @since 2.0.0 + * @category Sequencing + */ +const flatten = exports.flatten = core.flatten; +/** + * Races two effects and returns the result of the first successful one. + * + * **Details** + * + * This function takes two effects and runs them concurrently. The first effect + * that successfully completes will determine the result of the race, and the + * other effect will be interrupted. + * + * If neither effect succeeds, the function will fail with a `Cause` + * containing all the errors. + * + * **When to Use** + * + * This is useful when you want to run two effects concurrently, but only care + * about the first one to succeed. It is commonly used in cases like timeouts, + * retries, or when you want to optimize for the faster response without + * worrying about the other effect. + * + * **Handling Success or Failure with Either** + * + * If you want to handle the result of whichever task completes first, whether + * it succeeds or fails, you can use the `Effect.either` function. This function + * wraps the result in an `Either` type, allowing you to see if the result + * was a success (`Right`) or a failure (`Left`). + * + * **Example** (Both Tasks Succeed) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task1 = Effect.succeed("task1").pipe( + * Effect.delay("200 millis"), + * Effect.tap(Console.log("task1 done")), + * Effect.onInterrupt(() => Console.log("task1 interrupted")) + * ) + * const task2 = Effect.succeed("task2").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Console.log("task2 done")), + * Effect.onInterrupt(() => Console.log("task2 interrupted")) + * ) + * + * const program = Effect.race(task1, task2) + * + * Effect.runFork(program) + * // Output: + * // task1 done + * // task2 interrupted + * ``` + * + * **Example** (One Task Fails, One Succeeds) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task1 = Effect.fail("task1").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Console.log("task1 done")), + * Effect.onInterrupt(() => Console.log("task1 interrupted")) + * ) + * const task2 = Effect.succeed("task2").pipe( + * Effect.delay("200 millis"), + * Effect.tap(Console.log("task2 done")), + * Effect.onInterrupt(() => Console.log("task2 interrupted")) + * ) + * + * const program = Effect.race(task1, task2) + * + * Effect.runFork(program) + * // Output: + * // task2 done + * ``` + * + * **Example** (Both Tasks Fail) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task1 = Effect.fail("task1").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Console.log("task1 done")), + * Effect.onInterrupt(() => Console.log("task1 interrupted")) + * ) + * const task2 = Effect.fail("task2").pipe( + * Effect.delay("200 millis"), + * Effect.tap(Console.log("task2 done")), + * Effect.onInterrupt(() => Console.log("task2 interrupted")) + * ) + * + * const program = Effect.race(task1, task2) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { + * // _id: 'Cause', + * // _tag: 'Parallel', + * // left: { _id: 'Cause', _tag: 'Fail', failure: 'task1' }, + * // right: { _id: 'Cause', _tag: 'Fail', failure: 'task2' } + * // } + * // } + * ``` + * + * **Example** (Handling Success or Failure with Either) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task1 = Effect.fail("task1").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Console.log("task1 done")), + * Effect.onInterrupt(() => Console.log("task1 interrupted")) + * ) + * const task2 = Effect.succeed("task2").pipe( + * Effect.delay("200 millis"), + * Effect.tap(Console.log("task2 done")), + * Effect.onInterrupt(() => Console.log("task2 interrupted")) + * ) + * + * // Run both tasks concurrently, wrapping the result + * // in Either to capture success or failure + * const program = Effect.race(Effect.either(task1), Effect.either(task2)) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // task2 interrupted + * // { _id: 'Either', _tag: 'Left', left: 'task1' } + * ``` + * + * @see {@link raceAll} for a version that handles multiple effects. + * @see {@link raceFirst} for a version that returns the result of the first effect to complete. + * + * @since 2.0.0 + * @category Racing + */ +const race = exports.race = fiberRuntime.race; +/** + * Races multiple effects and returns the first successful result. + * + * **Details** + * + * This function runs multiple effects concurrently and returns the result of + * the first one to succeed. If one effect succeeds, the others will be + * interrupted. + * + * If none of the effects succeed, the function will fail with the last error + * encountered. + * + * **When to Use** + * + * This is useful when you want to race multiple effects, but only care about + * the first one to succeed. It is commonly used in cases like timeouts, + * retries, or when you want to optimize for the faster response without + * worrying about the other effects. + * + * **Example** (All Tasks Succeed) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task1 = Effect.succeed("task1").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Console.log("task1 done")), + * Effect.onInterrupt(() => Console.log("task1 interrupted")) + * ) + * const task2 = Effect.succeed("task2").pipe( + * Effect.delay("200 millis"), + * Effect.tap(Console.log("task2 done")), + * Effect.onInterrupt(() => Console.log("task2 interrupted")) + * ) + * + * const task3 = Effect.succeed("task3").pipe( + * Effect.delay("150 millis"), + * Effect.tap(Console.log("task3 done")), + * Effect.onInterrupt(() => Console.log("task3 interrupted")) + * ) + * + * const program = Effect.raceAll([task1, task2, task3]) + * + * Effect.runFork(program) + * // Output: + * // task1 done + * // task2 interrupted + * // task3 interrupted + * ``` + * + * **Example** (One Task Fails, Two Tasks Succeed) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task1 = Effect.fail("task1").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Console.log("task1 done")), + * Effect.onInterrupt(() => Console.log("task1 interrupted")) + * ) + * const task2 = Effect.succeed("task2").pipe( + * Effect.delay("200 millis"), + * Effect.tap(Console.log("task2 done")), + * Effect.onInterrupt(() => Console.log("task2 interrupted")) + * ) + * + * const task3 = Effect.succeed("task3").pipe( + * Effect.delay("150 millis"), + * Effect.tap(Console.log("task3 done")), + * Effect.onInterrupt(() => Console.log("task3 interrupted")) + * ) + * + * const program = Effect.raceAll([task1, task2, task3]) + * + * Effect.runFork(program) + * // Output: + * // task3 done + * // task2 interrupted + * ``` + * + * **Example** (All Tasks Fail) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task1 = Effect.fail("task1").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Console.log("task1 done")), + * Effect.onInterrupt(() => Console.log("task1 interrupted")) + * ) + * const task2 = Effect.fail("task2").pipe( + * Effect.delay("200 millis"), + * Effect.tap(Console.log("task2 done")), + * Effect.onInterrupt(() => Console.log("task2 interrupted")) + * ) + * + * const task3 = Effect.fail("task3").pipe( + * Effect.delay("150 millis"), + * Effect.tap(Console.log("task3 done")), + * Effect.onInterrupt(() => Console.log("task3 interrupted")) + * ) + * + * const program = Effect.raceAll([task1, task2, task3]) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { _id: 'Cause', _tag: 'Fail', failure: 'task2' } + * // } + * ``` + * + * @see {@link race} for a version that handles only two effects. + * + * @since 2.0.0 + * @category Racing + */ +const raceAll = exports.raceAll = fiberRuntime.raceAll; +/** + * Races two effects and returns the result of the first one to complete. + * + * **Details** + * + * This function takes two effects and runs them concurrently, returning the + * result of the first one that completes, regardless of whether it succeeds or + * fails. + * + * **When to Use** + * + * This function is useful when you want to race two operations, and you want to + * proceed with whichever one finishes first, regardless of whether it succeeds + * or fails. + * + * **Disconnecting Effects** + * + * The `Effect.raceFirst` function safely interrupts the “loser” effect once the other completes, but it will not resume until the loser is cleanly terminated. + * + * If you want a quicker return, you can disconnect the interrupt signal for both effects. Instead of calling: + * + * ```ts skip-type-checking + * Effect.raceFirst(task1, task2) + * ``` + * + * You can use: + * + * ```ts skip-type-checking + * Effect.raceFirst(Effect.disconnect(task1), Effect.disconnect(task2)) + * ``` + * + * This allows both effects to complete independently while still terminating the losing effect in the background. + * + * **Example** (Both Tasks Succeed) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task1 = Effect.succeed("task1").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Console.log("task1 done")), + * Effect.onInterrupt(() => + * Console.log("task1 interrupted").pipe(Effect.delay("100 millis")) + * ) + * ) + * const task2 = Effect.succeed("task2").pipe( + * Effect.delay("200 millis"), + * Effect.tap(Console.log("task2 done")), + * Effect.onInterrupt(() => + * Console.log("task2 interrupted").pipe(Effect.delay("100 millis")) + * ) + * ) + * + * const program = Effect.raceFirst(task1, task2).pipe( + * Effect.tap(Console.log("more work...")) + * ) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // task1 done + * // task2 interrupted + * // more work... + * // { _id: 'Exit', _tag: 'Success', value: 'task1' } + * ``` + * + * **Example** (One Task Fails, One Succeeds) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task1 = Effect.fail("task1").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Console.log("task1 done")), + * Effect.onInterrupt(() => + * Console.log("task1 interrupted").pipe(Effect.delay("100 millis")) + * ) + * ) + * const task2 = Effect.succeed("task2").pipe( + * Effect.delay("200 millis"), + * Effect.tap(Console.log("task2 done")), + * Effect.onInterrupt(() => + * Console.log("task2 interrupted").pipe(Effect.delay("100 millis")) + * ) + * ) + * + * const program = Effect.raceFirst(task1, task2).pipe( + * Effect.tap(Console.log("more work...")) + * ) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // task2 interrupted + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { _id: 'Cause', _tag: 'Fail', failure: 'task1' } + * // } + * ``` + * + * **Example** (Using Effect.disconnect for Quicker Return) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task1 = Effect.succeed("task1").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Console.log("task1 done")), + * Effect.onInterrupt(() => + * Console.log("task1 interrupted").pipe(Effect.delay("100 millis")) + * ) + * ) + * const task2 = Effect.succeed("task2").pipe( + * Effect.delay("200 millis"), + * Effect.tap(Console.log("task2 done")), + * Effect.onInterrupt(() => + * Console.log("task2 interrupted").pipe(Effect.delay("100 millis")) + * ) + * ) + * + * // Race the two tasks with disconnect to allow quicker return + * const program = Effect.raceFirst( + * Effect.disconnect(task1), + * Effect.disconnect(task2) + * ).pipe(Effect.tap(Console.log("more work..."))) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // task1 done + * // more work... + * // { _id: 'Exit', _tag: 'Success', value: 'task1' } + * // task2 interrupted + * ``` + * + * @since 2.0.0 + * @category Racing + */ +const raceFirst = exports.raceFirst = circular.raceFirst; +/** + * Races two effects and calls a finisher when the first one completes. + * + * **Details** + * + * This function runs two effects concurrently and calls a specified “finisher” + * function once one of the effects completes, regardless of whether it succeeds + * or fails. + * + * The finisher functions for each effect allow you to handle the results of + * each effect as soon as they complete. + * + * The function takes two finisher callbacks, one for each effect, and allows + * you to specify how to handle the result of the race. + * + * **When to Use** + * + * This function is useful when you need to react to the completion of either + * effect without waiting for both to finish. It can be used whenever you want + * to take action based on the first available result. + * + * **Example** (Handling Results of Concurrent Tasks) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task1 = Effect.succeed("task1").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Console.log("task1 done")), + * Effect.onInterrupt(() => + * Console.log("task1 interrupted").pipe(Effect.delay("100 millis")) + * ) + * ) + * const task2 = Effect.succeed("task2").pipe( + * Effect.delay("200 millis"), + * Effect.tap(Console.log("task2 done")), + * Effect.onInterrupt(() => + * Console.log("task2 interrupted").pipe(Effect.delay("100 millis")) + * ) + * ) + * + * const program = Effect.raceWith(task1, task2, { + * onSelfDone: (exit) => Console.log(`task1 exited with ${exit}`), + * onOtherDone: (exit) => Console.log(`task2 exited with ${exit}`) + * }) + * + * Effect.runFork(program) + * // Output: + * // task1 done + * // task1 exited with { + * // "_id": "Exit", + * // "_tag": "Success", + * // "value": "task1" + * // } + * // task2 interrupted + * ``` + * + * @since 2.0.0 + * @category Racing + */ +const raceWith = exports.raceWith = fiberRuntime.raceWith; +/** + * Summarizes a effect by computing some value before and after execution, and + * then combining the values to produce a summary, together with the result of + * execution. + * + * @since 2.0.0 + * @category Sequencing + */ +const summarized = exports.summarized = effect.summarized; +/** + * Runs a side effect with the result of an effect without changing the original + * value. + * + * **Details** + * + * This function works similarly to `flatMap`, but it ignores the result of the + * function passed to it. The value from the previous effect remains available + * for the next part of the chain. Note that if the side effect fails, the + * entire chain will fail too. + * + * **When to Use** + * + * Use this function when you want to perform a side effect, like logging or + * tracking, without modifying the main value. This is useful when you need to + * observe or record an action but want the original value to be passed to the + * next step. + * + * **Example** (Logging a step in a pipeline) + * + * ```ts + * import { Console, Effect, pipe } from "effect" + * + * // Function to apply a discount safely to a transaction amount + * const applyDiscount = ( + * total: number, + * discountRate: number + * ): Effect.Effect => + * discountRate === 0 + * ? Effect.fail(new Error("Discount rate cannot be zero")) + * : Effect.succeed(total - (total * discountRate) / 100) + * + * // Simulated asynchronous task to fetch a transaction amount from database + * const fetchTransactionAmount = Effect.promise(() => Promise.resolve(100)) + * + * const finalAmount = pipe( + * fetchTransactionAmount, + * // Log the fetched transaction amount + * Effect.tap((amount) => Console.log(`Apply a discount to: ${amount}`)), + * // `amount` is still available! + * Effect.flatMap((amount) => applyDiscount(amount, 5)) + * ) + * + * Effect.runPromise(finalAmount).then(console.log) + * // Output: + * // Apply a discount to: 100 + * // 95 + * ``` + * + * @see {@link flatMap} for a version that allows you to change the value. + * + * @since 2.0.0 + * @category Sequencing + */ +const tap = exports.tap = core.tap; +/** + * Allows you to inspect both success and failure outcomes of an effect and + * perform side effects for each. + * + * **Details** + * + * This function enables you to handle both success and failure cases + * separately, without modifying the main effect's result. It is particularly + * useful for scenarios where you need to log, monitor, or perform additional + * actions depending on whether the effect succeeded or failed. + * + * When the effect succeeds, the `onSuccess` handler is executed with the + * success value. When the effect fails, the `onFailure` handler is executed + * with the failure value. Both handlers can include side effects such as + * logging or analytics, and neither modifies the original effect's output. + * + * If either the success or failure handler fails, the overall effect will also + * fail. + * + * **Example** + * + * ```ts + * import { Effect, Random, Console } from "effect" + * + * // Simulate a task that might fail + * const task = Effect.filterOrFail( + * Random.nextRange(-1, 1), + * (n) => n >= 0, + * () => "random number is negative" + * ) + * + * // Use tapBoth to log both success and failure outcomes + * const tapping = Effect.tapBoth(task, { + * onFailure: (error) => Console.log(`failure: ${error}`), + * onSuccess: (randomNumber) => + * Console.log(`random number: ${randomNumber}`) + * }) + * + * Effect.runFork(tapping) + * // Example Output: + * // failure: random number is negative + * ``` + * + * @since 2.0.0 + * @category Sequencing + */ +const tapBoth = exports.tapBoth = effect.tapBoth; +/** + * Inspect severe errors or defects (non-recoverable failures) in an effect. + * + * **Details** + * + * This function is specifically designed to handle and inspect defects, which + * are critical failures in your program, such as unexpected runtime exceptions + * or system-level errors. Unlike normal recoverable errors, defects typically + * indicate serious issues that cannot be addressed through standard error + * handling. + * + * When a defect occurs in an effect, the function you provide to this function + * will be executed, allowing you to log, monitor, or handle the defect in some + * way. Importantly, this does not alter the main result of the effect. If no + * defect occurs, the effect behaves as if this function was not used. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * // Simulate a task that fails with a recoverable error + * const task1: Effect.Effect = Effect.fail("NetworkError") + * + * // tapDefect won't log anything because NetworkError is not a defect + * const tapping1 = Effect.tapDefect(task1, (cause) => + * Console.log(`defect: ${cause}`) + * ) + * + * Effect.runFork(tapping1) + * // No Output + * + * // Simulate a severe failure in the system + * const task2: Effect.Effect = Effect.dieMessage( + * "Something went wrong" + * ) + * + * // Log the defect using tapDefect + * const tapping2 = Effect.tapDefect(task2, (cause) => + * Console.log(`defect: ${cause}`) + * ) + * + * Effect.runFork(tapping2) + * // Output: + * // defect: RuntimeException: Something went wrong + * // ... stack trace ... + * ``` + * + * @since 2.0.0 + * @category Sequencing + */ +const tapDefect = exports.tapDefect = effect.tapDefect; +/** + * Execute a side effect on failure without modifying the original effect. + * + * **Details** + * + * This function allows you to inspect and react to the failure of an effect by + * executing an additional effect. The failure value is passed to the provided + * function, enabling you to log it, track it, or perform any other operation. + * Importantly, the original failure remains intact and is re-propagated, so the + * effect's behavior is unchanged. + * + * The side effect you provide is only executed when the effect fails. If the + * effect succeeds, the function is ignored, and the success value is propagated + * as usual. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * // Simulate a task that fails with an error + * const task: Effect.Effect = Effect.fail("NetworkError") + * + * // Use tapError to log the error message when the task fails + * const tapping = Effect.tapError(task, (error) => + * Console.log(`expected error: ${error}`) + * ) + * + * Effect.runFork(tapping) + * // Output: + * // expected error: NetworkError + * ``` + * + * @since 2.0.0 + * @category Sequencing + */ +const tapError = exports.tapError = effect.tapError; +/** + * Inspect errors matching a specific tag without altering the original effect. + * + * **Details** + * + * This function allows you to inspect and handle specific error types based on + * their `_tag` property. It is particularly useful in applications where errors + * are modeled with tagged types (e.g., union types with discriminating tags). + * By targeting errors with a specific `_tag`, you can log or perform actions on + * them while leaving the error channel and overall effect unchanged. + * + * If the error doesn't match the specified tag, this function does nothing, and + * the effect proceeds as usual. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * class NetworkError { + * readonly _tag = "NetworkError" + * constructor(readonly statusCode: number) {} + * } + * + * class ValidationError { + * readonly _tag = "ValidationError" + * constructor(readonly field: string) {} + * } + * + * // Create a task that fails with a NetworkError + * const task: Effect.Effect = + * Effect.fail(new NetworkError(504)) + * + * // Use tapErrorTag to inspect only NetworkError types and log the status code + * const tapping = Effect.tapErrorTag(task, "NetworkError", (error) => + * Console.log(`expected error: ${error.statusCode}`) + * ) + * + * Effect.runFork(tapping) + * // Output: + * // expected error: 504 + * ``` + * + * @since 2.0.0 + * @category Sequencing + */ +const tapErrorTag = exports.tapErrorTag = effect.tapErrorTag; +/** + * Inspect the complete cause of an error, including failures and defects. + * + * **Details** + * + * This function provides access to the full cause of an error, including both + * recoverable failures and irrecoverable defects. It allows you to handle, log, + * or monitor specific error causes without modifying the result of the effect. + * The full `Cause` object encapsulates the error and its contextual + * information, making it useful for debugging and understanding failure + * scenarios in complex workflows. + * + * The effect itself is not modified, and any errors or defects remain in the + * error channel of the original effect. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * // Create a task that fails with a NetworkError + * const task1: Effect.Effect = Effect.fail("NetworkError") + * + * const tapping1 = Effect.tapErrorCause(task1, (cause) => + * Console.log(`error cause: ${cause}`) + * ) + * + * Effect.runFork(tapping1) + * // Output: + * // error cause: Error: NetworkError + * + * // Simulate a severe failure in the system + * const task2: Effect.Effect = Effect.dieMessage( + * "Something went wrong" + * ) + * + * const tapping2 = Effect.tapErrorCause(task2, (cause) => + * Console.log(`error cause: ${cause}`) + * ) + * + * Effect.runFork(tapping2) + * // Output: + * // error cause: RuntimeException: Something went wrong + * // ... stack trace ... + * ``` + * + * @since 2.0.0 + * @category Sequencing + */ +const tapErrorCause = exports.tapErrorCause = effect.tapErrorCause; +/** + * Repeats an effect indefinitely until an error occurs. + * + * **Details** + * + * This function executes an effect repeatedly in an infinite loop. Each + * iteration is executed sequentially, and the loop continues until the first + * error occurs. If the effect succeeds, it starts over from the beginning. If + * the effect fails, the error is propagated, and the loop stops. + * + * Be cautious when using this function, as it will run indefinitely unless an + * error interrupts it. This makes it suitable for long-running processes or + * continuous polling tasks, but you should ensure proper error handling or + * combine it with other operators like `timeout` or `schedule` to prevent + * unintentional infinite loops. + * + * @since 2.0.0 + * @category Repetition / Recursion + */ +const forever = exports.forever = effect.forever; +/** + * Repeatedly updates a state through an effectful operation until a condition + * is no longer met. + * + * **Details** + * + * This function provides a way to implement effectful loops, similar to a + * `while` loop in JavaScript. + * + * ```ts skip-type-checking + * let result = initial + * + * while (options.while(result)) { + * result = options.body(result) + * } + * + * return result + * ``` + * + * It starts with an initial state, checks a + * condition (`while`), and executes a body operation to update the state if the + * condition evaluates to `true`. The process repeats until the condition + * returns `false`. + * + * The state is passed between iterations, allowing the body operation to modify + * it dynamically. The final state after the loop ends is returned as the result + * of the effect. + * + * **When to Use** + * + * This is particularly useful for scenarios where looping logic involves + * asynchronous or side-effectful operations, such as polling or iterative + * computations that depend on external factors. + * + * **Example** (Effectful Iteration) + * + * ```ts + * import { Effect } from "effect" + * + * const result = Effect.iterate( + * // Initial result + * 1, + * { + * // Condition to continue iterating + * while: (result) => result <= 5, + * // Operation to change the result + * body: (result) => Effect.succeed(result + 1) + * } + * ) + * + * Effect.runPromise(result).then(console.log) + * // Output: 6 + * ``` + * + * @since 2.0.0 + * @category Looping + */ +const iterate = exports.iterate = effect.iterate; +/** + * Repeatedly executes a loop with a state, collecting results or discarding + * them based on configuration. + * + * **Details** + * + * This function performs an effectful loop, starting with an initial state and + * iterating as long as the `while` condition evaluates to `true`, similar to a + * `while` loop in JavaScript. + * + * ```ts skip-type-checking + * let state = initial + * const result = [] + * + * while (options.while(state)) { + * result.push(options.body(state)) // Perform the effectful operation + * state = options.step(state) // Update the state + * } + * + * return result + * ``` + * + * During each iteration, the `step` function updates the state, and the `body` + * effect is executed. + * + * The results of the body effect can be collected in an array or discarded + * based on the `discard` option. + * + * **Discarding Intermediate Results** + * + * - If `discard` is `false` or not provided, the intermediate results are + * collected into an array and returned as the final result. + * - If `discard` is `true`, the intermediate results are ignored, and the + * effect returns `void`. + * + * **When to Use** + * + * This is useful for implementing loops where you need to perform effectful + * computations repeatedly, such as processing items in a list, generating + * values, or performing iterative updates. + * + * **Example** (Looping with Collected Results) + * + * ```ts + * import { Effect } from "effect" + * + * // A loop that runs 5 times, collecting each iteration's result + * const result = Effect.loop( + * // Initial state + * 1, + * { + * // Condition to continue looping + * while: (state) => state <= 5, + * // State update function + * step: (state) => state + 1, + * // Effect to be performed on each iteration + * body: (state) => Effect.succeed(state) + * } + * ) + * + * Effect.runPromise(result).then(console.log) + * // Output: [1, 2, 3, 4, 5] + * ``` + * + * **Example** (Loop with Discarded Results) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const result = Effect.loop( + * // Initial state + * 1, + * { + * // Condition to continue looping + * while: (state) => state <= 5, + * // State update function + * step: (state) => state + 1, + * // Effect to be performed on each iteration + * body: (state) => Console.log(`Currently at state ${state}`), + * // Discard intermediate results + * discard: true + * } + * ) + * + * Effect.runPromise(result).then(console.log) + * // Output: + * // Currently at state 1 + * // Currently at state 2 + * // Currently at state 3 + * // Currently at state 4 + * // Currently at state 5 + * // undefined + * ``` + * + * @since 2.0.0 + * @category Looping + */ +const loop = exports.loop = effect.loop; +/** + * Repeats an effect based on a specified schedule or until the first failure. + * + * **Details** + * + * This function executes an effect repeatedly according to the given schedule. + * Each repetition occurs after the initial execution of the effect, meaning + * that the schedule determines the number of additional repetitions. For + * example, using `Schedule.once` will result in the effect being executed twice + * (once initially and once as part of the repetition). + * + * If the effect succeeds, it is repeated according to the schedule. If it + * fails, the repetition stops immediately, and the failure is returned. + * + * The schedule can also specify delays between repetitions, making it useful + * for tasks like retrying operations with backoff, periodic execution, or + * performing a series of dependent actions. + * + * You can combine schedules for more advanced repetition logic, such as adding + * delays, limiting recursions, or dynamically adjusting based on the outcome of + * each execution. + * + * **Example** (Success Example) + * + * ```ts + * import { Effect, Schedule, Console } from "effect" + * + * const action = Console.log("success") + * const policy = Schedule.addDelay(Schedule.recurs(2), () => "100 millis") + * const program = Effect.repeat(action, policy) + * + * Effect.runPromise(program).then((n) => console.log(`repetitions: ${n}`)) + * ``` + * + * **Example** (Failure Example) + * + * ```ts + * import { Effect, Schedule } from "effect" + * + * let count = 0 + * + * // Define an async effect that simulates an action with possible failures + * const action = Effect.async((resume) => { + * if (count > 1) { + * console.log("failure") + * resume(Effect.fail("Uh oh!")) + * } else { + * count++ + * console.log("success") + * resume(Effect.succeed("yay!")) + * } + * }) + * + * const policy = Schedule.addDelay(Schedule.recurs(2), () => "100 millis") + * const program = Effect.repeat(action, policy) + * + * Effect.runPromiseExit(program).then(console.log) + * ``` + * + * @since 2.0.0 + * @category Repetition / Recursion + */ +const repeat = exports.repeat = schedule_.repeat_combined; +/** + * Repeats an effect a specified number of times or until the first failure. + * + * **Details** + * + * This function executes an effect initially and then repeats it the specified + * number of times, as long as it succeeds. For example, calling + * `repeatN(action, 2)` will execute `action` once initially and then repeat it + * two additional times if there are no failures. + * + * If the effect fails during any repetition, the failure is returned, and no + * further repetitions are attempted. + * + * **When to Use** + * + * This function is useful for tasks that need to be retried a fixed number of + * times or for performing repeated actions without requiring a schedule. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * const action = Console.log("success") + * const program = Effect.repeatN(action, 2) + * + * Effect.runPromise(program) + * ``` + * + * @since 2.0.0 + * @category Repetition / Recursion + */ +const repeatN = exports.repeatN = effect.repeatN; +/** + * Repeats an effect with a schedule, handling failures using a custom handler. + * + * **Details** + * + * This function allows you to execute an effect repeatedly based on a specified + * schedule. If the effect fails at any point, a custom failure handler is + * invoked. The handler is provided with both the failure value and the output + * of the schedule at the time of failure. This enables advanced error recovery + * or alternative fallback logic while maintaining flexibility in how + * repetitions are handled. + * + * For example, using a schedule with `recurs(2)` will allow for two additional + * repetitions after the initial execution, provided the effect succeeds. If a + * failure occurs during any iteration, the failure handler is invoked to handle + * the situation. + * + * **Example** + * + * ```ts + * import { Effect, Schedule } from "effect" + * + * let count = 0 + * + * // Define an async effect that simulates an action with possible failures + * const action = Effect.async((resume) => { + * if (count > 1) { + * console.log("failure") + * resume(Effect.fail("Uh oh!")) + * } else { + * count++ + * console.log("success") + * resume(Effect.succeed("yay!")) + * } + * }) + * + * const policy = Schedule.addDelay( + * Schedule.recurs(2), // Repeat for a maximum of 2 times + * () => "100 millis" // Add a delay of 100 milliseconds between repetitions + * ) + * + * const program = Effect.repeatOrElse(action, policy, () => + * Effect.sync(() => { + * console.log("orElse") + * return count - 1 + * }) + * ) + * + * Effect.runPromise(program).then((n) => console.log(`repetitions: ${n}`)) + * ``` + * + * @since 2.0.0 + * @category Repetition / Recursion + */ +const repeatOrElse = exports.repeatOrElse = schedule_.repeatOrElse_Effect; +/** + * Repeats an effect based on a specified schedule. + * + * **Details** + * + * This function allows you to execute an effect repeatedly according to a given + * schedule. The schedule determines the timing and number of repetitions. Each + * repetition can also depend on the decision of the schedule, providing + * flexibility for complex workflows. This function does not modify the effect's + * success or failure; it only controls its repetition. + * + * For example, you can use a schedule that recurs a specific number of times, + * adds delays between repetitions, or customizes repetition behavior based on + * external inputs. The effect runs initially and is repeated according to the + * schedule. + * + * @see {@link scheduleFrom} for a variant that allows the schedule's decision + * to depend on the result of this effect. + * + * @since 2.0.0 + * @category Repetition / Recursion + */ +const schedule = exports.schedule = schedule_.schedule_Effect; +/** + * Runs an effect repeatedly on a new fiber according to a given schedule. + * + * **Details** + * + * This function starts the provided effect on a new fiber and runs it + * repeatedly based on the specified schedule. The repetitions are managed by + * the schedule's rules, which define the timing and number of iterations. The + * fiber is attached to the current scope, meaning it is automatically managed + * and cleaned up when the scope is closed. + * + * The function returns a `RuntimeFiber` that allows you to monitor or interact + * with the running fiber. + * + * **When to Use** + * + * This is particularly useful for concurrent execution of scheduled tasks or + * when you want to continue processing without waiting for the repetitions to + * complete. + * + * @since 2.0.0 + * @category Repetition / Recursion + */ +const scheduleForked = exports.scheduleForked = schedule_.scheduleForked; +/** + * Runs an effect repeatedly according to a schedule, starting from a specified + * input value. + * + * **Details** + * + * This function allows you to repeatedly execute an effect based on a schedule. + * The schedule starts with the given `initial` input value, which is passed to + * the first execution. Subsequent executions of the effect are controlled by + * the schedule's rules, using the output of the previous iteration as the input + * for the next one. + * + * The returned effect will complete when the schedule ends or the effect fails, + * propagating the error. + * + * @since 2.0.0 + * @category Repetition / Recursion + */ +const scheduleFrom = exports.scheduleFrom = schedule_.scheduleFrom_Effect; +/** + * @since 2.0.0 + * @category Repetition / Recursion + */ +const whileLoop = exports.whileLoop = core.whileLoop; +/** + * Returns a collection of all `FiberRef` values for the fiber running this + * effect. + * + * @since 2.0.0 + * @category Fiber Refs + */ +const getFiberRefs = exports.getFiberRefs = effect.fiberRefs; +/** + * Inherits values from all `FiberRef` instances into current fiber. + * + * @since 2.0.0 + * @category Fiber Refs + */ +const inheritFiberRefs = exports.inheritFiberRefs = effect.inheritFiberRefs; +/** + * @since 2.0.0 + * @category Fiber Refs + */ +const locally = exports.locally = core.fiberRefLocally; +/** + * @since 2.0.0 + * @category Fiber Refs + */ +const locallyWith = exports.locallyWith = core.fiberRefLocallyWith; +/** + * @since 2.0.0 + * @category Fiber Refs + */ +const locallyScoped = exports.locallyScoped = fiberRuntime.fiberRefLocallyScoped; +/** + * @since 2.0.0 + * @category Fiber Refs + */ +const locallyScopedWith = exports.locallyScopedWith = fiberRuntime.fiberRefLocallyScopedWith; +/** + * Applies the specified changes to the `FiberRef` values for the fiber + * running this workflow. + * + * @since 2.0.0 + * @category Fiber Refs + */ +const patchFiberRefs = exports.patchFiberRefs = effect.patchFiberRefs; +/** + * Sets the `FiberRef` values for the fiber running this effect to the values + * in the specified collection of `FiberRef` values. + * + * @since 2.0.0 + * @category Fiber Refs + */ +const setFiberRefs = exports.setFiberRefs = effect.setFiberRefs; +/** + * Updates the `FiberRef` values for the fiber running this effect using the + * specified function. + * + * @since 2.0.0 + * @category Fiber Refs + */ +const updateFiberRefs = exports.updateFiberRefs = effect.updateFiberRefs; +/** + * Checks if an effect has failed. + * + * **Details** + * + * This function evaluates whether an effect has resulted in a failure. It + * returns a boolean value wrapped in an effect, with `true` indicating the + * effect failed and `false` otherwise. + * + * The resulting effect cannot fail (`never` in the error channel) but retains + * the context of the original effect. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const failure = Effect.fail("Uh oh!") + * + * console.log(Effect.runSync(Effect.isFailure(failure))) + * // Output: true + * + * const defect = Effect.dieMessage("BOOM!") + * + * Effect.runSync(Effect.isFailure(defect)) + * // throws: BOOM! + * ``` + * + * @since 2.0.0 + * @category Condition Checking + */ +const isFailure = exports.isFailure = effect.isFailure; +/** + * Checks if an effect has succeeded. + * + * **Details** + * + * This function evaluates whether an effect has resulted in a success. It + * returns a boolean value wrapped in an effect, with `true` indicating the + * effect succeeded and `false` otherwise. + * + * The resulting effect cannot fail (`never` in the error channel) but retains + * the context of the original effect. + * + * @since 2.0.0 + * @category Condition Checking + */ +const isSuccess = exports.isSuccess = effect.isSuccess; +/** + * Handles both success and failure cases of an effect without performing side + * effects. + * + * **Details** + * + * `match` lets you define custom handlers for both success and failure + * scenarios. You provide separate functions to handle each case, allowing you + * to process the result if the effect succeeds, or handle the error if the + * effect fails. + * + * **When to Use** + * + * This is useful for structuring your code to respond differently to success or + * failure without triggering side effects. + * + * **Example** (Handling Both Success and Failure Cases) + * + * ```ts + * import { Effect } from "effect" + * + * const success: Effect.Effect = Effect.succeed(42) + * + * const program1 = Effect.match(success, { + * onFailure: (error) => `failure: ${error.message}`, + * onSuccess: (value) => `success: ${value}` + * }) + * + * // Run and log the result of the successful effect + * Effect.runPromise(program1).then(console.log) + * // Output: "success: 42" + * + * const failure: Effect.Effect = Effect.fail( + * new Error("Uh oh!") + * ) + * + * const program2 = Effect.match(failure, { + * onFailure: (error) => `failure: ${error.message}`, + * onSuccess: (value) => `success: ${value}` + * }) + * + * // Run and log the result of the failed effect + * Effect.runPromise(program2).then(console.log) + * // Output: "failure: Uh oh!" + * ``` + * + * @see {@link matchEffect} if you need to perform side effects in the handlers. + * + * @since 2.0.0 + * @category Matching + */ +const match = exports.match = effect.match; +/** + * Handles failures by matching the cause of failure. + * + * **Details** + * + * The `matchCause` function allows you to handle failures with access to the + * full cause of the failure within a fiber. + * + * **When to Use** + * + * This is useful for differentiating between different types of errors, such as + * regular failures, defects, or interruptions. You can provide specific + * handling logic for each failure type based on the cause. + * + * **Example** (Handling Different Failure Causes) + * + * ```ts + * import { Effect } from "effect" + * + * const task: Effect.Effect = Effect.die("Uh oh!") + * + * const program = Effect.matchCause(task, { + * onFailure: (cause) => { + * switch (cause._tag) { + * case "Fail": + * // Handle standard failure + * return `Fail: ${cause.error.message}` + * case "Die": + * // Handle defects (unexpected errors) + * return `Die: ${cause.defect}` + * case "Interrupt": + * // Handle interruption + * return `${cause.fiberId} interrupted!` + * } + * // Fallback for other causes + * return "failed due to other causes" + * }, + * onSuccess: (value) => + * // task completes successfully + * `succeeded with ${value} value` + * }) + * + * Effect.runPromise(program).then(console.log) + * // Output: "Die: Uh oh!" + * ``` + * + * @see {@link matchCauseEffect} if you need to perform side effects in the + * handlers. + * @see {@link match} if you don't need to handle the cause of the failure. + * + * @since 2.0.0 + * @category Matching + */ +const matchCause = exports.matchCause = core.matchCause; +/** + * Handles failures with access to the cause and allows performing side effects. + * + * **Details** + * + * The `matchCauseEffect` function works similarly to {@link matchCause}, but it + * also allows you to perform additional side effects based on the failure + * cause. This function provides access to the complete cause of the failure, + * making it possible to differentiate between various failure types, and allows + * you to respond accordingly while performing side effects (like logging or + * other operations). + * + * **Example** (Handling Different Failure Causes with Side Effects) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task: Effect.Effect = Effect.die("Uh oh!") + * + * const program = Effect.matchCauseEffect(task, { + * onFailure: (cause) => { + * switch (cause._tag) { + * case "Fail": + * // Handle standard failure with a logged message + * return Console.log(`Fail: ${cause.error.message}`) + * case "Die": + * // Handle defects (unexpected errors) by logging the defect + * return Console.log(`Die: ${cause.defect}`) + * case "Interrupt": + * // Handle interruption and log the fiberId that was interrupted + * return Console.log(`${cause.fiberId} interrupted!`) + * } + * // Fallback for other causes + * return Console.log("failed due to other causes") + * }, + * onSuccess: (value) => + * // Log success if the task completes successfully + * Console.log(`succeeded with ${value} value`) + * }) + * + * Effect.runPromise(program) + * // Output: "Die: Uh oh!" + * ``` + * + * @see {@link matchCause} if you don't need side effects and only want to handle the result or failure. + * @see {@link matchEffect} if you don't need to handle the cause of the failure. + * + * @since 2.0.0 + * @category Matching + */ +const matchCauseEffect = exports.matchCauseEffect = core.matchCauseEffect; +/** + * Handles both success and failure cases of an effect, allowing for additional + * side effects. + * + * **Details** + * + * The `matchEffect` function is similar to {@link match}, but it enables you to + * perform side effects in the handlers for both success and failure outcomes. + * + * **When to Use** + * + * This is useful when you need to execute additional actions, like logging or + * notifying users, based on whether an effect succeeds or fails. + * + * **Example** (Handling Both Success and Failure Cases with Side Effects) + * + * ```ts + * import { Effect } from "effect" + * + * const success: Effect.Effect = Effect.succeed(42) + * const failure: Effect.Effect = Effect.fail( + * new Error("Uh oh!") + * ) + * + * const program1 = Effect.matchEffect(success, { + * onFailure: (error) => + * Effect.succeed(`failure: ${error.message}`).pipe( + * Effect.tap(Effect.log) + * ), + * onSuccess: (value) => + * Effect.succeed(`success: ${value}`).pipe(Effect.tap(Effect.log)) + * }) + * + * console.log(Effect.runSync(program1)) + * // Output: + * // timestamp=... level=INFO fiber=#0 message="success: 42" + * // success: 42 + * + * const program2 = Effect.matchEffect(failure, { + * onFailure: (error) => + * Effect.succeed(`failure: ${error.message}`).pipe( + * Effect.tap(Effect.log) + * ), + * onSuccess: (value) => + * Effect.succeed(`success: ${value}`).pipe(Effect.tap(Effect.log)) + * }) + * + * console.log(Effect.runSync(program2)) + * // Output: + * // timestamp=... level=INFO fiber=#1 message="failure: Uh oh!" + * // failure: Uh oh! + * ``` + * + * @see {@link match} if you don't need side effects and only want to handle the + * result or failure. + * + * @since 2.0.0 + * @category Matching + */ +const matchEffect = exports.matchEffect = core.matchEffect; +/** + * Logs one or more messages or error causes at the current log level. + * + * **Details** + * + * This function provides a simple way to log messages or error causes during + * the execution of your effects. By default, logs are recorded at the `INFO` + * level, but this can be adjusted using other logging utilities + * (`Logger.withMinimumLogLevel`). Multiple items, including `Cause` instances, + * can be logged in a single call. When logging `Cause` instances, detailed + * error information is included in the log output. + * + * The log output includes useful metadata like the current timestamp, log + * level, and fiber ID, making it suitable for debugging and tracking purposes. + * This function does not interrupt or alter the effect's execution flow. + * + * **Example** + * + * ```ts + * import { Cause, Effect } from "effect" + * + * const program = Effect.log( + * "message1", + * "message2", + * Cause.die("Oh no!"), + * Cause.die("Oh uh!") + * ) + * + * Effect.runFork(program) + * // Output: + * // timestamp=... level=INFO fiber=#0 message=message1 message=message2 cause="Error: Oh no! + * // Error: Oh uh!" + * ``` + * + * @since 2.0.0 + * @category Logging + */ +const log = exports.log = effect.log; +/** + * Logs messages or error causes at a specified log level. + * + * **Details** + * + * This function allows you to log one or more messages or error causes while + * specifying the desired log level (e.g., DEBUG, INFO, ERROR). It provides + * flexibility in categorizing logs based on their importance or severity, + * making it easier to filter logs during debugging or production monitoring. + * + * **Example** + * + * ```ts + * import { Cause, Effect, LogLevel } from "effect" + * + * const program = Effect.logWithLevel( + * LogLevel.Error, + * "Critical error encountered", + * Cause.die("System failure!") + * ) + * + * Effect.runFork(program) + * // Output: + * // timestamp=... level=ERROR fiber=#0 message=Critical error encountered cause="Error: System failure!" + * ``` + * + * @since 2.0.0 + * @category Logging + */ +const logWithLevel = (level, ...message) => effect.logWithLevel(level)(...message); +/** + * Logs messages at the TRACE log level. + * + * **Details** + * + * This function logs the specified messages at the TRACE level. TRACE logs are + * typically used for very detailed diagnostic information. These messages are + * not displayed by default. To view them, you must adjust the logging + * configuration by setting the minimum log level to `LogLevel.Trace` using + * `Logger.withMinimumLogLevel`. + * + * **Example** + * + * ```ts + * import { Effect, Logger, LogLevel } from "effect" + * + * const program = Effect.logTrace("message1").pipe(Logger.withMinimumLogLevel(LogLevel.Trace)) + * + * Effect.runFork(program) + * // timestamp=... level=TRACE fiber=#0 message=message1 + * ``` + * + * @since 2.0.0 + * @category Logging + */ +exports.logWithLevel = logWithLevel; +const logTrace = exports.logTrace = effect.logTrace; +/** + * Logs messages at the DEBUG log level. + * + * **Details** + * + * This function logs messages at the DEBUG level, which is typically used for + * diagnosing application behavior during development. DEBUG messages provide + * less detailed information than TRACE logs but are still not shown by default. + * To view these logs, adjust the log level using `Logger.withMinimumLogLevel`. + * + * **Example** + * + * ```ts + * import { Effect, Logger, LogLevel } from "effect" + * + * const program = Effect.logDebug("message1").pipe(Logger.withMinimumLogLevel(LogLevel.Debug)) + * + * Effect.runFork(program) + * // timestamp=... level=DEBUG fiber=#0 message=message1 + * ``` + * + * @since 2.0.0 + * @category Logging + */ +const logDebug = exports.logDebug = effect.logDebug; +/** + * Logs messages at the INFO log level. + * + * **Details** + * + * This function logs messages at the INFO level, suitable for general + * application events or operational messages. INFO logs are shown by default + * and are commonly used for highlighting normal, non-error operations. + * + * @since 2.0.0 + * @category Logging + */ +const logInfo = exports.logInfo = effect.logInfo; +/** + * Logs messages at the WARNING log level. + * + * **Details** + * + * This function logs messages at the WARNING level, suitable for highlighting + * potential issues that are not errors but may require attention. These + * messages indicate that something unexpected occurred or might lead to errors + * in the future. + * + * @since 2.0.0 + * @category Logging + */ +const logWarning = exports.logWarning = effect.logWarning; +/** + * Logs messages at the ERROR log level. + * + * **Details** + * + * This function logs messages at the ERROR level, suitable for reporting + * application errors or failures. These logs are typically used for unexpected + * issues that need immediate attention. + * + * @since 2.0.0 + * @category Logging + */ +const logError = exports.logError = effect.logError; +/** + * Logs messages at the FATAL log level. + * + * **Details** + * + * This function logs messages at the FATAL level, suitable for reporting + * critical errors that cause the application to terminate or stop functioning. + * These logs are typically used for unrecoverable errors that require immediate + * attention. + * + * @since 2.0.0 + * @category Logging + */ +const logFatal = exports.logFatal = effect.logFatal; +/** + * Adds a log span to an effect for tracking and logging its execution duration. + * + * **Details** + * + * This function wraps an effect with a log span, providing performance + * monitoring and debugging capabilities. The log span tracks the duration of + * the wrapped effect and logs it with the specified label. This is particularly + * useful when analyzing time-sensitive operations or understanding the + * execution time of specific tasks in your application. + * + * The logged output will include the label and the total time taken for the + * operation. The span information is included in the log metadata, making it + * easy to trace performance metrics in logs. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const program = Effect.gen(function*() { + * yield* Effect.sleep("1 second") + * yield* Effect.log("The job is finished!") + * }).pipe(Effect.withLogSpan("myspan")) + * + * Effect.runFork(program) + * // timestamp=... level=INFO fiber=#0 message="The job is finished!" myspan=1011ms + * ``` + * + * @since 2.0.0 + * @category Logging + */ +const withLogSpan = exports.withLogSpan = effect.withLogSpan; +/** + * Adds custom annotations to log entries generated within an effect. + * + * **Details** + * + * This function allows you to enhance log messages by appending additional + * context in the form of key-value pairs. These annotations are included in + * every log message created during the execution of the effect, making the logs + * more informative and easier to trace. + * + * The annotations can be specified as a single key-value pair or as a record of + * multiple key-value pairs. This is particularly useful for tracking + * operations, debugging, or associating specific metadata with logs for better + * observability. + * + * The annotated key-value pairs will appear alongside the log message in the + * output. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const program = Effect.gen(function*() { + * yield* Effect.log("message1") + * yield* Effect.log("message2") + * }).pipe(Effect.annotateLogs("taskId", "1234")) // Annotation as key/value pair + * + * Effect.runFork(program) + * // timestamp=... level=INFO fiber=#0 message=message1 taskId=1234 + * // timestamp=... level=INFO fiber=#0 message=message2 taskId=1234 + * ``` + * + * @see {@link annotateLogsScoped} to add log annotations with a limited scope. + * + * @since 2.0.0 + * @category Logging + */ +const annotateLogs = exports.annotateLogs = effect.annotateLogs; +/** + * Adds log annotations with a limited scope to enhance contextual logging. + * + * **Details** + * + * This function allows you to apply key-value annotations to log entries + * generated within a specific scope of your effect computations. The + * annotations are restricted to the defined `Scope`, ensuring that they are + * only applied to logs produced during that scope. Once the scope ends, the + * annotations are automatically removed, making it easier to manage + * context-specific logging without affecting other parts of your application. + * + * The annotations can be provided as a single key-value pair or as a record of + * multiple key-value pairs. This flexibility enables fine-grained control over + * the additional metadata included in logs for specific tasks or operations. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const program = Effect.gen(function*() { + * yield* Effect.log("no annotations") + * yield* Effect.annotateLogsScoped({ key: "value" }) + * yield* Effect.log("message1") // Annotation is applied to this log + * yield* Effect.log("message2") // Annotation is applied to this log + * }).pipe(Effect.scoped, Effect.andThen(Effect.log("no annotations again"))) + * + * Effect.runFork(program) + * // timestamp=... level=INFO fiber=#0 message="no annotations" + * // timestamp=... level=INFO fiber=#0 message=message1 key=value + * // timestamp=... level=INFO fiber=#0 message=message2 key=value + * // timestamp=... level=INFO fiber=#0 message="no annotations again" + * ``` + * + * @see {@link annotateLogs} to add custom annotations to log entries generated within an effect. + * + * @since 3.1.0 + * @category Logging + */ +const annotateLogsScoped = exports.annotateLogsScoped = fiberRuntime.annotateLogsScoped; +/** + * Retrieves the current log annotations for the current scope. + * + * **Details** + * + * This function provides access to the log annotations associated with the + * current scope. Log annotations are key-value pairs that provide additional + * context to log entries. They are often used to add metadata such as tags, + * identifiers, or extra debugging information to logs. + * + * By using this function, you can inspect or utilize the annotations applied to + * the current scope, making it easier to trace and debug specific sections of + * your application. + * + * @see {@link annotateLogs} to add custom annotations to log entries generated within an effect. + * @see {@link annotateLogsScoped} to add log annotations with a limited scope. + * + * @since 2.0.0 + * @category Logging + */ +const logAnnotations = exports.logAnnotations = effect.logAnnotations; +/** + * Configures whether child fibers will log unhandled errors and at what log + * level. + * + * **Details** + * + * This function allows you to control whether unhandled errors from child + * fibers are logged and to specify the log level for these errors. By default, + * unhandled errors are reported via the logger. However, using this function, + * you can choose to suppress these logs by passing `Option.none` or adjust the + * log level to a specific severity, such as `Error`, `Warning`, or `Info`. + * + * This configuration is scoped to the effect it is applied to, meaning the + * changes only apply to the child fibers created within that effect's context. + * It is especially useful when you want to reduce noise in logs or prioritize + * certain types of errors. + * + * **Example** + * + * ```ts + * import { Effect, Fiber, LogLevel, Option } from "effect" + * + * const program = Effect.gen(function*() { + * const fiber = yield* Effect.fork(Effect.fail("Unhandled error!")) + * yield* Fiber.join(fiber) + * }) + * + * Effect.runFork(program.pipe(Effect.withUnhandledErrorLogLevel(Option.some(LogLevel.Error)))) + * // Output: + * // timestamp=... level=ERROR fiber=#1 message="Fiber terminated with an unhandled error" cause="Error: Unhandled error!" + * ``` + * + * @since 2.0.0 + * @category Logging + */ +const withUnhandledErrorLogLevel = exports.withUnhandledErrorLogLevel = core.withUnhandledErrorLogLevel; +/** + * Conditionally executes an effect based on the specified log level and currently enabled log level. + * + * **Details** + * + * This function runs the provided effect only if the specified log level is + * enabled. If the log level is enabled, the effect is executed and its result + * is wrapped in `Some`. If the log level is not enabled, the effect is not + * executed and `None` is returned. + * + * This function is useful for conditionally executing logging-related effects + * or other operations that depend on the current log level configuration. + * + * **Example** + * + * ```ts + * import { Effect, Logger, LogLevel } from "effect" + * + * const program = Effect.gen(function* () { + * yield* Effect.whenLogLevel(Effect.logTrace("message1"), LogLevel.Trace); // returns `None` + * yield* Effect.whenLogLevel(Effect.logDebug("message2"), LogLevel.Debug); // returns `Some` + * }).pipe(Logger.withMinimumLogLevel(LogLevel.Debug)); + * + * Effect.runFork(program) + * // timestamp=... level=DEBUG fiber=#0 message=message2 + * ``` + * + * @see {@link FiberRef.currentMinimumLogLevel} to retrieve the current minimum log level. + * + * @since 3.13.0 + * @category Logging + */ +const whenLogLevel = exports.whenLogLevel = fiberRuntime.whenLogLevel; +/** + * Converts an effect's failure into a fiber termination, removing the error + * from the effect's type. + * + * **Details** + * + * The `orDie` function is used when you encounter errors that you do not want + * to handle or recover from. It removes the error type from the effect and + * ensures that any failure will terminate the fiber. This is useful for + * propagating failures as defects, signaling that they should not be handled + * within the effect. + * + * **When to Use* + * + * Use `orDie` when failures should be treated as unrecoverable defects and no + * error handling is required. + * + * **Example** (Propagating an Error as a Defect) + * + * ```ts + * import { Effect } from "effect" + * + * const divide = (a: number, b: number) => + * b === 0 + * ? Effect.fail(new Error("Cannot divide by zero")) + * : Effect.succeed(a / b) + * + * // ┌─── Effect + * // ▼ + * const program = Effect.orDie(divide(1, 0)) + * + * Effect.runPromise(program).catch(console.error) + * // Output: + * // (FiberFailure) Error: Cannot divide by zero + * // ...stack trace... + * ``` + * + * @see {@link orDieWith} if you need to customize the error. + * + * @since 2.0.0 + * @category Converting Failures to Defects + */ +const orDie = exports.orDie = core.orDie; +/** + * Converts an effect's failure into a fiber termination with a custom error. + * + * **Details** + * + * The `orDieWith` function behaves like {@link orDie}, but it allows you to provide a mapping + * function to transform the error before terminating the fiber. This is useful for cases where + * you want to include a more detailed or user-friendly error when the failure is propagated + * as a defect. + * + * **When to Use** + * + * Use `orDieWith` when failures should terminate the fiber as defects, and you want to customize + * the error for clarity or debugging purposes. + * + * **Example** (Customizing Defect) + * + * ```ts + * import { Effect } from "effect" + * + * const divide = (a: number, b: number) => + * b === 0 + * ? Effect.fail(new Error("Cannot divide by zero")) + * : Effect.succeed(a / b) + * + * // ┌─── Effect + * // ▼ + * const program = Effect.orDieWith( + * divide(1, 0), + * (error) => new Error(`defect: ${error.message}`) + * ) + * + * Effect.runPromise(program).catch(console.error) + * // Output: + * // (FiberFailure) Error: defect: Cannot divide by zero + * // ...stack trace... + * ``` + * + * @see {@link orDie} if you don't need to customize the error. + * + * @since 2.0.0 + * @category Converting Failures to Defects + */ +const orDieWith = exports.orDieWith = core.orDieWith; +/** + * Attempts one effect, and if it fails, falls back to another effect. + * + * **Details** + * + * This function allows you to try executing an effect, and if it fails + * (produces an error), a fallback effect is executed instead. The fallback + * effect is defined as a lazy argument, meaning it will only be evaluated if + * the first effect fails. This provides a way to recover from errors by + * specifying an alternative path of execution. + * + * The error type of the resulting effect will be that of the fallback effect, + * as the first effect's error is replaced when the fallback is executed. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const success = Effect.succeed("success") + * const failure = Effect.fail("failure") + * const fallback = Effect.succeed("fallback") + * + * // Try the success effect first, fallback is not used + * const program1 = Effect.orElse(success, () => fallback) + * console.log(Effect.runSync(program1)) + * // Output: "success" + * + * // Try the failure effect first, fallback is used + * const program2 = Effect.orElse(failure, () => fallback) + * console.log(Effect.runSync(program2)) + * // Output: "fallback" + * ``` + * + * @see {@link catchAll} if you need to access the error in the fallback effect. + * + * @since 2.0.0 + * @category Fallback + */ +const orElse = exports.orElse = core.orElse; +/** + * Replaces the failure of an effect with a custom failure value. + * + * **Details** + * + * This function allows you to handle the failure of an effect by replacing it + * with a predefined failure value. If the effect fails, the new failure value + * provided by the `evaluate` function will be returned instead of the original + * failure. If the effect succeeds, the original success value is returned + * unchanged. + * + * **When to Use** + * + * This is particularly useful when you want to standardize error handling or + * provide a consistent failure value for specific operations. It simplifies + * error management by ensuring that all failures are replaced with a controlled + * alternative. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const validate = (age: number): Effect.Effect => { + * if (age < 0) { + * return Effect.fail("NegativeAgeError") + * } else if (age < 18) { + * return Effect.fail("IllegalAgeError") + * } else { + * return Effect.succeed(age) + * } + * } + * + * const program = Effect.orElseFail(validate(-1), () => "invalid age") + * + * console.log(Effect.runSyncExit(program)) + * // Output: + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { _id: 'Cause', _tag: 'Fail', failure: 'invalid age' } + * // } + * ``` + * + * @see {@link mapError} if you need to access the error to transform it. + * + * @since 2.0.0 + * @category Fallback + */ +const orElseFail = exports.orElseFail = effect.orElseFail; +/** + * Ensures the effect always succeeds by replacing failures with a default + * success value. + * + * **Details** + * + * This function transforms an effect that may fail into one that cannot fail by + * replacing any failure with a provided success value. If the original effect + * fails, the failure is "swallowed," and the specified success value is + * returned instead. If the original effect succeeds, its value remains + * unchanged. + * + * **When to Use** + * + * This is especially useful for providing default values in case of failure, + * ensuring that an effect always completes successfully. By using this + * function, you can avoid the need for complex error handling and guarantee a + * fallback result. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const validate = (age: number): Effect.Effect => { + * if (age < 0) { + * return Effect.fail("NegativeAgeError") + * } else if (age < 18) { + * return Effect.fail("IllegalAgeError") + * } else { + * return Effect.succeed(age) + * } + * } + * + * const program = Effect.orElseSucceed(validate(-1), () => 18) + * + * console.log(Effect.runSyncExit(program)) + * // Output: + * // { _id: 'Exit', _tag: 'Success', value: 18 } + * ``` + * + * @since 2.0.0 + * @category Fallback + */ +const orElseSucceed = exports.orElseSucceed = effect.orElseSucceed; +/** + * Runs a sequence of effects and returns the result of the first successful + * one. + * + * **Details** + * + * This function allows you to execute a collection of effects in sequence, + * stopping at the first success. If an effect succeeds, its result is + * immediately returned, and no further effects in the sequence are executed. + * However, if all the effects fail, the function will return the error of the + * last effect. + * + * The execution is sequential, meaning that effects are evaluated one at a time + * in the order they are provided. This ensures predictable behavior and avoids + * unnecessary computations. + * + * If the collection of effects is empty, an `IllegalArgumentException` is + * thrown, indicating that the operation is invalid without any effects to try. + * + * **When to Use** + * + * This is particularly useful when you have multiple fallback strategies or + * alternative sources to obtain a result, such as attempting multiple APIs, + * retrieving configurations, or accessing resources in a prioritized manner. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * interface Config { + * host: string + * port: number + * apiKey: string + * } + * + * // Create a configuration object with sample values + * const makeConfig = (name: string): Config => ({ + * host: `${name}.example.com`, + * port: 8080, + * apiKey: "12345-abcde" + * }) + * + * // Simulate retrieving configuration from a remote node + * const remoteConfig = (name: string): Effect.Effect => + * Effect.gen(function* () { + * // Simulate node3 being the only one with available config + * if (name === "node3") { + * yield* Console.log(`Config for ${name} found`) + * return makeConfig(name) + * } else { + * yield* Console.log(`Unavailable config for ${name}`) + * return yield* Effect.fail(new Error(`Config not found for ${name}`)) + * } + * }) + * + * // Define the master configuration and potential fallback nodes + * const masterConfig = remoteConfig("master") + * const nodeConfigs = ["node1", "node2", "node3", "node4"].map(remoteConfig) + * + * // Attempt to find a working configuration, + * // starting with the master and then falling back to other nodes + * const config = Effect.firstSuccessOf([masterConfig, ...nodeConfigs]) + * + * // Run the effect to retrieve the configuration + * const result = Effect.runSync(config) + * + * console.log(result) + * // Output: + * // Unavailable config for master + * // Unavailable config for node1 + * // Unavailable config for node2 + * // Config for node3 found + * // { host: 'node3.example.com', port: 8080, apiKey: '12345-abcde' } + * ``` + * + * @since 2.0.0 + * @category Fallback + */ +const firstSuccessOf = exports.firstSuccessOf = effect.firstSuccessOf; +/** + * Retrieves the `Random` service from the context. + * + * @since 2.0.0 + * @category Random + */ +const random = exports.random = effect.random; +/** + * Retrieves the `Random` service from the context and uses it to run the + * specified effect. + * + * @since 2.0.0 + * @category Random + */ +const randomWith = exports.randomWith = defaultServices.randomWith; +/** + * Executes the specified effect with the specified implementation of the + * `Random` service. + * + * @since 2.0.0 + * @category Random + */ +const withRandom = exports.withRandom = defaultServices.withRandom; +/** + * Executes the specified effect with a `Random` service that cycles through + * a provided array of values. + * + * @example + * ```ts + * import { Effect, Random } from "effect" + * + * Effect.gen(function*() { + * console.log(yield* Random.next) // 0.2 + * console.log(yield* Random.next) // 0.5 + * console.log(yield* Random.next) // 0.8 + * }).pipe(Effect.withRandomFixed([0.2, 0.5, 0.8])) + * ``` + * + * @since 3.11.0 + * @category Random + */ +const withRandomFixed = exports.withRandomFixed = /*#__PURE__*/(0, _Function.dual)(2, (effect, values) => withRandom(effect, Random.fixed(values))); +/** + * Sets the implementation of the `Random` service to the specified value and + * restores it to its original value when the scope is closed. + * + * @since 2.0.0 + * @category Random + */ +const withRandomScoped = exports.withRandomScoped = fiberRuntime.withRandomScoped; +/** + * Returns an effect that accesses the runtime, which can be used to (unsafely) + * execute tasks. + * + * **When to Use** + * + * This is useful for integration with legacy code that must call back into + * Effect code. + * + * @since 2.0.0 + * @category Runtime + */ +const runtime = exports.runtime = runtime_.runtime; +/** + * Retrieves an effect that succeeds with the current runtime flags, which + * govern behavior and features of the runtime system. + * + * @since 2.0.0 + * @category Runtime + */ +const getRuntimeFlags = exports.getRuntimeFlags = core.runtimeFlags; +/** + * @since 2.0.0 + * @category Runtime + */ +const patchRuntimeFlags = exports.patchRuntimeFlags = core.updateRuntimeFlags; +/** + * @since 2.0.0 + * @category Runtime + */ +const withRuntimeFlagsPatch = exports.withRuntimeFlagsPatch = core.withRuntimeFlags; +/** + * @since 2.0.0 + * @category Runtime + */ +const withRuntimeFlagsPatchScoped = exports.withRuntimeFlagsPatchScoped = fiberRuntime.withRuntimeFlagsScoped; +/** + * Tags each metric in an effect with specific key-value pairs. + * + * **Details** + * + * This function allows you to tag all metrics in an effect with a set of + * key-value pairs or a single key-value pair. Tags help you add metadata to + * metrics, making it easier to filter and categorize them in monitoring + * systems. The provided tags will apply to all metrics generated within the + * effect's scope. + * + * @since 2.0.0 + * @category Metrics + */ +const tagMetrics = exports.tagMetrics = effect.tagMetrics; +/** + * Adds labels to metrics within an effect using `MetricLabel` objects. + * + * **Details** + * + * This function allows you to label metrics using `MetricLabel` objects. Labels + * help add structured metadata to metrics for categorization and filtering in + * monitoring systems. The provided labels will apply to all metrics within the + * effect's execution. + * + * @since 2.0.0 + * @category Metrics + */ +const labelMetrics = exports.labelMetrics = effect.labelMetrics; +/** + * Tags metrics within a scope with a specific key-value pair. + * + * **Details** + * + * This function tags all metrics within a scope with the provided key-value + * pair. Once the scope is closed, the tag is automatically removed. This is + * useful for applying temporary context-specific tags to metrics during scoped + * operations. + * + * @since 2.0.0 + * @category Metrics + */ +const tagMetricsScoped = exports.tagMetricsScoped = fiberRuntime.tagMetricsScoped; +/** + * Adds labels to metrics within a scope using `MetricLabel` objects. + * + * **Details** + * + * This function allows you to apply labels to all metrics generated within a + * specific scope using an array of `MetricLabel` objects. These labels provide + * additional metadata to metrics, which can be used for categorization, + * filtering, or monitoring purposes. The labels are scoped and will be removed + * automatically once the scope is closed, ensuring they are only applied + * temporarily within the defined context. + * + * @since 2.0.0 + * @category Metrics + */ +const labelMetricsScoped = exports.labelMetricsScoped = fiberRuntime.labelMetricsScoped; +/** + * Retrieves the metric labels associated with the current scope. + * + * @since 2.0.0 + * @category Metrics + */ +const metricLabels = exports.metricLabels = core.metricLabels; +/** + * Associates a metric with the current effect, updating it as the effect progresses. + * + * @since 2.0.0 + * @category Metrics + */ +const withMetric = exports.withMetric = effect.withMetric; +/** + * Unsafely creates a new Semaphore. + * + * @since 2.0.0 + * @category Semaphore + */ +const unsafeMakeSemaphore = exports.unsafeMakeSemaphore = circular.unsafeMakeSemaphore; +/** + * Creates a new semaphore with the specified number of permits. + * + * **Details** + * + * This function initializes a semaphore that controls concurrent access to a + * shared resource. The number of permits determines how many tasks can access + * the resource concurrently. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * // Create a semaphore with 3 permits + * const mutex = Effect.makeSemaphore(3) + * ``` + * + * @since 2.0.0 + * @category Semaphore + */ +const makeSemaphore = exports.makeSemaphore = circular.makeSemaphore; +/** + * @category Latch + * @since 3.8.0 + */ +const unsafeMakeLatch = exports.unsafeMakeLatch = circular.unsafeMakeLatch; +/** + * Creates a new `Latch`, starting in the specified state. + * + * **Details** + * + * This function initializes a `Latch` safely, ensuring proper runtime + * guarantees. By default, the latch starts in the closed state. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * const program = Effect.gen(function*() { + * // Create a latch, starting in the closed state + * const latch = yield* Effect.makeLatch(false) + * + * // Fork a fiber that logs "open sesame" when the latch is opened + * const fiber = yield* Console.log("open sesame").pipe( + * latch.whenOpen, + * Effect.fork + * ) + * + * yield* Effect.sleep("1 second") + * + * // Open the latch + * yield* latch.open + * yield* fiber.await + * }) + * + * Effect.runFork(program) + * // Output: open sesame (after 1 second) + * ``` + * + * @category Latch + * @since 3.8.0 + */ +const makeLatch = exports.makeLatch = circular.makeLatch; +/** + * Runs an effect in the background, returning a fiber that can be observed or + * interrupted. + * + * Unless you specifically need a `Promise` or synchronous operation, `runFork` + * is a good default choice. + * + * **Details** + * + * This function is the foundational way to execute an effect in the background. + * It creates a "fiber," a lightweight, cooperative thread of execution that can + * be observed (to access its result), interrupted, or joined. Fibers are useful + * for concurrent programming and allow effects to run independently of the main + * program flow. + * + * Once the effect is running in a fiber, you can monitor its progress, cancel + * it if necessary, or retrieve its result when it completes. If the effect + * fails, the fiber will propagate the failure, which you can observe and + * handle. + * + * **When to Use** + * + * Use this function when you need to run an effect in the background, + * especially if the effect is long-running or performs periodic tasks. It's + * suitable for tasks that need to run independently but might still need + * observation or management, like logging, monitoring, or scheduled tasks. + * + * This function is ideal if you don't need the result immediately or if the + * effect is part of a larger concurrent workflow. + * + * **Example** (Running an Effect in the Background) + * + * ```ts + * import { Effect, Console, Schedule, Fiber } from "effect" + * + * // ┌─── Effect + * // ▼ + * const program = Effect.repeat( + * Console.log("running..."), + * Schedule.spaced("200 millis") + * ) + * + * // ┌─── RuntimeFiber + * // ▼ + * const fiber = Effect.runFork(program) + * + * setTimeout(() => { + * Effect.runFork(Fiber.interrupt(fiber)) + * }, 500) + * ``` + * + * @since 2.0.0 + * @category Running Effects + */ +const runFork = exports.runFork = runtime_.unsafeForkEffect; +/** + * Executes an effect asynchronously and handles the result using a callback. + * + * **Details** + * + * This function runs an effect asynchronously and passes the result (`Exit`) to + * a specified callback. The callback is invoked with the outcome of the effect: + * - On success, the callback receives the successful result. + * - On failure, the callback receives the failure information. + * + * **When to Use** + * + * This function is effectful and should only be invoked at the edges of your + * program. + * + * @since 2.0.0 + * @category Running Effects + */ +const runCallback = exports.runCallback = runtime_.unsafeRunEffect; +/** + * Executes an effect and returns the result as a `Promise`. + * + * **Details** + * + * This function runs an effect and converts its result into a `Promise`. If the + * effect succeeds, the `Promise` will resolve with the successful result. If + * the effect fails, the `Promise` will reject with an error, which includes the + * failure details of the effect. + * + * The optional `options` parameter allows you to pass an `AbortSignal` for + * cancellation, enabling more fine-grained control over asynchronous tasks. + * + * **When to Use** + * + * Use this function when you need to execute an effect and work with its result + * in a promise-based system, such as when integrating with third-party + * libraries that expect `Promise` results. + * + * **Example** (Running a Successful Effect as a Promise) + * + * ```ts + * import { Effect } from "effect" + * + * Effect.runPromise(Effect.succeed(1)).then(console.log) + * // Output: 1 + * ``` + * + * **Example** (Handling a Failing Effect as a Rejected Promise) + * + * ```ts + * import { Effect } from "effect" + * + * Effect.runPromise(Effect.fail("my error")).catch(console.error) + * // Output: + * // (FiberFailure) Error: my error + * ``` + * + * @see {@link runPromiseExit} for a version that returns an `Exit` type instead + * of rejecting. + * + * @since 2.0.0 + * @category Running Effects + */ +const runPromise = exports.runPromise = runtime_.unsafeRunPromiseEffect; +/** + * Runs an effect and returns a `Promise` that resolves to an `Exit`, + * representing the outcome. + * + * **Details** + * + * This function executes an effect and resolves to an `Exit` object. The `Exit` + * type provides detailed information about the result of the effect: + * - If the effect succeeds, the `Exit` will be of type `Success` and include + * the value produced by the effect. + * - If the effect fails, the `Exit` will be of type `Failure` and contain a + * `Cause` object, detailing the failure. + * + * Using this function allows you to examine both successful results and failure + * cases in a unified way, while still leveraging `Promise` for handling the + * asynchronous behavior of the effect. + * + * **When to Use** + * + * Use this function when you need to understand the outcome of an effect, + * whether it succeeded or failed, and want to work with this result using + * `Promise` syntax. This is particularly useful when integrating with systems + * that rely on promises but need more detailed error handling than a simple + * rejection. + * + * **Example** (Handling Results as Exit) + * + * ```ts + * import { Effect } from "effect" + * + * // Execute a successful effect and get the Exit result as a Promise + * Effect.runPromiseExit(Effect.succeed(1)).then(console.log) + * // Output: + * // { + * // _id: "Exit", + * // _tag: "Success", + * // value: 1 + * // } + * + * // Execute a failing effect and get the Exit result as a Promise + * Effect.runPromiseExit(Effect.fail("my error")).then(console.log) + * // Output: + * // { + * // _id: "Exit", + * // _tag: "Failure", + * // cause: { + * // _id: "Cause", + * // _tag: "Fail", + * // failure: "my error" + * // } + * // } + * ``` + * + * @since 2.0.0 + * @category Running Effects + */ +const runPromiseExit = exports.runPromiseExit = runtime_.unsafeRunPromiseExitEffect; +/** + * Executes an effect synchronously, running it immediately and returning the + * result. + * + * **Details** + * + * This function evaluates the provided effect synchronously, returning its + * result directly. It is ideal for effects that do not fail or include + * asynchronous operations. If the effect does fail or involves async tasks, it + * will throw an error. Execution stops at the point of failure or asynchronous + * operation, making it unsuitable for effects that require asynchronous + * handling. + * + * **Important**: Attempting to run effects that involve asynchronous operations + * or failures will result in exceptions being thrown, so use this function with + * care for purely synchronous and error-free effects. + * + * **When to Use** + * + * Use this function when: + * - You are sure that the effect will not fail or involve asynchronous + * operations. + * - You need a direct, synchronous result from the effect. + * - You are working within a context where asynchronous effects are not + * allowed. + * + * Avoid using this function for effects that can fail or require asynchronous + * handling. For such cases, consider using {@link runPromise} or + * {@link runSyncExit}. + * + * **Example** (Synchronous Logging) + * + * ```ts + * import { Effect } from "effect" + * + * const program = Effect.sync(() => { + * console.log("Hello, World!") + * return 1 + * }) + * + * const result = Effect.runSync(program) + * // Output: Hello, World! + * + * console.log(result) + * // Output: 1 + * ``` + * + * **Example** (Incorrect Usage with Failing or Async Effects) + * + * ```ts + * import { Effect } from "effect" + * + * try { + * // Attempt to run an effect that fails + * Effect.runSync(Effect.fail("my error")) + * } catch (e) { + * console.error(e) + * } + * // Output: + * // (FiberFailure) Error: my error + * + * try { + * // Attempt to run an effect that involves async work + * Effect.runSync(Effect.promise(() => Promise.resolve(1))) + * } catch (e) { + * console.error(e) + * } + * // Output: + * // (FiberFailure) AsyncFiberException: Fiber #0 cannot be resolved synchronously. This is caused by using runSync on an effect that performs async work + * ``` + * + * @see {@link runSyncExit} for a version that returns an `Exit` type instead of + * throwing an error. + * + * @since 2.0.0 + * @category Running Effects + */ +const runSync = exports.runSync = runtime_.unsafeRunSyncEffect; +/** + * Runs an effect synchronously and returns the result as an `Exit` type. + * + * **Details** + * + * This function executes the provided effect synchronously and returns an `Exit` + * type that encapsulates the outcome of the effect: + * - If the effect succeeds, the result is wrapped in a `Success`. + * - If the effect fails, it returns a `Failure` containing a `Cause` that explains + * the failure. + * + * If the effect involves asynchronous operations, this function will return a `Failure` + * with a `Die` cause, indicating that it cannot resolve the effect synchronously. + * This makes the function suitable for use only with effects that are synchronous + * in nature. + * + * **When to Use** + * + * Use this function when: + * - You want to handle both success and failure outcomes in a structured way using the `Exit` type. + * - You are working with effects that are purely synchronous and do not involve asynchronous operations. + * - You need to debug or inspect failures, including their causes, in a detailed manner. + * + * Avoid using this function for effects that involve asynchronous operations, as it will fail with a `Die` cause. + * + * **Example** (Handling Results as Exit) + * + * ```ts + * import { Effect } from "effect" + * + * console.log(Effect.runSyncExit(Effect.succeed(1))) + * // Output: + * // { + * // _id: "Exit", + * // _tag: "Success", + * // value: 1 + * // } + * + * console.log(Effect.runSyncExit(Effect.fail("my error"))) + * // Output: + * // { + * // _id: "Exit", + * // _tag: "Failure", + * // cause: { + * // _id: "Cause", + * // _tag: "Fail", + * // failure: "my error" + * // } + * // } + * ``` + * + * **Example** (Asynchronous Operation Resulting in Die) + * + * ```ts + * import { Effect } from "effect" + * + * console.log(Effect.runSyncExit(Effect.promise(() => Promise.resolve(1)))) + * // Output: + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { + * // _id: 'Cause', + * // _tag: 'Die', + * // defect: [Fiber #0 cannot be resolved synchronously. This is caused by using runSync on an effect that performs async work] { + * // fiber: [FiberRuntime], + * // _tag: 'AsyncFiberException', + * // name: 'AsyncFiberException' + * // } + * // } + * // } + * ``` + * + * @since 2.0.0 + * @category Running Effects + */ +const runSyncExit = exports.runSyncExit = runtime_.unsafeRunSyncExitEffect; +/** + * Combines multiple effects and accumulates both successes and failures. + * + * **Details** + * + * This function allows you to combine multiple effects, continuing through all + * effects even if some of them fail. Unlike other functions that stop execution + * upon encountering an error, this function collects all errors into a `Cause`. + * The final result includes all successes and the accumulated failures. + * + * By default, effects are executed sequentially, but you can control + * concurrency and batching behavior using the `options` parameter. This + * provides flexibility in scenarios where you want to maximize performance or + * ensure specific ordering. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task1 = Console.log("task1").pipe(Effect.as(1)) + * const task2 = Effect.fail("Oh uh!").pipe(Effect.as(2)) + * const task3 = Console.log("task2").pipe(Effect.as(3)) + * const task4 = Effect.fail("Oh no!").pipe(Effect.as(4)) + * + * const program = task1.pipe( + * Effect.validate(task2), + * Effect.validate(task3), + * Effect.validate(task4) + * ) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // task1 + * // task2 + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { + * // _id: 'Cause', + * // _tag: 'Sequential', + * // left: { _id: 'Cause', _tag: 'Fail', failure: 'Oh uh!' }, + * // right: { _id: 'Cause', _tag: 'Fail', failure: 'Oh no!' } + * // } + * // } + * ``` + * + * @see {@link zip} for a version that stops at the first error. + * + * @since 2.0.0 + * @category Error Accumulation + */ +const validate = exports.validate = fiberRuntime.validate; +/** + * Sequentially combines two effects using a specified combiner function while + * accumulating errors. + * + * **Details** + * + * This function combines two effects, `self` and `that`, into a single effect + * by applying the provided combiner function to their results. If both effects + * succeed, the combiner function is applied to their results to produce the + * final value. If either effect fails, the failures are accumulated into a + * combined `Cause`. + * + * By default, effects are executed sequentially. However, the execution mode + * can be controlled using the `options` parameter to enable concurrency, + * batching, or customized finalizer behavior. + * + * @since 2.0.0 + * @category Error Accumulation + */ +const validateWith = exports.validateWith = fiberRuntime.validateWith; +/** + * Combines two effects into a single effect, producing a tuple of their + * results. + * + * **Details** + * + * This function combines two effects, `self` and `that`, into one. It executes + * the first effect (`self`) and then the second effect (`that`), collecting + * their results into a tuple. Both effects must succeed for the resulting + * effect to succeed. If either effect fails, the entire operation fails. + * + * By default, the effects are executed sequentially. If the `concurrent` option + * is set to `true`, the effects will run concurrently, potentially improving + * performance for independent operations. + * + * **Example** (Combining Two Effects Sequentially) + * + * ```ts + * import { Effect } from "effect" + * + * const task1 = Effect.succeed(1).pipe( + * Effect.delay("200 millis"), + * Effect.tap(Effect.log("task1 done")) + * ) + * const task2 = Effect.succeed("hello").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Effect.log("task2 done")) + * ) + * + * // Combine the two effects together + * // + * // ┌─── Effect<[number, string], never, never> + * // ▼ + * const program = Effect.zip(task1, task2) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // timestamp=... level=INFO fiber=#0 message="task1 done" + * // timestamp=... level=INFO fiber=#0 message="task2 done" + * // [ 1, 'hello' ] + * ``` + * + * **Example** (Combining Two Effects Concurrently) + * + * ```ts + * import { Effect } from "effect" + * + * const task1 = Effect.succeed(1).pipe( + * Effect.delay("200 millis"), + * Effect.tap(Effect.log("task1 done")) + * ) + * const task2 = Effect.succeed("hello").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Effect.log("task2 done")) + * ) + * + * // Run both effects concurrently using the concurrent option + * const program = Effect.zip(task1, task2, { concurrent: true }) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // timestamp=... level=INFO fiber=#0 message="task2 done" + * // timestamp=... level=INFO fiber=#0 message="task1 done" + * // [ 1, 'hello' ] + * ``` + * + * @see {@link zipWith} for a version that combines the results with a custom + * function. + * @see {@link validate} for a version that accumulates errors. + * + * @since 2.0.0 + * @category Zipping + */ +const zip = exports.zip = fiberRuntime.zipOptions; +/** + * Executes two effects sequentially, returning the result of the first effect + * and ignoring the result of the second. + * + * **Details** + * + * This function allows you to run two effects in sequence, where the result of + * the first effect is preserved, and the result of the second effect is + * discarded. By default, the two effects are executed sequentially. If you need + * them to run concurrently, you can pass the `{ concurrent: true }` option. + * + * The second effect will always be executed, even though its result is ignored. + * This makes it useful for cases where you want to execute an effect for its + * side effects while keeping the result of another effect. + * + * **When to Use** + * + * Use this function when you are only interested in the result of the first + * effect but still need to run the second effect for its side effects, such as + * logging or performing a cleanup action. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const task1 = Effect.succeed(1).pipe( + * Effect.delay("200 millis"), + * Effect.tap(Effect.log("task1 done")) + * ) + * const task2 = Effect.succeed("hello").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Effect.log("task2 done")) + * ) + * + * const program = Effect.zipLeft(task1, task2) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // timestamp=... level=INFO fiber=#0 message="task1 done" + * // timestamp=... level=INFO fiber=#0 message="task2 done" + * // 1 + * ``` + * + * @see {@link zipRight} for a version that returns the result of the second + * effect. + * + * @since 2.0.0 + * @category Zipping + */ +const zipLeft = exports.zipLeft = fiberRuntime.zipLeftOptions; +/** + * Executes two effects sequentially, returning the result of the second effect + * while ignoring the result of the first. + * + * **Details** + * + * This function allows you to run two effects in sequence, keeping the result + * of the second effect and discarding the result of the first. By default, the + * two effects are executed sequentially. If you need them to run concurrently, + * you can pass the `{ concurrent: true }` option. + * + * The first effect will always be executed, even though its result is ignored. + * This makes it useful for scenarios where the first effect is needed for its + * side effects, but only the result of the second effect is important. + * + * **When to Use** + * + * Use this function when you are only interested in the result of the second + * effect but still need to run the first effect for its side effects, such as + * initialization or setup tasks. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const task1 = Effect.succeed(1).pipe( + * Effect.delay("200 millis"), + * Effect.tap(Effect.log("task1 done")) + * ) + * const task2 = Effect.succeed("hello").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Effect.log("task2 done")) + * ) + * + * const program = Effect.zipRight(task1, task2) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // timestamp=... level=INFO fiber=#0 message="task1 done" + * // timestamp=... level=INFO fiber=#0 message="task2 done" + * // hello + * ``` + * + * @see {@link zipLeft} for a version that returns the result of the first + * effect. + * + * @since 2.0.0 + * @category Zipping + */ +const zipRight = exports.zipRight = fiberRuntime.zipRightOptions; +/** + * Combines two effects sequentially and applies a function to their results to + * produce a single value. + * + * **Details** + * + * This function runs two effects in sequence (or concurrently, if the `{ + * concurrent: true }` option is provided) and combines their results using a + * provided function. Unlike {@link zip}, which returns a tuple of the results, + * this function processes the results with a custom function to produce a + * single output. + * + * **Example** (Combining Effects with a Custom Function) + * + * ```ts + * import { Effect } from "effect" + * + * const task1 = Effect.succeed(1).pipe( + * Effect.delay("200 millis"), + * Effect.tap(Effect.log("task1 done")) + * ) + * const task2 = Effect.succeed("hello").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Effect.log("task2 done")) + * ) + * + * const task3 = Effect.zipWith( + * task1, + * task2, + * // Combines results into a single value + * (number, string) => number + string.length + * ) + * + * Effect.runPromise(task3).then(console.log) + * // Output: + * // timestamp=... level=INFO fiber=#3 message="task1 done" + * // timestamp=... level=INFO fiber=#2 message="task2 done" + * // 6 + * ``` + * + * @since 2.0.0 + * @category Zipping + */ +const zipWith = exports.zipWith = fiberRuntime.zipWithOptions; +/** + * Applies the function produced by one effect to the value produced by another effect. + * + * **Details** + * + * This function combines two effects: + * - The first effect produces a function of type `(a: A) => B`. + * - The second effect produces a value of type `A`. + * + * Once both effects complete successfully, the function is applied to the value, resulting in an effect that produces a value of type `B`. + * + * @since 2.0.0 + */ +const ap = exports.ap = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => zipWith(self, that, (f, a) => f(a))); +/** + * @category Requests & Batching + * @since 2.0.0 + */ +const blocked = exports.blocked = core.blocked; +/** + * @category Requests & Batching + * @since 2.0.0 + */ +const runRequestBlock = exports.runRequestBlock = core.runRequestBlock; +/** + * @category Requests & Batching + * @since 2.0.0 + */ +const step = exports.step = core.step; +/** + * @since 2.0.0 + * @category Requests & Batching + */ +const request = exports.request = /*#__PURE__*/(0, _Function.dual)(args => Request.isRequest(args[0]), query.fromRequest); +/** + * @since 2.0.0 + * @category Requests & Batching + */ +const cacheRequestResult = exports.cacheRequestResult = query.cacheRequest; +/** + * @since 2.0.0 + * @category Requests & Batching + */ +const withRequestBatching = exports.withRequestBatching = core.withRequestBatching; +/** + * @since 2.0.0 + * @category Requests & Batching + */ +const withRequestCaching = exports.withRequestCaching = query.withRequestCaching; +/** + * @since 2.0.0 + * @category Requests & Batching + */ +const withRequestCache = exports.withRequestCache = query.withRequestCache; +/** + * @since 2.0.0 + * @category Tracing + */ +const tracer = exports.tracer = effect.tracer; +/** + * @since 2.0.0 + * @category Tracing + */ +const tracerWith = exports.tracerWith = defaultServices.tracerWith; +/** + * @since 2.0.0 + * @category Tracing + */ +const withTracer = exports.withTracer = defaultServices.withTracer; +/** + * @since 2.0.0 + * @category Tracing + */ +const withTracerScoped = exports.withTracerScoped = fiberRuntime.withTracerScoped; +/** + * Disable the tracer for the given Effect. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * Effect.succeed(42).pipe( + * Effect.withSpan("my-span"), + * // the span will not be registered with the tracer + * Effect.withTracerEnabled(false) + * ) + * ``` + * + * @since 2.0.0 + * @category Tracing + */ +const withTracerEnabled = exports.withTracerEnabled = core.withTracerEnabled; +/** + * @since 2.0.0 + * @category Tracing + */ +const withTracerTiming = exports.withTracerTiming = core.withTracerTiming; +/** + * Adds annotations to each span in the effect for enhanced traceability. + * + * **Details** + * + * This function lets you attach key-value annotations to all spans generated + * during the execution of an effect. Annotations provide additional context, + * such as metadata or labels, which can help you understand and debug + * asynchronous workflows more effectively. + * + * You can either pass a single key-value pair or a record of key-value pairs to + * annotate the spans. These annotations can then be visualized in tracing tools + * that support span annotations. + * + * @since 2.0.0 + * @category Tracing + */ +const annotateSpans = exports.annotateSpans = effect.annotateSpans; +/** + * Adds annotations to the currently active span for traceability. + * + * **Details** + * + * This function adds key-value annotations to the currently active span in the + * effect's trace. These annotations help provide more context about the + * operation being executed at a specific point in time. Unlike + * {@link annotateSpans}, which applies to all spans in an effect, this function + * focuses solely on the active span. + * + * You can either pass a single key-value pair or a record of key-value pairs to + * annotate the span. These annotations are useful for adding metadata to + * operations, especially in systems with detailed observability requirements. + * + * @since 2.0.0 + * @category Tracing + */ +const annotateCurrentSpan = exports.annotateCurrentSpan = effect.annotateCurrentSpan; +/** + * @since 2.0.0 + * @category Tracing + */ +const currentSpan = exports.currentSpan = effect.currentSpan; +/** + * @since 3.20.0 + * @category Tracing + */ +const currentPropagatedSpan = exports.currentPropagatedSpan = effect.currentPropagatedSpan; +/** + * @since 2.0.0 + * @category Tracing + */ +const currentParentSpan = exports.currentParentSpan = effect.currentParentSpan; +/** + * @since 2.0.0 + * @category Tracing + */ +const spanAnnotations = exports.spanAnnotations = effect.spanAnnotations; +/** + * @since 2.0.0 + * @category Tracing + */ +const spanLinks = exports.spanLinks = effect.spanLinks; +/** + * For all spans in this effect, add a link with the provided span. + * + * @since 2.0.0 + * @category Tracing + */ +const linkSpans = exports.linkSpans = effect.linkSpans; +/** + * Add span links to the current span. + * + * @since 3.14.0 + * @category Tracing + */ +const linkSpanCurrent = exports.linkSpanCurrent = effect.linkSpanCurrent; +/** + * Create a new span for tracing. + * + * @since 2.0.0 + * @category Tracing + */ +const makeSpan = exports.makeSpan = effect.makeSpan; +/** + * Create a new span for tracing, and automatically close it when the Scope + * finalizes. + * + * The span is not added to the current span stack, so no child spans will be + * created for it. + * + * @since 2.0.0 + * @category Tracing + */ +const makeSpanScoped = exports.makeSpanScoped = fiberRuntime.makeSpanScoped; +/** + * Create a new span for tracing, and automatically close it when the effect + * completes. + * + * The span is not added to the current span stack, so no child spans will be + * created for it. + * + * @since 2.0.0 + * @category Tracing + */ +const useSpan = exports.useSpan = effect.useSpan; +/** + * Wraps the effect with a new span for tracing. + * + * @since 2.0.0 + * @category Tracing + */ +const withSpan = exports.withSpan = effect.withSpan; +/** + * Wraps a function that returns an effect with a new span for tracing. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const getTodo = Effect.functionWithSpan({ + * body: (id: number) => Effect.succeed(`Got todo ${id}!`), + * options: (id) => ({ + * name: `getTodo-${id}`, + * attributes: { id } + * }) + * }) + * ``` + * + * @since 3.2.0 + * @category Tracing + */ +const functionWithSpan = exports.functionWithSpan = effect.functionWithSpan; +/** + * Wraps the effect with a new span for tracing. + * + * The span is ended when the Scope is finalized. + * + * @since 2.0.0 + * @category Tracing + */ +const withSpanScoped = exports.withSpanScoped = fiberRuntime.withSpanScoped; +/** + * Adds the provided span to the current span stack. + * + * @since 2.0.0 + * @category Tracing + */ +const withParentSpan = exports.withParentSpan = effect.withParentSpan; +/** + * Safely handles nullable values by creating an effect that fails for `null` or + * `undefined`. + * + * **Details** + * + * This function ensures that an input value is non-null and non-undefined + * before processing it. If the value is valid, the effect succeeds with the + * value. If the value is `null` or `undefined`, the effect fails with a + * `NoSuchElementException`. This is particularly useful for avoiding + * null-related errors by clearly separating valid values from invalid ones in + * effectful computations. + * + * The failure with `NoSuchElementException` allows you to explicitly handle + * cases where a value is expected but not provided, leading to safer and more + * predictable code. + * + * **When to Use** + * + * Use this function when working with values that may be `null` or `undefined` + * and you want to ensure that only non-null values are processed. It helps + * enforce null-safety and makes error handling more explicit. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * // ┌─── Effect + * // ▼ + * const maybe1 = Effect.fromNullable(1) + * + * Effect.runPromiseExit(maybe1).then(console.log) + * // Output: + * // { _id: 'Exit', _tag: 'Success', value: 1 } + * + * // ┌─── Effect + * // ▼ + * const maybe2 = Effect.fromNullable(null as number | null) + * + * Effect.runPromiseExit(maybe2).then(console.log) + * // Output: + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { + * // _id: 'Cause', + * // _tag: 'Fail', + * // failure: { _tag: 'NoSuchElementException' } + * // } + * // } + * ``` + * + * @since 2.0.0 + * @category Optional Wrapping & Unwrapping + */ +const fromNullable = exports.fromNullable = effect.fromNullable; +/** + * Converts an effect that may fail with a `NoSuchElementException` into an + * effect that succeeds with an `Option`. + * + * **Details** + * + * This function transforms an effect that might fail with + * `Cause.NoSuchElementException` into an effect that succeeds with an `Option` + * type. If the original effect succeeds, its value is wrapped in `Option.some`. + * If it fails specifically due to a `NoSuchElementException`, the failure is + * mapped to `Option.none`. Other types of failures remain unchanged and are + * passed through as they are. + * + * This is useful when working with effects where you want to gracefully handle + * the absence of a value while preserving other potential failures. + * + * **When to Use** + * + * Use this function when you need to handle missing values as `Option.none` + * rather than throwing or propagating errors like `NoSuchElementException`. + * It’s ideal for scenarios where you want to explicitly represent optionality + * in a type-safe way while retaining other failure information. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * // ┌─── Effect + * // ▼ + * const maybe1 = Effect.fromNullable(1) + * + * // ┌─── Effect, never, never> + * // ▼ + * const option1 = Effect.optionFromOptional(maybe1) + * + * Effect.runPromise(option1).then(console.log) + * // Output: { _id: 'Option', _tag: 'Some', value: 1 } + * + * // ┌─── Effect + * // ▼ + * const maybe2 = Effect.fromNullable(null as number | null) + * + * // ┌─── Effect, never, never> + * // ▼ + * const option2 = Effect.optionFromOptional(maybe2) + * + * Effect.runPromise(option2).then(console.log) + * // Output: { _tag: 'None' } + * ``` + * + * @since 2.0.0 + * @category Optional Wrapping & Unwrapping + */ +const optionFromOptional = exports.optionFromOptional = effect.optionFromOptional; +/** + * Converts an `Option` of an `Effect` into an `Effect` of an `Option`. + * + * **Details** + * + * This function transforms an `Option>` into an + * `Effect, E, R>`. If the `Option` is `None`, the resulting `Effect` + * will immediately succeed with a `None` value. If the `Option` is `Some`, the + * inner `Effect` will be executed, and its result wrapped in a `Some`. + * + * **Example** + * + * ```ts + * import { Effect, Option } from "effect" + * + * // ┌─── Option> + * // ▼ + * const maybe = Option.some(Effect.succeed(42)) + * + * // ┌─── Effect, never, never> + * // ▼ + * const result = Effect.transposeOption(maybe) + * + * console.log(Effect.runSync(result)) + * // Output: { _id: 'Option', _tag: 'Some', value: 42 } + * ``` + * + * @since 3.13.0 + * @category Optional Wrapping & Unwrapping + */ +const transposeOption = self => { + return option_.isNone(self) ? succeedNone : map(self.value, option_.some); +}; +/** + * Applies an `Effect` on an `Option` and transposes the result. + * + * **Details** + * + * If the `Option` is `None`, the resulting `Effect` will immediately succeed with a `None` value. + * If the `Option` is `Some`, the effectful operation will be executed on the inner value, and its result wrapped in a `Some`. + * + * @example + * ```ts + * import { Effect, Option, pipe } from "effect" + * + * // ┌─── Effect, never, never>> + * // ▼ + * const noneResult = pipe( + * Option.none(), + * Effect.transposeMapOption(() => Effect.succeed(42)) // will not be executed + * ) + * console.log(Effect.runSync(noneResult)) + * // Output: { _id: 'Option', _tag: 'None' } + * + * // ┌─── Effect, never, never>> + * // ▼ + * const someSuccessResult = pipe( + * Option.some(42), + * Effect.transposeMapOption((value) => Effect.succeed(value * 2)) + * ) + * console.log(Effect.runSync(someSuccessResult)) + * // Output: { _id: 'Option', _tag: 'Some', value: 84 } + * ``` + * + * @since 3.14.0 + * @category Optional Wrapping & Unwrapping + */ +exports.transposeOption = transposeOption; +const transposeMapOption = exports.transposeMapOption = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => option_.isNone(self) ? succeedNone : map(f(self.value), option_.some)); +const makeTagProxy = TagClass => { + const cache = new Map(); + return new Proxy(TagClass, { + get(target, prop, receiver) { + if (prop in target) { + return Reflect.get(target, prop, receiver); + } + if (cache.has(prop)) { + return cache.get(prop); + } + const fn = (...args) => core.andThen(target, s => { + if (typeof s[prop] === "function") { + cache.set(prop, (...args) => core.andThen(target, s => s[prop](...args))); + return s[prop](...args); + } + cache.set(prop, core.andThen(target, s => s[prop])); + return s[prop]; + }); + const cn = core.andThen(target, s => s[prop]); + // @effect-diagnostics-next-line floatingEffect:off + Object.assign(fn, cn); + const apply = fn.apply; + const bind = fn.bind; + const call = fn.call; + const proto = Object.setPrototypeOf({}, Object.getPrototypeOf(cn)); + proto.apply = apply; + proto.bind = bind; + proto.call = call; + Object.setPrototypeOf(fn, proto); + cache.set(prop, fn); + return fn; + } + }); +}; +/** + * Creates a unique tag for a dependency, embedding the service's methods as + * static properties. + * + * **Details** + * + * This function allows you to define a `Tag` for a service or dependency in + * your application. The `Tag` not only acts as an identifier but also provides + * direct access to the service's methods via static properties. This makes it + * easier to access and use the service in your code without manually managing + * contexts. + * + * In the example below, the fields of the service (in this case, the `notify` + * method) are turned into static properties of the Notifications class, making + * it easier to access them. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * class Notifications extends Effect.Tag("Notifications")< + * Notifications, + * { readonly notify: (message: string) => Effect.Effect } + * >() {} + * + * // Create an effect that depends on the Notifications service + * const action = Notifications.notify("Hello, world!") + * ``` + * + * @since 2.0.0 + * @category Context + */ +const Tag = id => () => { + const limit = Error.stackTraceLimit; + Error.stackTraceLimit = 2; + const creationError = new Error(); + Error.stackTraceLimit = limit; + function TagClass() {} + Object.setPrototypeOf(TagClass, _context.TagProto); + TagClass.key = id; + Object.defineProperty(TagClass, "use", { + get() { + return body => core.andThen(this, body); + } + }); + Object.defineProperty(TagClass, "stack", { + get() { + return creationError.stack; + } + }); + return makeTagProxy(TagClass); +}; +/** + * Simplifies the creation and management of services in Effect by defining both + * a `Tag` and a `Layer`. + * + * **Details** + * + * This function allows you to streamline the creation of services by combining + * the definition of a `Context.Tag` and a `Layer` in a single step. It supports + * various ways of providing the service implementation: + * - Using an `effect` to define the service dynamically. + * - Using `sync` or `succeed` to define the service statically. + * - Using `scoped` to create services with lifecycle management. + * + * It also allows you to specify dependencies for the service, which will be + * provided automatically when the service is used. Accessors can be optionally + * generated for the service, making it more convenient to use. + * + * **Example** + * + * ```ts + * import { Effect } from 'effect'; + * + * class Prefix extends Effect.Service()("Prefix", { + * sync: () => ({ prefix: "PRE" }) + * }) {} + * + * class Logger extends Effect.Service()("Logger", { + * accessors: true, + * effect: Effect.gen(function* () { + * const { prefix } = yield* Prefix + * return { + * info: (message: string) => + * Effect.sync(() => { + * console.log(`[${prefix}][${message}]`) + * }) + * } + * }), + * dependencies: [Prefix.Default] + * }) {} + * ``` + * + * @since 3.9.0 + * @category Context + * @experimental might be up for breaking changes + */ +exports.Tag = Tag; +const Service = function () { + return function () { + const [id, maker] = arguments; + const proxy = "accessors" in maker ? maker["accessors"] : false; + const limit = Error.stackTraceLimit; + Error.stackTraceLimit = 2; + const creationError = new Error(); + Error.stackTraceLimit = limit; + let patchState = "unchecked"; + const TagClass = function (service) { + if (patchState === "unchecked") { + const proto = Object.getPrototypeOf(service); + if (proto === Object.prototype || proto === null) { + patchState = "plain"; + } else { + const selfProto = Object.getPrototypeOf(this); + Object.setPrototypeOf(selfProto, proto); + patchState = "patched"; + } + } + if (patchState === "plain") { + Object.assign(this, service); + } else if (patchState === "patched") { + Object.setPrototypeOf(service, Object.getPrototypeOf(this)); + return service; + } + }; + TagClass.prototype._tag = id; + Object.defineProperty(TagClass, "make", { + get() { + return service => new this(service); + } + }); + Object.defineProperty(TagClass, "use", { + get() { + return body => core.andThen(this, body); + } + }); + TagClass.key = id; + Object.assign(TagClass, _context.TagProto); + Object.defineProperty(TagClass, "stack", { + get() { + return creationError.stack; + } + }); + const hasDeps = "dependencies" in maker && maker.dependencies.length > 0; + const layerName = hasDeps ? "DefaultWithoutDependencies" : "Default"; + let layerCache; + let isFunction = false; + if ("effect" in maker) { + isFunction = typeof maker.effect === "function"; + Object.defineProperty(TagClass, layerName, { + get() { + if (isFunction) { + return function () { + return layer.fromEffect(TagClass, map(maker.effect.apply(null, arguments), _ => new this(_))); + }.bind(this); + } + return layerCache ??= layer.fromEffect(TagClass, map(maker.effect, _ => new this(_))); + } + }); + } else if ("scoped" in maker) { + isFunction = typeof maker.scoped === "function"; + Object.defineProperty(TagClass, layerName, { + get() { + if (isFunction) { + return function () { + return layer.scoped(TagClass, map(maker.scoped.apply(null, arguments), _ => new this(_))); + }.bind(this); + } + return layerCache ??= layer.scoped(TagClass, map(maker.scoped, _ => new this(_))); + } + }); + } else if ("sync" in maker) { + Object.defineProperty(TagClass, layerName, { + get() { + return layerCache ??= layer.sync(TagClass, () => new this(maker.sync())); + } + }); + } else { + Object.defineProperty(TagClass, layerName, { + get() { + return layerCache ??= layer.succeed(TagClass, new this(maker.succeed)); + } + }); + } + if (hasDeps) { + let layerWithDepsCache; + Object.defineProperty(TagClass, "Default", { + get() { + if (isFunction) { + return function () { + return layer.provide(this.DefaultWithoutDependencies.apply(null, arguments), maker.dependencies); + }; + } + return layerWithDepsCache ??= layer.provide(this.DefaultWithoutDependencies, maker.dependencies); + } + }); + } + return proxy === true ? makeTagProxy(TagClass) : TagClass; + }; +}; +/** + * The `Effect.fn` function allows you to create traced functions that return an + * effect. It provides two key features: + * + * - **Stack traces with location details** if an error occurs. + * - **Automatic span creation** for tracing when a span name is provided. + * + * If a span name is passed as the first argument, the function's execution is + * tracked using that name. If no name is provided, stack tracing still works, + * but spans are not created. + * + * A function can be defined using either: + * + * - A generator function, allowing the use of `yield*` for effect composition. + * - A regular function that returns an `Effect`. + * + * **Example** (Creating a Traced Function with a Span Name) + * + * ```ts + * import { Effect } from "effect" + * + * const myfunc = Effect.fn("myspan")(function* (n: N) { + * yield* Effect.annotateCurrentSpan("n", n) // Attach metadata to the span + * console.log(`got: ${n}`) + * yield* Effect.fail(new Error("Boom!")) // Simulate failure + * }) + * + * Effect.runFork(myfunc(100).pipe(Effect.catchAllCause(Effect.logError))) + * // Output: + * // got: 100 + * // timestamp=... level=ERROR fiber=#0 cause="Error: Boom! + * // at (/.../index.ts:6:22) <= Raise location + * // at myspan (/.../index.ts:3:23) <= Definition location + * // at myspan (/.../index.ts:9:16)" <= Call location + * ``` + * + * `Effect.fn` automatically creates spans. The spans capture information about + * the function execution, including metadata and error details. + * + * **Example** (Exporting Spans to the Console) + * + * ```ts skip-type-checking + * import { Effect } from "effect" + * import { NodeSdk } from "@effect/opentelemetry" + * import { + * ConsoleSpanExporter, + * BatchSpanProcessor + * } from "@opentelemetry/sdk-trace-base" + * + * const myfunc = Effect.fn("myspan")(function* (n: N) { + * yield* Effect.annotateCurrentSpan("n", n) + * console.log(`got: ${n}`) + * yield* Effect.fail(new Error("Boom!")) + * }) + * + * const program = myfunc(100) + * + * const NodeSdkLive = NodeSdk.layer(() => ({ + * resource: { serviceName: "example" }, + * // Export span data to the console + * spanProcessor: new BatchSpanProcessor(new ConsoleSpanExporter()) + * })) + * + * Effect.runFork(program.pipe(Effect.provide(NodeSdkLive))) + * // Output: + * // got: 100 + * // { + * // resource: { + * // attributes: { + * // 'service.name': 'example', + * // 'telemetry.sdk.language': 'nodejs', + * // 'telemetry.sdk.name': '@effect/opentelemetry', + * // 'telemetry.sdk.version': '1.30.1' + * // } + * // }, + * // instrumentationScope: { name: 'example', version: undefined, schemaUrl: undefined }, + * // traceId: '22801570119e57a6e2aacda3dec9665b', + * // parentId: undefined, + * // traceState: undefined, + * // name: 'myspan', + * // id: '7af530c1e01bc0cb', + * // kind: 0, + * // timestamp: 1741182277518402.2, + * // duration: 4300.416, + * // attributes: { + * // n: 100, + * // 'code.stacktrace': 'at (/.../index.ts:8:23)\n' + + * // 'at (/.../index.ts:14:17)' + * // }, + * // status: { code: 2, message: 'Boom!' }, + * // events: [ + * // { + * // name: 'exception', + * // attributes: { + * // 'exception.type': 'Error', + * // 'exception.message': 'Boom!', + * // 'exception.stacktrace': 'Error: Boom!\n' + + * // ' at (/.../index.ts:11:22)\n' + + * // ' at myspan (/.../index.ts:8:23)\n' + + * // ' at myspan (/.../index.ts:14:17)' + * // }, + * // time: [ 1741182277, 522702583 ], + * // droppedAttributesCount: 0 + * // } + * // ], + * // links: [] + * // } + * ``` + * + * `Effect.fn` also acts as a pipe function, allowing you to create a pipeline + * after the function definition using the effect returned by the generator + * function as the starting value of the pipeline. + * + * **Example** (Creating a Traced Function with a Delay) + * + * ```ts + * import { Effect } from "effect" + * + * const myfunc = Effect.fn( + * function* (n: number) { + * console.log(`got: ${n}`) + * yield* Effect.fail(new Error("Boom!")) + * }, + * // You can access both the created effect and the original arguments + * (effect, n) => Effect.delay(effect, `${n / 100} seconds`) + * ) + * + * Effect.runFork(myfunc(100).pipe(Effect.catchAllCause(Effect.logError))) + * // Output: + * // got: 100 + * // timestamp=... level=ERROR fiber=#0 cause="Error: Boom! (<= after 1 second) + * ``` + * + * @see {@link fnUntraced} for a version of this function that doesn't add a span. + * + * @since 3.11.0 + * @category Tracing + */ +exports.Service = Service; +const fn = function (nameOrBody, ...pipeables) { + const limit = Error.stackTraceLimit; + Error.stackTraceLimit = 2; + const errorDef = new Error(); + Error.stackTraceLimit = limit; + if (typeof nameOrBody !== "string") { + return defineLength(nameOrBody.length, function (...args) { + const limit = Error.stackTraceLimit; + Error.stackTraceLimit = 2; + const errorCall = new Error(); + Error.stackTraceLimit = limit; + return fnApply({ + self: this, + body: nameOrBody, + args, + pipeables, + spanName: "", + spanOptions: { + context: internalTracer.DisablePropagation.context(true) + }, + errorDef, + errorCall + }); + }); + } + const name = nameOrBody; + const options = pipeables[0]; + return (body, ...pipeables) => defineLength(body.length, { + [name](...args) { + const limit = Error.stackTraceLimit; + Error.stackTraceLimit = 2; + const errorCall = new Error(); + Error.stackTraceLimit = limit; + return fnApply({ + self: this, + body, + args, + pipeables, + spanName: name, + spanOptions: options, + errorDef, + errorCall + }); + } + }[name]); +}; +exports.fn = fn; +function defineLength(length, fn) { + return Object.defineProperty(fn, "length", { + value: length, + configurable: true + }); +} +function fnApply(options) { + let effect; + let fnError = undefined; + if ((0, _Utils.isGeneratorFunction)(options.body)) { + effect = core.fromIterator(() => options.body.apply(options.self, options.args)); + } else { + try { + effect = options.body.apply(options.self, options.args); + } catch (error) { + fnError = error; + effect = die(error); + } + } + if (options.pipeables.length > 0) { + try { + for (const x of options.pipeables) { + effect = x(effect, ...options.args); + } + } catch (error) { + effect = fnError ? failCause(internalCause.sequential(internalCause.die(fnError), internalCause.die(error))) : die(error); + } + } + let cache = false; + const captureStackTrace = () => { + if (cache !== false) { + return cache; + } + if (options.errorCall.stack) { + const stackDef = options.errorDef.stack.trim().split("\n"); + const stackCall = options.errorCall.stack.trim().split("\n"); + let endStackDef = stackDef.slice(2).join("\n").trim(); + if (!endStackDef.includes(`(`)) { + endStackDef = endStackDef.replace(/at (.*)/, "at ($1)"); + } + let endStackCall = stackCall.slice(2).join("\n").trim(); + if (!endStackCall.includes(`(`)) { + endStackCall = endStackCall.replace(/at (.*)/, "at ($1)"); + } + cache = `${endStackDef}\n${endStackCall}`; + return cache; + } + }; + const opts = options.spanOptions && "captureStackTrace" in options.spanOptions ? options.spanOptions : { + captureStackTrace, + ...options.spanOptions + }; + return withSpan(effect, options.spanName, opts); +} +/** + * Same as {@link fn}, but allows you to create a function that is not traced, for when performance is critical. + * + * @see {@link fn} for a version that includes tracing. + * + * @since 3.12.0 + * @category Tracing + */ +const fnUntraced = exports.fnUntraced = core.fnUntraced; +// ----------------------------------------------------------------------------- +// Type constraints +// ----------------------------------------------------------------------------- +/** + * A no-op type constraint that enforces the success channel of an Effect conforms to + * the specified success type `A`. + * + * @example + * import { Effect } from "effect" + * + * // Ensure that the program does not expose any unhandled errors. + * const program = Effect.succeed(42).pipe(Effect.ensureSuccessType()) + * + * @since 3.17.0 + * @category Type constraints + */ +const ensureSuccessType = () => effect => effect; +/** + * A no-op type constraint that enforces the error channel of an Effect conforms to + * the specified error type `E`. + * + * @example + * import { Effect } from "effect" + * + * // Ensure that the program does not expose any unhandled errors. + * const program = Effect.succeed(42).pipe(Effect.ensureErrorType()) + * + * @since 3.17.0 + * @category Type constraints + */ +exports.ensureSuccessType = ensureSuccessType; +const ensureErrorType = () => effect => effect; +/** + * A no-op type constraint that enforces the requirements channel of an Effect conforms to + * the specified requirements type `R`. + * + * @example + * import { Effect } from "effect" + * + * // Ensure that the program does not have any requirements. + * const program = Effect.succeed(42).pipe(Effect.ensureRequirementsType()) + * + * @since 3.17.0 + * @category Type constraints + */ +exports.ensureErrorType = ensureErrorType; +const ensureRequirementsType = () => effect => effect; +exports.ensureRequirementsType = ensureRequirementsType; +//# sourceMappingURL=Effect.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Effect.js.map b/backend/node_modules/effect/dist/cjs/Effect.js.map new file mode 100644 index 0000000000000000000000000000000000000000..bf75b724f4d496f1874d5bc5e590ad3a31b44277 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Effect.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Effect.js","names":["_Function","require","internalCause","_interopRequireWildcard","console_","_context","effect","core","defaultServices","circular","internalExecutionPlan","fiberRuntime","layer","option_","query","runtime_","schedule_","internalTracer","Random","Request","Scheduler","_Utils","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","EffectTypeId","exports","isEffect","cachedWithTTL","cached","cachedInvalidateWithTTL","memoize","cachedFunction","once","all","allWith","allSuccesses","dropUntil","dropWhile","takeUntil","takeWhile","every","exists","filter","filterMap","findFirst","forEach","head","mergeAll","partition","reduce","reduceWhile","reduceRight","reduceEffect","replicate","replicateEffect","validateAll","validateFirst","async","asyncEffect","custom","withFiberRuntime","fail","failSync","failCause","failCauseSync","die","dieMessage","dieSync","gen","never","none","promise","succeed","succeedNone","succeedSome","suspend","sync","_void","void","yieldNow","_catch","catch","catchAll","catchAllCause","catchAllDefect","catchIf","catchSome","catchSomeCause","catchSomeDefect","catchTag","catchTags","cause","eventually","ignore","ignoreLogged","parallelErrors","sandbox","retry","retry_combined","withExecutionPlan","retryOrElse","retryOrElse_Effect","try_","try","tryMap","tryMapPromise","tryPromise","unsandbox","allowInterrupt","checkInterruptible","disconnect","interrupt","interruptWith","interruptible","interruptibleMask","onInterrupt","uninterruptible","uninterruptibleMask","liftPredicate","as","asSome","asSomeError","asVoid","flip","flipWith","map","mapAccum","mapBoth","mapError","mapErrorCause","merge","negate","acquireRelease","acquireReleaseInterruptible","acquireUseRelease","addFinalizer","ensuring","onError","onExit","parallelFinalizers","sequentialFinalizers","finalizersMask","scope","scopeWith","scopedWith","scoped","scopedEffect","using","withEarlyRelease","awaitAllChildren","daemonChildren","descriptor","descriptorWith","diffFiberRefs","ensuringChild","ensuringChildren","fiberId","fiberIdWith","fork","forkDaemon","forkAll","forkIn","forkScoped","forkWithErrorHandler","fromFiber","fromFiberEffect","supervised","transplant","withConcurrency","withScheduler","withSchedulingPriority","withMaxOpsBeforeYield","clock","clockWith","withClockScoped","withClock","console","consoleWith","withConsoleScoped","withConsole","delay","sleep","timed","timedWith","timeout","timeoutOption","timeoutFail","timeoutFailCause","timeoutTo","configProviderWith","withConfigProvider","withConfigProviderScoped","context","contextWith","contextWithEffect","mapInputContext","provide","effect_provide","provideService","provideServiceEffect","serviceFunction","serviceFunctionEffect","serviceFunctions","serviceConstants","serviceMembers","serviceOption","serviceOptional","updateService","Do","bind","bindAll","bindTo","let_","let","option","either","exit","intoDeferred","if_","if","filterOrDie","filterOrDieMessage","filterOrElse","filterOrFail","filterEffectOrElse","filterEffectOrFail","unless","unlessEffect","when","whenEffect","whenFiberRef","whenRef","flatMap","andThen","flatten","race","raceAll","raceFirst","raceWith","summarized","tap","tapBoth","tapDefect","tapError","tapErrorTag","tapErrorCause","forever","iterate","loop","repeat","repeat_combined","repeatN","repeatOrElse","repeatOrElse_Effect","schedule","schedule_Effect","scheduleForked","scheduleFrom","scheduleFrom_Effect","whileLoop","getFiberRefs","fiberRefs","inheritFiberRefs","locally","fiberRefLocally","locallyWith","fiberRefLocallyWith","locallyScoped","fiberRefLocallyScoped","locallyScopedWith","fiberRefLocallyScopedWith","patchFiberRefs","setFiberRefs","updateFiberRefs","isFailure","isSuccess","match","matchCause","matchCauseEffect","matchEffect","log","logWithLevel","level","message","logTrace","logDebug","logInfo","logWarning","logError","logFatal","withLogSpan","annotateLogs","annotateLogsScoped","logAnnotations","withUnhandledErrorLogLevel","whenLogLevel","orDie","orDieWith","orElse","orElseFail","orElseSucceed","firstSuccessOf","random","randomWith","withRandom","withRandomFixed","dual","values","fixed","withRandomScoped","runtime","getRuntimeFlags","runtimeFlags","patchRuntimeFlags","updateRuntimeFlags","withRuntimeFlagsPatch","withRuntimeFlags","withRuntimeFlagsPatchScoped","withRuntimeFlagsScoped","tagMetrics","labelMetrics","tagMetricsScoped","labelMetricsScoped","metricLabels","withMetric","unsafeMakeSemaphore","makeSemaphore","unsafeMakeLatch","makeLatch","runFork","unsafeForkEffect","runCallback","unsafeRunEffect","runPromise","unsafeRunPromiseEffect","runPromiseExit","unsafeRunPromiseExitEffect","runSync","unsafeRunSyncEffect","runSyncExit","unsafeRunSyncExitEffect","validate","validateWith","zip","zipOptions","zipLeft","zipLeftOptions","zipRight","zipRightOptions","zipWith","zipWithOptions","ap","self","that","a","blocked","runRequestBlock","step","request","args","isRequest","fromRequest","cacheRequestResult","cacheRequest","withRequestBatching","withRequestCaching","withRequestCache","tracer","tracerWith","withTracer","withTracerScoped","withTracerEnabled","withTracerTiming","annotateSpans","annotateCurrentSpan","currentSpan","currentPropagatedSpan","currentParentSpan","spanAnnotations","spanLinks","linkSpans","linkSpanCurrent","makeSpan","makeSpanScoped","useSpan","withSpan","functionWithSpan","withSpanScoped","withParentSpan","fromNullable","optionFromOptional","transposeOption","isNone","value","some","transposeMapOption","makeTagProxy","TagClass","cache","Map","Proxy","target","prop","receiver","Reflect","fn","s","cn","assign","apply","proto","setPrototypeOf","getPrototypeOf","Tag","id","limit","Error","stackTraceLimit","creationError","TagProto","key","body","stack","Service","maker","arguments","proxy","patchState","service","prototype","selfProto","_tag","hasDeps","dependencies","length","layerName","layerCache","isFunction","fromEffect","_","layerWithDepsCache","DefaultWithoutDependencies","nameOrBody","pipeables","errorDef","defineLength","errorCall","fnApply","spanName","spanOptions","DisablePropagation","name","options","configurable","fnError","undefined","isGeneratorFunction","fromIterator","error","x","sequential","captureStackTrace","stackDef","trim","split","stackCall","endStackDef","slice","join","includes","replace","endStackCall","opts","fnUntraced","ensureSuccessType","ensureErrorType","ensureRequirementsType"],"sources":["../../src/Effect.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;AAwBA,IAAAA,SAAA,GAAAC,OAAA;AAIA,IAAAC,aAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,QAAA,GAAAD,uBAAA,CAAAF,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAH,uBAAA,CAAAF,OAAA;AACA,IAAAM,IAAA,GAAAJ,uBAAA,CAAAF,OAAA;AACA,IAAAO,eAAA,GAAAL,uBAAA,CAAAF,OAAA;AACA,IAAAQ,QAAA,GAAAN,uBAAA,CAAAF,OAAA;AACA,IAAAS,qBAAA,GAAAP,uBAAA,CAAAF,OAAA;AACA,IAAAU,YAAA,GAAAR,uBAAA,CAAAF,OAAA;AACA,IAAAW,KAAA,GAAAT,uBAAA,CAAAF,OAAA;AACA,IAAAY,OAAA,GAAAV,uBAAA,CAAAF,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AAM;AAEpH;;;;;;;;;;;;;AAAAoC,OAAA,CAAAic,iBAAA,GAAAA,iBAAA;AAaO,MAAMC,eAAe,GAAGA,CAAA,KAA8Bte,MAAwB,IAAuBA,MAAM;AAElH;;;;;;;;;;;;;AAAAoC,OAAA,CAAAkc,eAAA,GAAAA,eAAA;AAaO,MAAMC,sBAAsB,GAAGA,CAAA,KAA8Bve,MAAwB,IAC1FA,MAAM;AAAAoC,OAAA,CAAAmc,sBAAA,GAAAA,sBAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Effectable.js b/backend/node_modules/effect/dist/cjs/Effectable.js new file mode 100644 index 0000000000000000000000000000000000000000..6e1420fa9e62737acf8b849c4b67bb340208a00b --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Effectable.js @@ -0,0 +1,58 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.StructuralCommitPrototype = exports.StructuralClass = exports.StreamTypeId = exports.SinkTypeId = exports.EffectTypeId = exports.EffectPrototype = exports.CommitPrototype = exports.Class = exports.ChannelTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/effectable.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category type ids + */ +const EffectTypeId = exports.EffectTypeId = internal.EffectTypeId; +/** + * @since 2.0.0 + * @category type ids + */ +const StreamTypeId = exports.StreamTypeId = internal.StreamTypeId; +/** + * @since 2.0.0 + * @category type ids + */ +const SinkTypeId = exports.SinkTypeId = internal.SinkTypeId; +/** + * @since 2.0.0 + * @category type ids + */ +const ChannelTypeId = exports.ChannelTypeId = internal.ChannelTypeId; +/** + * @since 2.0.0 + * @category prototypes + */ +const EffectPrototype = exports.EffectPrototype = internal.EffectPrototype; +/** + * @since 2.0.0 + * @category prototypes + */ +const CommitPrototype = exports.CommitPrototype = internal.CommitPrototype; +/** + * @since 2.0.0 + * @category prototypes + */ +const StructuralCommitPrototype = exports.StructuralCommitPrototype = internal.StructuralCommitPrototype; +const Base = internal.Base; +const StructuralBase = internal.StructuralBase; +/** + * @since 2.0.0 + * @category constructors + */ +class Class extends Base {} +/** + * @since 2.0.0 + * @category constructors + */ +exports.Class = Class; +class StructuralClass extends StructuralBase {} +exports.StructuralClass = StructuralClass; +//# sourceMappingURL=Effectable.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Effectable.js.map b/backend/node_modules/effect/dist/cjs/Effectable.js.map new file mode 100644 index 0000000000000000000000000000000000000000..85473fd382688f5b1486564479f5d9de15e2ec6a --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Effectable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Effectable.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","EffectTypeId","exports","StreamTypeId","SinkTypeId","ChannelTypeId","EffectPrototype","CommitPrototype","StructuralCommitPrototype","Base","StructuralBase","Class","StructuralClass"],"sources":["../../src/Effectable.ts"],"sourcesContent":[null],"mappings":";;;;;;AAKA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAoD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA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AAe,GAAAL,OAAA,CAAAK,eAAA,GAAyB5B,QAAQ,CAAC4B,eAAe;AAE7E;;;;AAIO,MAAMC,yBAAyB,GAAAN,OAAA,CAAAM,yBAAA,GAAyB7B,QAAQ,CAAC6B,yBAAyB;AAEjG,MAAMC,IAAI,GAAoB9B,QAAQ,CAAC8B,IAAI;AAC3C,MAAMC,cAAc,GAAoB/B,QAAQ,CAAC+B,cAAc;AAE/D;;;;AAIM,MAAgBC,KAA+B,SAAQF,IAAa;AAO1E;;;;AAAAP,OAAA,CAAAS,KAAA,GAAAA,KAAA;AAIM,MAAgBC,eAAyC,SAAQF,cAAuB;AAAAR,OAAA,CAAAU,eAAA,GAAAA,eAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Either.js b/backend/node_modules/effect/dist/cjs/Either.js new file mode 100644 index 0000000000000000000000000000000000000000..987a04e76ef329d92ed0c230171147cc77398146 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Either.js @@ -0,0 +1,654 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.zipWith = exports.void = exports.try = exports.transposeOption = exports.transposeMapOption = exports.right = exports.orElse = exports.merge = exports.match = exports.mapLeft = exports.mapBoth = exports.map = exports.liftPredicate = exports.let = exports.left = exports.isRight = exports.isLeft = exports.isEither = exports.getRight = exports.getOrUndefined = exports.getOrThrowWith = exports.getOrThrow = exports.getOrNull = exports.getOrElse = exports.getLeft = exports.getEquivalence = exports.gen = exports.fromOption = exports.fromNullable = exports.flip = exports.flatMap = exports.filterOrLeft = exports.bindTo = exports.bind = exports.ap = exports.andThen = exports.all = exports.TypeId = exports.Do = void 0; +var Equivalence = _interopRequireWildcard(require("./Equivalence.js")); +var _Function = require("./Function.js"); +var doNotation = _interopRequireWildcard(require("./internal/doNotation.js")); +var either = _interopRequireWildcard(require("./internal/either.js")); +var option_ = _interopRequireWildcard(require("./internal/option.js")); +var _Predicate = require("./Predicate.js"); +var Gen = _interopRequireWildcard(require("./Utils.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * @category symbols + * @since 2.0.0 + */ +const TypeId = exports.TypeId = either.TypeId; +/** + * Constructs a new `Either` holding a `Right` value. This usually represents a successful value due to the right bias + * of this structure. + * + * @category constructors + * @since 2.0.0 + */ +const right = exports.right = either.right; +const void_ = exports.void = /*#__PURE__*/right(void 0); +/** + * Constructs a new `Either` holding a `Left` value. This usually represents a failure, due to the right-bias of this + * structure. + * + * @category constructors + * @since 2.0.0 + */ +const left = exports.left = either.left; +/** + * Takes a lazy default and a nullable value, if the value is not nully (`null` or `undefined`), turn it into a `Right`, if the value is nully use + * the provided default as a `Left`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either } from "effect" + * + * assert.deepStrictEqual(Either.fromNullable(1, () => 'fallback'), Either.right(1)) + * assert.deepStrictEqual(Either.fromNullable(null, () => 'fallback'), Either.left('fallback')) + * ``` + * + * @category constructors + * @since 2.0.0 + */ +const fromNullable = exports.fromNullable = /*#__PURE__*/(0, _Function.dual)(2, (self, onNullable) => self == null ? left(onNullable(self)) : right(self)); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either, Option } from "effect" + * + * assert.deepStrictEqual(Either.fromOption(Option.some(1), () => 'error'), Either.right(1)) + * assert.deepStrictEqual(Either.fromOption(Option.none(), () => 'error'), Either.left('error')) + * ``` + * + * @category constructors + * @since 2.0.0 + */ +const fromOption = exports.fromOption = either.fromOption; +const try_ = evaluate => { + if ((0, _Predicate.isFunction)(evaluate)) { + try { + return right(evaluate()); + } catch (e) { + return left(e); + } + } else { + try { + return right(evaluate.try()); + } catch (e) { + return left(evaluate.catch(e)); + } + } +}; +exports.try = try_; +/** + * Tests if a value is a `Either`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either } from "effect" + * + * assert.deepStrictEqual(Either.isEither(Either.right(1)), true) + * assert.deepStrictEqual(Either.isEither(Either.left("a")), true) + * assert.deepStrictEqual(Either.isEither({ right: 1 }), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +const isEither = exports.isEither = either.isEither; +/** + * Determine if a `Either` is a `Left`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either } from "effect" + * + * assert.deepStrictEqual(Either.isLeft(Either.right(1)), false) + * assert.deepStrictEqual(Either.isLeft(Either.left("a")), true) + * ``` + * + * @category guards + * @since 2.0.0 + */ +const isLeft = exports.isLeft = either.isLeft; +/** + * Determine if a `Either` is a `Right`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either } from "effect" + * + * assert.deepStrictEqual(Either.isRight(Either.right(1)), true) + * assert.deepStrictEqual(Either.isRight(Either.left("a")), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +const isRight = exports.isRight = either.isRight; +/** + * Converts a `Either` to an `Option` discarding the `Left`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either, Option } from "effect" + * + * assert.deepStrictEqual(Either.getRight(Either.right('ok')), Option.some('ok')) + * assert.deepStrictEqual(Either.getRight(Either.left('err')), Option.none()) + * ``` + * + * @category getters + * @since 2.0.0 + */ +const getRight = exports.getRight = either.getRight; +/** + * Converts a `Either` to an `Option` discarding the value. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either, Option } from "effect" + * + * assert.deepStrictEqual(Either.getLeft(Either.right('ok')), Option.none()) + * assert.deepStrictEqual(Either.getLeft(Either.left('err')), Option.some('err')) + * ``` + * + * @category getters + * @since 2.0.0 + */ +const getLeft = exports.getLeft = either.getLeft; +/** + * @category equivalence + * @since 2.0.0 + */ +const getEquivalence = ({ + left, + right +}) => Equivalence.make((x, y) => isLeft(x) ? isLeft(y) && left(x.left, y.left) : isRight(y) && right(x.right, y.right)); +/** + * @category mapping + * @since 2.0.0 + */ +exports.getEquivalence = getEquivalence; +const mapBoth = exports.mapBoth = /*#__PURE__*/(0, _Function.dual)(2, (self, { + onLeft, + onRight +}) => isLeft(self) ? left(onLeft(self.left)) : right(onRight(self.right))); +/** + * Maps the `Left` side of an `Either` value to a new `Either` value. + * + * @category mapping + * @since 2.0.0 + */ +const mapLeft = exports.mapLeft = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => isLeft(self) ? left(f(self.left)) : right(self.right)); +/** + * Maps the `Right` side of an `Either` value to a new `Either` value. + * + * @category mapping + * @since 2.0.0 + */ +const map = exports.map = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => isRight(self) ? right(f(self.right)) : left(self.left)); +/** + * Takes two functions and an `Either` value, if the value is a `Left` the inner value is applied to the `onLeft function, + * if the value is a `Right` the inner value is applied to the `onRight` function. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, Either } from "effect" + * + * const onLeft = (strings: ReadonlyArray): string => `strings: ${strings.join(', ')}` + * + * const onRight = (value: number): string => `Ok: ${value}` + * + * assert.deepStrictEqual(pipe(Either.right(1), Either.match({ onLeft, onRight })), 'Ok: 1') + * assert.deepStrictEqual( + * pipe(Either.left(['string 1', 'string 2']), Either.match({ onLeft, onRight })), + * 'strings: string 1, string 2' + * ) + * ``` + * + * @category pattern matching + * @since 2.0.0 + */ +const match = exports.match = /*#__PURE__*/(0, _Function.dual)(2, (self, { + onLeft, + onRight +}) => isLeft(self) ? onLeft(self.left) : onRight(self.right)); +/** + * Transforms a `Predicate` function into a `Right` of the input value if the predicate returns `true` + * or `Left` of the result of the provided function if the predicate returns false + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, Either } from "effect" + * + * const isPositive = (n: number): boolean => n > 0 + * const isPositiveEither = Either.liftPredicate(isPositive, n => `${n} is not positive`) + * + * assert.deepStrictEqual( + * isPositiveEither(1), + * Either.right(1) + * ) + * assert.deepStrictEqual( + * isPositiveEither(0), + * Either.left("0 is not positive") + * ) + * ``` + * + * @category lifting + * @since 3.4.0 + */ +const liftPredicate = exports.liftPredicate = /*#__PURE__*/(0, _Function.dual)(3, (a, predicate, orLeftWith) => predicate(a) ? right(a) : left(orLeftWith(a))); +/** + * Filter the right value with the provided function. + * If the predicate fails, set the left value with the result of the provided function. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, Either } from "effect" + * + * const isPositive = (n: number): boolean => n > 0 + * + * assert.deepStrictEqual( + * pipe( + * Either.right(1), + * Either.filterOrLeft(isPositive, n => `${n} is not positive`) + * ), + * Either.right(1) + * ) + * assert.deepStrictEqual( + * pipe( + * Either.right(0), + * Either.filterOrLeft(isPositive, n => `${n} is not positive`) + * ), + * Either.left("0 is not positive") + * ) + * ``` + * + * @since 2.0.0 + * @category filtering & conditionals + */ +const filterOrLeft = exports.filterOrLeft = /*#__PURE__*/(0, _Function.dual)(3, (self, predicate, orLeftWith) => flatMap(self, r => predicate(r) ? right(r) : left(orLeftWith(r)))); +/** + * @category getters + * @since 2.0.0 + */ +const merge = exports.merge = /*#__PURE__*/match({ + onLeft: _Function.identity, + onRight: _Function.identity +}); +/** + * Returns the wrapped value if it's a `Right` or a default value if is a `Left`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either } from "effect" + * + * assert.deepStrictEqual(Either.getOrElse(Either.right(1), (error) => error + "!"), 1) + * assert.deepStrictEqual(Either.getOrElse(Either.left("not a number"), (error) => error + "!"), "not a number!") + * ``` + * + * @category getters + * @since 2.0.0 + */ +const getOrElse = exports.getOrElse = /*#__PURE__*/(0, _Function.dual)(2, (self, onLeft) => isLeft(self) ? onLeft(self.left) : self.right); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either } from "effect" + * + * assert.deepStrictEqual(Either.getOrNull(Either.right(1)), 1) + * assert.deepStrictEqual(Either.getOrNull(Either.left("a")), null) + * ``` + * + * @category getters + * @since 2.0.0 + */ +const getOrNull = exports.getOrNull = /*#__PURE__*/getOrElse(_Function.constNull); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either } from "effect" + * + * assert.deepStrictEqual(Either.getOrUndefined(Either.right(1)), 1) + * assert.deepStrictEqual(Either.getOrUndefined(Either.left("a")), undefined) + * ``` + * + * @category getters + * @since 2.0.0 + */ +const getOrUndefined = exports.getOrUndefined = /*#__PURE__*/getOrElse(_Function.constUndefined); +/** + * Extracts the value of an `Either` or throws if the `Either` is `Left`. + * + * If a default error is sufficient for your use case and you don't need to configure the thrown error, see {@link getOrThrow}. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either } from "effect" + * + * assert.deepStrictEqual( + * Either.getOrThrowWith(Either.right(1), () => new Error('Unexpected Left')), + * 1 + * ) + * assert.throws(() => Either.getOrThrowWith(Either.left("error"), () => new Error('Unexpected Left'))) + * ``` + * + * @category getters + * @since 2.0.0 + */ +const getOrThrowWith = exports.getOrThrowWith = /*#__PURE__*/(0, _Function.dual)(2, (self, onLeft) => { + if (isRight(self)) { + return self.right; + } + throw onLeft(self.left); +}); +// TODO(4.0): by default should throw `L` (i.e getOrThrowWith with the identity function) +/** + * Extracts the value of an `Either` or throws if the `Either` is `Left`. + * + * The thrown error is a default error. To configure the error thrown, see {@link getOrThrowWith}. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either } from "effect" + * + * assert.deepStrictEqual(Either.getOrThrow(Either.right(1)), 1) + * assert.throws(() => Either.getOrThrow(Either.left("error"))) + * ``` + * + * @throws `Error("getOrThrow called on a Left")` + * + * @category getters + * @since 2.0.0 + */ +const getOrThrow = exports.getOrThrow = /*#__PURE__*/getOrThrowWith(() => new Error("getOrThrow called on a Left")); +/** + * Returns `self` if it is a `Right` or `that` otherwise. + * + * @category error handling + * @since 2.0.0 + */ +const orElse = exports.orElse = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => isLeft(self) ? that(self.left) : right(self.right)); +/** + * @category sequencing + * @since 2.0.0 + */ +const flatMap = exports.flatMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => isLeft(self) ? left(self.left) : f(self.right)); +/** + * Executes a sequence of two `Either`s. The second `Either` can be dependent on the result of the first `Either`. + * + * @category sequencing + * @since 2.0.0 + */ +const andThen = exports.andThen = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => flatMap(self, a => { + const b = (0, _Predicate.isFunction)(f) ? f(a) : f; + return isEither(b) ? b : right(b); +})); +/** + * @category zipping + * @since 2.0.0 + */ +const zipWith = exports.zipWith = /*#__PURE__*/(0, _Function.dual)(3, (self, that, f) => flatMap(self, r => map(that, r2 => f(r, r2)))); +/** + * @category combining + * @since 2.0.0 + */ +const ap = exports.ap = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => zipWith(self, that, (f, a) => f(a))); +/** + * Takes a structure of `Either`s and returns an `Either` of values with the same structure. + * + * - If a tuple is supplied, then the returned `Either` will contain a tuple with the same length. + * - If a struct is supplied, then the returned `Either` will contain a struct with the same keys. + * - If an iterable is supplied, then the returned `Either` will contain an array. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either } from "effect" + * + * assert.deepStrictEqual(Either.all([Either.right(1), Either.right(2)]), Either.right([1, 2])) + * assert.deepStrictEqual(Either.all({ right: Either.right(1), b: Either.right("hello") }), Either.right({ right: 1, b: "hello" })) + * assert.deepStrictEqual(Either.all({ right: Either.right(1), b: Either.left("error") }), Either.left("error")) + * ``` + * + * @category combining + * @since 2.0.0 + */ +// @ts-expect-error +const all = input => { + if (Symbol.iterator in input) { + const out = []; + for (const e of input) { + if (isLeft(e)) { + return e; + } + out.push(e.right); + } + return right(out); + } + const out = {}; + for (const key of Object.keys(input)) { + const e = input[key]; + if (isLeft(e)) { + return e; + } + out[key] = e.right; + } + return right(out); +}; +/** + * Returns an `Either` that swaps the error/success cases. This allows you to + * use all methods on the error channel, possibly before flipping back. + * + * @since 2.0.0 + * @category mapping + */ +exports.all = all; +const flip = self => isLeft(self) ? right(self.left) : left(self.right); +exports.flip = flip; +const adapter = /*#__PURE__*/Gen.adapter(); +/** + * @category generators + * @since 2.0.0 + */ +const gen = (...args) => { + const f = args.length === 1 ? args[0] : args[1].bind(args[0]); + const iterator = f(adapter); + let state = iterator.next(); + while (!state.done) { + const current = Gen.isGenKind(state.value) ? state.value.value : Gen.yieldWrapGet(state.value); + if (isLeft(current)) { + return current; + } + state = iterator.next(current.right); + } + return right(state.value); +}; +// ------------------------------------------------------------------------------------- +// do notation +// ------------------------------------------------------------------------------------- +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Either` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either, pipe } from "effect" + * + * const result = pipe( + * Either.Do, + * Either.bind("x", () => Either.right(2)), + * Either.bind("y", () => Either.right(3)), + * Either.let("sum", ({ x, y }) => x + y) + * ) + * assert.deepStrictEqual(result, Either.right({ x: 2, y: 3, sum: 5 })) + * ``` + * + * @see {@link bind} + * @see {@link bindTo} + * @see {@link let_ let} + * + * @category do notation + * @since 2.0.0 + */ +exports.gen = gen; +const Do = exports.Do = /*#__PURE__*/right({}); +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Either` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either, pipe } from "effect" + * + * const result = pipe( + * Either.Do, + * Either.bind("x", () => Either.right(2)), + * Either.bind("y", () => Either.right(3)), + * Either.let("sum", ({ x, y }) => x + y) + * ) + * assert.deepStrictEqual(result, Either.right({ x: 2, y: 3, sum: 5 })) + * ``` + * + * @see {@link Do} + * @see {@link bindTo} + * @see {@link let_ let} + * + * @category do notation + * @since 2.0.0 + */ +const bind = exports.bind = /*#__PURE__*/doNotation.bind(map, flatMap); +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Either` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either, pipe } from "effect" + * + * const result = pipe( + * Either.Do, + * Either.bind("x", () => Either.right(2)), + * Either.bind("y", () => Either.right(3)), + * Either.let("sum", ({ x, y }) => x + y) + * ) + * assert.deepStrictEqual(result, Either.right({ x: 2, y: 3, sum: 5 })) + * ``` + * + * @see {@link Do} + * @see {@link bind} + * @see {@link let_ let} + * + * @category do notation + * @since 2.0.0 + */ +const bindTo = exports.bindTo = /*#__PURE__*/doNotation.bindTo(map); +const let_ = exports.let = /*#__PURE__*/doNotation.let_(map); +/** + * Converts an `Option` of an `Either` into an `Either` of an `Option`. + * + * **Details** + * + * This function transforms an `Option>` into an + * `Either, E>`. If the `Option` is `None`, the resulting `Either` + * will be a `Right` with a `None` value. If the `Option` is `Some`, the + * inner `Either` will be executed, and its result wrapped in a `Some`. + * + * @example + * ```ts + * import { Effect, Either, Option } from "effect" + * + * // ┌─── Option> + * // ▼ + * const maybe = Option.some(Either.right(42)) + * + * // ┌─── Either, never, never> + * // ▼ + * const result = Either.transposeOption(maybe) + * + * console.log(Effect.runSync(result)) + * // Output: { _id: 'Option', _tag: 'Some', value: 42 } + * ``` + * + * @since 3.14.0 + * @category Optional Wrapping & Unwrapping + */ +const transposeOption = self => { + return option_.isNone(self) ? right(option_.none) : map(self.value, option_.some); +}; +/** + * Applies an `Either` on an `Option` and transposes the result. + * + * **Details** + * + * If the `Option` is `None`, the resulting `Either` will immediately succeed with a `Right` value of `None`. + * If the `Option` is `Some`, the transformation function will be applied to the inner value, and its result wrapped in a `Some`. + * + * @example + * ```ts + * import { Either, Option, pipe } from "effect" + * + * // ┌─── Either, never>> + * // ▼ + * const noneResult = pipe( + * Option.none(), + * Either.transposeMapOption(() => Either.right(42)) // will not be executed + * ) + * console.log(noneResult) + * // Output: { _id: 'Either', _tag: 'Right', right: { _id: 'Option', _tag: 'None' } } + * + * // ┌─── Either, never>> + * // ▼ + * const someRightResult = pipe( + * Option.some(42), + * Either.transposeMapOption((value) => Either.right(value * 2)) + * ) + * console.log(someRightResult) + * // Output: { _id: 'Either', _tag: 'Right', right: { _id: 'Option', _tag: 'Some', value: 84 } } + * ``` + * + * @since 3.15.0 + * @category Optional Wrapping & Unwrapping + */ +exports.transposeOption = transposeOption; +const transposeMapOption = exports.transposeMapOption = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => option_.isNone(self) ? right(option_.none) : map(f(self.value), option_.some)); +//# sourceMappingURL=Either.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Encoding.js b/backend/node_modules/effect/dist/cjs/Encoding.js new file mode 100644 index 0000000000000000000000000000000000000000..1fde178e6e2bea498e8634581da5d53a917d0f4d --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Encoding.js @@ -0,0 +1,155 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isEncodeException = exports.isDecodeException = exports.encodeUriComponent = exports.encodeHex = exports.encodeBase64Url = exports.encodeBase64 = exports.decodeUriComponent = exports.decodeHexString = exports.decodeHex = exports.decodeBase64UrlString = exports.decodeBase64Url = exports.decodeBase64String = exports.decodeBase64 = exports.EncodeExceptionTypeId = exports.EncodeException = exports.DecodeExceptionTypeId = exports.DecodeException = void 0; +var Either = _interopRequireWildcard(require("./Either.js")); +var Base64 = _interopRequireWildcard(require("./internal/encoding/base64.js")); +var Base64Url = _interopRequireWildcard(require("./internal/encoding/base64Url.js")); +var Common = _interopRequireWildcard(require("./internal/encoding/common.js")); +var Hex = _interopRequireWildcard(require("./internal/encoding/hex.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * This module provides encoding & decoding functionality for: + * + * - base64 (RFC4648) + * - base64 (URL) + * - hex + * + * @since 2.0.0 + */ + +/** + * Encodes the given value into a base64 (RFC4648) `string`. + * + * @category encoding + * @since 2.0.0 + */ +const encodeBase64 = input => typeof input === "string" ? Base64.encode(Common.encoder.encode(input)) : Base64.encode(input); +/** + * Decodes a base64 (RFC4648) encoded `string` into a `Uint8Array`. + * + * @category decoding + * @since 2.0.0 + */ +exports.encodeBase64 = encodeBase64; +const decodeBase64 = str => Base64.decode(str); +/** + * Decodes a base64 (RFC4648) encoded `string` into a UTF-8 `string`. + * + * @category decoding + * @since 2.0.0 + */ +exports.decodeBase64 = decodeBase64; +const decodeBase64String = str => Either.map(decodeBase64(str), _ => Common.decoder.decode(_)); +/** + * Encodes the given value into a base64 (URL) `string`. + * + * @category encoding + * @since 2.0.0 + */ +exports.decodeBase64String = decodeBase64String; +const encodeBase64Url = input => typeof input === "string" ? Base64Url.encode(Common.encoder.encode(input)) : Base64Url.encode(input); +/** + * Decodes a base64 (URL) encoded `string` into a `Uint8Array`. + * + * @category decoding + * @since 2.0.0 + */ +exports.encodeBase64Url = encodeBase64Url; +const decodeBase64Url = str => Base64Url.decode(str); +/** + * Decodes a base64 (URL) encoded `string` into a UTF-8 `string`. + * + * @category decoding + * @since 2.0.0 + */ +exports.decodeBase64Url = decodeBase64Url; +const decodeBase64UrlString = str => Either.map(decodeBase64Url(str), _ => Common.decoder.decode(_)); +/** + * Encodes the given value into a hex `string`. + * + * @category encoding + * @since 2.0.0 + */ +exports.decodeBase64UrlString = decodeBase64UrlString; +const encodeHex = input => typeof input === "string" ? Hex.encode(Common.encoder.encode(input)) : Hex.encode(input); +/** + * Decodes a hex encoded `string` into a `Uint8Array`. + * + * @category decoding + * @since 2.0.0 + */ +exports.encodeHex = encodeHex; +const decodeHex = str => Hex.decode(str); +/** + * Decodes a hex encoded `string` into a UTF-8 `string`. + * + * @category decoding + * @since 2.0.0 + */ +exports.decodeHex = decodeHex; +const decodeHexString = str => Either.map(decodeHex(str), _ => Common.decoder.decode(_)); +/** + * Encodes a UTF-8 `string` into a URI component `string`. + * + * @category encoding + * @since 3.12.0 + */ +exports.decodeHexString = decodeHexString; +const encodeUriComponent = str => Either.try({ + try: () => encodeURIComponent(str), + catch: e => EncodeException(str, e instanceof Error ? e.message : "Invalid input") +}); +/** + * Decodes a URI component `string` into a UTF-8 `string`. + * + * @category decoding + * @since 3.12.0 + */ +exports.encodeUriComponent = encodeUriComponent; +const decodeUriComponent = str => Either.try({ + try: () => decodeURIComponent(str), + catch: e => DecodeException(str, e instanceof Error ? e.message : "Invalid input") +}); +/** + * @since 2.0.0 + * @category symbols + */ +exports.decodeUriComponent = decodeUriComponent; +const DecodeExceptionTypeId = exports.DecodeExceptionTypeId = Common.DecodeExceptionTypeId; +/** + * Creates a checked exception which occurs when decoding fails. + * + * @since 2.0.0 + * @category errors + */ +const DecodeException = exports.DecodeException = Common.DecodeException; +/** + * Returns `true` if the specified value is an `DecodeException`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isDecodeException = exports.isDecodeException = Common.isDecodeException; +/** + * @since 3.12.0 + * @category symbols + */ +const EncodeExceptionTypeId = exports.EncodeExceptionTypeId = Common.EncodeExceptionTypeId; +/** + * Creates a checked exception which occurs when encoding fails. + * + * @since 3.12.0 + * @category errors + */ +const EncodeException = exports.EncodeException = Common.EncodeException; +/** + * Returns `true` if the specified value is an `EncodeException`, `false` otherwise. + * + * @since 3.12.0 + * @category refinements + */ +const isEncodeException = exports.isEncodeException = Common.isEncodeException; +//# sourceMappingURL=Encoding.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Encoding.js.map b/backend/node_modules/effect/dist/cjs/Encoding.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ec3cd16ae04e366f836837613012dad484decd7d --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Encoding.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Encoding.js","names":["Either","_interopRequireWildcard","require","Base64","Base64Url","Common","Hex","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","encodeBase64","input","encode","encoder","exports","decodeBase64","str","decode","decodeBase64String","map","_","decoder","encodeBase64Url","decodeBase64Url","decodeBase64UrlString","encodeHex","decodeHex","decodeHexString","encodeUriComponent","try","encodeURIComponent","catch","EncodeException","Error","message","decodeUriComponent","decodeURIComponent","DecodeException","DecodeExceptionTypeId","isDecodeException","EncodeExceptionTypeId","isEncodeException"],"sources":["../../src/Encoding.ts"],"sourcesContent":[null],"mappings":";;;;;;AASA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,SAAA,GAAAH,uBAAA,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AAAvB,OAAA,CAAAuB,eAAA,GAAyDhD,MAAM,CAACgD,eAAe;AAE3G;;;;;;AAMO,MAAME,iBAAiB,GAAAzB,OAAA,CAAAyB,iBAAA,GAAyClD,MAAM,CAACkD,iBAAiB;AAE/F;;;;AAIO,MAAMC,qBAAqB,GAAA1B,OAAA,CAAA0B,qBAAA,GAAkBnD,MAAM,CAACmD,qBAAqB;AAqBhF;;;;;;AAMO,MAAMR,eAAe,GAAAlB,OAAA,CAAAkB,eAAA,GAAyD3C,MAAM,CAAC2C,eAAe;AAE3G;;;;;;AAMO,MAAMS,iBAAiB,GAAA3B,OAAA,CAAA2B,iBAAA,GAAyCpD,MAAM,CAACoD,iBAAiB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Equal.js b/backend/node_modules/effect/dist/cjs/Equal.js new file mode 100644 index 0000000000000000000000000000000000000000..7d65ed256b89614b0df670db452d1f403530c984 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Equal.js @@ -0,0 +1,84 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.equals = equals; +exports.symbol = exports.isEqual = exports.equivalence = void 0; +var Hash = _interopRequireWildcard(require("./Hash.js")); +var _Predicate = require("./Predicate.js"); +var _Utils = require("./Utils.js"); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const symbol = exports.symbol = /*#__PURE__*/Symbol.for("effect/Equal"); +function equals() { + if (arguments.length === 1) { + return self => compareBoth(self, arguments[0]); + } + return compareBoth(arguments[0], arguments[1]); +} +function compareBoth(self, that) { + if (self === that) { + return true; + } + const selfType = typeof self; + if (selfType !== typeof that) { + return false; + } + if (selfType === "object" || selfType === "function") { + if (self !== null && that !== null) { + if (isEqual(self) && isEqual(that)) { + if (Hash.hash(self) === Hash.hash(that) && self[symbol](that)) { + return true; + } else { + return _Utils.structuralRegionState.enabled && _Utils.structuralRegionState.tester ? _Utils.structuralRegionState.tester(self, that) : false; + } + } else if (self instanceof Date && that instanceof Date) { + const t1 = self.getTime(); + const t2 = that.getTime(); + return t1 === t2 || Number.isNaN(t1) && Number.isNaN(t2); + } else if (self instanceof URL && that instanceof URL) { + return self.href === that.href; + } + } + if (_Utils.structuralRegionState.enabled) { + if (self === null || that === null) { + return false; + } + if (Array.isArray(self) && Array.isArray(that)) { + return self.length === that.length && self.every((v, i) => compareBoth(v, that[i])); + } + if (Object.getPrototypeOf(self) === Object.prototype && Object.getPrototypeOf(that) === Object.prototype) { + const keysSelf = Object.keys(self); + const keysThat = Object.keys(that); + if (keysSelf.length === keysThat.length) { + for (const key of keysSelf) { + // @ts-expect-error + if (!(key in that && compareBoth(self[key], that[key]))) { + return _Utils.structuralRegionState.tester ? _Utils.structuralRegionState.tester(self, that) : false; + } + } + return true; + } + } + return _Utils.structuralRegionState.tester ? _Utils.structuralRegionState.tester(self, that) : false; + } + } + return _Utils.structuralRegionState.enabled && _Utils.structuralRegionState.tester ? _Utils.structuralRegionState.tester(self, that) : false; +} +/** + * @since 2.0.0 + * @category guards + */ +const isEqual = u => (0, _Predicate.hasProperty)(u, symbol); +/** + * @since 2.0.0 + * @category instances + */ +exports.isEqual = isEqual; +const equivalence = () => equals; +exports.equivalence = equivalence; +//# sourceMappingURL=Equal.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Equal.js.map b/backend/node_modules/effect/dist/cjs/Equal.js.map new file mode 100644 index 0000000000000000000000000000000000000000..4a34c3c998f14d11f1ae67e5594b741730e4b8f2 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Equal.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Equal.js","names":["Hash","_interopRequireWildcard","require","_Predicate","_Utils","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","symbol","exports","Symbol","for","equals","arguments","length","self","compareBoth","that","selfType","isEqual","hash","structuralRegionState","enabled","tester","Date","t1","getTime","t2","Number","isNaN","URL","href","Array","isArray","every","v","getPrototypeOf","prototype","keysSelf","keys","keysThat","key","u","hasProperty","equivalence"],"sources":["../../src/Equal.ts"],"sourcesContent":[null],"mappings":";;;;;;;AAIA,IAAAA,IAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAAkD,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,G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IAAW,CAAC;QACzC,MAAMyB,QAAQ,GAAGnC,MAAM,CAACkC,IAAI,CAACtB,IAAW,CAAC;QACzC,IAAIqB,QAAQ,CAACxB,MAAM,KAAK0B,QAAQ,CAAC1B,MAAM,EAAE;UACvC,KAAK,MAAM2B,GAAG,IAAIH,QAAQ,EAAE;YAC1B;YACA,IAAI,EAAEG,GAAG,IAAIxB,IAAI,IAAID,WAAW,CAACD,IAAI,CAAC0B,GAAG,CAAC,EAAExB,IAAI,CAACwB,GAAG,CAAC,CAAC,CAAC,EAAE;cACvD,OAAOpB,4BAAqB,CAACE,MAAM,GAAGF,4BAAqB,CAACE,MAAM,CAACR,IAAI,EAAEE,IAAI,CAAC,GAAG,KAAK;YACxF;UACF;UACA,OAAO,IAAI;QACb;MACF;MACA,OAAOI,4BAAqB,CAACE,MAAM,GAAGF,4BAAqB,CAACE,MAAM,CAACR,IAAI,EAAEE,IAAI,CAAC,GAAG,KAAK;IACxF;EACF;EAEA,OAAOI,4BAAqB,CAACC,OAAO,IAAID,4BAAqB,CAACE,MAAM,GAChEF,4BAAqB,CAACE,MAAM,CAACR,IAAI,EAAEE,IAAI,CAAC,GACxC,KAAK;AACX;AAEA;;;;AAIO,MAAME,OAAO,GAAIuB,CAAU,IAAiB,IAAAC,sBAAW,EAACD,CAAC,EAAElC,MAAM,CAAC;AAEzE;;;;AAAAC,OAAA,CAAAU,OAAA,GAAAA,OAAA;AAIO,MAAMyB,WAAW,GAA4BA,CAAA,KAAMhC,MAAM;AAAAH,OAAA,CAAAmC,WAAA,GAAAA,WAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Equivalence.js b/backend/node_modules/effect/dist/cjs/Equivalence.js new file mode 100644 index 0000000000000000000000000000000000000000..e391e4791d6857ad9bbfcfa3545a17b7665d1146 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Equivalence.js @@ -0,0 +1,181 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.tuple = exports.symbol = exports.struct = exports.string = exports.strict = exports.productMany = exports.product = exports.number = exports.mapInput = exports.make = exports.combineMany = exports.combineAll = exports.combine = exports.boolean = exports.bigint = exports.array = exports.all = exports.Date = void 0; +var _Function = require("./Function.js"); +/** + * This module provides an implementation of the `Equivalence` type class, which defines a binary relation + * that is reflexive, symmetric, and transitive. In other words, it defines a notion of equivalence between values of a certain type. + * These properties are also known in mathematics as an "equivalence relation". + * + * @since 2.0.0 + */ + +/** + * @category constructors + * @since 2.0.0 + */ +const make = isEquivalent => (self, that) => self === that || isEquivalent(self, that); +exports.make = make; +const isStrictEquivalent = (x, y) => x === y; +/** + * Return an `Equivalence` that uses strict equality (===) to compare values. + * + * @since 2.0.0 + * @category constructors + */ +const strict = () => isStrictEquivalent; +/** + * @category instances + * @since 2.0.0 + */ +exports.strict = strict; +const string = exports.string = /*#__PURE__*/strict(); +/** + * @category instances + * @since 2.0.0 + */ +const number = exports.number = /*#__PURE__*/strict(); +/** + * @category instances + * @since 2.0.0 + */ +const boolean = exports.boolean = /*#__PURE__*/strict(); +/** + * @category instances + * @since 2.0.0 + */ +const bigint = exports.bigint = /*#__PURE__*/strict(); +/** + * @category instances + * @since 2.0.0 + */ +const symbol = exports.symbol = /*#__PURE__*/strict(); +/** + * @category combining + * @since 2.0.0 + */ +const combine = exports.combine = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => make((x, y) => self(x, y) && that(x, y))); +/** + * @category combining + * @since 2.0.0 + */ +const combineMany = exports.combineMany = /*#__PURE__*/(0, _Function.dual)(2, (self, collection) => make((x, y) => { + if (!self(x, y)) { + return false; + } + for (const equivalence of collection) { + if (!equivalence(x, y)) { + return false; + } + } + return true; +})); +const isAlwaysEquivalent = (_x, _y) => true; +/** + * @category combining + * @since 2.0.0 + */ +const combineAll = collection => combineMany(isAlwaysEquivalent, collection); +/** + * @category mapping + * @since 2.0.0 + */ +exports.combineAll = combineAll; +const mapInput = exports.mapInput = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => make((x, y) => self(f(x), f(y)))); +/** + * @category instances + * @since 2.0.0 + */ +const Date = exports.Date = /*#__PURE__*/mapInput(number, date => date.getTime()); +/** + * @category combining + * @since 2.0.0 + */ +const product = exports.product = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => make(([xa, xb], [ya, yb]) => self(xa, ya) && that(xb, yb))); +/** + * @category combining + * @since 2.0.0 + */ +const all = collection => { + return make((x, y) => { + const len = Math.min(x.length, y.length); + let collectionLength = 0; + for (const equivalence of collection) { + if (collectionLength >= len) { + break; + } + if (!equivalence(x[collectionLength], y[collectionLength])) { + return false; + } + collectionLength++; + } + return true; + }); +}; +/** + * @category combining + * @since 2.0.0 + */ +exports.all = all; +const productMany = (self, collection) => { + const equivalence = all(collection); + return make((x, y) => !self(x[0], y[0]) ? false : equivalence(x.slice(1), y.slice(1))); +}; +/** + * Similar to `Promise.all` but operates on `Equivalence`s. + * + * ```ts skip-type-checking + * [Equivalence, Equivalence, ...] -> Equivalence<[A, B, ...]> + * ``` + * + * Given a tuple of `Equivalence`s returns a new `Equivalence` that compares values of a tuple + * by applying each `Equivalence` to the corresponding element of the tuple. + * + * @category combinators + * @since 2.0.0 + */ +exports.productMany = productMany; +const tuple = (...elements) => all(elements); +/** + * Creates a new `Equivalence` for an array of values based on a given `Equivalence` for the elements of the array. + * + * @category combinators + * @since 2.0.0 + */ +exports.tuple = tuple; +const array = item => make((self, that) => { + if (self.length !== that.length) { + return false; + } + for (let i = 0; i < self.length; i++) { + const isEq = item(self[i], that[i]); + if (!isEq) { + return false; + } + } + return true; +}); +/** + * Given a struct of `Equivalence`s returns a new `Equivalence` that compares values of a struct + * by applying each `Equivalence` to the corresponding property of the struct. + * + * @category combinators + * @since 2.0.0 + */ +exports.array = array; +const struct = fields => { + const keys = Object.keys(fields); + return make((self, that) => { + for (const key of keys) { + if (!fields[key](self[key], that[key])) { + return false; + } + } + return true; + }); +}; +exports.struct = struct; +//# sourceMappingURL=Equivalence.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/ExecutionPlan.js.map b/backend/node_modules/effect/dist/cjs/ExecutionPlan.js.map new file mode 100644 index 0000000000000000000000000000000000000000..421427bf53221512a9eeafcccffcf3fa746f3d80 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/ExecutionPlan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ExecutionPlan.js","names":["Effect","_interopRequireWildcard","require","internal","Layer","_Pipeable","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","exports","isExecutionPlan","make","steps","makeProto","map","options","attempts","Error","schedule","while","input","suspend","result","succeed","undefined","provide","Proto","withRequirements","self","contextWith","context","step","isLayer","succeedContext","pipe","pipeArguments","arguments","create","merge","plans","flatMap","plan"],"sources":["../../src/ExecutionPlan.ts"],"sourcesContent":[null],"mappings":";;;;;;AAMA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,KAAA,GAAAH,uBAAA,CAAAC,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AAA6C,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ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E,MAAM,KAAK,SAAS,GAAGvC,MAAM,CAACwC,OAAO,CAACD,MAAM,CAAC,GAAGA,MAAM;IACtE,CAAC,CAAC,GACFE,SAAS;IACbC,OAAO,EAAEV,OAAO,CAACU;GAClB;AACH,CAAC,CAAQ,CAAC;AAAAhB,OAAA,CAAAE,IAAA,GAAAA,IAAA;AAmEZ,MAAMe,KAAK,GAAsC;EAC/C,CAAClB,MAAM,GAAGA,MAAM;EAChB,IAAImB,gBAAgBA,CAAA;IAClB,MAAMC,IAAI,GAAG,IAAiC;IAC9C,OAAO7C,MAAM,CAAC8C,WAAW,CAAEC,OAA6B,IACtDjB,SAAS,CAACe,IAAI,CAAChB,KAAK,CAACE,GAAG,CAAEiB,IAAI,KAAM;MAClC,GAAGA,IAAI;MACPN,OAAO,EAAEtC,KAAK,CAAC6C,OAAO,CAACD,IAAI,CAACN,OAAO,CAAC,GAAGtC,KAAK,CAACsC,OAAO,CAACM,IAAI,CAACN,OAAO,EAAEtC,KAAK,CAAC8C,cAAc,CAACH,OAAO,CAAC,CAAC,GAAGC,IAAI,CAACN;KAC1G,CAAC,CAAQ,CAAC,CACZ;EACH,CAAC;EACDS,IAAIA,CAAA;IACF,OAAO,IAAAC,uBAAa,EAAC,IAAI,EAAEC,SAAS,CAAC;EACvC;CACD;AAED,MAAMvB,SAAS,GACbD,KAKW,IACT;EACF,MAAMgB,IAAI,GAAGvB,MAAM,CAACgC,MAAM,CAACX,KAAK,CAAC;EACjCE,IAAI,CAAChB,KAAK,GAAGA,KAAK;EAClB,OAAOgB,IAAI;AACb,CAAC;AAED;;;;;AAKO,MAAMU,KAAK,GAAGA,CACnB,GAAGC,KAAY,KAMX1B,SAAS,CAAC0B,KAAK,CAACC,OAAO,CAAEC,IAAI,IAAKA,IAAI,CAAC7B,KAAK,CAAQ,CAAC;AAAAH,OAAA,CAAA6B,KAAA,GAAAA,KAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/ExecutionStrategy.js b/backend/node_modules/effect/dist/cjs/ExecutionStrategy.js new file mode 100644 index 0000000000000000000000000000000000000000..a9fae8d52a708ea9e37efaeb86e57d741f1f4777 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/ExecutionStrategy.js @@ -0,0 +1,62 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.sequential = exports.parallelN = exports.parallel = exports.match = exports.isSequential = exports.isParallelN = exports.isParallel = void 0; +var internal = _interopRequireWildcard(require("./internal/executionStrategy.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * Execute effects sequentially. + * + * @since 2.0.0 + * @category constructors + */ +const sequential = exports.sequential = internal.sequential; +/** + * Execute effects in parallel. + * + * @since 2.0.0 + * @category constructors + */ +const parallel = exports.parallel = internal.parallel; +/** + * Execute effects in parallel, up to the specified number of concurrent fibers. + * + * @since 2.0.0 + * @category constructors + */ +const parallelN = exports.parallelN = internal.parallelN; +/** + * Returns `true` if the specified `ExecutionStrategy` is an instance of + * `Sequential`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isSequential = exports.isSequential = internal.isSequential; +/** + * Returns `true` if the specified `ExecutionStrategy` is an instance of + * `Sequential`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isParallel = exports.isParallel = internal.isParallel; +/** + * Returns `true` if the specified `ExecutionStrategy` is an instance of + * `Sequential`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isParallelN = exports.isParallelN = internal.isParallelN; +/** + * Folds over the specified `ExecutionStrategy` using the provided case + * functions. + * + * @since 2.0.0 + * @category folding + */ +const match = exports.match = internal.match; +//# sourceMappingURL=ExecutionStrategy.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/ExecutionStrategy.js.map b/backend/node_modules/effect/dist/cjs/ExecutionStrategy.js.map new file mode 100644 index 0000000000000000000000000000000000000000..67a058f2f1a7f30c41b42713150f80b34ac7016d --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/ExecutionStrategy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ExecutionStrategy.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","sequential","exports","parallel","parallelN","isSequential","isParallel","isParallelN","match"],"sources":["../../src/ExecutionStrategy.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA2D,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AA6C3D;;;;;;AAMO,MAAMkB,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAsBtB,QAAQ,CAACsB,UAAU;AAEhE;;;;;;AAMO,MAAME,QAAQ,GAAAD,OAAA,CAAAC,QAAA,GAAsBxB,QAAQ,CAACwB,QAAQ;AAE5D;;;;;;AAMO,MAAMC,SAAS,GAAAF,OAAA,CAAAE,SAAA,GAA+CzB,QAAQ,CAACyB,SAAS;AAEvF;;;;;;;AAOO,MAAMC,YAAY,GAAAH,OAAA,CAAAG,YAAA,GAAoD1B,QAAQ,CAAC0B,YAAY;AAElG;;;;;;;AAOO,MAAMC,UAAU,GAAAJ,OAAA,CAAAI,UAAA,GAAkD3B,QAAQ,CAAC2B,UAAU;AAE5F;;;;;;;AAOO,MAAMC,WAAW,GAAAL,OAAA,CAAAK,WAAA,GAAmD5B,QAAQ,CAAC4B,WAAW;AAE/F;;;;;;;AAOO,MAAMC,KAAK,GAAAN,OAAA,CAAAM,KAAA,GA8Bd7B,QAAQ,CAAC6B,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Exit.js b/backend/node_modules/effect/dist/cjs/Exit.js new file mode 100644 index 0000000000000000000000000000000000000000..8731a2b239b6d8b664e8adebcbf6b4d5cfadb909 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Exit.js @@ -0,0 +1,256 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.zipWith = exports.zipRight = exports.zipParRight = exports.zipParLeft = exports.zipPar = exports.zipLeft = exports.zip = exports.void = exports.succeed = exports.matchEffect = exports.match = exports.mapErrorCause = exports.mapError = exports.mapBoth = exports.map = exports.isSuccess = exports.isInterrupted = exports.isFailure = exports.isExit = exports.interrupt = exports.getOrElse = exports.fromOption = exports.fromEither = exports.forEachEffect = exports.flatten = exports.flatMapEffect = exports.flatMap = exports.failCause = exports.fail = exports.exists = exports.die = exports.causeOption = exports.asVoid = exports.as = exports.all = void 0; +var core = _interopRequireWildcard(require("./internal/core.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * Returns `true` if the specified value is an `Exit`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isExit = exports.isExit = core.exitIsExit; +/** + * Returns `true` if the specified `Exit` is a `Failure`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isFailure = exports.isFailure = core.exitIsFailure; +/** + * Returns `true` if the specified `Exit` is a `Success`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isSuccess = exports.isSuccess = core.exitIsSuccess; +/** + * Returns `true` if the specified exit is a `Failure` **and** the `Cause` of + * the failure was due to interruption, `false` otherwise. + * + * @since 2.0.0 + * @category getters + */ +const isInterrupted = exports.isInterrupted = core.exitIsInterrupted; +/** + * Maps the `Success` value of the specified exit to the provided constant + * value. + * + * @since 2.0.0 + * @category mapping + */ +const as = exports.as = core.exitAs; +/** + * Maps the `Success` value of the specified exit to a void. + * + * @since 2.0.0 + * @category mapping + */ +const asVoid = exports.asVoid = core.exitAsVoid; +/** + * Returns a `Some>` if the specified exit is a `Failure`, `None` + * otherwise. + * + * @since 2.0.0 + * @category getters + */ +const causeOption = exports.causeOption = core.exitCauseOption; +/** + * Collects all of the specified exit values into a `Some, E>>`. If + * the provided iterable contains no elements, `None` will be returned. + * + * @since 2.0.0 + * @category constructors + */ +const all = exports.all = core.exitCollectAll; +/** + * Constructs a new `Exit.Failure` from the specified unrecoverable defect. + * + * @since 2.0.0 + * @category constructors + */ +const die = exports.die = core.exitDie; +/** + * Executes the predicate on the value of the specified exit if it is a + * `Success`, otherwise returns `false`. + * + * @since 2.0.0 + * @category elements + */ +const exists = exports.exists = core.exitExists; +/** + * Constructs a new `Exit.Failure` from the specified recoverable error of type + * `E`. + * + * @since 2.0.0 + * @category constructors + */ +const fail = exports.fail = core.exitFail; +/** + * Constructs a new `Exit.Failure` from the specified `Cause` of type `E`. + * + * @since 2.0.0 + * @category constructors + */ +const failCause = exports.failCause = core.exitFailCause; +/** + * @since 2.0.0 + * @category sequencing + */ +const flatMap = exports.flatMap = core.exitFlatMap; +/** + * @since 2.0.0 + * @category sequencing + */ +const flatMapEffect = exports.flatMapEffect = core.exitFlatMapEffect; +/** + * @since 2.0.0 + * @category sequencing + */ +const flatten = exports.flatten = core.exitFlatten; +/** + * @since 2.0.0 + * @category traversing + */ +const forEachEffect = exports.forEachEffect = core.exitForEachEffect; +/** + * Converts an `Either` into an `Exit`. + * + * @since 2.0.0 + * @category conversions + */ +const fromEither = exports.fromEither = core.exitFromEither; +/** + * Converts an `Option` into an `Exit`. + * + * @since 2.0.0 + * @category conversions + */ +const fromOption = exports.fromOption = core.exitFromOption; +/** + * Returns the `A` if specified exit is a `Success`, otherwise returns the + * alternate `A` value computed from the specified function which receives the + * `Cause` of the exit `Failure`. + * + * @since 2.0.0 + * @category getters + */ +const getOrElse = exports.getOrElse = core.exitGetOrElse; +/** + * Constructs a new `Exit.Failure` from the specified `FiberId` indicating that + * the `Fiber` running an `Effect` workflow was terminated due to interruption. + * + * @since 2.0.0 + * @category constructors + */ +const interrupt = exports.interrupt = core.exitInterrupt; +/** + * Maps over the `Success` value of the specified exit using the provided + * function. + * + * @since 2.0.0 + * @category mapping + */ +const map = exports.map = core.exitMap; +/** + * Maps over the `Success` and `Failure` cases of the specified exit using the + * provided functions. + * + * @since 2.0.0 + * @category mapping + */ +const mapBoth = exports.mapBoth = core.exitMapBoth; +/** + * Maps over the error contained in the `Failure` of the specified exit using + * the provided function. + * + * @since 2.0.0 + * @category mapping + */ +const mapError = exports.mapError = core.exitMapError; +/** + * Maps over the `Cause` contained in the `Failure` of the specified exit using + * the provided function. + * + * @since 2.0.0 + * @category mapping + */ +const mapErrorCause = exports.mapErrorCause = core.exitMapErrorCause; +/** + * @since 2.0.0 + * @category folding + */ +const match = exports.match = core.exitMatch; +/** + * @since 2.0.0 + * @category folding + */ +const matchEffect = exports.matchEffect = core.exitMatchEffect; +/** + * Constructs a new `Exit.Success` containing the specified value of type `A`. + * + * @since 2.0.0 + * @category constructors + */ +const succeed = exports.succeed = core.exitSucceed; +const void_ = exports.void = core.exitVoid; +/** + * Sequentially zips the this result with the specified result or else returns + * the failed `Cause`. + * + * @since 2.0.0 + * @category zipping + */ +const zip = exports.zip = core.exitZip; +/** + * Sequentially zips the this result with the specified result discarding the + * second element of the tuple or else returns the failed `Cause`. + * + * @since 2.0.0 + * @category zipping + */ +const zipLeft = exports.zipLeft = core.exitZipLeft; +/** + * Sequentially zips the this result with the specified result discarding the + * first element of the tuple or else returns the failed `Cause`. + * + * @since 2.0.0 + * @category zipping + */ +const zipRight = exports.zipRight = core.exitZipRight; +/** + * Parallelly zips the this result with the specified result or else returns + * the failed `Cause`. + * + * @since 2.0.0 + * @category zipping + */ +const zipPar = exports.zipPar = core.exitZipPar; +/** + * Parallelly zips the this result with the specified result discarding the + * second element of the tuple or else returns the failed `Cause`. + * + * @since 2.0.0 + * @category zipping + */ +const zipParLeft = exports.zipParLeft = core.exitZipParLeft; +/** + * Parallelly zips the this result with the specified result discarding the + * first element of the tuple or else returns the failed `Cause`. + * + * @since 2.0.0 + * @category zipping + */ +const zipParRight = exports.zipParRight = core.exitZipParRight; +/** + * Zips this exit together with that exit using the specified combination + * functions. + * + * @since 2.0.0 + * @category zipping + */ +const zipWith = exports.zipWith = core.exitZipWith; +//# sourceMappingURL=Exit.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Exit.js.map b/backend/node_modules/effect/dist/cjs/Exit.js.map new file mode 100644 index 0000000000000000000000000000000000000000..8efa6a873d1892a37e4151ecb7595852e11b8ba1 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Exit.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Exit.js","names":["core","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","isExit","exports","exitIsExit","isFailure","exitIsFailure","isSuccess","exitIsSuccess","isInterrupted","exitIsInterrupted","as","exitAs","asVoid","exitAsVoid","causeOption","exitCauseOption","all","exitCollectAll","die","exitDie","exists","exitExists","fail","exitFail","failCause","exitFailCause","flatMap","exitFlatMap","flatMapEffect","exitFlatMapEffect","flatten","exitFlatten","forEachEffect","exitForEachEffect","fromEither","exitFromEither","fromOption","exitFromOption","getOrElse","exitGetOrElse","interrupt","exitInterrupt","map","exitMap","mapBoth","exitMapBoth","mapError","exitMapError","mapErrorCause","exitMapErrorCause","match","exitMatch","matchEffect","exitMatchEffect","succeed","exitSucceed","void_","void","exitVoid","zip","exitZip","zipLeft","exitZipLeft","zipRight","exitZipRight","zipPar","exitZipPar","zipParLeft","exitZipParLeft","zipParRight","exitZipParRight","zipWith","exitZipWith"],"sources":["../../src/Exit.ts"],"sourcesContent":[null],"mappings":";;;;;;AAQA,IAAAA,IAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA0C,SAAA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CAAA6D,QAAA,GAiBjBpF,IAAI,CAACqF,YAAY;AAErB;;;;;;;AAOO,MAAMC,MAAM,GAAA/D,OAAA,CAAA+D,MAAA,GAiBftF,IAAI,CAACuF,UAAU;AAEnB;;;;;;;AAOO,MAAMC,UAAU,GAAAjE,OAAA,CAAAiE,UAAA,GAiBnBxF,IAAI,CAACyF,cAAc;AAEvB;;;;;;;AAOO,MAAMC,WAAW,GAAAnE,OAAA,CAAAmE,WAAA,GAiBpB1F,IAAI,CAAC2F,eAAe;AAExB;;;;;;;AAOO,MAAMC,OAAO,GAAArE,OAAA,CAAAqE,OAAA,GA8BhB5F,IAAI,CAAC6F,WAAW","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/FastCheck.js.map b/backend/node_modules/effect/dist/cjs/FastCheck.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f5670f7446981b39c970d969523614c980952656 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/FastCheck.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FastCheck.js","names":["_fastCheck","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../src/FastCheck.ts"],"sourcesContent":[null],"mappings":";;;;;AAQA,IAAAA,UAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,UAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,UAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,UAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Fiber.js b/backend/node_modules/effect/dist/cjs/Fiber.js new file mode 100644 index 0000000000000000000000000000000000000000..ad00be2c805972e10c521f2c08c4027f9013dde7 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Fiber.js @@ -0,0 +1,340 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.zipWith = exports.zipRight = exports.zipLeft = exports.zip = exports.void = exports.unsafeRoots = exports.succeed = exports.status = exports.scoped = exports.roots = exports.pretty = exports.poll = exports.orElseEither = exports.orElse = exports.never = exports.match = exports.mapFiber = exports.mapEffect = exports.map = exports.joinAll = exports.join = exports.isRuntimeFiber = exports.isFiber = exports.interrupted = exports.interruptFork = exports.interruptAsFork = exports.interruptAs = exports.interruptAllAs = exports.interruptAll = exports.interrupt = exports.inheritAll = exports.id = exports.getCurrentFiber = exports.fromEffect = exports.failCause = exports.fail = exports.dumpAll = exports.dump = exports.done = exports.children = exports.awaitAll = exports.await = exports.all = exports.RuntimeFiberTypeId = exports.Order = exports.FiberTypeId = void 0; +var core = _interopRequireWildcard(require("./internal/core.js")); +var circular = _interopRequireWildcard(require("./internal/effect/circular.js")); +var internal = _interopRequireWildcard(require("./internal/fiber.js")); +var fiberRuntime = _interopRequireWildcard(require("./internal/fiberRuntime.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const FiberTypeId = exports.FiberTypeId = internal.FiberTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +const RuntimeFiberTypeId = exports.RuntimeFiberTypeId = internal.RuntimeFiberTypeId; +/** + * @since 2.0.0 + * @category instances + */ +const Order = exports.Order = internal.Order; +/** + * Returns `true` if the specified value is a `Fiber`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isFiber = exports.isFiber = internal.isFiber; +/** + * Returns `true` if the specified `Fiber` is a `RuntimeFiber`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isRuntimeFiber = exports.isRuntimeFiber = internal.isRuntimeFiber; +/** + * The identity of the fiber. + * + * @since 2.0.0 + * @category getters + */ +const id = exports.id = internal.id; +const _await = exports.await = internal._await; +/** + * Awaits on all fibers to be completed, successfully or not. + * + * @since 2.0.0 + * @category destructors + */ +const awaitAll = exports.awaitAll = fiberRuntime.fiberAwaitAll; +/** + * Retrieves the immediate children of the fiber. + * + * @since 2.0.0 + * @category getters + */ +const children = exports.children = internal.children; +/** + * Collects all fibers into a single fiber producing an in-order list of the + * results. + * + * @since 2.0.0 + * @category constructors + */ +const all = exports.all = fiberRuntime.fiberAll; +/** + * A fiber that is done with the specified `Exit` value. + * + * @since 2.0.0 + * @category constructors + */ +const done = exports.done = internal.done; +/** + * @since 2.0.0 + * @category destructors + */ +const dump = exports.dump = internal.dump; +/** + * @since 2.0.0 + * @category destructors + */ +const dumpAll = exports.dumpAll = internal.dumpAll; +/** + * A fiber that has already failed with the specified value. + * + * @since 2.0.0 + * @category constructors + */ +const fail = exports.fail = internal.fail; +/** + * Creates a `Fiber` that has already failed with the specified cause. + * + * @since 2.0.0 + * @category constructors + */ +const failCause = exports.failCause = internal.failCause; +/** + * Lifts an `Effect` into a `Fiber`. + * + * @since 2.0.0 + * @category conversions + */ +const fromEffect = exports.fromEffect = internal.fromEffect; +/** + * Gets the current fiber if one is running. + * + * @since 2.0.0 + * @category utilities + */ +const getCurrentFiber = exports.getCurrentFiber = internal.getCurrentFiber; +/** + * Inherits values from all `FiberRef` instances into current fiber. This + * will resume immediately. + * + * @since 2.0.0 + * @category destructors + */ +const inheritAll = exports.inheritAll = internal.inheritAll; +/** + * Interrupts the fiber from whichever fiber is calling this method. If the + * fiber has already exited, the returned effect will resume immediately. + * Otherwise, the effect will resume when the fiber exits. + * + * @since 2.0.0 + * @category interruption + */ +const interrupt = exports.interrupt = core.interruptFiber; +/** + * Constructrs a `Fiber` that is already interrupted. + * + * @since 2.0.0 + * @category constructors + */ +const interrupted = exports.interrupted = internal.interrupted; +/** + * Interrupts the fiber as if interrupted from the specified fiber. If the + * fiber has already exited, the returned effect will resume immediately. + * Otherwise, the effect will resume when the fiber exits. + * + * @since 2.0.0 + * @category interruption + */ +const interruptAs = exports.interruptAs = core.interruptAsFiber; +/** + * Interrupts the fiber as if interrupted from the specified fiber. If the + * fiber has already exited, the returned effect will resume immediately. + * Otherwise, the effect will resume when the fiber exits. + * + * @since 2.0.0 + * @category interruption + */ +const interruptAsFork = exports.interruptAsFork = internal.interruptAsFork; +/** + * Interrupts all fibers, awaiting their interruption. + * + * @since 2.0.0 + * @category interruption + */ +const interruptAll = exports.interruptAll = internal.interruptAll; +/** + * Interrupts all fibers as by the specified fiber, awaiting their + * interruption. + * + * @since 2.0.0 + * @category interruption + */ +const interruptAllAs = exports.interruptAllAs = internal.interruptAllAs; +/** + * Interrupts the fiber from whichever fiber is calling this method. The + * interruption will happen in a separate daemon fiber, and the returned + * effect will always resume immediately without waiting. + * + * @since 2.0.0 + * @category interruption + */ +const interruptFork = exports.interruptFork = fiberRuntime.fiberInterruptFork; +/** + * Joins the fiber, which suspends the joining fiber until the result of the + * fiber has been determined. Attempting to join a fiber that has erred will + * result in a catchable error. Joining an interrupted fiber will result in an + * "inner interruption" of this fiber, unlike interruption triggered by + * another fiber, "inner interruption" can be caught and recovered. + * + * @since 2.0.0 + * @category destructors + */ +const join = exports.join = internal.join; +/** + * Joins all fibers, awaiting their _successful_ completion. Attempting to + * join a fiber that has erred will result in a catchable error, _if_ that + * error does not result from interruption. + * + * @since 2.0.0 + * @category destructors + */ +const joinAll = exports.joinAll = fiberRuntime.fiberJoinAll; +/** + * Maps over the value the Fiber computes. + * + * @since 2.0.0 + * @category mapping + */ +const map = exports.map = internal.map; +/** + * Effectually maps over the value the fiber computes. + * + * @since 2.0.0 + * @category mapping + */ +const mapEffect = exports.mapEffect = internal.mapEffect; +/** + * Passes the success of this fiber to the specified callback, and continues + * with the fiber that it returns. + * + * @since 2.0.0 + * @category mapping + */ +const mapFiber = exports.mapFiber = internal.mapFiber; +/** + * Folds over the `Fiber` or `RuntimeFiber`. + * + * @since 2.0.0 + * @category folding + */ +const match = exports.match = internal.match; +/** + * A fiber that never fails or succeeds. + * + * @since 2.0.0 + * @category constructors + */ +const never = exports.never = internal.never; +/** + * Returns a fiber that prefers `this` fiber, but falls back to the `that` one + * when `this` one fails. Interrupting the returned fiber will interrupt both + * fibers, sequentially, from left to right. + * + * @since 2.0.0 + * @category alternatives + */ +const orElse = exports.orElse = internal.orElse; +/** + * Returns a fiber that prefers `this` fiber, but falls back to the `that` one + * when `this` one fails. Interrupting the returned fiber will interrupt both + * fibers, sequentially, from left to right. + * + * @since 2.0.0 + * @category alternatives + */ +const orElseEither = exports.orElseEither = internal.orElseEither; +/** + * Tentatively observes the fiber, but returns immediately if it is not + * already done. + * + * @since 2.0.0 + * @category getters + */ +const poll = exports.poll = internal.poll; +/** + * Pretty-prints a `RuntimeFiber`. + * + * @since 2.0.0 + * @category destructors + */ +const pretty = exports.pretty = internal.pretty; +/** + * Returns a chunk containing all root fibers. + * + * @since 2.0.0 + * @category constructors + */ +const roots = exports.roots = internal.roots; +/** + * Returns a chunk containing all root fibers. + * + * @since 2.0.0 + * @category constructors + */ +const unsafeRoots = exports.unsafeRoots = internal.unsafeRoots; +/** + * Converts this fiber into a scoped effect. The fiber is interrupted when the + * scope is closed. + * + * @since 2.0.0 + * @category destructors + */ +const scoped = exports.scoped = fiberRuntime.fiberScoped; +/** + * Returns the `FiberStatus` of a `RuntimeFiber`. + * + * @since 2.0.0 + * @category getters + */ +const status = exports.status = internal.status; +/** + * Returns a fiber that has already succeeded with the specified value. + * + * @since 2.0.0 + * @category constructors + */ +const succeed = exports.succeed = internal.succeed; +const void_ = exports.void = internal.void; +/** + * Zips this fiber and the specified fiber together, producing a tuple of + * their output. + * + * @since 2.0.0 + * @category zipping + */ +const zip = exports.zip = circular.zipFiber; +/** + * Same as `zip` but discards the output of that `Fiber`. + * + * @since 2.0.0 + * @category zipping + */ +const zipLeft = exports.zipLeft = circular.zipLeftFiber; +/** + * Same as `zip` but discards the output of this `Fiber`. + * + * @since 2.0.0 + * @category zipping + */ +const zipRight = exports.zipRight = circular.zipRightFiber; +/** + * Zips this fiber with the specified fiber, combining their results using the + * specified combiner function. Both joins and interruptions are performed in + * sequential order from left to right. + * + * @since 2.0.0 + * @category zipping + */ +const zipWith = exports.zipWith = circular.zipWithFiber; +//# sourceMappingURL=Fiber.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/FiberHandle.js b/backend/node_modules/effect/dist/cjs/FiberHandle.js new file mode 100644 index 0000000000000000000000000000000000000000..29a8ce337f2269f87439c32a8aa2b8e878ab68e3 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/FiberHandle.js @@ -0,0 +1,335 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.unsafeSet = exports.unsafeGet = exports.set = exports.runtimePromise = exports.runtime = exports.run = exports.makeRuntimePromise = exports.makeRuntime = exports.make = exports.join = exports.isFiberHandle = exports.get = exports.clear = exports.awaitEmpty = exports.TypeId = void 0; +var Cause = _interopRequireWildcard(require("./Cause.js")); +var Deferred = _interopRequireWildcard(require("./Deferred.js")); +var Effect = _interopRequireWildcard(require("./Effect.js")); +var Exit = _interopRequireWildcard(require("./Exit.js")); +var Fiber = _interopRequireWildcard(require("./Fiber.js")); +var FiberId = _interopRequireWildcard(require("./FiberId.js")); +var _Function = require("./Function.js"); +var HashSet = _interopRequireWildcard(require("./HashSet.js")); +var Inspectable = _interopRequireWildcard(require("./Inspectable.js")); +var Option = _interopRequireWildcard(require("./Option.js")); +var _Pipeable = require("./Pipeable.js"); +var Predicate = _interopRequireWildcard(require("./Predicate.js")); +var Runtime = _interopRequireWildcard(require("./Runtime.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @categories type ids + */ +const TypeId = exports.TypeId = /*#__PURE__*/Symbol.for("effect/FiberHandle"); +/** + * @since 2.0.0 + * @categories refinements + */ +const isFiberHandle = u => Predicate.hasProperty(u, TypeId); +exports.isFiberHandle = isFiberHandle; +const Proto = { + [TypeId]: TypeId, + toString() { + return Inspectable.format(this.toJSON()); + }, + toJSON() { + return { + _id: "FiberHandle", + state: this.state + }; + }, + [Inspectable.NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + } +}; +const unsafeMake = deferred => { + const self = Object.create(Proto); + self.state = { + _tag: "Open", + fiber: undefined + }; + self.deferred = deferred; + return self; +}; +/** + * A FiberHandle can be used to store a single fiber. + * When the associated Scope is closed, the contained fiber will be interrupted. + * + * You can add a fiber to the handle using `FiberHandle.run`, and the fiber will + * be automatically removed from the FiberHandle when it completes. + * + * @example + * ```ts + * import { Effect, FiberHandle } from "effect" + * + * Effect.gen(function*() { + * const handle = yield* FiberHandle.make() + * + * // run some effects + * yield* FiberHandle.run(handle, Effect.never) + * // this will interrupt the previous fiber + * yield* FiberHandle.run(handle, Effect.never) + * + * yield* Effect.sleep(1000) + * }).pipe( + * Effect.scoped // The fiber will be interrupted when the scope is closed + * ) + * ``` + * + * @since 2.0.0 + * @categories constructors + */ +const make = () => Effect.acquireRelease(Effect.map(Deferred.make(), deferred => unsafeMake(deferred)), handle => Effect.withFiberRuntime(parent => { + const state = handle.state; + if (state._tag === "Closed") return Effect.void; + handle.state = { + _tag: "Closed" + }; + return state.fiber ? Effect.intoDeferred(Effect.asVoid(Fiber.interruptAs(state.fiber, FiberId.combine(parent.id(), internalFiberId))), handle.deferred) : Deferred.done(handle.deferred, Exit.void); +})); +/** + * Create an Effect run function that is backed by a FiberHandle. + * + * @since 2.0.0 + * @categories constructors + */ +exports.make = make; +const makeRuntime = () => Effect.flatMap(make(), self => runtime(self)()); +/** + * Create an Effect run function that is backed by a FiberHandle. + * + * @since 3.13.0 + * @categories constructors + */ +exports.makeRuntime = makeRuntime; +const makeRuntimePromise = () => Effect.flatMap(make(), self => runtimePromise(self)()); +exports.makeRuntimePromise = makeRuntimePromise; +const internalFiberIdId = -1; +const internalFiberId = /*#__PURE__*/FiberId.make(internalFiberIdId, 0); +const isInternalInterruption = /*#__PURE__*/Cause.reduceWithContext(undefined, { + emptyCase: _Function.constFalse, + failCase: _Function.constFalse, + dieCase: _Function.constFalse, + interruptCase: (_, fiberId) => HashSet.has(FiberId.ids(fiberId), internalFiberIdId), + sequentialCase: (_, left, right) => left || right, + parallelCase: (_, left, right) => left || right +}); +/** + * Set the fiber in a FiberHandle. When the fiber completes, it will be removed from the FiberHandle. + * If a fiber is already running, it will be interrupted unless `options.onlyIfMissing` is set. + * + * @since 2.0.0 + * @categories combinators + */ +const unsafeSet = exports.unsafeSet = /*#__PURE__*/(0, _Function.dual)(args => isFiberHandle(args[0]), (self, fiber, options) => { + if (self.state._tag === "Closed") { + fiber.unsafeInterruptAsFork(FiberId.combine(options?.interruptAs ?? FiberId.none, internalFiberId)); + return; + } else if (self.state.fiber !== undefined) { + if (options?.onlyIfMissing === true) { + fiber.unsafeInterruptAsFork(FiberId.combine(options?.interruptAs ?? FiberId.none, internalFiberId)); + return; + } else if (self.state.fiber === fiber) { + return; + } + self.state.fiber.unsafeInterruptAsFork(FiberId.combine(options?.interruptAs ?? FiberId.none, internalFiberId)); + self.state.fiber = undefined; + } + self.state.fiber = fiber; + fiber.addObserver(exit => { + if (self.state._tag === "Open" && fiber === self.state.fiber) { + self.state.fiber = undefined; + } + if (Exit.isFailure(exit) && (options?.propagateInterruption === true ? !isInternalInterruption(exit.cause) : !Cause.isInterruptedOnly(exit.cause))) { + Deferred.unsafeDone(self.deferred, exit); + } + }); +}); +/** + * Set the fiber in the FiberHandle. When the fiber completes, it will be removed from the FiberHandle. + * If a fiber already exists in the FiberHandle, it will be interrupted unless `options.onlyIfMissing` is set. + * + * @since 2.0.0 + * @categories combinators + */ +const set = exports.set = /*#__PURE__*/(0, _Function.dual)(args => isFiberHandle(args[0]), (self, fiber, options) => Effect.fiberIdWith(fiberId => Effect.sync(() => unsafeSet(self, fiber, { + interruptAs: fiberId, + onlyIfMissing: options?.onlyIfMissing, + propagateInterruption: options?.propagateInterruption +})))); +/** + * Retrieve the fiber from the FiberHandle. + * + * @since 2.0.0 + * @categories combinators + */ +const unsafeGet = self => self.state._tag === "Closed" ? Option.none() : Option.fromNullable(self.state.fiber); +/** + * Retrieve the fiber from the FiberHandle. + * + * @since 2.0.0 + * @categories combinators + */ +exports.unsafeGet = unsafeGet; +const get = self => Effect.suspend(() => unsafeGet(self)); +/** + * @since 2.0.0 + * @categories combinators + */ +exports.get = get; +const clear = self => Effect.uninterruptibleMask(restore => Effect.withFiberRuntime(fiber => { + if (self.state._tag === "Closed" || self.state.fiber === undefined) { + return Effect.void; + } + return Effect.zipRight(restore(Fiber.interruptAs(self.state.fiber, FiberId.combine(fiber.id(), internalFiberId))), Effect.sync(() => { + if (self.state._tag === "Open") { + self.state.fiber = undefined; + } + })); +})); +exports.clear = clear; +const constInterruptedFiber = /*#__PURE__*/function () { + let fiber = undefined; + return () => { + if (fiber === undefined) { + fiber = Effect.runFork(Effect.interrupt); + } + return fiber; + }; +}(); +/** + * Run an Effect and add the forked fiber to the FiberHandle. + * When the fiber completes, it will be removed from the FiberHandle. + * + * @since 2.0.0 + * @categories combinators + */ +const run = function () { + const self = arguments[0]; + if (Effect.isEffect(arguments[1])) { + return runImpl(self, arguments[1], arguments[2]); + } + const options = arguments[1]; + return effect => runImpl(self, effect, options); +}; +exports.run = run; +const runImpl = (self, effect, options) => Effect.withFiberRuntime(parent => { + if (self.state._tag === "Closed") { + return Effect.interrupt; + } else if (self.state.fiber !== undefined && options?.onlyIfMissing === true) { + return Effect.sync(constInterruptedFiber); + } + const runtime = Runtime.make({ + context: parent.currentContext, + fiberRefs: parent.getFiberRefs(), + runtimeFlags: Runtime.defaultRuntime.runtimeFlags + }); + const fiber = Runtime.runFork(runtime)(effect); + unsafeSet(self, fiber, { + ...options, + interruptAs: parent.id() + }); + return Effect.succeed(fiber); +}); +/** + * Capture a Runtime and use it to fork Effect's, adding the forked fibers to the FiberHandle. + * + * @example + * ```ts + * import { Context, Effect, FiberHandle } from "effect" + * + * interface Users { + * readonly _: unique symbol + * } + * const Users = Context.GenericTag> + * }>("Users") + * + * Effect.gen(function*() { + * const handle = yield* FiberHandle.make() + * const run = yield* FiberHandle.runtime(handle)() + * + * // run an effect and set the fiber in the handle + * run(Effect.andThen(Users, _ => _.getAll)) + * + * // this will interrupt the previous fiber + * run(Effect.andThen(Users, _ => _.getAll)) + * }).pipe( + * Effect.scoped // The fiber will be interrupted when the scope is closed + * ) + * ``` + * + * @since 2.0.0 + * @categories combinators + */ +const runtime = self => () => Effect.map(Effect.runtime(), runtime => { + const runFork = Runtime.runFork(runtime); + return (effect, options) => { + if (self.state._tag === "Closed") { + return constInterruptedFiber(); + } else if (self.state.fiber !== undefined && options?.onlyIfMissing === true) { + return constInterruptedFiber(); + } + const fiber = runFork(effect, options); + unsafeSet(self, fiber, options); + return fiber; + }; +}); +/** + * Capture a Runtime and use it to fork Effect's, adding the forked fibers to the FiberHandle. + * + * The returned run function will return Promise's that will resolve when the + * fiber completes. + * + * @since 3.13.0 + * @categories combinators + */ +exports.runtime = runtime; +const runtimePromise = self => () => Effect.map(runtime(self)(), runFork => (effect, options) => new Promise((resolve, reject) => runFork(effect, options).addObserver(exit => { + if (Exit.isSuccess(exit)) { + resolve(exit.value); + } else { + reject(Cause.squash(exit.cause)); + } +}))); +/** + * If any of the Fiber's in the handle terminate with a failure, + * the returned Effect will terminate with the first failure that occurred. + * + * @since 2.0.0 + * @categories combinators + * @example + * ```ts + * import { Effect, FiberHandle } from "effect"; + * + * Effect.gen(function* (_) { + * const handle = yield* _(FiberHandle.make()); + * yield* _(FiberHandle.set(handle, Effect.runFork(Effect.fail("error")))); + * + * // parent fiber will fail with "error" + * yield* _(FiberHandle.join(handle)); + * }); + * ``` + */ +exports.runtimePromise = runtimePromise; +const join = self => Deferred.await(self.deferred); +/** + * Wait for the fiber in the FiberHandle to complete. + * + * @since 3.13.0 + * @categories combinators + */ +exports.join = join; +const awaitEmpty = self => Effect.suspend(() => { + if (self.state._tag === "Closed" || self.state.fiber === undefined) { + return Effect.void; + } + return Fiber.await(self.state.fiber); +}); +exports.awaitEmpty = awaitEmpty; +//# sourceMappingURL=FiberHandle.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/FiberId.js b/backend/node_modules/effect/dist/cjs/FiberId.js new file mode 100644 index 0000000000000000000000000000000000000000..1150eb15f509018d4d8e97234fb4974488153272 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/FiberId.js @@ -0,0 +1,122 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.unsafeMake = exports.toSet = exports.toOption = exports.threadName = exports.runtime = exports.none = exports.make = exports.isRuntime = exports.isNone = exports.isFiberId = exports.isComposite = exports.ids = exports.getOrElse = exports.composite = exports.combineAll = exports.combine = exports.FiberIdTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/fiberId.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const FiberIdTypeId = exports.FiberIdTypeId = internal.FiberIdTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +const none = exports.none = internal.none; +/** + * @since 2.0.0 + * @category constructors + */ +const runtime = exports.runtime = internal.runtime; +/** + * @since 2.0.0 + * @category constructors + */ +const composite = exports.composite = internal.composite; +/** + * Returns `true` if the specified unknown value is a `FiberId`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isFiberId = exports.isFiberId = internal.isFiberId; +/** + * Returns `true` if the `FiberId` is a `None`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isNone = exports.isNone = internal.isNone; +/** + * Returns `true` if the `FiberId` is a `Runtime`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isRuntime = exports.isRuntime = internal.isRuntime; +/** + * Returns `true` if the `FiberId` is a `Composite`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isComposite = exports.isComposite = internal.isComposite; +/** + * Combine two `FiberId`s. + * + * @since 2.0.0 + * @category constructors + */ +const combine = exports.combine = internal.combine; +/** + * Combines a set of `FiberId`s into a single `FiberId`. + * + * @since 2.0.0 + * @category constructors + */ +const combineAll = exports.combineAll = internal.combineAll; +/** + * Returns this `FiberId` if it is not `None`, otherwise returns that `FiberId`. + * + * @since 2.0.0 + * @category utils + */ +const getOrElse = exports.getOrElse = internal.getOrElse; +/** + * Get the set of identifiers for this `FiberId`. + * + * @since 2.0.0 + * @category destructors + */ +const ids = exports.ids = internal.ids; +/** + * Creates a new `FiberId`. + * + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * Creates a string representing the name of the current thread of execution + * represented by the specified `FiberId`. + * + * @since 2.0.0 + * @category destructors + */ +const threadName = exports.threadName = internal.threadName; +/** + * Convert a `FiberId` into an `Option`. + * + * @since 2.0.0 + * @category destructors + */ +const toOption = exports.toOption = internal.toOption; +/** + * Convert a `FiberId` into a `HashSet`. + * + * @since 2.0.0 + * @category destructors + */ +const toSet = exports.toSet = internal.toSet; +/** + * Unsafely creates a new `FiberId`. + * + * @since 2.0.0 + * @category unsafe + */ +const unsafeMake = exports.unsafeMake = internal.unsafeMake; +//# sourceMappingURL=FiberId.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/FiberId.js.map b/backend/node_modules/effect/dist/cjs/FiberId.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c93f79edb27d8d99feade8b7215c8df2668334a7 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/FiberId.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FiberId.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","FiberIdTypeId","exports","none","runtime","composite","isFiberId","isNone","isRuntime","isComposite","combine","combineAll","getOrElse","ids","make","threadName","toOption","toSet","unsafeMake"],"sources":["../../src/FiberId.ts"],"sourcesContent":[null],"mappings":";;;;;;AAMA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAiD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,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AN,OAAA,CAAAM,SAAA,GAAuC7B,QAAQ,CAAC6B,SAAS;AAE/E;;;;;;AAMO,MAAMC,WAAW,GAAAP,OAAA,CAAAO,WAAA,GAAyC9B,QAAQ,CAAC8B,WAAW;AAErF;;;;;;AAMO,MAAMC,OAAO,GAAAR,OAAA,CAAAQ,OAAA,GAehB/B,QAAQ,CAAC+B,OAAO;AAEpB;;;;;;AAMO,MAAMC,UAAU,GAAAT,OAAA,CAAAS,UAAA,GAAoDhC,QAAQ,CAACgC,UAAU;AAE9F;;;;;;AAMO,MAAMC,SAAS,GAAAV,OAAA,CAAAU,SAAA,GAelBjC,QAAQ,CAACiC,SAAS;AAEtB;;;;;;AAMO,MAAMC,GAAG,GAAAX,OAAA,CAAAW,GAAA,GAA+ClC,QAAQ,CAACkC,GAAG;AAE3E;;;;;;AAMO,MAAMC,IAAI,GAAAZ,OAAA,CAAAY,IAAA,GAAsDnC,QAAQ,CAACmC,IAAI;AAEpF;;;;;;;AAOO,MAAMC,UAAU,GAAAb,OAAA,CAAAa,UAAA,GAA8BpC,QAAQ,CAACoC,UAAU;AAExE;;;;;;AAMO,MAAMC,QAAQ,GAAAd,OAAA,CAAAc,QAAA,GAA8CrC,QAAQ,CAACqC,QAAQ;AAEpF;;;;;;AAMO,MAAMC,KAAK,GAAAf,OAAA,CAAAe,KAAA,GAAgDtC,QAAQ,CAACsC,KAAK;AAEhF;;;;;;AAMO,MAAMC,UAAU,GAAAhB,OAAA,CAAAgB,UAAA,GAAyBvC,QAAQ,CAACuC,UAAU","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/FiberMap.js b/backend/node_modules/effect/dist/cjs/FiberMap.js new file mode 100644 index 0000000000000000000000000000000000000000..35b6aa9cc0a1c09612c00510eaa345c986a4dc08 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/FiberMap.js @@ -0,0 +1,374 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.unsafeSet = exports.unsafeHas = exports.unsafeGet = exports.size = exports.set = exports.runtimePromise = exports.runtime = exports.run = exports.remove = exports.makeRuntimePromise = exports.makeRuntime = exports.make = exports.join = exports.isFiberMap = exports.has = exports.get = exports.clear = exports.awaitEmpty = exports.TypeId = void 0; +var Cause = _interopRequireWildcard(require("./Cause.js")); +var Deferred = _interopRequireWildcard(require("./Deferred.js")); +var Effect = _interopRequireWildcard(require("./Effect.js")); +var Exit = _interopRequireWildcard(require("./Exit.js")); +var Fiber = _interopRequireWildcard(require("./Fiber.js")); +var FiberId = _interopRequireWildcard(require("./FiberId.js")); +var _Function = require("./Function.js"); +var HashSet = _interopRequireWildcard(require("./HashSet.js")); +var Inspectable = _interopRequireWildcard(require("./Inspectable.js")); +var Iterable = _interopRequireWildcard(require("./Iterable.js")); +var MutableHashMap = _interopRequireWildcard(require("./MutableHashMap.js")); +var Option = _interopRequireWildcard(require("./Option.js")); +var _Pipeable = require("./Pipeable.js"); +var Predicate = _interopRequireWildcard(require("./Predicate.js")); +var Runtime = _interopRequireWildcard(require("./Runtime.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @categories type ids + */ +const TypeId = exports.TypeId = /*#__PURE__*/Symbol.for("effect/FiberMap"); +/** + * @since 2.0.0 + * @categories refinements + */ +const isFiberMap = u => Predicate.hasProperty(u, TypeId); +exports.isFiberMap = isFiberMap; +const Proto = { + [TypeId]: TypeId, + [Symbol.iterator]() { + if (this.state._tag === "Closed") { + return Iterable.empty(); + } + return this.state.backing[Symbol.iterator](); + }, + toString() { + return Inspectable.format(this.toJSON()); + }, + toJSON() { + return { + _id: "FiberMap", + state: this.state + }; + }, + [Inspectable.NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + } +}; +const unsafeMake = (backing, deferred) => { + const self = Object.create(Proto); + self.state = { + _tag: "Open", + backing + }; + self.deferred = deferred; + return self; +}; +/** + * A FiberMap can be used to store a collection of fibers, indexed by some key. + * When the associated Scope is closed, all fibers in the map will be interrupted. + * + * You can add fibers to the map using `FiberMap.set` or `FiberMap.run`, and the fibers will + * be automatically removed from the FiberMap when they complete. + * + * @example + * ```ts + * import { Effect, FiberMap } from "effect" + * + * Effect.gen(function*() { + * const map = yield* FiberMap.make() + * + * // run some effects and add the fibers to the map + * yield* FiberMap.run(map, "fiber a", Effect.never) + * yield* FiberMap.run(map, "fiber b", Effect.never) + * + * yield* Effect.sleep(1000) + * }).pipe( + * Effect.scoped // The fibers will be interrupted when the scope is closed + * ) + * ``` + * + * @since 2.0.0 + * @categories constructors + */ +const make = () => Effect.acquireRelease(Effect.map(Deferred.make(), deferred => unsafeMake(MutableHashMap.empty(), deferred)), map => Effect.withFiberRuntime(parent => { + const state = map.state; + if (state._tag === "Closed") return Effect.void; + map.state = { + _tag: "Closed" + }; + return Fiber.interruptAllAs(Iterable.map(state.backing, ([, fiber]) => fiber), FiberId.combine(parent.id(), internalFiberId)).pipe(Effect.intoDeferred(map.deferred)); +})); +/** + * Create an Effect run function that is backed by a FiberMap. + * + * @since 2.0.0 + * @categories constructors + */ +exports.make = make; +const makeRuntime = () => Effect.flatMap(make(), self => runtime(self)()); +/** + * Create an Effect run function that is backed by a FiberMap. + * + * @since 3.13.0 + * @categories constructors + */ +exports.makeRuntime = makeRuntime; +const makeRuntimePromise = () => Effect.flatMap(make(), self => runtimePromise(self)()); +exports.makeRuntimePromise = makeRuntimePromise; +const internalFiberIdId = -1; +const internalFiberId = /*#__PURE__*/FiberId.make(internalFiberIdId, 0); +const isInternalInterruption = /*#__PURE__*/Cause.reduceWithContext(undefined, { + emptyCase: _Function.constFalse, + failCase: _Function.constFalse, + dieCase: _Function.constFalse, + interruptCase: (_, fiberId) => HashSet.has(FiberId.ids(fiberId), internalFiberIdId), + sequentialCase: (_, left, right) => left || right, + parallelCase: (_, left, right) => left || right +}); +/** + * Add a fiber to the FiberMap. When the fiber completes, it will be removed from the FiberMap. + * If the key already exists in the FiberMap, the previous fiber will be interrupted. + * + * @since 2.0.0 + * @categories combinators + */ +const unsafeSet = exports.unsafeSet = /*#__PURE__*/(0, _Function.dual)(args => isFiberMap(args[0]), (self, key, fiber, options) => { + if (self.state._tag === "Closed") { + fiber.unsafeInterruptAsFork(FiberId.combine(options?.interruptAs ?? FiberId.none, internalFiberId)); + return; + } + const previous = MutableHashMap.get(self.state.backing, key); + if (previous._tag === "Some") { + if (options?.onlyIfMissing === true) { + fiber.unsafeInterruptAsFork(FiberId.combine(options?.interruptAs ?? FiberId.none, internalFiberId)); + return; + } else if (previous.value === fiber) { + return; + } + previous.value.unsafeInterruptAsFork(FiberId.combine(options?.interruptAs ?? FiberId.none, internalFiberId)); + } + MutableHashMap.set(self.state.backing, key, fiber); + fiber.addObserver(exit => { + if (self.state._tag === "Closed") { + return; + } + const current = MutableHashMap.get(self.state.backing, key); + if (Option.isSome(current) && fiber === current.value) { + MutableHashMap.remove(self.state.backing, key); + } + if (Exit.isFailure(exit) && (options?.propagateInterruption === true ? !isInternalInterruption(exit.cause) : !Cause.isInterruptedOnly(exit.cause))) { + Deferred.unsafeDone(self.deferred, exit); + } + }); +}); +/** + * Add a fiber to the FiberMap. When the fiber completes, it will be removed from the FiberMap. + * If the key already exists in the FiberMap, the previous fiber will be interrupted. + * + * @since 2.0.0 + * @categories combinators + */ +const set = exports.set = /*#__PURE__*/(0, _Function.dual)(args => isFiberMap(args[0]), (self, key, fiber, options) => Effect.fiberIdWith(fiberId => Effect.sync(() => unsafeSet(self, key, fiber, { + ...options, + interruptAs: fiberId +})))); +/** + * Retrieve a fiber from the FiberMap. + * + * @since 2.0.0 + * @categories combinators + */ +const unsafeGet = exports.unsafeGet = /*#__PURE__*/(0, _Function.dual)(2, (self, key) => self.state._tag === "Closed" ? Option.none() : MutableHashMap.get(self.state.backing, key)); +/** + * Retrieve a fiber from the FiberMap. + * + * @since 2.0.0 + * @categories combinators + */ +const get = exports.get = /*#__PURE__*/(0, _Function.dual)(2, (self, key) => Effect.suspend(() => unsafeGet(self, key))); +/** + * Check if a key exists in the FiberMap. + * + * @since 2.0.0 + * @categories combinators + */ +const unsafeHas = exports.unsafeHas = /*#__PURE__*/(0, _Function.dual)(2, (self, key) => self.state._tag === "Closed" ? false : MutableHashMap.has(self.state.backing, key)); +/** + * Check if a key exists in the FiberMap. + * + * @since 2.0.0 + * @categories combinators + */ +const has = exports.has = /*#__PURE__*/(0, _Function.dual)(2, (self, key) => Effect.sync(() => unsafeHas(self, key))); +/** + * Remove a fiber from the FiberMap, interrupting it if it exists. + * + * @since 2.0.0 + * @categories combinators + */ +const remove = exports.remove = /*#__PURE__*/(0, _Function.dual)(2, (self, key) => Effect.withFiberRuntime(removeFiber => { + if (self.state._tag === "Closed") { + return Effect.void; + } + const fiber = MutableHashMap.get(self.state.backing, key); + if (fiber._tag === "None") { + return Effect.void; + } + // will be removed by the observer + return Fiber.interruptAs(fiber.value, FiberId.combine(removeFiber.id(), internalFiberId)); +})); +/** + * @since 2.0.0 + * @categories combinators + */ +const clear = self => Effect.withFiberRuntime(clearFiber => { + if (self.state._tag === "Closed") { + return Effect.void; + } + return Effect.forEach(self.state.backing, ([, fiber]) => + // will be removed by the observer + Fiber.interruptAs(fiber, FiberId.combine(clearFiber.id(), internalFiberId))); +}); +exports.clear = clear; +const constInterruptedFiber = /*#__PURE__*/function () { + let fiber = undefined; + return () => { + if (fiber === undefined) { + fiber = Effect.runFork(Effect.interrupt); + } + return fiber; + }; +}(); +/** + * Run an Effect and add the forked fiber to the FiberMap. + * When the fiber completes, it will be removed from the FiberMap. + * + * @since 2.0.0 + * @categories combinators + */ +const run = function () { + const self = arguments[0]; + if (Effect.isEffect(arguments[2])) { + return runImpl(self, arguments[1], arguments[2], arguments[3]); + } + const key = arguments[1]; + const options = arguments[2]; + return effect => runImpl(self, key, effect, options); +}; +exports.run = run; +const runImpl = (self, key, effect, options) => Effect.withFiberRuntime(parent => { + if (self.state._tag === "Closed") { + return Effect.interrupt; + } else if (options?.onlyIfMissing === true && unsafeHas(self, key)) { + return Effect.sync(constInterruptedFiber); + } + const runtime = Runtime.make({ + context: parent.currentContext, + fiberRefs: parent.getFiberRefs(), + runtimeFlags: Runtime.defaultRuntime.runtimeFlags + }); + const fiber = Runtime.runFork(runtime)(effect); + unsafeSet(self, key, fiber, { + ...options, + interruptAs: parent.id() + }); + return Effect.succeed(fiber); +}); +/** + * Capture a Runtime and use it to fork Effect's, adding the forked fibers to the FiberMap. + * + * @example + * ```ts + * import { Context, Effect, FiberMap } from "effect" + * + * interface Users { + * readonly _: unique symbol + * } + * const Users = Context.GenericTag> + * }>("Users") + * + * Effect.gen(function*() { + * const map = yield* FiberMap.make() + * const run = yield* FiberMap.runtime(map)() + * + * // run some effects and add the fibers to the map + * run("effect-a", Effect.andThen(Users, _ => _.getAll)) + * run("effect-b", Effect.andThen(Users, _ => _.getAll)) + * }).pipe( + * Effect.scoped // The fibers will be interrupted when the scope is closed + * ) + * ``` + * + * @since 2.0.0 + * @categories combinators + */ +const runtime = self => () => Effect.map(Effect.runtime(), runtime => { + const runFork = Runtime.runFork(runtime); + return (key, effect, options) => { + if (self.state._tag === "Closed") { + return constInterruptedFiber(); + } else if (options?.onlyIfMissing === true && unsafeHas(self, key)) { + return constInterruptedFiber(); + } + const fiber = runFork(effect, options); + unsafeSet(self, key, fiber, options); + return fiber; + }; +}); +/** + * Capture a Runtime and use it to fork Effect's, adding the forked fibers to the FiberMap. + * + * @since 3.13.0 + * @categories combinators + */ +exports.runtime = runtime; +const runtimePromise = self => () => Effect.map(runtime(self)(), runFork => (key, effect, options) => new Promise((resolve, reject) => runFork(key, effect, options).addObserver(exit => { + if (Exit.isSuccess(exit)) { + resolve(exit.value); + } else { + reject(Cause.squash(exit.cause)); + } +}))); +/** + * @since 2.0.0 + * @categories combinators + */ +exports.runtimePromise = runtimePromise; +const size = self => Effect.sync(() => self.state._tag === "Closed" ? 0 : MutableHashMap.size(self.state.backing)); +/** + * Join all fibers in the FiberMap. If any of the Fiber's in the map terminate with a failure, + * the returned Effect will terminate with the first failure that occurred. + * + * @since 2.0.0 + * @categories combinators + * @example + * ```ts + * import { Effect, FiberMap } from "effect"; + * + * Effect.gen(function* (_) { + * const map = yield* _(FiberMap.make()); + * yield* _(FiberMap.set(map, "a", Effect.runFork(Effect.fail("error")))); + * + * // parent fiber will fail with "error" + * yield* _(FiberMap.join(map)); + * }); + * ``` + */ +exports.size = size; +const join = self => Deferred.await(self.deferred); +/** + * Wait for the FiberMap to be empty. + * + * @since 3.13.0 + * @categories combinators + */ +exports.join = join; +const awaitEmpty = self => Effect.whileLoop({ + while: () => self.state._tag === "Open" && MutableHashMap.size(self.state.backing) > 0, + body: () => Fiber.await(Iterable.unsafeHead(self)[1]), + step: _Function.constVoid +}); +exports.awaitEmpty = awaitEmpty; +//# sourceMappingURL=FiberMap.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/FiberRef.js b/backend/node_modules/effect/dist/cjs/FiberRef.js new file mode 100644 index 0000000000000000000000000000000000000000..af8db7f9f2edd4e19899c62d1d7e38f0376bcb22 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/FiberRef.js @@ -0,0 +1,243 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.versionMismatchErrorLogLevel = exports.updateSomeAndGet = exports.updateSome = exports.updateAndGet = exports.update = exports.unsafeMakeSupervisor = exports.unsafeMakePatch = exports.unsafeMakeHashSet = exports.unsafeMakeContext = exports.unsafeMake = exports.unhandledErrorLogLevel = exports.set = exports.reset = exports.modifySome = exports.modify = exports.makeWith = exports.makeRuntimeFlags = exports.makeContext = exports.make = exports.interruptedCause = exports.getWith = exports.getAndUpdateSome = exports.getAndUpdate = exports.getAndSet = exports.get = exports.delete = exports.currentTracerTimingEnabled = exports.currentTracerSpanLinks = exports.currentTracerSpanAnnotations = exports.currentTracerEnabled = exports.currentSupervisor = exports.currentSchedulingPriority = exports.currentScheduler = exports.currentRuntimeFlags = exports.currentRequestCacheEnabled = exports.currentRequestCache = exports.currentRequestBatchingEnabled = exports.currentMinimumLogLevel = exports.currentMetricLabels = exports.currentMaxOpsBeforeYield = exports.currentLoggers = exports.currentLogSpan = exports.currentLogLevel = exports.currentLogAnnotations = exports.currentContext = exports.currentConcurrency = exports.FiberRefTypeId = void 0; +var core = _interopRequireWildcard(require("./internal/core.js")); +var fiberRuntime = _interopRequireWildcard(require("./internal/fiberRuntime.js")); +var query = _interopRequireWildcard(require("./internal/query.js")); +var Scheduler = _interopRequireWildcard(require("./Scheduler.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const FiberRefTypeId = exports.FiberRefTypeId = core.FiberRefTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = fiberRuntime.fiberRefMake; +/** + * @since 2.0.0 + * @category constructors + */ +const makeWith = exports.makeWith = fiberRuntime.fiberRefMakeWith; +/** + * @since 2.0.0 + * @category constructors + */ +const makeContext = exports.makeContext = fiberRuntime.fiberRefMakeContext; +/** + * @since 2.0.0 + * @category constructors + */ +const makeRuntimeFlags = exports.makeRuntimeFlags = fiberRuntime.fiberRefMakeRuntimeFlags; +/** + * @since 2.0.0 + * @category constructors + */ +const unsafeMake = exports.unsafeMake = core.fiberRefUnsafeMake; +/** + * @since 2.0.0 + * @category constructors + */ +const unsafeMakeHashSet = exports.unsafeMakeHashSet = core.fiberRefUnsafeMakeHashSet; +/** + * @since 2.0.0 + * @category constructors + */ +const unsafeMakeContext = exports.unsafeMakeContext = core.fiberRefUnsafeMakeContext; +/** + * @since 2.0.0 + * @category constructors + */ +const unsafeMakeSupervisor = exports.unsafeMakeSupervisor = fiberRuntime.fiberRefUnsafeMakeSupervisor; +/** + * @since 2.0.0 + * @category constructors + */ +const unsafeMakePatch = exports.unsafeMakePatch = core.fiberRefUnsafeMakePatch; +/** + * @since 2.0.0 + * @category getters + */ +const get = exports.get = core.fiberRefGet; +/** + * @since 2.0.0 + * @category utils + */ +const getAndSet = exports.getAndSet = core.fiberRefGetAndSet; +/** + * @since 2.0.0 + * @category utils + */ +const getAndUpdate = exports.getAndUpdate = core.fiberRefGetAndUpdate; +/** + * @since 2.0.0 + * @category utils + */ +const getAndUpdateSome = exports.getAndUpdateSome = core.fiberRefGetAndUpdateSome; +/** + * @since 2.0.0 + * @category utils + */ +const getWith = exports.getWith = core.fiberRefGetWith; +/** + * @since 2.0.0 + * @category utils + */ +const set = exports.set = core.fiberRefSet; +const _delete = exports.delete = core.fiberRefDelete; +/** + * @since 2.0.0 + * @category utils + */ +const reset = exports.reset = core.fiberRefReset; +/** + * @since 2.0.0 + * @category utils + */ +const modify = exports.modify = core.fiberRefModify; +/** + * @since 2.0.0 + * @category utils + */ +const modifySome = exports.modifySome = core.fiberRefModifySome; +/** + * @since 2.0.0 + * @category utils + */ +const update = exports.update = core.fiberRefUpdate; +/** + * @since 2.0.0 + * @category utils + */ +const updateSome = exports.updateSome = core.fiberRefUpdateSome; +/** + * @since 2.0.0 + * @category utils + */ +const updateAndGet = exports.updateAndGet = core.fiberRefUpdateAndGet; +/** + * @since 2.0.0 + * @category utils + */ +const updateSomeAndGet = exports.updateSomeAndGet = core.fiberRefUpdateSomeAndGet; +/** + * @since 2.0.0 + * @category fiberRefs + */ +const currentConcurrency = exports.currentConcurrency = core.currentConcurrency; +/** + * @since 2.0.0 + * @category fiberRefs + */ +const currentRequestBatchingEnabled = exports.currentRequestBatchingEnabled = core.currentRequestBatching; +/** + * @since 2.0.0 + * @category fiberRefs + */ +const currentRequestCache = exports.currentRequestCache = query.currentCache; +/** + * @since 2.0.0 + * @category fiberRefs + */ +const currentRequestCacheEnabled = exports.currentRequestCacheEnabled = query.currentCacheEnabled; +/** + * @since 2.0.0 + * @category fiberRefs + */ +const currentContext = exports.currentContext = core.currentContext; +/** + * @since 2.0.0 + * @category fiberRefs + */ +const currentSchedulingPriority = exports.currentSchedulingPriority = core.currentSchedulingPriority; +/** + * @since 2.0.0 + * @category fiberRefs + */ +const currentMaxOpsBeforeYield = exports.currentMaxOpsBeforeYield = core.currentMaxOpsBeforeYield; +/** + * @since 2.0.0 + * @category fiberRefs + */ +const unhandledErrorLogLevel = exports.unhandledErrorLogLevel = core.currentUnhandledErrorLogLevel; +/** + * @since 3.17.0 + * @category fiberRefs + */ +const versionMismatchErrorLogLevel = exports.versionMismatchErrorLogLevel = core.currentVersionMismatchErrorLogLevel; +/** + * @since 2.0.0 + * @category fiberRefs + */ +const currentLogAnnotations = exports.currentLogAnnotations = core.currentLogAnnotations; +/** + * @since 2.0.0 + * @category fiberRefs + */ +const currentLoggers = exports.currentLoggers = fiberRuntime.currentLoggers; +/** + * @since 2.0.0 + * @category fiberRefs + */ +const currentLogLevel = exports.currentLogLevel = core.currentLogLevel; +/** + * @since 2.0.0 + * @category fiberRefs + */ +const currentMinimumLogLevel = exports.currentMinimumLogLevel = fiberRuntime.currentMinimumLogLevel; +/** + * @since 2.0.0 + * @category fiberRefs + */ +const currentLogSpan = exports.currentLogSpan = core.currentLogSpan; +/** + * @since 2.0.0 + * @category fiberRefs + */ +const currentRuntimeFlags = exports.currentRuntimeFlags = fiberRuntime.currentRuntimeFlags; +/** + * @since 2.0.0 + * @category fiberRefs + */ +const currentScheduler = exports.currentScheduler = Scheduler.currentScheduler; +/** + * @since 2.0.0 + * @category fiberRefs + */ +const currentSupervisor = exports.currentSupervisor = fiberRuntime.currentSupervisor; +/** + * @since 2.0.0 + * @category fiberRefs + */ +const currentMetricLabels = exports.currentMetricLabels = core.currentMetricLabels; +/** + * @since 2.0.0 + * @category fiberRefs + */ +const currentTracerEnabled = exports.currentTracerEnabled = core.currentTracerEnabled; +/** + * @since 2.0.0 + * @category fiberRefs + */ +const currentTracerTimingEnabled = exports.currentTracerTimingEnabled = core.currentTracerTimingEnabled; +/** + * @since 2.0.0 + * @category fiberRefs + */ +const currentTracerSpanAnnotations = exports.currentTracerSpanAnnotations = core.currentTracerSpanAnnotations; +/** + * @since 2.0.0 + * @category fiberRefs + */ +const currentTracerSpanLinks = exports.currentTracerSpanLinks = core.currentTracerSpanLinks; +/** + * @since 2.0.0 + * @category fiberRefs + */ +const interruptedCause = exports.interruptedCause = core.currentInterruptedCause; +//# sourceMappingURL=FiberRef.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/FiberRef.js.map b/backend/node_modules/effect/dist/cjs/FiberRef.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5ff9e7716ddcfc40a1294382d01f6af37fd03957 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/FiberRef.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FiberRef.js","names":["core","_interopRequireWildcard","require","fiberRuntime","query","Scheduler","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","FiberRefTypeId","exports","make","fiberRefMake","makeWith","fiberRefMakeWith","makeContext","fiberRefMakeContext","makeRuntimeFlags","fiberRefMakeRuntimeFlags","unsafeMake","fiberRefUnsafeMake","unsafeMakeHashSet","fiberRefUnsafeMakeHashSet","unsafeMakeContext","fiberRefUnsafeMakeContext","unsafeMakeSupervisor","fiberRefUnsafeMakeSupervisor","unsafeMakePatch","fiberRefUnsafeMakePatch","fiberRefGet","getAndSet","fiberRefGetAndSet","getAndUpdate","fiberRefGetAndUpdate","getAndUpdateSome","fiberRefGetAndUpdateSome","getWith","fiberRefGetWith","fiberRefSet","_delete","delete","fiberRefDelete","reset","fiberRefReset","modify","fiberRefModify","modifySome","fiberRefModifySome","update","fiberRefUpdate","updateSome","fiberRefUpdateSome","updateAndGet","fiberRefUpdateAndGet","updateSomeAndGet","fiberRefUpdateSomeAndGet","currentConcurrency","currentRequestBatchingEnabled","currentRequestBatching","currentRequestCache","currentCache","currentRequestCacheEnabled","currentCacheEnabled","currentContext","currentSchedulingPriority","currentMaxOpsBeforeYield","unhandledErrorLogLevel","currentUnhandledErrorLogLevel","versionMismatchErrorLogLevel","currentVersionMismatchErrorLogLevel","currentLogAnnotations","currentLoggers","currentLogLevel","currentMinimumLogLevel","currentLogSpan","currentRuntimeFlags","currentScheduler","currentSupervisor","currentMetricLabels","currentTracerEnabled","currentTracerTimingEnabled","currentTracerSpanAnnotations","currentTracerSpanLinks","interruptedCause","currentInterruptedCause"],"sources":["../../src/FiberRef.ts"],"sourcesContent":[null],"mappings":";;;;;;AAWA,IAAAA,IAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,KAAA,GAAAH,uBAAA,CAAAC,OAAA;AASA,IAAAG,SAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAA2C,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,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;AAIO,MAAMC,gBAAgB,GAAAzE,OAAA,CAAAyE,gBAAA,GAAiCnG,IAAI,CAACoG,uBAAuB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/FiberRefsPatch.js.map b/backend/node_modules/effect/dist/cjs/FiberRefsPatch.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c3f5e28ba701466273b8db031be938add0885da7 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/FiberRefsPatch.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FiberRefsPatch.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","empty","exports","diff","combine","patch"],"sources":["../../src/FiberRefsPatch.ts"],"sourcesContent":[null],"mappings":";;;;;;AAMA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAyD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AA4DzD;;;;AAIO,MAAMkB,KAAK,GAAAC,OAAA,CAAAD,KAAA,GAAmBtB,QAAQ,CAACsB,KAAK;AAEnD;;;;;;;AAOO,MAAME,IAAI,GAAAD,OAAA,CAAAC,IAAA,GAAqFxB,QAAQ,CAACwB,IAAI;AAEnH;;;;;;;;AAQO,MAAMC,OAAO,GAAAF,OAAA,CAAAE,OAAA,GAmBhBzB,QAAQ,CAACyB,OAAO;AAEpB;;;;;;;AAOO,MAAMC,KAAK,GAAAH,OAAA,CAAAG,KAAA,GAqBd1B,QAAQ,CAAC0B,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/FiberSet.js b/backend/node_modules/effect/dist/cjs/FiberSet.js new file mode 100644 index 0000000000000000000000000000000000000000..f62e9f9eeda71918201d79b0e3c691662bfcdf6d --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/FiberSet.js @@ -0,0 +1,308 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.unsafeAdd = exports.size = exports.runtimePromise = exports.runtime = exports.run = exports.makeRuntimePromise = exports.makeRuntime = exports.make = exports.join = exports.isFiberSet = exports.clear = exports.awaitEmpty = exports.add = exports.TypeId = void 0; +var Cause = _interopRequireWildcard(require("./Cause.js")); +var Deferred = _interopRequireWildcard(require("./Deferred.js")); +var Effect = _interopRequireWildcard(require("./Effect.js")); +var Exit = _interopRequireWildcard(require("./Exit.js")); +var Fiber = _interopRequireWildcard(require("./Fiber.js")); +var FiberId = _interopRequireWildcard(require("./FiberId.js")); +var _Function = require("./Function.js"); +var HashSet = _interopRequireWildcard(require("./HashSet.js")); +var Inspectable = _interopRequireWildcard(require("./Inspectable.js")); +var Iterable = _interopRequireWildcard(require("./Iterable.js")); +var _Pipeable = require("./Pipeable.js"); +var Predicate = _interopRequireWildcard(require("./Predicate.js")); +var Runtime = _interopRequireWildcard(require("./Runtime.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * @since 2.0.0 + * @categories type ids + */ +const TypeId = exports.TypeId = /*#__PURE__*/Symbol.for("effect/FiberSet"); +/** + * @since 2.0.0 + * @categories refinements + */ +const isFiberSet = u => Predicate.hasProperty(u, TypeId); +exports.isFiberSet = isFiberSet; +const Proto = { + [TypeId]: TypeId, + [Symbol.iterator]() { + if (this.state._tag === "Closed") { + return Iterable.empty(); + } + return this.state.backing[Symbol.iterator](); + }, + toString() { + return Inspectable.format(this.toJSON()); + }, + toJSON() { + return { + _id: "FiberMap", + state: this.state + }; + }, + [Inspectable.NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + } +}; +const unsafeMake = (backing, deferred) => { + const self = Object.create(Proto); + self.state = { + _tag: "Open", + backing + }; + self.deferred = deferred; + return self; +}; +/** + * A FiberSet can be used to store a collection of fibers. + * When the associated Scope is closed, all fibers in the set will be interrupted. + * + * You can add fibers to the set using `FiberSet.add` or `FiberSet.run`, and the fibers will + * be automatically removed from the FiberSet when they complete. + * + * @example + * ```ts + * import { Effect, FiberSet } from "effect" + * + * Effect.gen(function*() { + * const set = yield* FiberSet.make() + * + * // run some effects and add the fibers to the set + * yield* FiberSet.run(set, Effect.never) + * yield* FiberSet.run(set, Effect.never) + * + * yield* Effect.sleep(1000) + * }).pipe( + * Effect.scoped // The fibers will be interrupted when the scope is closed + * ) + * ``` + * + * @since 2.0.0 + * @categories constructors + */ +const make = () => Effect.acquireRelease(Effect.map(Deferred.make(), deferred => unsafeMake(new Set(), deferred)), set => Effect.withFiberRuntime(parent => { + const state = set.state; + if (state._tag === "Closed") return Effect.void; + set.state = { + _tag: "Closed" + }; + const fibers = state.backing; + return Fiber.interruptAllAs(fibers, FiberId.combine(parent.id(), internalFiberId)).pipe(Effect.intoDeferred(set.deferred)); +})); +/** + * Create an Effect run function that is backed by a FiberSet. + * + * @since 2.0.0 + * @categories constructors + */ +exports.make = make; +const makeRuntime = () => Effect.flatMap(make(), self => runtime(self)()); +/** + * Create an Effect run function that is backed by a FiberSet. + * + * @since 3.13.0 + * @categories constructors + */ +exports.makeRuntime = makeRuntime; +const makeRuntimePromise = () => Effect.flatMap(make(), self => runtimePromise(self)()); +exports.makeRuntimePromise = makeRuntimePromise; +const internalFiberIdId = -1; +const internalFiberId = /*#__PURE__*/FiberId.make(internalFiberIdId, 0); +const isInternalInterruption = /*#__PURE__*/Cause.reduceWithContext(undefined, { + emptyCase: _Function.constFalse, + failCase: _Function.constFalse, + dieCase: _Function.constFalse, + interruptCase: (_, fiberId) => HashSet.has(FiberId.ids(fiberId), internalFiberIdId), + sequentialCase: (_, left, right) => left || right, + parallelCase: (_, left, right) => left || right +}); +/** + * Add a fiber to the FiberSet. When the fiber completes, it will be removed. + * + * @since 2.0.0 + * @categories combinators + */ +const unsafeAdd = exports.unsafeAdd = /*#__PURE__*/(0, _Function.dual)(args => isFiberSet(args[0]), (self, fiber, options) => { + if (self.state._tag === "Closed") { + fiber.unsafeInterruptAsFork(FiberId.combine(options?.interruptAs ?? FiberId.none, 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 (Exit.isFailure(exit) && (options?.propagateInterruption === true ? !isInternalInterruption(exit.cause) : !Cause.isInterruptedOnly(exit.cause))) { + Deferred.unsafeDone(self.deferred, exit); + } + }); +}); +/** + * Add a fiber to the FiberSet. When the fiber completes, it will be removed. + * + * @since 2.0.0 + * @categories combinators + */ +const add = exports.add = /*#__PURE__*/(0, _Function.dual)(args => isFiberSet(args[0]), (self, fiber, options) => Effect.fiberIdWith(fiberId => Effect.sync(() => unsafeAdd(self, fiber, { + ...options, + interruptAs: fiberId +})))); +/** + * @since 2.0.0 + * @categories combinators + */ +const clear = self => Effect.withFiberRuntime(clearFiber => { + if (self.state._tag === "Closed") { + return Effect.void; + } + return Effect.forEach(self.state.backing, fiber => + // will be removed by the observer + Fiber.interruptAs(fiber, FiberId.combine(clearFiber.id(), internalFiberId))); +}); +exports.clear = clear; +const constInterruptedFiber = /*#__PURE__*/function () { + let fiber = undefined; + return () => { + if (fiber === undefined) { + fiber = Effect.runFork(Effect.interrupt); + } + return fiber; + }; +}(); +/** + * Fork an Effect and add the forked fiber to the FiberSet. + * When the fiber completes, it will be removed from the FiberSet. + * + * @since 2.0.0 + * @categories combinators + */ +const run = function () { + const self = arguments[0]; + if (!Effect.isEffect(arguments[1])) { + const options = arguments[1]; + return effect => runImpl(self, effect, options); + } + return runImpl(self, arguments[1], arguments[2]); +}; +exports.run = run; +const runImpl = (self, effect, options) => Effect.fiberIdWith(fiberId => { + if (self.state._tag === "Closed") { + return Effect.sync(constInterruptedFiber); + } + return Effect.tap(Effect.forkDaemon(effect), fiber => unsafeAdd(self, fiber, { + ...options, + interruptAs: fiberId + })); +}); +/** + * Capture a Runtime and use it to fork Effect's, adding the forked fibers to the FiberSet. + * + * @example + * ```ts + * import { Context, Effect, FiberSet } from "effect" + * + * interface Users { + * readonly _: unique symbol + * } + * const Users = Context.GenericTag> + * }>("Users") + * + * Effect.gen(function*() { + * const set = yield* FiberSet.make() + * const run = yield* FiberSet.runtime(set)() + * + * // run some effects and add the fibers to the set + * run(Effect.andThen(Users, _ => _.getAll)) + * }).pipe( + * Effect.scoped // The fibers will be interrupted when the scope is closed + * ) + * ``` + * + * @since 2.0.0 + * @categories combinators + */ +const runtime = self => () => Effect.map(Effect.runtime(), runtime => { + const runFork = Runtime.runFork(runtime); + return (effect, options) => { + if (self.state._tag === "Closed") { + return constInterruptedFiber(); + } + const fiber = runFork(effect, options); + unsafeAdd(self, fiber); + return fiber; + }; +}); +/** + * Capture a Runtime and use it to fork Effect's, adding the forked fibers to the FiberSet. + * + * The returned run function will return Promise's. + * + * @since 3.13.0 + * @categories combinators + */ +exports.runtime = runtime; +const runtimePromise = self => () => Effect.map(runtime(self)(), runFork => (effect, options) => new Promise((resolve, reject) => runFork(effect, options).addObserver(exit => { + if (Exit.isSuccess(exit)) { + resolve(exit.value); + } else { + reject(Cause.squash(exit.cause)); + } +}))); +/** + * @since 2.0.0 + * @categories combinators + */ +exports.runtimePromise = runtimePromise; +const size = self => Effect.sync(() => self.state._tag === "Closed" ? 0 : self.state.backing.size); +/** + * Join all fibers in the FiberSet. If any of the Fiber's in the set terminate with a failure, + * the returned Effect will terminate with the first failure that occurred. + * + * @since 2.0.0 + * @categories combinators + * @example + * ```ts + * import { Effect, FiberSet } from "effect"; + * + * Effect.gen(function* (_) { + * const set = yield* _(FiberSet.make()); + * yield* _(FiberSet.add(set, Effect.runFork(Effect.fail("error")))); + * + * // parent fiber will fail with "error" + * yield* _(FiberSet.join(set)); + * }); + * ``` + */ +exports.size = size; +const join = self => Deferred.await(self.deferred); +/** + * Wait until the fiber set is empty. + * + * @since 3.13.0 + * @categories combinators + */ +exports.join = join; +const awaitEmpty = self => Effect.whileLoop({ + while: () => self.state._tag === "Open" && self.state.backing.size > 0, + body: () => Fiber.await(Iterable.unsafeHead(self)), + step: _Function.constVoid +}); +exports.awaitEmpty = awaitEmpty; +//# sourceMappingURL=FiberSet.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/FiberSet.js.map b/backend/node_modules/effect/dist/cjs/FiberSet.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5edc1655f02cbe0e0f831e262867fbb6566f417e --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/FiberSet.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FiberSet.js","names":["Cause","_interopRequireWildcard","require","Deferred","Effect","Exit","Fiber","FiberId","_Function","HashSet","Inspectable","Iterable","_Pipeable","Predicate","Runtime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","exports","Symbol","for","isFiberSet","u","hasProperty","Proto","iterator","state","_tag","empty","backing","toString","format","toJSON","_id","NodeInspectSymbol","pipe","pipeArguments","arguments","unsafeMake","deferred","self","create","make","acquireRelease","map","Set","withFiberRuntime","parent","void","fibers","interruptAllAs","combine","id","internalFiberId","intoDeferred","makeRuntime","flatMap","runtime","makeRuntimePromise","runtimePromise","internalFiberIdId","isInternalInterruption","reduceWithContext","undefined","emptyCase","constFalse","failCase","dieCase","interruptCase","_","fiberId","ids","sequentialCase","left","right","parallelCase","unsafeAdd","dual","args","fiber","options","unsafeInterruptAsFork","interruptAs","none","add","addObserver","exit","delete","isFailure","propagateInterruption","cause","isInterruptedOnly","unsafeDone","fiberIdWith","sync","clear","clearFiber","forEach","constInterruptedFiber","runFork","interrupt","run","isEffect","effect","runImpl","tap","forkDaemon","Promise","resolve","reject","isSuccess","value","squash","size","join","await","awaitEmpty","whileLoop","while","body","unsafeHead","step","constVoid"],"sources":["../../src/FiberSet.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,uBAAA,CA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AAC;EACrB,CAAC,MAAM;IACLF,MAAM,CAAC9H,KAAK,CAACiI,MAAM,CAAC1B,IAAI,CAACI,KAAK,CAAC,CAAC;EAClC;AACF,CAAC,CAAC,CACH,CACJ;AAEH;;;;AAAAxE,OAAA,CAAAyC,cAAA,GAAAA,cAAA;AAIO,MAAMsD,IAAI,GAAUzE,IAAoB,IAC7CrD,MAAM,CAAC2G,IAAI,CAAC,MAAMtD,IAAI,CAACd,KAAK,CAACC,IAAI,KAAK,QAAQ,GAAG,CAAC,GAAGa,IAAI,CAACd,KAAK,CAACG,OAAO,CAACoF,IAAI,CAAC;AAE/E;;;;;;;;;;;;;;;;;;;AAAA/F,OAAA,CAAA+F,IAAA,GAAAA,IAAA;AAmBO,MAAMC,IAAI,GAAU1E,IAAoB,IAC7CtD,QAAQ,CAACiI,KAAK,CAAC3E,IAAI,CAACD,QAAsC,CAAC;AAE7D;;;;;;AAAArB,OAAA,CAAAgG,IAAA,GAAAA,IAAA;AAMO,MAAME,UAAU,GAAU5E,IAAoB,IACnDrD,MAAM,CAACkI,SAAS,CAAC;EACfC,KAAK,EAAEA,CAAA,KAAM9E,IAAI,CAACd,KAAK,CAACC,IAAI,KAAK,MAAM,IAAIa,IAAI,CAACd,KAAK,CAACG,OAAO,CAACoF,IAAI,GAAG,CAAC;EACtEM,IAAI,EAAEA,CAAA,KAAMlI,KAAK,CAAC8H,KAAK,CAACzH,QAAQ,CAAC8H,UAAU,CAAChF,IAAI,CAAC,CAAC;EAClDiF,IAAI,EAAEC;CACP,CAAC;AAAAxG,OAAA,CAAAkG,UAAA,GAAAA,UAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/FiberStatus.js b/backend/node_modules/effect/dist/cjs/FiberStatus.js new file mode 100644 index 0000000000000000000000000000000000000000..5e1304f169ead30bbb0c5ec3a7c8b39d30954fbd --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/FiberStatus.js @@ -0,0 +1,59 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.suspended = exports.running = exports.isSuspended = exports.isRunning = exports.isFiberStatus = exports.isDone = exports.done = exports.FiberStatusTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/fiberStatus.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const FiberStatusTypeId = exports.FiberStatusTypeId = internal.FiberStatusTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +const done = exports.done = internal.done; +/** + * @since 2.0.0 + * @category constructors + */ +const running = exports.running = internal.running; +/** + * @since 2.0.0 + * @category constructors + */ +const suspended = exports.suspended = internal.suspended; +/** + * Returns `true` if the specified value is a `FiberStatus`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isFiberStatus = exports.isFiberStatus = internal.isFiberStatus; +/** + * Returns `true` if the specified `FiberStatus` is `Done`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isDone = exports.isDone = internal.isDone; +/** + * Returns `true` if the specified `FiberStatus` is `Running`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isRunning = exports.isRunning = internal.isRunning; +/** + * Returns `true` if the specified `FiberStatus` is `Suspended`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isSuspended = exports.isSuspended = internal.isSuspended; +//# sourceMappingURL=FiberStatus.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/FiberStatus.js.map b/backend/node_modules/effect/dist/cjs/FiberStatus.js.map new file mode 100644 index 0000000000000000000000000000000000000000..65ddf73adb70f7b6ca8d3f9a354c186236b2734a --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/FiberStatus.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FiberStatus.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","FiberStatusTypeId","exports","done","running","suspended","isFiberStatus","isDone","isRunning","isSuspended"],"sources":["../../src/FiberStatus.ts"],"sourcesContent":[null],"mappings":";;;;;;AAKA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAqD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAGrD;;;;AAIO,MAAMkB,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAkBtB,QAAQ,CAACsB,iBAAiB;AA4C1E;;;;AAIO,MAAME,IAAI,GAAAD,OAAA,CAAAC,IAAA,GAAgBxB,QAAQ,CAACwB,IAAI;AAE9C;;;;AAIO,MAAMC,OAAO,GAAAF,OAAA,CAAAE,OAAA,GAA6DzB,QAAQ,CAACyB,OAAO;AAEjG;;;;AAIO,MAAMC,SAAS,GAAAH,OAAA,CAAAG,SAAA,GACpB1B,QAAQ,CAAC0B,SAAS;AAEpB;;;;;;AAMO,MAAMC,aAAa,GAAAJ,OAAA,CAAAI,aAAA,GAAqC3B,QAAQ,CAAC2B,aAAa;AAErF;;;;;;AAMO,MAAMC,MAAM,GAAAL,OAAA,CAAAK,MAAA,GAAwC5B,QAAQ,CAAC4B,MAAM;AAE1E;;;;;;;AAOO,MAAMC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAA2C7B,QAAQ,CAAC6B,SAAS;AAEnF;;;;;;;AAOO,MAAMC,WAAW,GAAAP,OAAA,CAAAO,WAAA,GAA6C9B,QAAQ,CAAC8B,WAAW","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Function.js b/backend/node_modules/effect/dist/cjs/Function.js new file mode 100644 index 0000000000000000000000000000000000000000..0e07331341b6f04f317b6ddc87a503d7993ee51a --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Function.js @@ -0,0 +1,488 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.flip = exports.dual = exports.constant = exports.constVoid = exports.constUndefined = exports.constTrue = exports.constNull = exports.constFalse = exports.compose = exports.apply = exports.absurd = exports.SK = void 0; +exports.flow = flow; +exports.isFunction = exports.identity = exports.hole = void 0; +exports.pipe = pipe; +exports.untupled = exports.unsafeCoerce = exports.tupled = exports.satisfies = void 0; +/** + * Tests if a value is a `function`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isFunction } from "effect/Predicate" + * + * assert.deepStrictEqual(isFunction(isFunction), true) + * assert.deepStrictEqual(isFunction("function"), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +const isFunction = input => typeof input === "function"; +/** + * Creates a function that can be used in a data-last (aka `pipe`able) or + * data-first style. + * + * The first parameter to `dual` is either the arity of the uncurried function + * or a predicate that determines if the function is being used in a data-first + * or data-last style. + * + * Using the arity is the most common use case, but there are some cases where + * you may want to use a predicate. For example, if you have a function that + * takes an optional argument, you can use a predicate to determine if the + * function is being used in a data-first or data-last style. + * + * You can pass either the arity of the uncurried function or a predicate + * which determines if the function is being used in a data-first or + * data-last style. + * + * **Example** (Using arity to determine data-first or data-last style) + * + * ```ts + * import { dual, pipe } from "effect/Function" + * + * const sum = dual< + * (that: number) => (self: number) => number, + * (self: number, that: number) => number + * >(2, (self, that) => self + that) + * + * console.log(sum(2, 3)) // 5 + * console.log(pipe(2, sum(3))) // 5 + * ``` + * + * **Example** (Using call signatures to define the overloads) + * + * ```ts + * import { dual, pipe } from "effect/Function" + * + * const sum: { + * (that: number): (self: number) => number + * (self: number, that: number): number + * } = dual(2, (self: number, that: number): number => self + that) + * + * console.log(sum(2, 3)) // 5 + * console.log(pipe(2, sum(3))) // 5 + * ``` + * + * **Example** (Using a predicate to determine data-first or data-last style) + * + * ```ts + * import { dual, pipe } from "effect/Function" + * + * const sum = dual< + * (that: number) => (self: number) => number, + * (self: number, that: number) => number + * >( + * (args) => args.length === 2, + * (self, that) => self + that + * ) + * + * console.log(sum(2, 3)) // 5 + * console.log(pipe(2, sum(3))) // 5 + * ``` + * + * @since 2.0.0 + */ +exports.isFunction = isFunction; +const dual = function (arity, body) { + if (typeof arity === "function") { + return function () { + if (arity(arguments)) { + // @ts-expect-error + return body.apply(this, arguments); + } + return self => body(self, ...arguments); + }; + } + switch (arity) { + case 0: + case 1: + throw new RangeError(`Invalid arity ${arity}`); + case 2: + return function (a, b) { + if (arguments.length >= 2) { + return body(a, b); + } + return function (self) { + return body(self, a); + }; + }; + case 3: + return function (a, b, c) { + if (arguments.length >= 3) { + return body(a, b, c); + } + return function (self) { + return body(self, a, b); + }; + }; + case 4: + return function (a, b, c, d) { + if (arguments.length >= 4) { + return body(a, b, c, d); + } + return function (self) { + return body(self, a, b, c); + }; + }; + case 5: + return function (a, b, c, d, e) { + if (arguments.length >= 5) { + return body(a, b, c, d, e); + } + return function (self) { + return body(self, a, b, c, d); + }; + }; + default: + return function () { + if (arguments.length >= arity) { + // @ts-expect-error + return body.apply(this, arguments); + } + const args = arguments; + return function (self) { + return body(self, ...args); + }; + }; + } +}; +/** + * Apply a function to given values. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, apply } from "effect/Function" + * import { length } from "effect/String" + * + * assert.deepStrictEqual(pipe(length, apply("hello")), 5) + * ``` + * + * @since 2.0.0 + */ +exports.dual = dual; +const apply = (...a) => self => self(...a); +/** + * The identity function, i.e. A function that returns its input argument. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { identity } from "effect/Function" + * + * assert.deepStrictEqual(identity(5), 5) + * ``` + * + * @since 2.0.0 + */ +exports.apply = apply; +const identity = a => a; +/** + * A function that ensures that the type of an expression matches some type, + * without changing the resulting type of that expression. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { satisfies } from "effect/Function" + * + * const test1 = satisfies()(5 as const) + * //^? const test: 5 + * // @ts-expect-error + * const test2 = satisfies()(5) + * //^? Argument of type 'number' is not assignable to parameter of type 'string' + * + * assert.deepStrictEqual(satisfies()(5), 5) + * ``` + * + * @since 2.0.0 + */ +exports.identity = identity; +const satisfies = () => b => b; +/** + * Casts the result to the specified type. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { unsafeCoerce, identity } from "effect/Function" + * + * assert.deepStrictEqual(unsafeCoerce, identity) + * ``` + * + * @since 2.0.0 + */ +exports.satisfies = satisfies; +const unsafeCoerce = exports.unsafeCoerce = identity; +/** + * Creates a constant value that never changes. + * + * This is useful when you want to pass a value to a higher-order function (a function that takes another function as its argument) + * and want that inner function to always use the same value, no matter how many times it is called. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { constant } from "effect/Function" + * + * const constNull = constant(null) + * + * assert.deepStrictEqual(constNull(), null) + * assert.deepStrictEqual(constNull(), null) + * ``` + * + * @since 2.0.0 + */ +const constant = value => () => value; +/** + * A thunk that returns always `true`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { constTrue } from "effect/Function" + * + * assert.deepStrictEqual(constTrue(), true) + * ``` + * + * @since 2.0.0 + */ +exports.constant = constant; +const constTrue = exports.constTrue = /*#__PURE__*/constant(true); +/** + * A thunk that returns always `false`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { constFalse } from "effect/Function" + * + * assert.deepStrictEqual(constFalse(), false) + * ``` + * + * @since 2.0.0 + */ +const constFalse = exports.constFalse = /*#__PURE__*/constant(false); +/** + * A thunk that returns always `null`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { constNull } from "effect/Function" + * + * assert.deepStrictEqual(constNull(), null) + * ``` + * + * @since 2.0.0 + */ +const constNull = exports.constNull = /*#__PURE__*/constant(null); +/** + * A thunk that returns always `undefined`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { constUndefined } from "effect/Function" + * + * assert.deepStrictEqual(constUndefined(), undefined) + * ``` + * + * @since 2.0.0 + */ +const constUndefined = exports.constUndefined = /*#__PURE__*/constant(undefined); +/** + * A thunk that returns always `void`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { constVoid } from "effect/Function" + * + * assert.deepStrictEqual(constVoid(), undefined) + * ``` + * + * @since 2.0.0 + */ +const constVoid = exports.constVoid = constUndefined; +/** + * Reverses the order of arguments for a curried function. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { flip } from "effect/Function" + * + * const f = (a: number) => (b: string) => a - b.length + * + * assert.deepStrictEqual(flip(f)('aaa')(2), -1) + * ``` + * + * @since 2.0.0 + */ +const flip = f => (...b) => (...a) => f(...a)(...b); +/** + * Composes two functions, `ab` and `bc` into a single function that takes in an argument `a` of type `A` and returns a result of type `C`. + * The result is obtained by first applying the `ab` function to `a` and then applying the `bc` function to the result of `ab`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { compose } from "effect/Function" + * + * const increment = (n: number) => n + 1; + * const square = (n: number) => n * n; + * + * assert.strictEqual(compose(increment, square)(2), 9); + * ``` + * + * @since 2.0.0 + */ +exports.flip = flip; +const compose = exports.compose = /*#__PURE__*/dual(2, (ab, bc) => a => bc(ab(a))); +/** + * The `absurd` function is a stub for cases where a value of type `never` is encountered in your code, + * meaning that it should be impossible for this code to be executed. + * + * This function is particularly useful when it's necessary to specify that certain cases are impossible. + * + * @since 2.0.0 + */ +const absurd = _ => { + throw new Error("Called `absurd` function which should be uncallable"); +}; +/** + * Creates a version of this function: instead of `n` arguments, it accepts a single tuple argument. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { tupled } from "effect/Function" + * + * const sumTupled = tupled((x: number, y: number): number => x + y) + * + * assert.deepStrictEqual(sumTupled([1, 2]), 3) + * ``` + * + * @since 2.0.0 + */ +exports.absurd = absurd; +const tupled = f => a => f(...a); +/** + * Inverse function of `tupled` + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { untupled } from "effect/Function" + * + * const getFirst = untupled((tuple: [A, B]): A => tuple[0]) + * + * assert.deepStrictEqual(getFirst(1, 2), 1) + * ``` + * + * @since 2.0.0 + */ +exports.tupled = tupled; +const untupled = f => (...a) => f(a); +exports.untupled = untupled; +function pipe(a, ab, bc, cd, de, ef, fg, gh, hi) { + switch (arguments.length) { + case 1: + return a; + case 2: + return ab(a); + case 3: + return bc(ab(a)); + case 4: + return cd(bc(ab(a))); + case 5: + return de(cd(bc(ab(a)))); + case 6: + return ef(de(cd(bc(ab(a))))); + case 7: + return fg(ef(de(cd(bc(ab(a)))))); + case 8: + return gh(fg(ef(de(cd(bc(ab(a))))))); + case 9: + return hi(gh(fg(ef(de(cd(bc(ab(a)))))))); + default: + { + let ret = arguments[0]; + for (let i = 1; i < arguments.length; i++) { + ret = arguments[i](ret); + } + return ret; + } + } +} +function flow(ab, bc, cd, de, ef, fg, gh, hi, ij) { + switch (arguments.length) { + case 1: + return ab; + case 2: + return function () { + return bc(ab.apply(this, arguments)); + }; + case 3: + return function () { + return cd(bc(ab.apply(this, arguments))); + }; + case 4: + return function () { + return de(cd(bc(ab.apply(this, arguments)))); + }; + case 5: + return function () { + return ef(de(cd(bc(ab.apply(this, arguments))))); + }; + case 6: + return function () { + return fg(ef(de(cd(bc(ab.apply(this, arguments)))))); + }; + case 7: + return function () { + return gh(fg(ef(de(cd(bc(ab.apply(this, arguments))))))); + }; + case 8: + return function () { + return hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments)))))))); + }; + case 9: + return function () { + return ij(hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments))))))))); + }; + } + return; +} +/** + * Type hole simulation. + * + * @since 2.0.0 + */ +const hole = exports.hole = /*#__PURE__*/unsafeCoerce(absurd); +/** + * The SK combinator, also known as the "S-K combinator" or "S-combinator", is a fundamental combinator in the + * lambda calculus and the SKI combinator calculus. + * + * This function is useful for discarding the first argument passed to it and returning the second argument. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { SK } from "effect/Function"; + * + * assert.deepStrictEqual(SK(0, "hello"), "hello") + * ``` + * + * @since 2.0.0 + */ +const SK = (_, b) => b; +exports.SK = SK; +//# sourceMappingURL=Function.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/GlobalValue.js b/backend/node_modules/effect/dist/cjs/GlobalValue.js new file mode 100644 index 0000000000000000000000000000000000000000..816221c9b593868c6c13b93aeeb195f991180af9 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/GlobalValue.js @@ -0,0 +1,59 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.globalValue = void 0; +/** + * The `GlobalValue` module ensures that a single instance of a value is created globally, + * even when modules are imported multiple times (e.g., due to mixing CommonJS and ESM builds) + * or during hot-reloading in development environments like Next.js or Remix. + * + * It achieves this by using a versioned global store, identified by a unique `Symbol` tied to + * the current version of the `effect` library. The store holds values that are keyed by an identifier, + * allowing the reuse of previously computed instances across imports or reloads. + * + * This pattern is particularly useful in scenarios where frequent reloading can cause services or + * single-instance objects to be recreated unnecessarily, such as in development environments with hot-reloading. + * + * @since 2.0.0 + */ +const globalStoreId = `effect/GlobalValue`; +let globalStore; +/** + * Retrieves or computes a global value associated with the given `id`. If the value for this `id` + * has already been computed, it will be returned from the global store. If it does not exist yet, + * the provided `compute` function will be executed to compute the value, store it, and then return it. + * + * This ensures that even in cases where the module is imported multiple times (e.g., in mixed environments + * like CommonJS and ESM, or during hot-reloading in development), the value is computed only once and reused + * thereafter. + * + * @example + * ```ts + * import { globalValue } from "effect/GlobalValue" + * + * // This cache will persist as long as the module is running, + * // even if reloaded or imported elsewhere + * const myCache = globalValue( + * Symbol.for("myCache"), + * () => new WeakMap() + * ) + * ``` + * + * @since 2.0.0 + */ +const globalValue = (id, compute) => { + if (!globalStore) { + // @ts-expect-error + globalThis[globalStoreId] ??= new Map(); + // @ts-expect-error + globalStore = globalThis[globalStoreId]; + } + if (!globalStore.has(id)) { + globalStore.set(id, compute()); + } + return globalStore.get(id); +}; +exports.globalValue = globalValue; +//# sourceMappingURL=GlobalValue.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Graph.js b/backend/node_modules/effect/dist/cjs/Graph.js new file mode 100644 index 0000000000000000000000000000000000000000..1f4ec5b7464308c357a54366982050e803237374 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Graph.js @@ -0,0 +1,3080 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.values = exports.updateNode = exports.updateEdge = exports.undirected = exports.topo = exports.toMermaid = exports.toGraphViz = exports.stronglyConnectedComponents = exports.reverse = exports.removeNode = exports.removeEdge = exports.nodes = exports.nodeCount = exports.neighborsDirected = exports.neighbors = exports.mutate = exports.mapNodes = exports.mapEdges = exports.isGraph = exports.isBipartite = exports.isAcyclic = exports.indices = exports.hasNode = exports.hasEdge = exports.getNode = exports.getEdge = exports.floydWarshall = exports.findNodes = exports.findNode = exports.findEdges = exports.findEdge = exports.filterNodes = exports.filterMapNodes = exports.filterMapEdges = exports.filterEdges = exports.externals = exports.entries = exports.endMutation = exports.edges = exports.edgeCount = exports.directed = exports.dijkstra = exports.dfsPostOrder = exports.dfs = exports.connectedComponents = exports.bfs = exports.bellmanFord = exports.beginMutation = exports.astar = exports.addNode = exports.addEdge = exports.Walker = exports.TypeId = exports.GraphError = exports.Edge = void 0; +var Data = _interopRequireWildcard(require("./Data.js")); +var Equal = _interopRequireWildcard(require("./Equal.js")); +var _Function = require("./Function.js"); +var Hash = _interopRequireWildcard(require("./Hash.js")); +var _Inspectable = require("./Inspectable.js"); +var Option = _interopRequireWildcard(require("./Option.js")); +var _Pipeable = require("./Pipeable.js"); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @experimental + * @since 3.18.0 + */ + +/** + * Unique identifier for Graph instances. + * + * @since 3.18.0 + * @category symbol + */ +const TypeId = exports.TypeId = "~effect/Graph"; +/** + * Edge data containing source, target, and user data. + * + * @since 3.18.0 + * @category models + */ +class Edge extends Data.Class {} +// ============================================================================= +// Proto Objects +// ============================================================================= +/** @internal */ +exports.Edge = Edge; +const ProtoGraph = { + [TypeId]: TypeId, + [Symbol.iterator]() { + return this.nodes[Symbol.iterator](); + }, + [_Inspectable.NodeInspectSymbol]() { + return this.toJSON(); + }, + [Equal.symbol](that) { + if (isGraph(that)) { + if (this.nodes.size !== that.nodes.size || this.edges.size !== that.edges.size || this.type !== that.type) { + return false; + } + // Compare nodes + for (const [nodeIndex, nodeData] of this.nodes) { + if (!that.nodes.has(nodeIndex)) { + return false; + } + const otherNodeData = that.nodes.get(nodeIndex); + if (!Equal.equals(nodeData, otherNodeData)) { + return false; + } + } + // Compare edges + for (const [edgeIndex, edgeData] of this.edges) { + if (!that.edges.has(edgeIndex)) { + return false; + } + const otherEdge = that.edges.get(edgeIndex); + if (!Equal.equals(edgeData, otherEdge)) { + return false; + } + } + return true; + } + return false; + }, + [Hash.symbol]() { + let hash = Hash.string("Graph"); + hash = hash ^ Hash.string(this.type); + hash = hash ^ Hash.number(this.nodes.size); + hash = hash ^ Hash.number(this.edges.size); + for (const [nodeIndex, nodeData] of this.nodes) { + hash = hash ^ Hash.hash(nodeIndex) + Hash.hash(nodeData); + } + for (const [edgeIndex, edgeData] of this.edges) { + hash = hash ^ Hash.hash(edgeIndex) + Hash.hash(edgeData); + } + return hash; + }, + toJSON() { + return { + _id: "Graph", + nodeCount: this.nodes.size, + edgeCount: this.edges.size, + type: this.type + }; + }, + toString() { + return (0, _Inspectable.format)(this); + }, + pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + } +}; +// ============================================================================= +// Errors +// ============================================================================= +/** + * Error thrown when a graph operation fails. + * + * @since 3.18.0 + * @category errors + */ +class GraphError extends /*#__PURE__*/Data.TaggedError("GraphError") {} +/** @internal */ +exports.GraphError = GraphError; +const missingNode = node => new GraphError({ + message: `Node ${node} does not exist` +}); +// ============================================================================= +// Constructors +// ============================================================================= +/** @internal */ +const isGraph = u => typeof u === "object" && u !== null && TypeId in u; +/** + * Creates a directed graph, optionally with initial mutations. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * // Directed graph with initial nodes and edges + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, "A->B") + * Graph.addEdge(mutable, b, c, "B->C") + * }) + * ``` + * + * @since 3.18.0 + * @category constructors + */ +exports.isGraph = isGraph; +const directed = mutate => { + const graph = Object.create(ProtoGraph); + graph.type = "directed"; + graph.nodes = new Map(); + graph.edges = new Map(); + graph.adjacency = new Map(); + graph.reverseAdjacency = new Map(); + graph.nextNodeIndex = 0; + graph.nextEdgeIndex = 0; + graph.isAcyclic = Option.some(true); + graph.mutable = false; + if (mutate) { + const mutable = beginMutation(graph); + mutate(mutable); + return endMutation(mutable); + } + return graph; +}; +/** + * Creates an undirected graph, optionally with initial mutations. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * // Undirected graph with initial nodes and edges + * const graph = Graph.undirected((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, "A-B") + * Graph.addEdge(mutable, b, c, "B-C") + * }) + * ``` + * + * @since 3.18.0 + * @category constructors + */ +exports.directed = directed; +const undirected = mutate => { + const graph = Object.create(ProtoGraph); + graph.type = "undirected"; + graph.nodes = new Map(); + graph.edges = new Map(); + graph.adjacency = new Map(); + graph.reverseAdjacency = new Map(); + graph.nextNodeIndex = 0; + graph.nextEdgeIndex = 0; + graph.isAcyclic = Option.some(true); + graph.mutable = false; + if (mutate) { + const mutable = beginMutation(graph); + mutate(mutable); + return endMutation(mutable); + } + return graph; +}; +// ============================================================================= +// Scoped Mutable API +// ============================================================================= +/** + * Creates a mutable scope for safe graph mutations by copying the data structure. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed() + * const mutable = Graph.beginMutation(graph) + * // Now mutable can be safely modified without affecting original graph + * ``` + * + * @since 3.18.0 + * @category mutations + */ +exports.undirected = undirected; +const beginMutation = graph => { + // Copy adjacency maps with deep cloned arrays + const adjacency = new Map(); + const reverseAdjacency = new Map(); + for (const [nodeIndex, edges] of graph.adjacency) { + adjacency.set(nodeIndex, [...edges]); + } + for (const [nodeIndex, edges] of graph.reverseAdjacency) { + reverseAdjacency.set(nodeIndex, [...edges]); + } + const mutable = Object.create(ProtoGraph); + mutable.type = graph.type; + mutable.nodes = new Map(graph.nodes); + mutable.edges = new Map(graph.edges); + mutable.adjacency = adjacency; + mutable.reverseAdjacency = reverseAdjacency; + mutable.nextNodeIndex = graph.nextNodeIndex; + mutable.nextEdgeIndex = graph.nextEdgeIndex; + mutable.isAcyclic = graph.isAcyclic; + mutable.mutable = true; + return mutable; +}; +/** + * Converts a mutable graph back to an immutable graph, ending the mutation scope. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed() + * const mutable = Graph.beginMutation(graph) + * // ... perform mutations on mutable ... + * const newGraph = Graph.endMutation(mutable) + * ``` + * + * @since 3.18.0 + * @category mutations + */ +exports.beginMutation = beginMutation; +const endMutation = mutable => { + const graph = Object.create(ProtoGraph); + graph.type = mutable.type; + graph.nodes = new Map(mutable.nodes); + graph.edges = new Map(mutable.edges); + graph.adjacency = mutable.adjacency; + graph.reverseAdjacency = mutable.reverseAdjacency; + graph.nextNodeIndex = mutable.nextNodeIndex; + graph.nextEdgeIndex = mutable.nextEdgeIndex; + graph.isAcyclic = mutable.isAcyclic; + graph.mutable = false; + return graph; +}; +/** + * Performs scoped mutations on a graph, automatically managing the mutation lifecycle. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed() + * const newGraph = Graph.mutate(graph, (mutable) => { + * // Safe mutations go here + * // mutable gets automatically converted back to immutable + * }) + * ``` + * + * @since 3.18.0 + * @category mutations + */ +exports.endMutation = endMutation; +const mutate = exports.mutate = /*#__PURE__*/(0, _Function.dual)(2, (graph, f) => { + const mutable = beginMutation(graph); + f(mutable); + return endMutation(mutable); +}); +// ============================================================================= +// Basic Node Operations +// ============================================================================= +/** + * Adds a new node to a mutable graph and returns its index. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const result = Graph.mutate(Graph.directed(), (mutable) => { + * const nodeA = Graph.addNode(mutable, "Node A") + * const nodeB = Graph.addNode(mutable, "Node B") + * console.log(nodeA) // NodeIndex with value 0 + * console.log(nodeB) // NodeIndex with value 1 + * }) + * ``` + * + * @since 3.18.0 + * @category mutations + */ +const addNode = (mutable, data) => { + const nodeIndex = mutable.nextNodeIndex; + // Add node data + mutable.nodes.set(nodeIndex, data); + // Initialize empty adjacency lists + mutable.adjacency.set(nodeIndex, []); + mutable.reverseAdjacency.set(nodeIndex, []); + // Update graph allocators + mutable.nextNodeIndex = mutable.nextNodeIndex + 1; + return nodeIndex; +}; +/** + * Gets the data associated with a node index, if it exists. + * + * @example + * ```ts + * import { Graph, Option } from "effect" + * + * const graph = Graph.mutate(Graph.directed(), (mutable) => { + * Graph.addNode(mutable, "Node A") + * }) + * + * const nodeIndex = 0 + * const nodeData = Graph.getNode(graph, nodeIndex) + * + * if (Option.isSome(nodeData)) { + * console.log(nodeData.value) // "Node A" + * } + * ``` + * + * @since 3.18.0 + * @category getters + */ +exports.addNode = addNode; +const getNode = (graph, nodeIndex) => graph.nodes.has(nodeIndex) ? Option.some(graph.nodes.get(nodeIndex)) : Option.none(); +/** + * Checks if a node with the given index exists in the graph. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.mutate(Graph.directed(), (mutable) => { + * Graph.addNode(mutable, "Node A") + * }) + * + * const nodeIndex = 0 + * const exists = Graph.hasNode(graph, nodeIndex) + * console.log(exists) // true + * + * const nonExistentIndex = 999 + * const notExists = Graph.hasNode(graph, nonExistentIndex) + * console.log(notExists) // false + * ``` + * + * @since 3.18.0 + * @category getters + */ +exports.getNode = getNode; +const hasNode = (graph, nodeIndex) => graph.nodes.has(nodeIndex); +/** + * Returns the number of nodes in the graph. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const emptyGraph = Graph.directed() + * console.log(Graph.nodeCount(emptyGraph)) // 0 + * + * const graphWithNodes = Graph.mutate(emptyGraph, (mutable) => { + * Graph.addNode(mutable, "Node A") + * Graph.addNode(mutable, "Node B") + * Graph.addNode(mutable, "Node C") + * }) + * + * console.log(Graph.nodeCount(graphWithNodes)) // 3 + * ``` + * + * @since 3.18.0 + * @category getters + */ +exports.hasNode = hasNode; +const nodeCount = graph => graph.nodes.size; +/** + * Finds the first node that matches the given predicate. + * + * @example + * ```ts + * import { Graph, Option } from "effect" + * + * const graph = Graph.mutate(Graph.directed(), (mutable) => { + * Graph.addNode(mutable, "Node A") + * Graph.addNode(mutable, "Node B") + * Graph.addNode(mutable, "Node C") + * }) + * + * const result = Graph.findNode(graph, (data) => data.startsWith("Node B")) + * console.log(result) // Option.some(1) + * + * const notFound = Graph.findNode(graph, (data) => data === "Node D") + * console.log(notFound) // Option.none() + * ``` + * + * @since 3.18.0 + * @category getters + */ +exports.nodeCount = nodeCount; +const findNode = (graph, predicate) => { + for (const [index, data] of graph.nodes) { + if (predicate(data)) { + return Option.some(index); + } + } + return Option.none(); +}; +/** + * Finds all nodes that match the given predicate. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.mutate(Graph.directed(), (mutable) => { + * Graph.addNode(mutable, "Start A") + * Graph.addNode(mutable, "Node B") + * Graph.addNode(mutable, "Start C") + * }) + * + * const result = Graph.findNodes(graph, (data) => data.startsWith("Start")) + * console.log(result) // [0, 2] + * + * const empty = Graph.findNodes(graph, (data) => data === "Not Found") + * console.log(empty) // [] + * ``` + * + * @since 3.18.0 + * @category getters + */ +exports.findNode = findNode; +const findNodes = (graph, predicate) => { + const results = []; + for (const [index, data] of graph.nodes) { + if (predicate(data)) { + results.push(index); + } + } + return results; +}; +/** + * Finds the first edge that matches the given predicate. + * + * @example + * ```ts + * import { Graph, Option } from "effect" + * + * const graph = Graph.mutate(Graph.directed(), (mutable) => { + * const nodeA = Graph.addNode(mutable, "Node A") + * const nodeB = Graph.addNode(mutable, "Node B") + * const nodeC = Graph.addNode(mutable, "Node C") + * Graph.addEdge(mutable, nodeA, nodeB, 10) + * Graph.addEdge(mutable, nodeB, nodeC, 20) + * }) + * + * const result = Graph.findEdge(graph, (data) => data > 15) + * console.log(result) // Option.some(1) + * + * const notFound = Graph.findEdge(graph, (data) => data > 100) + * console.log(notFound) // Option.none() + * ``` + * + * @since 3.18.0 + * @category getters + */ +exports.findNodes = findNodes; +const findEdge = (graph, predicate) => { + for (const [edgeIndex, edgeData] of graph.edges) { + if (predicate(edgeData.data, edgeData.source, edgeData.target)) { + return Option.some(edgeIndex); + } + } + return Option.none(); +}; +/** + * Finds all edges that match the given predicate. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.mutate(Graph.directed(), (mutable) => { + * const nodeA = Graph.addNode(mutable, "Node A") + * const nodeB = Graph.addNode(mutable, "Node B") + * const nodeC = Graph.addNode(mutable, "Node C") + * Graph.addEdge(mutable, nodeA, nodeB, 10) + * Graph.addEdge(mutable, nodeB, nodeC, 20) + * Graph.addEdge(mutable, nodeC, nodeA, 30) + * }) + * + * const result = Graph.findEdges(graph, (data) => data >= 20) + * console.log(result) // [1, 2] + * + * const empty = Graph.findEdges(graph, (data) => data > 100) + * console.log(empty) // [] + * ``` + * + * @since 3.18.0 + * @category getters + */ +exports.findEdge = findEdge; +const findEdges = (graph, predicate) => { + const results = []; + for (const [edgeIndex, edgeData] of graph.edges) { + if (predicate(edgeData.data, edgeData.source, edgeData.target)) { + results.push(edgeIndex); + } + } + return results; +}; +/** + * Updates a single node's data by applying a transformation function. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * Graph.addNode(mutable, "Node A") + * Graph.addNode(mutable, "Node B") + * Graph.updateNode(mutable, 0, (data) => data.toUpperCase()) + * }) + * + * const nodeData = Graph.getNode(graph, 0) + * console.log(nodeData) // Option.some("NODE A") + * ``` + * + * @since 3.18.0 + * @category transformations + */ +exports.findEdges = findEdges; +const updateNode = (mutable, index, f) => { + if (!mutable.nodes.has(index)) { + return; + } + const currentData = mutable.nodes.get(index); + const newData = f(currentData); + mutable.nodes.set(index, newData); +}; +/** + * Updates a single edge's data by applying a transformation function. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const result = Graph.mutate(Graph.directed(), (mutable) => { + * const nodeA = Graph.addNode(mutable, "Node A") + * const nodeB = Graph.addNode(mutable, "Node B") + * const edgeIndex = Graph.addEdge(mutable, nodeA, nodeB, 10) + * Graph.updateEdge(mutable, edgeIndex, (data) => data * 2) + * }) + * + * const edgeData = Graph.getEdge(result, 0) + * console.log(edgeData) // Option.some({ source: 0, target: 1, data: 20 }) + * ``` + * + * @since 3.18.0 + * @category mutations + */ +exports.updateNode = updateNode; +const updateEdge = (mutable, edgeIndex, f) => { + if (!mutable.edges.has(edgeIndex)) { + return; + } + const currentEdge = mutable.edges.get(edgeIndex); + const newData = f(currentEdge.data); + mutable.edges.set(edgeIndex, { + ...currentEdge, + data: newData + }); +}; +/** + * Creates a new graph with transformed node data using the provided mapping function. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * Graph.addNode(mutable, "node a") + * Graph.addNode(mutable, "node b") + * Graph.addNode(mutable, "node c") + * Graph.mapNodes(mutable, (data) => data.toUpperCase()) + * }) + * + * const nodeData = Graph.getNode(graph, 0) + * console.log(nodeData) // Option.some("NODE A") + * ``` + * + * @since 3.18.0 + * @category transformations + */ +exports.updateEdge = updateEdge; +const mapNodes = (mutable, f) => { + // Transform existing node data in place + for (const [index, data] of mutable.nodes) { + const newData = f(data); + mutable.nodes.set(index, newData); + } +}; +/** + * Transforms all edge data in a mutable graph using the provided mapping function. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, 10) + * Graph.addEdge(mutable, b, c, 20) + * Graph.mapEdges(mutable, (data) => data * 2) + * }) + * + * const edgeData = Graph.getEdge(graph, 0) + * console.log(edgeData) // Option.some({ source: 0, target: 1, data: 20 }) + * ``` + * + * @since 3.18.0 + * @category transformations + */ +exports.mapNodes = mapNodes; +const mapEdges = (mutable, f) => { + // Transform existing edge data in place + for (const [index, edgeData] of mutable.edges) { + const newData = f(edgeData.data); + mutable.edges.set(index, { + ...edgeData, + data: newData + }); + } +}; +/** + * Reverses all edge directions in a mutable graph by swapping source and target nodes. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, 1) // A -> B + * Graph.addEdge(mutable, b, c, 2) // B -> C + * Graph.reverse(mutable) // Now B -> A, C -> B + * }) + * + * const edge0 = Graph.getEdge(graph, 0) + * console.log(edge0) // Option.some({ source: 1, target: 0, data: 1 }) - B -> A + * ``` + * + * @since 3.18.0 + * @category transformations + */ +exports.mapEdges = mapEdges; +const reverse = mutable => { + // Reverse all edges by swapping source and target + for (const [index, edgeData] of mutable.edges) { + mutable.edges.set(index, { + source: edgeData.target, + target: edgeData.source, + data: edgeData.data + }); + } + // Clear and rebuild adjacency lists with reversed directions + mutable.adjacency.clear(); + mutable.reverseAdjacency.clear(); + // Rebuild adjacency lists with reversed directions + for (const [edgeIndex, edgeData] of mutable.edges) { + // Add to forward adjacency (source -> target) + const sourceEdges = mutable.adjacency.get(edgeData.source) || []; + sourceEdges.push(edgeIndex); + mutable.adjacency.set(edgeData.source, sourceEdges); + // Add to reverse adjacency (target <- source) + const targetEdges = mutable.reverseAdjacency.get(edgeData.target) || []; + targetEdges.push(edgeIndex); + mutable.reverseAdjacency.set(edgeData.target, targetEdges); + } + // Invalidate cycle flag since edge directions changed + mutable.isAcyclic = Option.none(); +}; +/** + * Filters and optionally transforms nodes in a mutable graph using a predicate function. + * Nodes that return Option.none are removed along with all their connected edges. + * + * @example + * ```ts + * import { Graph, Option } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "active") + * const b = Graph.addNode(mutable, "inactive") + * const c = Graph.addNode(mutable, "active") + * Graph.addEdge(mutable, a, b, 1) + * Graph.addEdge(mutable, b, c, 2) + * + * // Keep only "active" nodes and transform to uppercase + * Graph.filterMapNodes(mutable, (data) => + * data === "active" ? Option.some(data.toUpperCase()) : Option.none() + * ) + * }) + * + * console.log(Graph.nodeCount(graph)) // 2 (only "active" nodes remain) + * ``` + * + * @since 3.18.0 + * @category transformations + */ +exports.reverse = reverse; +const filterMapNodes = (mutable, f) => { + const nodesToRemove = []; + // First pass: identify nodes to remove and transform data for nodes to keep + for (const [index, data] of mutable.nodes) { + const result = f(data); + if (Option.isSome(result)) { + // Transform node data + mutable.nodes.set(index, result.value); + } else { + // Mark for removal + nodesToRemove.push(index); + } + } + // Second pass: remove filtered out nodes and their edges + for (const nodeIndex of nodesToRemove) { + removeNode(mutable, nodeIndex); + } +}; +/** + * Filters and optionally transforms edges in a mutable graph using a predicate function. + * Edges that return Option.none are removed from the graph. + * + * @example + * ```ts + * import { Graph, Option } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, 5) + * Graph.addEdge(mutable, b, c, 15) + * Graph.addEdge(mutable, c, a, 25) + * + * // Keep only edges with weight >= 10 and double their weight + * Graph.filterMapEdges(mutable, (data) => + * data >= 10 ? Option.some(data * 2) : Option.none() + * ) + * }) + * + * console.log(Graph.edgeCount(graph)) // 2 (edges with weight 5 removed) + * ``` + * + * @since 3.18.0 + * @category transformations + */ +exports.filterMapNodes = filterMapNodes; +const filterMapEdges = (mutable, f) => { + const edgesToRemove = []; + // First pass: identify edges to remove and transform data for edges to keep + for (const [index, edgeData] of mutable.edges) { + const result = f(edgeData.data); + if (Option.isSome(result)) { + // Transform edge data + mutable.edges.set(index, { + ...edgeData, + data: result.value + }); + } else { + // Mark for removal + edgesToRemove.push(index); + } + } + // Second pass: remove filtered out edges + for (const edgeIndex of edgesToRemove) { + removeEdge(mutable, edgeIndex); + } +}; +/** + * Filters nodes by removing those that don't match the predicate. + * This function modifies the mutable graph in place. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * Graph.addNode(mutable, "active") + * Graph.addNode(mutable, "inactive") + * Graph.addNode(mutable, "pending") + * Graph.addNode(mutable, "active") + * + * // Keep only "active" nodes + * Graph.filterNodes(mutable, (data) => data === "active") + * }) + * + * console.log(Graph.nodeCount(graph)) // 2 (only "active" nodes remain) + * ``` + * + * @since 3.18.0 + * @category transformations + */ +exports.filterMapEdges = filterMapEdges; +const filterNodes = (mutable, predicate) => { + const nodesToRemove = []; + // Identify nodes to remove + for (const [index, data] of mutable.nodes) { + if (!predicate(data)) { + nodesToRemove.push(index); + } + } + // Remove filtered out nodes (this also removes connected edges) + for (const nodeIndex of nodesToRemove) { + removeNode(mutable, nodeIndex); + } +}; +/** + * Filters edges by removing those that don't match the predicate. + * This function modifies the mutable graph in place. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * + * Graph.addEdge(mutable, a, b, 5) + * Graph.addEdge(mutable, b, c, 15) + * Graph.addEdge(mutable, c, a, 25) + * + * // Keep only edges with weight >= 10 + * Graph.filterEdges(mutable, (data) => data >= 10) + * }) + * + * console.log(Graph.edgeCount(graph)) // 2 (edge with weight 5 removed) + * ``` + * + * @since 3.18.0 + * @category transformations + */ +exports.filterNodes = filterNodes; +const filterEdges = (mutable, predicate) => { + const edgesToRemove = []; + // Identify edges to remove + for (const [index, edgeData] of mutable.edges) { + if (!predicate(edgeData.data)) { + edgesToRemove.push(index); + } + } + // Remove filtered out edges + for (const edgeIndex of edgesToRemove) { + removeEdge(mutable, edgeIndex); + } +}; +// ============================================================================= +// Cycle Flag Management (Internal) +// ============================================================================= +/** @internal */ +exports.filterEdges = filterEdges; +const invalidateCycleFlagOnRemoval = mutable => { + // Only invalidate if the graph had cycles (removing edges/nodes cannot introduce cycles in acyclic graphs) + // If already unknown (null) or acyclic (true), no need to change + if (Option.isSome(mutable.isAcyclic) && mutable.isAcyclic.value === false) { + mutable.isAcyclic = Option.none(); + } +}; +/** @internal */ +const invalidateCycleFlagOnAddition = mutable => { + // Only invalidate if the graph was acyclic (adding edges cannot remove cycles from cyclic graphs) + // If already unknown (null) or cyclic (false), no need to change + if (Option.isSome(mutable.isAcyclic) && mutable.isAcyclic.value === true) { + mutable.isAcyclic = Option.none(); + } +}; +// ============================================================================= +// Edge Operations +// ============================================================================= +/** + * Adds a new edge to a mutable graph and returns its index. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const result = Graph.mutate(Graph.directed(), (mutable) => { + * const nodeA = Graph.addNode(mutable, "Node A") + * const nodeB = Graph.addNode(mutable, "Node B") + * const edge = Graph.addEdge(mutable, nodeA, nodeB, 42) + * console.log(edge) // EdgeIndex with value 0 + * }) + * ``` + * + * @since 3.18.0 + * @category mutations + */ +const addEdge = (mutable, source, target, data) => { + // Validate that both nodes exist + if (!mutable.nodes.has(source)) { + throw missingNode(source); + } + if (!mutable.nodes.has(target)) { + throw missingNode(target); + } + const edgeIndex = mutable.nextEdgeIndex; + // Create edge data + const edgeData = new Edge({ + source, + target, + data + }); + mutable.edges.set(edgeIndex, edgeData); + // Update adjacency lists + const sourceAdjacency = mutable.adjacency.get(source); + if (sourceAdjacency !== undefined) { + sourceAdjacency.push(edgeIndex); + } + const targetReverseAdjacency = mutable.reverseAdjacency.get(target); + if (targetReverseAdjacency !== undefined) { + targetReverseAdjacency.push(edgeIndex); + } + // For undirected graphs, add reverse connections + if (mutable.type === "undirected") { + const targetAdjacency = mutable.adjacency.get(target); + if (targetAdjacency !== undefined) { + targetAdjacency.push(edgeIndex); + } + const sourceReverseAdjacency = mutable.reverseAdjacency.get(source); + if (sourceReverseAdjacency !== undefined) { + sourceReverseAdjacency.push(edgeIndex); + } + } + // Update allocators + mutable.nextEdgeIndex = mutable.nextEdgeIndex + 1; + // Only invalidate cycle flag if the graph was acyclic + // Adding edges cannot remove cycles from cyclic graphs + invalidateCycleFlagOnAddition(mutable); + return edgeIndex; +}; +/** + * Removes a node and all its incident edges from a mutable graph. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const result = Graph.mutate(Graph.directed(), (mutable) => { + * const nodeA = Graph.addNode(mutable, "Node A") + * const nodeB = Graph.addNode(mutable, "Node B") + * Graph.addEdge(mutable, nodeA, nodeB, 42) + * + * // Remove nodeA and all edges connected to it + * Graph.removeNode(mutable, nodeA) + * }) + * ``` + * + * @since 3.18.0 + * @category mutations + */ +exports.addEdge = addEdge; +const removeNode = (mutable, nodeIndex) => { + // Check if node exists + if (!mutable.nodes.has(nodeIndex)) { + return; // Node doesn't exist, nothing to remove + } + // Collect all incident edges for removal + const edgesToRemove = []; + // Get outgoing edges + const outgoingEdges = mutable.adjacency.get(nodeIndex); + if (outgoingEdges !== undefined) { + for (const edge of outgoingEdges) { + edgesToRemove.push(edge); + } + } + // Get incoming edges + const incomingEdges = mutable.reverseAdjacency.get(nodeIndex); + if (incomingEdges !== undefined) { + for (const edge of incomingEdges) { + edgesToRemove.push(edge); + } + } + // Remove all incident edges + for (const edgeIndex of edgesToRemove) { + removeEdgeInternal(mutable, edgeIndex); + } + // Remove the node itself + mutable.nodes.delete(nodeIndex); + mutable.adjacency.delete(nodeIndex); + mutable.reverseAdjacency.delete(nodeIndex); + // Only invalidate cycle flag if the graph wasn't already known to be acyclic + // Removing nodes cannot introduce cycles in an acyclic graph + invalidateCycleFlagOnRemoval(mutable); +}; +/** + * Removes an edge from a mutable graph. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const result = Graph.mutate(Graph.directed(), (mutable) => { + * const nodeA = Graph.addNode(mutable, "Node A") + * const nodeB = Graph.addNode(mutable, "Node B") + * const edge = Graph.addEdge(mutable, nodeA, nodeB, 42) + * + * // Remove the edge + * Graph.removeEdge(mutable, edge) + * }) + * ``` + * + * @since 3.18.0 + * @category mutations + */ +exports.removeNode = removeNode; +const removeEdge = (mutable, edgeIndex) => { + const wasRemoved = removeEdgeInternal(mutable, edgeIndex); + // Only invalidate cycle flag if an edge was actually removed + // and only if the graph wasn't already known to be acyclic + if (wasRemoved) { + invalidateCycleFlagOnRemoval(mutable); + } +}; +/** @internal */ +exports.removeEdge = removeEdge; +const removeEdgeInternal = (mutable, edgeIndex) => { + // Get edge data + const edge = mutable.edges.get(edgeIndex); + if (edge === undefined) { + return false; // Edge doesn't exist, no mutation occurred + } + const { + source, + target + } = edge; + // Remove from adjacency lists + const sourceAdjacency = mutable.adjacency.get(source); + if (sourceAdjacency !== undefined) { + const index = sourceAdjacency.indexOf(edgeIndex); + if (index !== -1) { + sourceAdjacency.splice(index, 1); + } + } + const targetReverseAdjacency = mutable.reverseAdjacency.get(target); + if (targetReverseAdjacency !== undefined) { + const index = targetReverseAdjacency.indexOf(edgeIndex); + if (index !== -1) { + targetReverseAdjacency.splice(index, 1); + } + } + // For undirected graphs, remove reverse connections + if (mutable.type === "undirected") { + const targetAdjacency = mutable.adjacency.get(target); + if (targetAdjacency !== undefined) { + const index = targetAdjacency.indexOf(edgeIndex); + if (index !== -1) { + targetAdjacency.splice(index, 1); + } + } + const sourceReverseAdjacency = mutable.reverseAdjacency.get(source); + if (sourceReverseAdjacency !== undefined) { + const index = sourceReverseAdjacency.indexOf(edgeIndex); + if (index !== -1) { + sourceReverseAdjacency.splice(index, 1); + } + } + } + // Remove edge data + mutable.edges.delete(edgeIndex); + return true; // Edge was successfully removed +}; +// ============================================================================= +// Edge Query Operations +// ============================================================================= +/** + * Gets the edge data associated with an edge index, if it exists. + * + * @example + * ```ts + * import { Graph, Option } from "effect" + * + * const graph = Graph.mutate(Graph.directed(), (mutable) => { + * const nodeA = Graph.addNode(mutable, "Node A") + * const nodeB = Graph.addNode(mutable, "Node B") + * Graph.addEdge(mutable, nodeA, nodeB, 42) + * }) + * + * const edgeIndex = 0 + * const edgeData = Graph.getEdge(graph, edgeIndex) + * + * if (Option.isSome(edgeData)) { + * console.log(edgeData.value.data) // 42 + * console.log(edgeData.value.source) // NodeIndex(0) + * console.log(edgeData.value.target) // NodeIndex(1) + * } + * ``` + * + * @since 3.18.0 + * @category getters + */ +const getEdge = (graph, edgeIndex) => graph.edges.has(edgeIndex) ? Option.some(graph.edges.get(edgeIndex)) : Option.none(); +/** + * Checks if an edge exists between two nodes in the graph. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.mutate(Graph.directed(), (mutable) => { + * const nodeA = Graph.addNode(mutable, "Node A") + * const nodeB = Graph.addNode(mutable, "Node B") + * const nodeC = Graph.addNode(mutable, "Node C") + * Graph.addEdge(mutable, nodeA, nodeB, 42) + * }) + * + * const nodeA = 0 + * const nodeB = 1 + * const nodeC = 2 + * + * const hasAB = Graph.hasEdge(graph, nodeA, nodeB) + * console.log(hasAB) // true + * + * const hasAC = Graph.hasEdge(graph, nodeA, nodeC) + * console.log(hasAC) // false + * ``` + * + * @since 3.18.0 + * @category getters + */ +exports.getEdge = getEdge; +const hasEdge = (graph, source, target) => { + const adjacencyList = graph.adjacency.get(source); + if (adjacencyList === undefined) { + return false; + } + // Check if any edge in the adjacency list connects to the target + for (const edgeIndex of adjacencyList) { + const edge = graph.edges.get(edgeIndex); + if (edge !== undefined && edge.target === target) { + return true; + } + } + return false; +}; +/** + * Returns the number of edges in the graph. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const emptyGraph = Graph.directed() + * console.log(Graph.edgeCount(emptyGraph)) // 0 + * + * const graphWithEdges = Graph.mutate(emptyGraph, (mutable) => { + * const nodeA = Graph.addNode(mutable, "Node A") + * const nodeB = Graph.addNode(mutable, "Node B") + * const nodeC = Graph.addNode(mutable, "Node C") + * Graph.addEdge(mutable, nodeA, nodeB, 1) + * Graph.addEdge(mutable, nodeB, nodeC, 2) + * Graph.addEdge(mutable, nodeC, nodeA, 3) + * }) + * + * console.log(Graph.edgeCount(graphWithEdges)) // 3 + * ``` + * + * @since 3.18.0 + * @category getters + */ +exports.hasEdge = hasEdge; +const edgeCount = graph => graph.edges.size; +/** + * Returns the neighboring nodes (targets of outgoing edges) for a given node. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.mutate(Graph.directed(), (mutable) => { + * const nodeA = Graph.addNode(mutable, "Node A") + * const nodeB = Graph.addNode(mutable, "Node B") + * const nodeC = Graph.addNode(mutable, "Node C") + * Graph.addEdge(mutable, nodeA, nodeB, 1) + * Graph.addEdge(mutable, nodeA, nodeC, 2) + * }) + * + * const nodeA = 0 + * const nodeB = 1 + * const nodeC = 2 + * + * const neighborsA = Graph.neighbors(graph, nodeA) + * console.log(neighborsA) // [NodeIndex(1), NodeIndex(2)] + * + * const neighborsB = Graph.neighbors(graph, nodeB) + * console.log(neighborsB) // [] + * ``` + * + * @since 3.18.0 + * @category getters + */ +exports.edgeCount = edgeCount; +const neighbors = (graph, nodeIndex) => { + // For undirected graphs, use the specialized helper that returns the other endpoint + if (graph.type === "undirected") { + return getUndirectedNeighbors(graph, nodeIndex); + } + const adjacencyList = graph.adjacency.get(nodeIndex); + if (adjacencyList === undefined) { + return []; + } + const result = []; + for (const edgeIndex of adjacencyList) { + const edge = graph.edges.get(edgeIndex); + if (edge !== undefined) { + result.push(edge.target); + } + } + return result; +}; +/** + * Get neighbors of a node in a specific direction for bidirectional traversal. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * Graph.addEdge(mutable, a, b, "A->B") + * }) + * + * const nodeA = 0 + * const nodeB = 1 + * + * // Get outgoing neighbors (nodes that nodeA points to) + * const outgoing = Graph.neighborsDirected(graph, nodeA, "outgoing") + * + * // Get incoming neighbors (nodes that point to nodeB) + * const incoming = Graph.neighborsDirected(graph, nodeB, "incoming") + * ``` + * + * @since 3.18.0 + * @category queries + */ +exports.neighbors = neighbors; +const neighborsDirected = (graph, nodeIndex, direction) => { + const adjacencyMap = direction === "incoming" ? graph.reverseAdjacency : graph.adjacency; + const adjacencyList = adjacencyMap.get(nodeIndex); + if (adjacencyList === undefined) { + return []; + } + const result = []; + for (const edgeIndex of adjacencyList) { + const edge = graph.edges.get(edgeIndex); + if (edge !== undefined) { + // For incoming direction, we want the source node instead of target + const neighborNode = direction === "incoming" ? edge.source : edge.target; + result.push(neighborNode); + } + } + return result; +}; +/** + * Exports a graph to GraphViz DOT format for visualization. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.mutate(Graph.directed(), (mutable) => { + * const nodeA = Graph.addNode(mutable, "Node A") + * const nodeB = Graph.addNode(mutable, "Node B") + * const nodeC = Graph.addNode(mutable, "Node C") + * Graph.addEdge(mutable, nodeA, nodeB, 1) + * Graph.addEdge(mutable, nodeB, nodeC, 2) + * Graph.addEdge(mutable, nodeC, nodeA, 3) + * }) + * + * const dot = Graph.toGraphViz(graph) + * console.log(dot) + * // digraph G { + * // "0" [label="Node A"]; + * // "1" [label="Node B"]; + * // "2" [label="Node C"]; + * // "0" -> "1" [label="1"]; + * // "1" -> "2" [label="2"]; + * // "2" -> "0" [label="3"]; + * // } + * ``` + * + * @since 3.18.0 + * @category utils + */ +exports.neighborsDirected = neighborsDirected; +const toGraphViz = (graph, options) => { + const { + edgeLabel = data => String(data), + graphName = "G", + nodeLabel = data => String(data) + } = options ?? {}; + const isDirected = graph.type === "directed"; + const graphType = isDirected ? "digraph" : "graph"; + const edgeOperator = isDirected ? "->" : "--"; + const lines = []; + lines.push(`${graphType} ${graphName} {`); + // Add nodes + for (const [nodeIndex, nodeData] of graph.nodes) { + const label = nodeLabel(nodeData).replace(/"/g, "\\\""); + lines.push(` "${nodeIndex}" [label="${label}"];`); + } + // Add edges + for (const [, edgeData] of graph.edges) { + const label = edgeLabel(edgeData.data).replace(/"/g, "\\\""); + lines.push(` "${edgeData.source}" ${edgeOperator} "${edgeData.target}" [label="${label}"];`); + } + lines.push("}"); + return lines.join("\n"); +}; +/** @internal */ +exports.toGraphViz = toGraphViz; +const escapeMermaidLabel = label => { + // Escape special characters for Mermaid using HTML entity codes + // According to: https://mermaid.js.org/syntax/flowchart.html#special-characters-that-break-syntax + return label.replace(/#/g, "#35;").replace(/"/g, "#quot;").replace(//g, "#gt;").replace(/&/g, "#amp;").replace(/\[/g, "#91;").replace(/\]/g, "#93;").replace(/\{/g, "#123;").replace(/\}/g, "#125;").replace(/\(/g, "#40;").replace(/\)/g, "#41;").replace(/\|/g, "#124;").replace(/\\/g, "#92;").replace(/\n/g, "
"); +}; +/** @internal */ +const formatMermaidNode = (nodeId, label, shape) => { + switch (shape) { + case "rectangle": + return `${nodeId}["${label}"]`; + case "rounded": + return `${nodeId}("${label}")`; + case "circle": + return `${nodeId}(("${label}"))`; + case "diamond": + return `${nodeId}{"${label}"}`; + case "hexagon": + return `${nodeId}{{"${label}"}}`; + case "stadium": + return `${nodeId}(["${label}"])`; + case "subroutine": + return `${nodeId}[["${label}"]]`; + case "cylindrical": + return `${nodeId}[("${label}")]`; + } +}; +/** + * Exports a graph to Mermaid diagram format for visualization. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.mutate(Graph.directed(), (mutable) => { + * const app = Graph.addNode(mutable, "App") + * const db = Graph.addNode(mutable, "Database") + * const cache = Graph.addNode(mutable, "Cache") + * Graph.addEdge(mutable, app, db, 1) + * Graph.addEdge(mutable, app, cache, 2) + * }) + * + * const mermaid = Graph.toMermaid(graph) + * console.log(mermaid) + * // flowchart TD + * // 0["App"] + * // 1["Database"] + * // 2["Cache"] + * // 0 -->|"1"| 1 + * // 0 -->|"2"| 2 + * ``` + * + * @since 3.18.0 + * @category utils + */ +const toMermaid = (graph, options) => { + // Extract and validate options with defaults + const { + diagramType, + direction = "TD", + edgeLabel = data => String(data), + nodeLabel = data => String(data), + nodeShape = () => "rectangle" + } = options ?? {}; + // Auto-detect diagram type if not specified + const finalDiagramType = diagramType ?? (graph.type === "directed" ? "flowchart" : "graph"); + // Generate diagram header + const lines = []; + lines.push(`${finalDiagramType} ${direction}`); + // Add nodes + for (const [nodeIndex, nodeData] of graph.nodes) { + const nodeId = String(nodeIndex); + const label = escapeMermaidLabel(nodeLabel(nodeData)); + const shape = nodeShape(nodeData); + const formattedNode = formatMermaidNode(nodeId, label, shape); + lines.push(` ${formattedNode}`); + } + // Add edges + const edgeOperator = finalDiagramType === "flowchart" ? "-->" : "---"; + for (const [, edgeData] of graph.edges) { + const sourceId = String(edgeData.source); + const targetId = String(edgeData.target); + const label = escapeMermaidLabel(edgeLabel(edgeData.data)); + if (label) { + lines.push(` ${sourceId} ${edgeOperator}|"${label}"| ${targetId}`); + } else { + lines.push(` ${sourceId} ${edgeOperator} ${targetId}`); + } + } + return lines.join("\n"); +}; +// ============================================================================= +// ============================================================================= +// Graph Structure Analysis Algorithms (Phase 5A) +// ============================================================================= +/** + * Checks if the graph is acyclic (contains no cycles). + * + * Uses depth-first search to detect back edges, which indicate cycles. + * For directed graphs, any back edge creates a cycle. For undirected graphs, + * a back edge that doesn't go to the immediate parent creates a cycle. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * // Acyclic directed graph (DAG) + * const dag = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, "A->B") + * Graph.addEdge(mutable, b, c, "B->C") + * }) + * console.log(Graph.isAcyclic(dag)) // true + * + * // Cyclic directed graph + * const cyclic = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * Graph.addEdge(mutable, a, b, "A->B") + * Graph.addEdge(mutable, b, a, "B->A") // Creates cycle + * }) + * console.log(Graph.isAcyclic(cyclic)) // false + * ``` + * + * @since 3.18.0 + * @category algorithms + */ +exports.toMermaid = toMermaid; +const isAcyclic = graph => { + // Use existing cycle flag if available + if (Option.isSome(graph.isAcyclic)) { + return graph.isAcyclic.value; + } + // Stack-safe DFS cycle detection using iterative approach + const visited = new Set(); + const recursionStack = new Set(); + // Get all nodes to handle disconnected components + for (const startNode of graph.nodes.keys()) { + if (visited.has(startNode)) { + continue; // Already processed this component + } + // Iterative DFS with explicit stack + const stack = [[startNode, [], 0, true]]; + while (stack.length > 0) { + const [node, neighbors, neighborIndex, isFirstVisit] = stack[stack.length - 1]; + // First visit to this node + if (isFirstVisit) { + if (recursionStack.has(node)) { + // Back edge found - cycle detected + graph.isAcyclic = Option.some(false); + return false; + } + if (visited.has(node)) { + stack.pop(); + continue; + } + visited.add(node); + recursionStack.add(node); + // Get neighbors for this node + const nodeNeighbors = Array.from(neighborsDirected(graph, node, "outgoing")); + stack[stack.length - 1] = [node, nodeNeighbors, 0, false]; + continue; + } + // Process next neighbor + if (neighborIndex < neighbors.length) { + const neighbor = neighbors[neighborIndex]; + stack[stack.length - 1] = [node, neighbors, neighborIndex + 1, false]; + if (recursionStack.has(neighbor)) { + // Back edge found - cycle detected + graph.isAcyclic = Option.some(false); + return false; + } + if (!visited.has(neighbor)) { + stack.push([neighbor, [], 0, true]); + } + } else { + // Done with this node - backtrack + recursionStack.delete(node); + stack.pop(); + } + } + } + // Cache the result + graph.isAcyclic = Option.some(true); + return true; +}; +/** + * Checks if an undirected graph is bipartite. + * + * A bipartite graph is one whose vertices can be divided into two disjoint sets + * such that no two vertices within the same set are adjacent. Uses BFS coloring + * to determine bipartiteness. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * // Bipartite graph (alternating coloring possible) + * const bipartite = Graph.undirected((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * const d = Graph.addNode(mutable, "D") + * Graph.addEdge(mutable, a, b, "edge") // Set 1: {A, C}, Set 2: {B, D} + * Graph.addEdge(mutable, b, c, "edge") + * Graph.addEdge(mutable, c, d, "edge") + * }) + * console.log(Graph.isBipartite(bipartite)) // true + * + * // Non-bipartite graph (odd cycle) + * const triangle = Graph.undirected((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, "edge") + * Graph.addEdge(mutable, b, c, "edge") + * Graph.addEdge(mutable, c, a, "edge") // Triangle (3-cycle) + * }) + * console.log(Graph.isBipartite(triangle)) // false + * ``` + * + * @since 3.18.0 + * @category algorithms + */ +exports.isAcyclic = isAcyclic; +const isBipartite = graph => { + const coloring = new Map(); + const discovered = new Set(); + let isBipartiteGraph = true; + // Get all nodes to handle disconnected components + for (const startNode of graph.nodes.keys()) { + if (!discovered.has(startNode)) { + // Start BFS coloring from this component + const queue = [startNode]; + coloring.set(startNode, 0); // Color start node with 0 + discovered.add(startNode); + while (queue.length > 0 && isBipartiteGraph) { + const current = queue.shift(); + const currentColor = coloring.get(current); + const neighborColor = currentColor === 0 ? 1 : 0; + // Get all neighbors for undirected graph + const nodeNeighbors = getUndirectedNeighbors(graph, current); + for (const neighbor of nodeNeighbors) { + if (!discovered.has(neighbor)) { + // Color unvisited neighbor with opposite color + coloring.set(neighbor, neighborColor); + discovered.add(neighbor); + queue.push(neighbor); + } else { + // Check if neighbor has the same color (conflict) + if (coloring.get(neighbor) === currentColor) { + isBipartiteGraph = false; + break; + } + } + } + } + // Early exit if not bipartite + if (!isBipartiteGraph) { + break; + } + } + } + return isBipartiteGraph; +}; +/** + * Get neighbors for undirected graphs by checking both adjacency and reverse adjacency. + * For undirected graphs, we need to find the other endpoint of each edge incident to the node. + */ +exports.isBipartite = isBipartite; +const getUndirectedNeighbors = (graph, nodeIndex) => { + const neighbors = new Set(); + // Check edges where this node is the source + const adjacencyList = graph.adjacency.get(nodeIndex); + if (adjacencyList !== undefined) { + for (const edgeIndex of adjacencyList) { + const edge = graph.edges.get(edgeIndex); + if (edge !== undefined) { + // For undirected graphs, the neighbor is the other endpoint + const otherNode = edge.source === nodeIndex ? edge.target : edge.source; + neighbors.add(otherNode); + } + } + } + return Array.from(neighbors); +}; +/** + * Find connected components in an undirected graph. + * Each component is represented as an array of node indices. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.undirected((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * const d = Graph.addNode(mutable, "D") + * Graph.addEdge(mutable, a, b, "edge") // Component 1: A-B + * Graph.addEdge(mutable, c, d, "edge") // Component 2: C-D + * }) + * + * const components = Graph.connectedComponents(graph) + * console.log(components) // [[0, 1], [2, 3]] + * ``` + * + * @since 3.18.0 + * @category algorithms + */ +const connectedComponents = graph => { + const visited = new Set(); + const components = []; + for (const startNode of graph.nodes.keys()) { + if (!visited.has(startNode)) { + // DFS to find all nodes in this component + const component = []; + const stack = [startNode]; + while (stack.length > 0) { + const current = stack.pop(); + if (!visited.has(current)) { + visited.add(current); + component.push(current); + // Add all unvisited neighbors to stack + const nodeNeighbors = getUndirectedNeighbors(graph, current); + for (const neighbor of nodeNeighbors) { + if (!visited.has(neighbor)) { + stack.push(neighbor); + } + } + } + } + components.push(component); + } + } + return components; +}; +/** + * Find strongly connected components in a directed graph using Kosaraju's algorithm. + * Each SCC is represented as an array of node indices. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, "A->B") + * Graph.addEdge(mutable, b, c, "B->C") + * Graph.addEdge(mutable, c, a, "C->A") // Creates SCC: A-B-C + * }) + * + * const sccs = Graph.stronglyConnectedComponents(graph) + * console.log(sccs) // [[0, 1, 2]] + * ``` + * + * @since 3.18.0 + * @category algorithms + */ +exports.connectedComponents = connectedComponents; +const stronglyConnectedComponents = graph => { + const visited = new Set(); + const finishOrder = []; + for (const startNode of graph.nodes.keys()) { + if (visited.has(startNode)) { + continue; + } + const stack = [[startNode, [], 0, true]]; + while (stack.length > 0) { + const [node, nodeNeighbors, neighborIndex, isFirstVisit] = stack[stack.length - 1]; + if (isFirstVisit) { + if (visited.has(node)) { + stack.pop(); + continue; + } + visited.add(node); + const nodeNeighborsList = neighbors(graph, node); + stack[stack.length - 1] = [node, nodeNeighborsList, 0, false]; + continue; + } + // Process next neighbor + if (neighborIndex < nodeNeighbors.length) { + const neighbor = nodeNeighbors[neighborIndex]; + stack[stack.length - 1] = [node, nodeNeighbors, neighborIndex + 1, false]; + if (!visited.has(neighbor)) { + stack.push([neighbor, [], 0, true]); + } + } else { + // Done with this node - add to finish order (post-order) + finishOrder.push(node); + stack.pop(); + } + } + } + // Step 2: Stack-safe DFS on transpose graph in reverse finish order + visited.clear(); + const sccs = []; + for (let i = finishOrder.length - 1; i >= 0; i--) { + const startNode = finishOrder[i]; + if (visited.has(startNode)) { + continue; + } + const scc = []; + const stack = [startNode]; + while (stack.length > 0) { + const node = stack.pop(); + if (visited.has(node)) { + continue; + } + visited.add(node); + scc.push(node); + // Use reverse adjacency (transpose graph) + const reverseAdjacency = graph.reverseAdjacency.get(node); + if (reverseAdjacency !== undefined) { + for (const edgeIndex of reverseAdjacency) { + const edge = graph.edges.get(edgeIndex); + if (edge !== undefined) { + const predecessor = edge.source; + if (!visited.has(predecessor)) { + stack.push(predecessor); + } + } + } + } + } + sccs.push(scc); + } + return sccs; +}; +/** + * Find the shortest path between two nodes using Dijkstra's algorithm. + * + * Dijkstra's algorithm works with non-negative edge weights and finds the shortest + * path from a source node to a target node in O((V + E) log V) time complexity. + * + * @example + * ```ts + * import { Graph, Option } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, 5) + * Graph.addEdge(mutable, a, c, 10) + * Graph.addEdge(mutable, b, c, 2) + * }) + * + * const result = Graph.dijkstra(graph, { source: 0, target: 2, cost: (edgeData) => edgeData }) + * if (Option.isSome(result)) { + * console.log(result.value.path) // [0, 1, 2] - shortest path A->B->C + * console.log(result.value.distance) // 7 - total distance + * } + * ``` + * + * @since 3.18.0 + * @category algorithms + */ +exports.stronglyConnectedComponents = stronglyConnectedComponents; +const dijkstra = (graph, config) => { + const { + cost, + source, + target + } = config; + // Validate that source and target nodes exist + if (!graph.nodes.has(source)) { + throw missingNode(source); + } + if (!graph.nodes.has(target)) { + throw missingNode(target); + } + // Early return if source equals target + if (source === target) { + return Option.some({ + path: [source], + distance: 0, + costs: [] + }); + } + // Distance tracking and priority queue simulation + const distances = new Map(); + const previous = new Map(); + const visited = new Set(); + // Initialize distances + // Iterate directly over node keys + for (const node of graph.nodes.keys()) { + distances.set(node, node === source ? 0 : Infinity); + previous.set(node, null); + } + // Simple priority queue using array (can be optimized with proper heap) + const priorityQueue = [{ + node: source, + distance: 0 + }]; + while (priorityQueue.length > 0) { + // Find minimum distance node (priority queue extract-min) + let minIndex = 0; + for (let i = 1; i < priorityQueue.length; i++) { + if (priorityQueue[i].distance < priorityQueue[minIndex].distance) { + minIndex = i; + } + } + const current = priorityQueue.splice(minIndex, 1)[0]; + const currentNode = current.node; + // Skip if already visited (can happen with duplicate entries) + if (visited.has(currentNode)) { + continue; + } + visited.add(currentNode); + // Early termination if we reached the target + if (currentNode === target) { + break; + } + // Get current distance + const currentDistance = distances.get(currentNode); + // Examine all outgoing edges + const adjacencyList = graph.adjacency.get(currentNode); + if (adjacencyList !== undefined) { + for (const edgeIndex of adjacencyList) { + const edge = graph.edges.get(edgeIndex); + if (edge !== undefined) { + const neighbor = edge.target; + const weight = cost(edge.data); + // Validate non-negative weights + if (weight < 0) { + throw new Error(`Dijkstra's algorithm requires non-negative edge weights, found ${weight}`); + } + const newDistance = currentDistance + weight; + const neighborDistance = distances.get(neighbor); + // Relaxation step + if (newDistance < neighborDistance) { + distances.set(neighbor, newDistance); + previous.set(neighbor, { + node: currentNode, + edgeData: edge.data + }); + // Add to priority queue if not visited + if (!visited.has(neighbor)) { + priorityQueue.push({ + node: neighbor, + distance: newDistance + }); + } + } + } + } + } + } + // Check if target is reachable + const targetDistance = distances.get(target); + if (targetDistance === Infinity) { + return Option.none(); // No path exists + } + // Reconstruct path + const path = []; + const costs = []; + let currentNode = target; + while (currentNode !== null) { + path.unshift(currentNode); + const prev = previous.get(currentNode); + if (prev !== null) { + costs.unshift(prev.edgeData); + currentNode = prev.node; + } else { + currentNode = null; + } + } + return Option.some({ + path, + distance: targetDistance, + costs + }); +}; +/** + * Find shortest paths between all pairs of nodes using Floyd-Warshall algorithm. + * + * Floyd-Warshall algorithm computes shortest paths between all pairs of nodes in O(V³) time. + * It can handle negative edge weights and detect negative cycles. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, 3) + * Graph.addEdge(mutable, b, c, 2) + * Graph.addEdge(mutable, a, c, 7) + * }) + * + * const result = Graph.floydWarshall(graph, (edgeData) => edgeData) + * const distanceAToC = result.distances.get(0)?.get(2) // 5 (A->B->C) + * const pathAToC = result.paths.get(0)?.get(2) // [0, 1, 2] + * ``` + * + * @since 3.18.0 + * @category algorithms + */ +exports.dijkstra = dijkstra; +const floydWarshall = (graph, cost) => { + // Get all nodes for Floyd-Warshall algorithm (needs array for nested iteration) + const allNodes = Array.from(graph.nodes.keys()); + // Initialize distance matrix + const dist = new Map(); + const next = new Map(); + const edgeMatrix = new Map(); + // Initialize with infinity for all pairs + for (const i of allNodes) { + dist.set(i, new Map()); + next.set(i, new Map()); + edgeMatrix.set(i, new Map()); + for (const j of allNodes) { + dist.get(i).set(j, i === j ? 0 : Infinity); + next.get(i).set(j, null); + edgeMatrix.get(i).set(j, null); + } + } + // Set edge weights + for (const [, edgeData] of graph.edges) { + const weight = cost(edgeData.data); + const i = edgeData.source; + const j = edgeData.target; + // Use minimum weight if multiple edges exist + const currentWeight = dist.get(i).get(j); + if (weight < currentWeight) { + dist.get(i).set(j, weight); + next.get(i).set(j, j); + edgeMatrix.get(i).set(j, edgeData.data); + } + } + // Floyd-Warshall main loop + for (const k of allNodes) { + for (const i of allNodes) { + for (const j of allNodes) { + const distIK = dist.get(i).get(k); + const distKJ = dist.get(k).get(j); + const distIJ = dist.get(i).get(j); + if (distIK !== Infinity && distKJ !== Infinity && distIK + distKJ < distIJ) { + dist.get(i).set(j, distIK + distKJ); + next.get(i).set(j, next.get(i).get(k)); + } + } + } + } + // Check for negative cycles + for (const i of allNodes) { + if (dist.get(i).get(i) < 0) { + throw new Error(`Negative cycle detected involving node ${i}`); + } + } + // Build result paths and edge weights + const paths = new Map(); + const resultCosts = new Map(); + for (const i of allNodes) { + paths.set(i, new Map()); + resultCosts.set(i, new Map()); + for (const j of allNodes) { + if (i === j) { + paths.get(i).set(j, [i]); + resultCosts.get(i).set(j, []); + } else if (dist.get(i).get(j) === Infinity) { + paths.get(i).set(j, null); + resultCosts.get(i).set(j, []); + } else { + // Reconstruct path iteratively + const path = []; + const weights = []; + let current = i; + path.push(current); + while (current !== j) { + const nextNode = next.get(current).get(j); + if (nextNode === null) break; + const edgeData = edgeMatrix.get(current).get(nextNode); + if (edgeData !== null) { + weights.push(edgeData); + } + current = nextNode; + path.push(current); + } + paths.get(i).set(j, path); + resultCosts.get(i).set(j, weights); + } + } + } + return { + distances: dist, + paths, + costs: resultCosts + }; +}; +/** + * Find the shortest path between two nodes using A* pathfinding algorithm. + * + * A* is an extension of Dijkstra's algorithm that uses a heuristic function to guide + * the search towards the target, potentially finding paths faster than Dijkstra's. + * The heuristic must be admissible (never overestimate the actual cost). + * + * @example + * ```ts + * import { Graph, Option } from "effect" + * + * const graph = Graph.directed<{x: number, y: number}, number>((mutable) => { + * const a = Graph.addNode(mutable, {x: 0, y: 0}) + * const b = Graph.addNode(mutable, {x: 1, y: 0}) + * const c = Graph.addNode(mutable, {x: 2, y: 0}) + * Graph.addEdge(mutable, a, b, 1) + * Graph.addEdge(mutable, b, c, 1) + * }) + * + * // Manhattan distance heuristic + * const heuristic = (nodeData: {x: number, y: number}, targetData: {x: number, y: number}) => + * Math.abs(nodeData.x - targetData.x) + Math.abs(nodeData.y - targetData.y) + * + * const result = Graph.astar(graph, { source: 0, target: 2, cost: (edgeData) => edgeData, heuristic }) + * if (Option.isSome(result)) { + * console.log(result.value.path) // [0, 1, 2] - shortest path + * console.log(result.value.distance) // 2 - total distance + * } + * ``` + * + * @since 3.18.0 + * @category algorithms + */ +exports.floydWarshall = floydWarshall; +const astar = (graph, config) => { + const { + cost, + heuristic, + source, + target + } = config; + // Validate that source and target nodes exist + if (!graph.nodes.has(source)) { + throw missingNode(source); + } + if (!graph.nodes.has(target)) { + throw missingNode(target); + } + // Early return if source equals target + if (source === target) { + return Option.some({ + path: [source], + distance: 0, + costs: [] + }); + } + // Get target node data for heuristic calculations + const targetNodeData = graph.nodes.get(target); + if (targetNodeData === undefined) { + throw new Error(`Target node ${target} data not found`); + } + // Distance tracking (g-score) and f-score (g + h) + const gScore = new Map(); + const fScore = new Map(); + const previous = new Map(); + const visited = new Set(); + // Initialize scores + // Iterate directly over node keys + for (const node of graph.nodes.keys()) { + gScore.set(node, node === source ? 0 : Infinity); + fScore.set(node, Infinity); + previous.set(node, null); + } + // Calculate initial f-score for source + const sourceNodeData = graph.nodes.get(source); + if (sourceNodeData !== undefined) { + const h = heuristic(sourceNodeData, targetNodeData); + fScore.set(source, h); + } + // Priority queue using f-score (total estimated cost) + const openSet = [{ + node: source, + fScore: fScore.get(source) + }]; + while (openSet.length > 0) { + // Find node with lowest f-score + let minIndex = 0; + for (let i = 1; i < openSet.length; i++) { + if (openSet[i].fScore < openSet[minIndex].fScore) { + minIndex = i; + } + } + const current = openSet.splice(minIndex, 1)[0]; + const currentNode = current.node; + // Skip if already visited + if (visited.has(currentNode)) { + continue; + } + visited.add(currentNode); + // Early termination if we reached the target + if (currentNode === target) { + break; + } + // Get current g-score + const currentGScore = gScore.get(currentNode); + // Examine all outgoing edges + const adjacencyList = graph.adjacency.get(currentNode); + if (adjacencyList !== undefined) { + for (const edgeIndex of adjacencyList) { + const edge = graph.edges.get(edgeIndex); + if (edge !== undefined) { + const neighbor = edge.target; + const weight = cost(edge.data); + // Validate non-negative weights + if (weight < 0) { + throw new Error(`A* algorithm requires non-negative edge weights, found ${weight}`); + } + const tentativeGScore = currentGScore + weight; + const neighborGScore = gScore.get(neighbor); + // If this path to neighbor is better than any previous one + if (tentativeGScore < neighborGScore) { + // Update g-score and previous + gScore.set(neighbor, tentativeGScore); + previous.set(neighbor, { + node: currentNode, + edgeData: edge.data + }); + // Calculate f-score using heuristic + const neighborNodeData = graph.nodes.get(neighbor); + if (neighborNodeData !== undefined) { + const h = heuristic(neighborNodeData, targetNodeData); + const f = tentativeGScore + h; + fScore.set(neighbor, f); + // Add to open set if not visited + if (!visited.has(neighbor)) { + openSet.push({ + node: neighbor, + fScore: f + }); + } + } + } + } + } + } + } + // Check if target is reachable + const targetGScore = gScore.get(target); + if (targetGScore === Infinity) { + return Option.none(); // No path exists + } + // Reconstruct path + const path = []; + const costs = []; + let currentNode = target; + while (currentNode !== null) { + path.unshift(currentNode); + const prev = previous.get(currentNode); + if (prev !== null) { + costs.unshift(prev.edgeData); + currentNode = prev.node; + } else { + currentNode = null; + } + } + return Option.some({ + path, + distance: targetGScore, + costs + }); +}; +/** + * Find the shortest path between two nodes using Bellman-Ford algorithm. + * + * Bellman-Ford algorithm can handle negative edge weights and detects negative cycles. + * It has O(VE) time complexity, slower than Dijkstra's but more versatile. + * Returns Option.none() if a negative cycle is detected that affects the path. + * + * @example + * ```ts + * import { Graph, Option } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, -1) // Negative weight allowed + * Graph.addEdge(mutable, b, c, 3) + * Graph.addEdge(mutable, a, c, 5) + * }) + * + * const result = Graph.bellmanFord(graph, { source: 0, target: 2, cost: (edgeData) => edgeData }) + * if (Option.isSome(result)) { + * console.log(result.value.path) // [0, 1, 2] - shortest path A->B->C + * console.log(result.value.distance) // 2 - total distance + * } + * ``` + * + * @since 3.18.0 + * @category algorithms + */ +exports.astar = astar; +const bellmanFord = (graph, config) => { + const { + cost, + source, + target + } = config; + // Validate that source and target nodes exist + if (!graph.nodes.has(source)) { + throw missingNode(source); + } + if (!graph.nodes.has(target)) { + throw missingNode(target); + } + // Early return if source equals target + if (source === target) { + return Option.some({ + path: [source], + distance: 0, + costs: [] + }); + } + // Initialize distances and predecessors + const distances = new Map(); + const previous = new Map(); + // Iterate directly over node keys + for (const node of graph.nodes.keys()) { + distances.set(node, node === source ? 0 : Infinity); + previous.set(node, null); + } + // Collect all edges for relaxation + const edges = []; + for (const [, edgeData] of graph.edges) { + const weight = cost(edgeData.data); + edges.push({ + source: edgeData.source, + target: edgeData.target, + weight, + edgeData: edgeData.data + }); + } + // Relax edges up to V-1 times + const nodeCount = graph.nodes.size; + for (let i = 0; i < nodeCount - 1; i++) { + let hasUpdate = false; + for (const edge of edges) { + const sourceDistance = distances.get(edge.source); + const targetDistance = distances.get(edge.target); + // Relaxation step + if (sourceDistance !== Infinity && sourceDistance + edge.weight < targetDistance) { + distances.set(edge.target, sourceDistance + edge.weight); + previous.set(edge.target, { + node: edge.source, + edgeData: edge.edgeData + }); + hasUpdate = true; + } + } + // Early termination if no updates + if (!hasUpdate) { + break; + } + } + // Check for negative cycles + for (const edge of edges) { + const sourceDistance = distances.get(edge.source); + const targetDistance = distances.get(edge.target); + if (sourceDistance !== Infinity && sourceDistance + edge.weight < targetDistance) { + // Negative cycle detected - check if it affects the path to target + const affectedNodes = new Set(); + const queue = [edge.target]; + while (queue.length > 0) { + const node = queue.shift(); + if (affectedNodes.has(node)) continue; + affectedNodes.add(node); + // Add all nodes reachable from this node + const adjacencyList = graph.adjacency.get(node); + if (adjacencyList !== undefined) { + for (const edgeIndex of adjacencyList) { + const edge = graph.edges.get(edgeIndex); + if (edge !== undefined) { + queue.push(edge.target); + } + } + } + } + // If target is affected by negative cycle, return null + if (affectedNodes.has(target)) { + return Option.none(); + } + } + } + // Check if target is reachable + const targetDistance = distances.get(target); + if (targetDistance === Infinity) { + return Option.none(); // No path exists + } + // Reconstruct path + const path = []; + const costs = []; + let currentNode = target; + while (currentNode !== null) { + path.unshift(currentNode); + const prev = previous.get(currentNode); + if (prev !== null) { + costs.unshift(prev.edgeData); + currentNode = prev.node; + } else { + currentNode = null; + } + } + return Option.some({ + path, + distance: targetDistance, + costs + }); +}; +/** + * Concrete class for iterables that produce [NodeIndex, NodeData] tuples. + * + * This class provides a common abstraction for all iterables that return node data, + * including traversal iterators (DFS, BFS, etc.) and element iterators (nodes, externals). + * It uses a mapEntry function pattern for flexible iteration and transformation. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * Graph.addEdge(mutable, a, b, 1) + * }) + * + * // Both traversal and element iterators return NodeWalker + * const dfsNodes: Graph.NodeWalker = Graph.dfs(graph, { start: [0] }) + * const allNodes: Graph.NodeWalker = Graph.nodes(graph) + * + * // Common interface for working with node iterables + * function processNodes(nodeIterable: Graph.NodeWalker): Array { + * return Array.from(Graph.indices(nodeIterable)) + * } + * + * // Access node data using values() or entries() + * const nodeData = Array.from(Graph.values(dfsNodes)) // ["A", "B"] + * const nodeEntries = Array.from(Graph.entries(allNodes)) // [[0, "A"], [1, "B"]] + * ``` + * + * @since 3.18.0 + * @category models + */ +exports.bellmanFord = bellmanFord; +class Walker { + /** + * @since 3.18.0 + */ + // @ts-ignore + [Symbol.iterator]; + /** + * Visits each element and maps it to a value using the provided function. + * + * Takes a function that receives the index and data, + * and returns an iterable of the mapped values. Skips elements that + * no longer exist in the graph. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * Graph.addEdge(mutable, a, b, 1) + * }) + * + * const dfs = Graph.dfs(graph, { start: [0] }) + * + * // Map to just the node data + * const values = Array.from(dfs.visit((index, data) => data)) + * console.log(values) // ["A", "B"] + * + * // Map to custom objects + * const custom = Array.from(dfs.visit((index, data) => ({ id: index, name: data }))) + * console.log(custom) // [{ id: 0, name: "A" }, { id: 1, name: "B" }] + * ``` + * + * @since 3.18.0 + * @category iterators + */ + visit; + constructor( + /** + * Visits each element and maps it to a value using the provided function. + * + * Takes a function that receives the index and data, + * and returns an iterable of the mapped values. Skips elements that + * no longer exist in the graph. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * Graph.addEdge(mutable, a, b, 1) + * }) + * + * const dfs = Graph.dfs(graph, { start: [0] }) + * + * // Map to just the node data + * const values = Array.from(dfs.visit((index, data) => data)) + * console.log(values) // ["A", "B"] + * + * // Map to custom objects + * const custom = Array.from(dfs.visit((index, data) => ({ id: index, name: data }))) + * console.log(custom) // [{ id: 0, name: "A" }, { id: 1, name: "B" }] + * ``` + * + * @since 3.18.0 + * @category iterators + */ + visit) { + this.visit = visit; + this[Symbol.iterator] = visit((index, data) => [index, data])[Symbol.iterator]; + } +} +/** + * Returns an iterator over the indices in the walker. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * Graph.addEdge(mutable, a, b, 1) + * }) + * + * const dfs = Graph.dfs(graph, { start: [0] }) + * const indices = Array.from(Graph.indices(dfs)) + * console.log(indices) // [0, 1] + * ``` + * + * @since 3.18.0 + * @category utilities + */ +exports.Walker = Walker; +const indices = walker => walker.visit((index, _) => index); +/** + * Returns an iterator over the values (data) in the walker. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * Graph.addEdge(mutable, a, b, 1) + * }) + * + * const dfs = Graph.dfs(graph, { start: [0] }) + * const values = Array.from(Graph.values(dfs)) + * console.log(values) // ["A", "B"] + * ``` + * + * @since 3.18.0 + * @category utilities + */ +exports.indices = indices; +const values = walker => walker.visit((_, data) => data); +/** + * Returns an iterator over [index, data] entries in the walker. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * Graph.addEdge(mutable, a, b, 1) + * }) + * + * const dfs = Graph.dfs(graph, { start: [0] }) + * const entries = Array.from(Graph.entries(dfs)) + * console.log(entries) // [[0, "A"], [1, "B"]] + * ``` + * + * @since 3.18.0 + * @category utilities + */ +exports.values = values; +const entries = walker => walker.visit((index, data) => [index, data]); +/** + * Creates a new DFS iterator with optional configuration. + * + * The iterator maintains a stack of nodes to visit and tracks discovered nodes. + * It provides lazy evaluation of the depth-first search. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, 1) + * Graph.addEdge(mutable, b, c, 1) + * }) + * + * // Start from a specific node + * const dfs1 = Graph.dfs(graph, { start: [0] }) + * for (const nodeIndex of Graph.indices(dfs1)) { + * console.log(nodeIndex) // Traverses in DFS order: 0, 1, 2 + * } + * + * // Empty iterator (no starting nodes) + * const dfs2 = Graph.dfs(graph) + * // Can be used programmatically + * ``` + * + * @since 3.18.0 + * @category iterators + */ +exports.entries = entries; +const dfs = (graph, config = {}) => { + const start = config.start ?? []; + const direction = config.direction ?? "outgoing"; + // Validate that all start nodes exist + for (const nodeIndex of start) { + if (!hasNode(graph, nodeIndex)) { + throw missingNode(nodeIndex); + } + } + return new Walker(f => ({ + [Symbol.iterator]: () => { + const stack = [...start]; + const discovered = new Set(); + const nextMapped = () => { + while (stack.length > 0) { + const current = stack.pop(); + if (discovered.has(current)) { + continue; + } + discovered.add(current); + const nodeDataOption = graph.nodes.get(current); + if (nodeDataOption === undefined) { + continue; + } + const neighbors = neighborsDirected(graph, current, direction); + for (let i = neighbors.length - 1; i >= 0; i--) { + const neighbor = neighbors[i]; + if (!discovered.has(neighbor)) { + stack.push(neighbor); + } + } + return { + done: false, + value: f(current, nodeDataOption) + }; + } + return { + done: true, + value: undefined + }; + }; + return { + next: nextMapped + }; + } + })); +}; +/** + * Creates a new BFS iterator with optional configuration. + * + * The iterator maintains a queue of nodes to visit and tracks discovered nodes. + * It provides lazy evaluation of the breadth-first search. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, 1) + * Graph.addEdge(mutable, b, c, 1) + * }) + * + * // Start from a specific node + * const bfs1 = Graph.bfs(graph, { start: [0] }) + * for (const nodeIndex of Graph.indices(bfs1)) { + * console.log(nodeIndex) // Traverses in BFS order: 0, 1, 2 + * } + * + * // Empty iterator (no starting nodes) + * const bfs2 = Graph.bfs(graph) + * // Can be used programmatically + * ``` + * + * @since 3.18.0 + * @category iterators + */ +exports.dfs = dfs; +const bfs = (graph, config = {}) => { + const start = config.start ?? []; + const direction = config.direction ?? "outgoing"; + // Validate that all start nodes exist + for (const nodeIndex of start) { + if (!hasNode(graph, nodeIndex)) { + throw missingNode(nodeIndex); + } + } + return new Walker(f => ({ + [Symbol.iterator]: () => { + const queue = [...start]; + const discovered = new Set(); + const nextMapped = () => { + while (queue.length > 0) { + const current = queue.shift(); + if (!discovered.has(current)) { + discovered.add(current); + const neighbors = neighborsDirected(graph, current, direction); + for (const neighbor of neighbors) { + if (!discovered.has(neighbor)) { + queue.push(neighbor); + } + } + const nodeData = getNode(graph, current); + if (Option.isSome(nodeData)) { + return { + done: false, + value: f(current, nodeData.value) + }; + } + return nextMapped(); + } + } + return { + done: true, + value: undefined + }; + }; + return { + next: nextMapped + }; + } + })); +}; +/** + * Creates a new topological sort iterator with optional configuration. + * + * The iterator uses Kahn's algorithm to lazily produce nodes in topological order. + * Throws an error if the graph contains cycles. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, 1) + * Graph.addEdge(mutable, b, c, 1) + * }) + * + * // Standard topological sort + * const topo1 = Graph.topo(graph) + * for (const nodeIndex of Graph.indices(topo1)) { + * console.log(nodeIndex) // 0, 1, 2 (topological order) + * } + * + * // With initial nodes + * const topo2 = Graph.topo(graph, { initials: [0] }) + * + * // Throws error for cyclic graph + * const cyclicGraph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * Graph.addEdge(mutable, a, b, 1) + * Graph.addEdge(mutable, b, a, 2) // Creates cycle + * }) + * + * try { + * Graph.topo(cyclicGraph) // Throws: "Cannot perform topological sort on cyclic graph" + * } catch (error) { + * console.log((error as Error).message) + * } + * ``` + * + * @since 3.18.0 + * @category iterators + */ +exports.bfs = bfs; +const topo = (graph, config = {}) => { + // Check if graph is acyclic first + if (!isAcyclic(graph)) { + throw new Error("Cannot perform topological sort on cyclic graph"); + } + const initials = config.initials ?? []; + // Validate that all initial nodes exist + for (const nodeIndex of initials) { + if (!hasNode(graph, nodeIndex)) { + throw missingNode(nodeIndex); + } + } + return new Walker(f => ({ + [Symbol.iterator]: () => { + const inDegree = new Map(); + const remaining = new Set(); + const queue = [...initials]; + // Initialize in-degree counts + for (const [nodeIndex] of graph.nodes) { + inDegree.set(nodeIndex, 0); + remaining.add(nodeIndex); + } + // Calculate in-degrees + for (const [, edgeData] of graph.edges) { + const currentInDegree = inDegree.get(edgeData.target) || 0; + inDegree.set(edgeData.target, currentInDegree + 1); + } + // Add nodes with zero in-degree to queue if no initials provided + if (initials.length === 0) { + for (const [nodeIndex, degree] of inDegree) { + if (degree === 0) { + queue.push(nodeIndex); + } + } + } + const nextMapped = () => { + while (queue.length > 0) { + const current = queue.shift(); + if (remaining.has(current)) { + remaining.delete(current); + // Process outgoing edges, reducing in-degree of targets + const neighbors = neighborsDirected(graph, current, "outgoing"); + for (const neighbor of neighbors) { + if (remaining.has(neighbor)) { + const currentInDegree = inDegree.get(neighbor) || 0; + const newInDegree = currentInDegree - 1; + inDegree.set(neighbor, newInDegree); + // If in-degree becomes 0, add to queue + if (newInDegree === 0) { + queue.push(neighbor); + } + } + } + const nodeData = getNode(graph, current); + if (Option.isSome(nodeData)) { + return { + done: false, + value: f(current, nodeData.value) + }; + } + return nextMapped(); + } + } + return { + done: true, + value: undefined + }; + }; + return { + next: nextMapped + }; + } + })); +}; +/** + * Creates a new DFS postorder iterator with optional configuration. + * + * The iterator maintains a stack with visit state tracking and emits nodes + * in postorder (after all descendants have been processed). Essential for + * dependency resolution and tree destruction algorithms. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const root = Graph.addNode(mutable, "root") + * const child1 = Graph.addNode(mutable, "child1") + * const child2 = Graph.addNode(mutable, "child2") + * Graph.addEdge(mutable, root, child1, 1) + * Graph.addEdge(mutable, root, child2, 1) + * }) + * + * // Postorder: children before parents + * const postOrder = Graph.dfsPostOrder(graph, { start: [0] }) + * for (const node of postOrder) { + * console.log(node) // 1, 2, 0 + * } + * ``` + * + * @since 3.18.0 + * @category iterators + */ +exports.topo = topo; +const dfsPostOrder = (graph, config = {}) => { + const start = config.start ?? []; + const direction = config.direction ?? "outgoing"; + // Validate that all start nodes exist + for (const nodeIndex of start) { + if (!hasNode(graph, nodeIndex)) { + throw missingNode(nodeIndex); + } + } + return new Walker(f => ({ + [Symbol.iterator]: () => { + const stack = []; + const discovered = new Set(); + const finished = new Set(); + // Initialize stack with start nodes + for (let i = start.length - 1; i >= 0; i--) { + stack.push({ + node: start[i], + visitedChildren: false + }); + } + const nextMapped = () => { + while (stack.length > 0) { + const current = stack[stack.length - 1]; + if (!discovered.has(current.node)) { + discovered.add(current.node); + current.visitedChildren = false; + } + if (!current.visitedChildren) { + current.visitedChildren = true; + const neighbors = neighborsDirected(graph, current.node, direction); + for (let i = neighbors.length - 1; i >= 0; i--) { + const neighbor = neighbors[i]; + if (!discovered.has(neighbor) && !finished.has(neighbor)) { + stack.push({ + node: neighbor, + visitedChildren: false + }); + } + } + } else { + const nodeToEmit = stack.pop().node; + if (!finished.has(nodeToEmit)) { + finished.add(nodeToEmit); + const nodeData = getNode(graph, nodeToEmit); + if (Option.isSome(nodeData)) { + return { + done: false, + value: f(nodeToEmit, nodeData.value) + }; + } + return nextMapped(); + } + } + } + return { + done: true, + value: undefined + }; + }; + return { + next: nextMapped + }; + } + })); +}; +/** + * Creates an iterator over all node indices in the graph. + * + * The iterator produces node indices in the order they were added to the graph. + * This provides access to all nodes regardless of connectivity. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, 1) + * }) + * + * const indices = Array.from(Graph.indices(Graph.nodes(graph))) + * console.log(indices) // [0, 1, 2] + * ``` + * + * @since 3.18.0 + * @category iterators + */ +exports.dfsPostOrder = dfsPostOrder; +const nodes = graph => new Walker(f => ({ + [Symbol.iterator]() { + const nodeMap = graph.nodes; + const iterator = nodeMap.entries(); + return { + next() { + const result = iterator.next(); + if (result.done) { + return { + done: true, + value: undefined + }; + } + const [nodeIndex, nodeData] = result.value; + return { + done: false, + value: f(nodeIndex, nodeData) + }; + } + }; + } +})); +/** + * Creates an iterator over all edge indices in the graph. + * + * The iterator produces edge indices in the order they were added to the graph. + * This provides access to all edges regardless of connectivity. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, 1) + * Graph.addEdge(mutable, b, c, 2) + * }) + * + * const indices = Array.from(Graph.indices(Graph.edges(graph))) + * console.log(indices) // [0, 1] + * ``` + * + * @since 3.18.0 + * @category iterators + */ +exports.nodes = nodes; +const edges = graph => new Walker(f => ({ + [Symbol.iterator]() { + const edgeMap = graph.edges; + const iterator = edgeMap.entries(); + return { + next() { + const result = iterator.next(); + if (result.done) { + return { + done: true, + value: undefined + }; + } + const [edgeIndex, edgeData] = result.value; + return { + done: false, + value: f(edgeIndex, edgeData) + }; + } + }; + } +})); +/** + * Creates an iterator over external nodes (nodes without edges in specified direction). + * + * External nodes are nodes that have no outgoing edges (direction="outgoing") or + * no incoming edges (direction="incoming"). These are useful for finding + * sources, sinks, or isolated nodes. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const source = Graph.addNode(mutable, "source") // 0 - no incoming + * const middle = Graph.addNode(mutable, "middle") // 1 - has both + * const sink = Graph.addNode(mutable, "sink") // 2 - no outgoing + * const isolated = Graph.addNode(mutable, "isolated") // 3 - no edges + * + * Graph.addEdge(mutable, source, middle, 1) + * Graph.addEdge(mutable, middle, sink, 2) + * }) + * + * // Nodes with no outgoing edges (sinks + isolated) + * const sinks = Array.from(Graph.indices(Graph.externals(graph, { direction: "outgoing" }))) + * console.log(sinks) // [2, 3] + * + * // Nodes with no incoming edges (sources + isolated) + * const sources = Array.from(Graph.indices(Graph.externals(graph, { direction: "incoming" }))) + * console.log(sources) // [0, 3] + * ``` + * + * @since 3.18.0 + * @category iterators + */ +exports.edges = edges; +const externals = (graph, config = {}) => { + const direction = config.direction ?? "outgoing"; + return new Walker(f => ({ + [Symbol.iterator]: () => { + const nodeMap = graph.nodes; + const adjacencyMap = direction === "incoming" ? graph.reverseAdjacency : graph.adjacency; + const nodeIterator = nodeMap.entries(); + const nextMapped = () => { + let current = nodeIterator.next(); + while (!current.done) { + const [nodeIndex, nodeData] = current.value; + const adjacencyList = adjacencyMap.get(nodeIndex); + // Node is external if it has no edges in the specified direction + if (adjacencyList === undefined || adjacencyList.length === 0) { + return { + done: false, + value: f(nodeIndex, nodeData) + }; + } + current = nodeIterator.next(); + } + return { + done: true, + value: undefined + }; + }; + return { + next: nextMapped + }; + } + })); +}; +exports.externals = externals; +//# sourceMappingURL=Graph.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Graph.js.map b/backend/node_modules/effect/dist/cjs/Graph.js.map new file mode 100644 index 0000000000000000000000000000000000000000..1545ab6ed559abb7902adeb3fe834f92afe884c9 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Graph.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Graph.js","names":["Data","_interopRequireWildcard","require","Equal","_Function","Hash","_Inspectable","Option","_Pipeable","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","exports","Edge","Class","ProtoGraph","Symbol","iterator","nodes","NodeInspectSymbol","toJSON","symbol","that","isGraph","size","edges","type","nodeIndex","nodeData","otherNodeData","equals","edgeIndex","edgeData","otherEdge","hash","string","number","_id","nodeCount","edgeCount","toString","format","pipe","pipeArguments","arguments","GraphError","TaggedError","missingNode","node","message","u","directed","mutate","graph","create","Map","adjacency","reverseAdjacency","nextNodeIndex","nextEdgeIndex","isAcyclic","some","mutable","beginMutation","endMutation","undirected","dual","addNode","data","getNode","none","hasNode","findNode","predicate","index","findNodes","results","push","findEdge","source","target","findEdges","updateNode","currentData","newData","updateEdge","currentEdge","mapNodes","mapEdges","reverse","clear","sourceEdges","targetEdges","filterMapNodes","nodesToRemove","result","isSome","value","removeNode","filterMapEdges","edgesToRemove","removeEdge","filterNodes","filterEdges","invalidateCycleFlagOnRemoval","invalidateCycleFlagOnAddition","addEdge","sourceAdjacency","undefined","targetReverseAdjacency","targetAdjacency","sourceReverseAdjacency","outgoingEdges","edge","incomingEdges","removeEdgeInternal","delete","wasRemoved","indexOf","splice","getEdge","hasEdge","adjacencyList","neighbors","getUndirectedNeighbors","neighborsDirected","direction","adjacencyMap","neighborNode","toGraphViz","options","edgeLabel","String","graphName","nodeLabel","isDirected","graphType","edgeOperator","lines","label","replace","join","escapeMermaidLabel","formatMermaidNode","nodeId","shape","toMermaid","diagramType","nodeShape","finalDiagramType","formattedNode","sourceId","targetId","visited","Set","recursionStack","startNode","keys","stack","length","neighborIndex","isFirstVisit","pop","add","nodeNeighbors","Array","from","neighbor","isBipartite","coloring","discovered","isBipartiteGraph","queue","current","shift","currentColor","neighborColor","otherNode","connectedComponents","components","component","stronglyConnectedComponents","finishOrder","nodeNeighborsList","sccs","scc","predecessor","dijkstra","config","cost","path","distance","costs","distances","previous","Infinity","priorityQueue","minIndex","currentNode","currentDistance","weight","Error","newDistance","neighborDistance","targetDistance","unshift","prev","floydWarshall","allNodes","dist","next","edgeMatrix","j","currentWeight","k","distIK","distKJ","distIJ","paths","resultCosts","weights","nextNode","astar","heuristic","targetNodeData","gScore","fScore","sourceNodeData","h","openSet","currentGScore","tentativeGScore","neighborGScore","neighborNodeData","targetGScore","bellmanFord","hasUpdate","sourceDistance","affectedNodes","Walker","visit","constructor","indices","walker","_","values","entries","dfs","start","nextMapped","nodeDataOption","done","bfs","topo","initials","inDegree","remaining","currentInDegree","degree","newInDegree","dfsPostOrder","finished","visitedChildren","nodeToEmit","nodeMap","ed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OAAO,IAAIiH,MAAM,CAAE/O,CAAC,KAAM;IACxB,CAACgB,MAAM,CAACC,QAAQ,GAAG,MAAK;MACtB,MAAMuP,OAAO,GAAGnN,KAAK,CAACnC,KAAK;MAC3B,MAAM6G,YAAY,GAAGD,SAAS,KAAK,UAAU,GACzCzE,KAAK,CAACI,gBAAgB,GACtBJ,KAAK,CAACG,SAAS;MAEnB,MAAMmN,YAAY,GAAGH,OAAO,CAAClB,OAAO,EAAE;MAEtC,MAAMG,UAAU,GAAGA,CAAA,KAAK;QACtB,IAAI5E,OAAO,GAAG8F,YAAY,CAACzD,IAAI,EAAE;QACjC,OAAO,CAACrC,OAAO,CAAC8E,IAAI,EAAE;UACpB,MAAM,CAAChO,SAAS,EAAEC,QAAQ,CAAC,GAAGiJ,OAAO,CAAC5E,KAAK;UAC3C,MAAMyB,aAAa,GAAGK,YAAY,CAAC3H,GAAG,CAACuB,SAAS,CAAC;UAEjD;UACA,IAAI+F,aAAa,KAAKd,SAAS,IAAIc,aAAa,CAACqC,MAAM,KAAK,CAAC,EAAE;YAC7D,OAAO;cAAE4F,IAAI,EAAE,KAAK;cAAE1J,KAAK,EAAEjG,CAAC,CAAC2B,SAAS,EAAEC,QAAQ;YAAC,CAAE;UACvD;UACAiJ,OAAO,GAAG8F,YAAY,CAACzD,IAAI,EAAE;QAC/B;QAEA,OAAO;UAAEyC,IAAI,EAAE,IAAI;UAAE1J,KAAK,EAAEW;QAAS,CAAW;MAClD,CAAC;MAED,OAAO;QAAEsG,IAAI,EAAEuC;MAAU,CAAE;IAC7B;GACD,CAAC,CAAC;AACL,CAAC;AAAA7O,OAAA,CAAA8P,SAAA,GAAAA,SAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/GroupBy.js.map b/backend/node_modules/effect/dist/cjs/GroupBy.js.map new file mode 100644 index 0000000000000000000000000000000000000000..91b3fa1696c7650cfe2bc9b4e5215dd6aebd1fc2 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/GroupBy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"GroupBy.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","GroupByTypeId","exports","evaluate","filter","first","make"],"sources":["../../src/GroupBy.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAiD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAHjD;;;;AAWA;;;;AAIO,MAAMkB,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAkBtB,QAAQ,CAACsB,aAAa;AAsClE;;;;;;;AAOO,MAAME,QAAQ,GAAAD,OAAA,CAAAC,QAAA,GAwBjBxB,QAAQ,CAACwB,QAAQ;AAErB;;;;;;AAMO,MAAMC,MAAM,GAAAF,OAAA,CAAAE,MAAA,GAefzB,QAAQ,CAACyB,MAAM;AAEnB;;;;;;AAMO,MAAMC,KAAK,GAAAH,OAAA,CAAAG,KAAA,GAed1B,QAAQ,CAAC0B,KAAK;AAElB;;;;;;AAMO,MAAMC,IAAI,GAAAJ,OAAA,CAAAI,IAAA,GAEU3B,QAAQ,CAAC2B,IAAI","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/HKT.js.map b/backend/node_modules/effect/dist/cjs/HKT.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5cad0d3bc926b3aea55f06ca528f94d60da5ae1b --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/HKT.js.map @@ -0,0 +1 @@ +{"version":3,"file":"HKT.js","names":[],"sources":["../../src/HKT.ts"],"sourcesContent":[null],"mappings":"","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Hash.js.map b/backend/node_modules/effect/dist/cjs/Hash.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d4ccc455879ec1e75f46d47ff06fb9ca0284dc15 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Hash.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Hash.js","names":["_Function","require","_GlobalValue","_Predicate","_Utils","randomHashCache","globalValue","Symbol","for","WeakMap","symbol","exports","hash","self","structuralRegionState","enabled","number","string","toString","String","Date","Number","isNaN","getTime","toISOString","URL","href","isHash","random","Error","has","set","Math","floor","MAX_SAFE_INTEGER","get","combine","b","optimize","n","u","hasProperty","Infinity","h","str","i","length","charCodeAt","structureKeys","o","keys","pipe","structure","Object","array","arr","cached","arguments","defineProperty","value","enumerable"],"sources":["../../src/Hash.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AANA;;;;AAQA;AACA,MAAMI,eAAe,gBAAG,IAAAC,wBAAW,eACjCC,MAAM,CAACC,GAAG,CAAC,6BAA6B,CAAC,EACzC,MAAM,IAAIC,OAAO,EAAkB,CACpC;AAED;;;;AAIO,MAAMC,MAAM,GAAAC,OAAA,CAAAD,MAAA,gBAAkBH,MAAM,CAACC,GAAG,CAAC,aAAa,CAAC;AAU9D;;;;AAIO,MAAMI,IAAI,GAA+BC,IAAO,IAAI;EACzD,IAAIC,4BAAqB,CAACC,OAAO,KAAK,IAAI,EAAE;IAC1C,OAAO,CAAC;EACV;EAEA,QAAQ,OAAOF,IAAI;IACjB,KAAK,QAAQ;MACX,OAAOG,MAAM,CAACH,IAAI,CAAC;IACrB,KAAK,QAAQ;MACX,OAAOI,MAAM,CAACJ,IAAI,CAACK,QAAQ,CAAC,EAAE,CAAC,CAAC;IAClC,KAAK,SAAS;MACZ,OAAOD,MAAM,CAACE,MAAM,CAACN,IAAI,CAAC,CAAC;IAC7B,KAAK,QAAQ;MACX,OAAOI,MAAM,CAACE,MAAM,CAACN,IAAI,CAAC,CAAC;IAC7B,KAAK,QAAQ;MACX,OAAOI,MAAM,CAACJ,IAAI,CAAC;IACrB,KAAK,WAAW;MACd,OAAOI,MAAM,CAAC,WAAW,CAAC;IAC5B,KAAK,UAAU;IACf,KAAK,QAAQ;MAAE;QACb,IAAIJ,IAAI,KAAK,IAAI,EAAE;UACjB,OAAOI,MAAM,CAAC,MAAM,CAAC;QACvB,CAAC,MAAM,IAAIJ,IAAI,YAAYO,IAAI,EAAE;UAC/B,IAAIC,MAAM,CAACC,KAAK,CAACT,IAAI,CAACU,OAAO,E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ACDgD,UAAU,EAAE;GACb,CAAC;EAEF,OAAOhD,IAAI;AACb,CAAC;AAAAD,OAAA,CAAA6C,MAAA,GAAAA,MAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/HashMap.js b/backend/node_modules/effect/dist/cjs/HashMap.js new file mode 100644 index 0000000000000000000000000000000000000000..94203e045a616f7ed7b6331e54777ba23088a30f --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/HashMap.js @@ -0,0 +1,322 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.values = exports.unsafeGet = exports.union = exports.toValues = exports.toEntries = exports.some = exports.size = exports.set = exports.removeMany = exports.remove = exports.reduce = exports.mutate = exports.modifyHash = exports.modifyAt = exports.modify = exports.map = exports.make = exports.keys = exports.keySet = exports.isHashMap = exports.isEmpty = exports.hasHash = exports.hasBy = exports.has = exports.getHash = exports.get = exports.fromIterable = exports.forEach = exports.flatMap = exports.findFirst = exports.filterMap = exports.filter = exports.every = exports.entries = exports.endMutation = exports.empty = exports.countBy = exports.compact = exports.beginMutation = void 0; +var HM = _interopRequireWildcard(require("./internal/hashMap.js")); +var keySet_ = _interopRequireWildcard(require("./internal/hashMap/keySet.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +const TypeId = HM.HashMapTypeId; +/** + * @since 2.0.0 + * @category refinements + */ +const isHashMap = exports.isHashMap = HM.isHashMap; +/** + * Creates a new `HashMap`. + * + * @since 2.0.0 + * @category constructors + */ +const empty = exports.empty = HM.empty; +/** + * Constructs a new `HashMap` from an array of key/value pairs. + * + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = HM.make; +/** + * Creates a new `HashMap` from an iterable collection of key/value pairs. + * + * @since 2.0.0 + * @category constructors + */ +const fromIterable = exports.fromIterable = HM.fromIterable; +/** + * Checks if the `HashMap` contains any entries. + * + * @since 2.0.0 + * @category elements + */ +const isEmpty = exports.isEmpty = HM.isEmpty; +/** + * Safely lookup the value for the specified key in the `HashMap` using the + * internal hashing function. + * + * @since 2.0.0 + * @category elements + */ +const get = exports.get = HM.get; +/** + * Lookup the value for the specified key in the `HashMap` using a custom hash. + * + * @since 2.0.0 + * @category elements + */ +const getHash = exports.getHash = HM.getHash; +/** + * Unsafely lookup the value for the specified key in the `HashMap` using the + * internal hashing function. + * + * @since 2.0.0 + * @category unsafe + */ +const unsafeGet = exports.unsafeGet = HM.unsafeGet; +/** + * Checks if the specified key has an entry in the `HashMap`. + * + * @since 2.0.0 + * @category elements + */ +const has = exports.has = HM.has; +/** + * Checks if the specified key has an entry in the `HashMap` using a custom + * hash. + * + * @since 2.0.0 + * @category elements + */ +const hasHash = exports.hasHash = HM.hasHash; +/** + * Checks if an element matching the given predicate exists in the given `HashMap`. + * + * @example + * ```ts + * import { HashMap } from "effect" + * + * const hm = HashMap.make([1, 'a']) + * HashMap.hasBy(hm, (value, key) => value === 'a' && key === 1); // -> true + * HashMap.hasBy(hm, (value) => value === 'b'); // -> false + * + * ``` + * + * @since 3.16.0 + * @category elements + */ +const hasBy = exports.hasBy = HM.hasBy; +/** + * Sets the specified key to the specified value using the internal hashing + * function. + * + * @since 2.0.0 + */ +const set = exports.set = HM.set; +/** + * Returns an `IterableIterator` of the keys within the `HashMap`. + * + * @since 2.0.0 + * @category getters + */ +const keys = exports.keys = HM.keys; +/** + * Returns a `HashSet` of keys within the `HashMap`. + * + * @since 2.0.0 + * @category getter + */ +const keySet = exports.keySet = keySet_.keySet; +/** + * Returns an `IterableIterator` of the values within the `HashMap`. + * + * @since 2.0.0 + * @category getters + */ +const values = exports.values = HM.values; +/** + * Returns an `Array` of the values within the `HashMap`. + * + * @since 3.13.0 + * @category getters + */ +const toValues = self => Array.from(values(self)); +/** + * Returns an `IterableIterator` of the entries within the `HashMap`. + * + * @since 2.0.0 + * @category getters + */ +exports.toValues = toValues; +const entries = exports.entries = HM.entries; +/** + * Returns an `Array<[K, V]>` of the entries within the `HashMap`. + * + * @since 2.0.0 + * @category getters + */ +const toEntries = self => Array.from(entries(self)); +/** + * Returns the number of entries within the `HashMap`. + * + * @since 2.0.0 + * @category getters + */ +exports.toEntries = toEntries; +const size = exports.size = HM.size; +/** + * Counts all the element of the given HashMap that pass the given predicate + * + * **Example** + * + * ```ts + * import { HashMap } from "effect" + * + * const map = HashMap.make([1, "a"], [2, "b"], [3, "c"]) + * const result = HashMap.countBy(map, (_v, key) => key % 2 === 1) + * console.log(result) // 2 + * ``` + * + * @since 3.17.0 + * @category folding + */ +const countBy = exports.countBy = HM.countBy; +/** + * Marks the `HashMap` as mutable. + * + * @since 2.0.0 + */ +const beginMutation = exports.beginMutation = HM.beginMutation; +/** + * Marks the `HashMap` as immutable. + * + * @since 2.0.0 + */ +const endMutation = exports.endMutation = HM.endMutation; +/** + * Mutates the `HashMap` within the context of the provided function. + * + * @since 2.0.0 + */ +const mutate = exports.mutate = HM.mutate; +/** + * Set or remove the specified key in the `HashMap` using the specified + * update function. The value of the specified key will be computed using the + * provided hash. + * + * The update function will be invoked with the current value of the key if it + * exists, or `None` if no such value exists. + * + * @since 2.0.0 + */ +const modifyAt = exports.modifyAt = HM.modifyAt; +/** + * Alter the value of the specified key in the `HashMap` using the specified + * update function. The value of the specified key will be computed using the + * provided hash. + * + * The update function will be invoked with the current value of the key if it + * exists, or `None` if no such value exists. + * + * This function will always either update or insert a value into the `HashMap`. + * + * @since 2.0.0 + */ +const modifyHash = exports.modifyHash = HM.modifyHash; +/** + * Updates the value of the specified key within the `HashMap` if it exists. + * + * @since 2.0.0 + */ +const modify = exports.modify = HM.modify; +/** + * Performs a union of this `HashMap` and that `HashMap`. + * + * @since 2.0.0 + */ +const union = exports.union = HM.union; +/** + * Remove the entry for the specified key in the `HashMap` using the internal + * hashing function. + * + * @since 2.0.0 + */ +const remove = exports.remove = HM.remove; +/** + * Removes all entries in the `HashMap` which have the specified keys. + * + * @since 2.0.0 + */ +const removeMany = exports.removeMany = HM.removeMany; +/** + * Maps over the entries of the `HashMap` using the specified function. + * + * @since 2.0.0 + * @category mapping + */ +const map = exports.map = HM.map; +/** + * Chains over the entries of the `HashMap` using the specified function. + * + * **NOTE**: the hash and equal of both maps have to be the same. + * + * @since 2.0.0 + * @category sequencing + */ +const flatMap = exports.flatMap = HM.flatMap; +/** + * Applies the specified function to the entries of the `HashMap`. + * + * @since 2.0.0 + * @category traversing + */ +const forEach = exports.forEach = HM.forEach; +/** + * Reduces the specified state over the entries of the `HashMap`. + * + * @since 2.0.0 + * @category folding + */ +const reduce = exports.reduce = HM.reduce; +/** + * Filters entries out of a `HashMap` using the specified predicate. + * + * @since 2.0.0 + * @category filtering + */ +const filter = exports.filter = HM.filter; +/** + * Filters out `None` values from a `HashMap` of `Options`s. + * + * @since 2.0.0 + * @category filtering + */ +const compact = exports.compact = HM.compact; +/** + * Maps over the entries of the `HashMap` using the specified partial function + * and filters out `None` values. + * + * @since 2.0.0 + * @category filtering + */ +const filterMap = exports.filterMap = HM.filterMap; +/** + * Returns the first element that satisfies the specified + * predicate, or `None` if no such element exists. + * + * @category elements + * @since 2.0.0 + */ +const findFirst = exports.findFirst = HM.findFirst; +/** + * Checks if any entry in a hashmap meets a specific condition. + * + * @since 3.13.0 + * @category elements + */ +const some = exports.some = HM.some; +/** + * Checks if all entries in a hashmap meets a specific condition. + * + * @param self - The hashmap to check. + * @param predicate - The condition to test entries (value, key). + * + * @since 3.14.0 + * @category elements + */ +const every = exports.every = HM.every; +//# sourceMappingURL=HashMap.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/HashMap.js.map b/backend/node_modules/effect/dist/cjs/HashMap.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ac706e332bc3250ccf6cf29662051f5e2814f6f2 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/HashMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"HashMap.js","names":["HM","_interopRequireWildcard","require","keySet_","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","HashMapTypeId","isHashMap","exports","empty","make","fromIterable","isEmpty","getHash","unsafeGet","hasHash","hasBy","keys","keySet","values","toValues","self","Array","from","entries","toEntries","size","countBy","beginMutation","endMutation","mutate","modifyAt","modifyHash","modify","union","remove","removeMany","map","flatMap","forEach","reduce","filter","compact","filterMap","findFirst","some","every"],"sources":["../../src/HashMap.ts"],"sourcesContent":[null],"mappings":";;;;;;AAOA,IAAAA,EAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAF,uBAAA,CAAAC,OAAA;AAAuD,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ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OAAA,GAAyD5D,EAAE,CAAC4D,OAAO;AAEvF;;;;;;;AAOO,MAAMC,SAAS,GAAAnC,OAAA,CAAAmC,SAAA,GAiBlB7D,EAAE,CAAC6D,SAAS;AAEhB;;;;;;;AAOO,MAAMC,SAAS,GAAApC,OAAA,CAAAoC,SAAA,GAiClB9D,EAAE,CAAC8D,SAAS;AAEhB;;;;;;AAMO,MAAMC,IAAI,GAAArC,OAAA,CAAAqC,IAAA,GAeb/D,EAAE,CAAC+D,IAAI;AAEX;;;;;;;;;AASO,MAAMC,KAAK,GAAAtC,OAAA,CAAAsC,KAAA,GAqBdhE,EAAE,CAACgE,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/HashRing.js b/backend/node_modules/effect/dist/cjs/HashRing.js new file mode 100644 index 0000000000000000000000000000000000000000..fb1ca23d379197a1e53c52ff943754a1fc6451ad --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/HashRing.js @@ -0,0 +1,257 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.remove = exports.make = exports.isHashRing = exports.has = exports.getShards = exports.get = exports.addMany = exports.add = void 0; +var _Function = require("./Function.js"); +var Hash = _interopRequireWildcard(require("./Hash.js")); +var Inspectable = _interopRequireWildcard(require("./Inspectable.js")); +var Iterable = _interopRequireWildcard(require("./Iterable.js")); +var _Pipeable = require("./Pipeable.js"); +var _Predicate = require("./Predicate.js"); +var PrimaryKey = _interopRequireWildcard(require("./PrimaryKey.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 3.19.0 + * @experimental + */ + +const TypeId = "~effect/cluster/HashRing"; +/** + * @since 3.19.0 + * @category Guards + * @experimental + */ +const isHashRing = u => (0, _Predicate.hasProperty)(u, TypeId); +/** + * @since 3.19.0 + * @category Constructors + * @experimental + */ +exports.isHashRing = isHashRing; +const make = options => { + const self = Object.create(Proto); + self.baseWeight = Math.max(options?.baseWeight ?? 128, 1); + self.totalWeightCache = 0; + self.nodes = new Map(); + self.ring = []; + return self; +}; +exports.make = make; +const Proto = { + [TypeId]: TypeId, + [Symbol.iterator]() { + return Iterable.map(this.nodes.values(), ([n]) => n)[Symbol.iterator](); + }, + pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + }, + ...Inspectable.BaseProto, + toJSON() { + return { + _id: "HashRing", + baseWeight: this.baseWeight, + nodes: this.ring.map(([, n]) => this.nodes.get(n)[0]) + }; + } +}; +/** + * Add new nodes to the ring. If a node already exists in the ring, it + * will be updated. For example, you can use this to update the node's weight. + * + * @since 3.19.0 + * @category Combinators + * @experimental + */ +const addMany = exports.addMany = /*#__PURE__*/(0, _Function.dual)(args => isHashRing(args[0]), (self, nodes, options) => { + const weight = Math.max(options?.weight ?? 1, 0.1); + const keys = []; + let toRemove; + for (const node of nodes) { + const key = PrimaryKey.value(node); + const entry = self.nodes.get(key); + if (entry) { + if (entry[1] === weight) continue; + toRemove ??= new Set(); + toRemove.add(key); + self.totalWeightCache -= entry[1]; + self.totalWeightCache += weight; + entry[1] = weight; + } else { + self.nodes.set(key, [node, weight]); + self.totalWeightCache += weight; + } + keys.push(key); + } + if (toRemove) { + self.ring = self.ring.filter(([, n]) => !toRemove.has(n)); + } + addNodesToRing(self, keys, Math.round(weight * self.baseWeight)); + return self; +}); +function addNodesToRing(self, keys, weight) { + for (let i = weight; i > 0; i--) { + for (let j = 0; j < keys.length; j++) { + const key = keys[j]; + self.ring.push([Hash.string(`${key}:${i}`), key]); + } + } + self.ring.sort((a, b) => a[0] - b[0]); +} +/** + * Add a new node to the ring. If the node already exists in the ring, it + * will be updated. For example, you can use this to update the node's weight. + * + * @since 3.19.0 + * @category Combinators + * @experimental + */ +const add = exports.add = /*#__PURE__*/(0, _Function.dual)(args => isHashRing(args[0]), (self, node, options) => addMany(self, [node], options)); +/** + * Removes the node from the ring. No-op's if the node does not exist. + * + * @since 3.19.0 + * @category Combinators + * @experimental + */ +const remove = exports.remove = /*#__PURE__*/(0, _Function.dual)(2, (self, node) => { + const key = PrimaryKey.value(node); + const entry = self.nodes.get(key); + if (entry) { + self.nodes.delete(key); + self.ring = self.ring.filter(([, n]) => n !== key); + self.totalWeightCache -= entry[1]; + } + return self; +}); +/** + * @since 3.19.0 + * @category Combinators + * @experimental + */ +const has = exports.has = /*#__PURE__*/(0, _Function.dual)(2, (self, node) => self.nodes.has(PrimaryKey.value(node))); +/** + * Gets the node which should handle the given input. Returns undefined if + * the hashring has no elements with weight. + * + * @since 3.19.0 + * @category Combinators + * @experimental + */ +const get = (self, input) => { + if (self.ring.length === 0) { + return undefined; + } + const index = getIndexForInput(self, Hash.string(input))[0]; + const node = self.ring[index][1]; + return self.nodes.get(node)[0]; +}; +/** + * Distributes `count` shards across the nodes in the ring, attempting to + * balance the number of shards allocated to each node. Returns undefined if + * the hashring has no elements with weight. + * + * @since 3.19.0 + * @category Combinators + * @experimental + */ +exports.get = get; +const getShards = (self, count) => { + if (self.ring.length === 0) { + return undefined; + } + const shards = new Array(count); + // for tracking how many shards have been allocated to each node + const allocations = new Map(); + // for tracking which shards still need to be allocated + const remaining = new Set(); + // for tracking which nodes have reached the max allocation + const exclude = new Set(); + // First pass - allocate the closest nodes, skipping nodes that have reached + // max + const distances = new Array(count); + for (let shard = 0; shard < count; shard++) { + const hash = shardHashes[shard] ??= Hash.string(`shard-${shard}`); + const [index, distance] = getIndexForInput(self, hash); + const node = self.ring[index][1]; + distances[shard] = [shard, node, distance]; + remaining.add(shard); + } + distances.sort((a, b) => a[2] - b[2]); + for (let i = 0; i < count; i++) { + const [shard, node] = distances[i]; + if (exclude.has(node)) continue; + const [value, weight] = self.nodes.get(node); + shards[shard] = value; + remaining.delete(shard); + const nodeCount = (allocations.get(node) ?? 0) + 1; + allocations.set(node, nodeCount); + const maxPerNode = Math.max(1, Math.floor(count * (weight / self.totalWeightCache))); + if (nodeCount >= maxPerNode) { + exclude.add(node); + } + } + // Second pass - allocate any remaining shards, skipping nodes that have + // reached max + let allAtMax = exclude.size === self.nodes.size; + remaining.forEach(shard => { + const index = getIndexForInput(self, shardHashes[shard], allAtMax ? undefined : exclude)[0]; + const node = self.ring[index][1]; + const [value, weight] = self.nodes.get(node); + shards[shard] = value; + if (allAtMax) return; + const nodeCount = (allocations.get(node) ?? 0) + 1; + allocations.set(node, nodeCount); + const maxPerNode = Math.max(1, Math.floor(count * (weight / self.totalWeightCache))); + if (nodeCount >= maxPerNode) { + exclude.add(node); + if (exclude.size === self.nodes.size) { + allAtMax = true; + } + } + }); + return shards; +}; +exports.getShards = getShards; +const shardHashes = []; +function getIndexForInput(self, hash, exclude) { + const ring = self.ring; + const len = ring.length; + let mid; + let lo = 0; + let hi = len - 1; + while (lo <= hi) { + mid = (lo + hi) / 2 >>> 0; + if (ring[mid][0] >= hash) { + hi = mid - 1; + } else { + lo = mid + 1; + } + } + const a = lo === len ? lo - 1 : lo; + const distA = Math.abs(ring[a][0] - hash); + if (exclude === undefined) { + const b = lo - 1; + if (b < 0) { + return [a, distA]; + } + const distB = Math.abs(ring[b][0] - hash); + return distA <= distB ? [a, distA] : [b, distB]; + } else if (!exclude.has(ring[a][1])) { + return [a, distA]; + } + const range = Math.max(lo, len - lo); + for (let i = 1; i < range; i++) { + let index = lo - i; + if (index >= 0 && index < len && !exclude.has(ring[index][1])) { + return [index, Math.abs(ring[index][0] - hash)]; + } + index = lo + i; + if (index >= 0 && index < len && !exclude.has(ring[index][1])) { + return [index, Math.abs(ring[index][0] - hash)]; + } + } + return [a, distA]; +} +//# sourceMappingURL=HashRing.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/HashRing.js.map b/backend/node_modules/effect/dist/cjs/HashRing.js.map new file mode 100644 index 0000000000000000000000000000000000000000..7fe3a64536ab4f66d725cda4a5fb63cc5e2ee5fa --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/HashRing.js.map @@ -0,0 +1 @@ +{"version":3,"file":"HashRing.js","names":["_Function","require","Hash","_interopRequireWildcard","Inspectable","Iterable","_Pipeable","_Predicate","PrimaryKey","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","isHashRing","u","hasProperty","exports","make","options","self","create","Proto","baseWeight","Math","max","totalWeightCache","nodes","Map","ring","Symbol","iterator","map","values","pipe","pipeArguments","arguments","BaseProto","toJSON","_id","addMany","dual","args","weight","keys","toRemove","node","key","value","entry","Set","add","push","filter","addNodesToRing","round","j","length","string","sort","a","b","remove","delete","input","undefined","index","getIndexForInput","getShards","count","shards","Array","allocations","remaining","exclude","distances","shard","hash","shardHashes","distance","nodeCount","maxPerNode","floor","allAtMax","size","forEach","len","mid","lo","hi","distA","abs","distB","range"],"sources":["../../src/HashRing.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAD,uBAAA,CAAAF,OAAA;AACA,IAAAI,QAAA,GAAAF,uBAAA,CAAAF,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAL,uBAAA,CAAAF,OAAA;AAA6C,SAAAE,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,CAAAM,CAAA,EAAAC,C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end of file diff --git a/backend/node_modules/effect/dist/cjs/HashSet.js.map b/backend/node_modules/effect/dist/cjs/HashSet.js.map new file mode 100644 index 0000000000000000000000000000000000000000..3ff19a36099a7739dd636c9f59c8191046031024 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/HashSet.js.map @@ -0,0 +1 @@ +{"version":3,"file":"HashSet.js","names":["HS","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","HashSetTypeId","isHashSet","exports","empty","fromIterable","make","some","every","isSubset","values","toValues","self","Array","from","size","beginMutation","endMutation","mutate","add","remove","difference","intersection","union","toggle","map","flatMap","forEach","reduce","filter","partition"],"sources":["../../src/HashSet.ts"],"sourcesContent":[null],"mappings":";;;;;;AAgQA,IAAAA,EAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA2C,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,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,MAAA,GAqCflD,EAAE,CAACkD,MAAM;AAEb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDO,MAAMC,MAAM,GAAA1B,OAAA,CAAA0B,MAAA,GA+FfnD,EAAE,CAACmD,MAAM;AAEb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DO,MAAMC,SAAS,GAAA3B,OAAA,CAAA2B,SAAA,GAgHlBpD,EAAE,CAACoD,SAAS","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Inspectable.js.map b/backend/node_modules/effect/dist/cjs/Inspectable.js.map new file mode 100644 index 0000000000000000000000000000000000000000..82937f50bc8b141d29fb4acb4586807fb99c0581 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Inspectable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Inspectable.js","names":["_GlobalValue","require","Predicate","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","NodeInspectSymbol","exports","Symbol","for","toJSON","x","hasProperty","isFunction","length","Array","isArray","map","redact","CIRCULAR","formatDate","date","toISOString","safeToString","input","s","toString","String","formatPropertyKey","name","isString","JSON","stringify","formatUnknown","options","space","seen","WeakSet","gap","isNumber","repeat","ind","d","wrap","v","body","ctor","constructor","prototype","ownKeys","Reflect","go","add","join","inner","isDate","ignoreToString","Error","cause","isBoolean","isSymbol","isBigInt","Set","Map","from","isObject","keys","k","format","BaseProto","Class","toStringUnknown","u","whitespace","stringifyCircular","obj","cache","retVal","_key","value","includes","undefined","push","redactableState","fiberRefs","isRedactable","symbolRedactable","globalValue","withRedactableContext","context","prev"],"sources":["../../src/Inspectable.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;AAIA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAC,uB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RwF,eAAe,CAACC,SAAS,GAAGM,IAAI;EAClC;AACF,CAAC;AAED;;;;AAAAnF,OAAA,CAAAiF,qBAAA,GAAAA,qBAAA;AAIO,MAAMtE,MAAM,GAAIsD,CAAU,IAAa;EAC5C,IAAIa,YAAY,CAACb,CAAC,CAAC,IAAIW,eAAe,CAACC,SAAS,KAAKH,SAAS,EAAE;IAC9D,OAAOT,CAAC,CAACc,gBAAgB,CAAC,CAACH,eAAe,CAACC,SAAS,CAAC;EACvD;EACA,OAAOZ,CAAC;AACV,CAAC;AAAAjE,OAAA,CAAAW,MAAA,GAAAA,MAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Iterable.js b/backend/node_modules/effect/dist/cjs/Iterable.js new file mode 100644 index 0000000000000000000000000000000000000000..4c1c4664711d822c1fad978794011c5c56ea145f --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Iterable.js @@ -0,0 +1,1009 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.zipWith = exports.zip = exports.unsafeHead = exports.unfold = exports.takeWhile = exports.take = exports.some = exports.size = exports.scan = exports.replicate = exports.reduce = exports.range = exports.prependAll = exports.prepend = exports.of = exports.map = exports.makeBy = exports.isEmpty = exports.intersperse = exports.head = exports.groupWith = exports.groupBy = exports.group = exports.getSomes = exports.getRights = exports.getLefts = exports.fromRecord = exports.forEach = exports.flatten = exports.flatMapNullable = exports.flatMap = exports.findLast = exports.findFirst = exports.filterMapWhile = exports.filterMap = exports.filter = exports.empty = exports.drop = exports.dedupeAdjacentWith = exports.dedupeAdjacent = exports.countBy = exports.containsWith = exports.contains = exports.chunksOf = exports.cartesianWith = exports.cartesian = exports.appendAll = exports.append = void 0; +var E = _interopRequireWildcard(require("./Either.js")); +var Equal = _interopRequireWildcard(require("./Equal.js")); +var _Function = require("./Function.js"); +var O = _interopRequireWildcard(require("./Option.js")); +var _Predicate = require("./Predicate.js"); +var Tuple = _interopRequireWildcard(require("./Tuple.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * This module provides utility functions for working with Iterables in TypeScript. + * + * @since 2.0.0 + */ + +/** + * Return a `Iterable` with element `i` initialized with `f(i)`. + * + * If the `length` is not specified, the `Iterable` will be infinite. + * + * **Note**. `length` is normalized to an integer >= 1. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { makeBy } from "effect/Iterable" + * + * assert.deepStrictEqual(Array.from(makeBy(n => n * 2, { length: 5 })), [0, 2, 4, 6, 8]) + * ``` + * + * @category constructors + * @since 2.0.0 + */ +const makeBy = (f, options) => { + const max = options?.length !== undefined ? Math.max(1, Math.floor(options.length)) : Infinity; + return { + [Symbol.iterator]() { + let i = 0; + return { + next() { + if (i < max) { + return { + value: f(i++), + done: false + }; + } + return { + done: true, + value: undefined + }; + } + }; + } + }; +}; +/** + * Return a `Iterable` containing a range of integers, including both endpoints. + * + * If `end` is omitted, the range will not have an upper bound. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { range } from "effect/Iterable" + * + * assert.deepStrictEqual(Array.from(range(1, 3)), [1, 2, 3]) + * ``` + * + * @category constructors + * @since 2.0.0 + */ +exports.makeBy = makeBy; +const range = (start, end) => { + if (end === undefined) { + return makeBy(i => start + i); + } + return makeBy(i => start + i, { + length: start <= end ? end - start + 1 : 1 + }); +}; +/** + * Return a `Iterable` containing a value repeated the specified number of times. + * + * **Note**. `n` is normalized to an integer >= 1. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { replicate } from "effect/Iterable" + * + * assert.deepStrictEqual(Array.from(replicate("a", 3)), ["a", "a", "a"]) + * ``` + * + * @category constructors + * @since 2.0.0 + */ +exports.range = range; +const replicate = exports.replicate = /*#__PURE__*/(0, _Function.dual)(2, (a, n) => makeBy(() => a, { + length: n +})); +/** + * Takes a record and returns an Iterable of tuples containing its keys and values. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { fromRecord } from "effect/Iterable" + * + * const x = { a: 1, b: 2, c: 3 } + * assert.deepStrictEqual(Array.from(fromRecord(x)), [["a", 1], ["b", 2], ["c", 3]]) + * ``` + * + * @category conversions + * @since 2.0.0 + */ +const fromRecord = self => ({ + *[Symbol.iterator]() { + for (const key in self) { + if (Object.prototype.hasOwnProperty.call(self, key)) { + yield [key, self[key]]; + } + } + } +}); +/** + * Prepend an element to the front of an `Iterable`, creating a new `Iterable`. + * + * @category concatenating + * @since 2.0.0 + */ +exports.fromRecord = fromRecord; +const prepend = exports.prepend = /*#__PURE__*/(0, _Function.dual)(2, (self, head) => prependAll(self, [head])); +/** + * Prepends the specified prefix iterable to the beginning of the specified iterable. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Iterable } from "effect" + * + * assert.deepStrictEqual( + * Array.from(Iterable.prependAll([1, 2], ["a", "b"])), + * ["a", "b", 1, 2] + * ) + * ``` + * + * @category concatenating + * @since 2.0.0 + */ +const prependAll = exports.prependAll = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => appendAll(that, self)); +/** + * Append an element to the end of an `Iterable`, creating a new `Iterable`. + * + * @category concatenating + * @since 2.0.0 + */ +const append = exports.append = /*#__PURE__*/(0, _Function.dual)(2, (self, last) => appendAll(self, [last])); +/** + * Concatenates two iterables, combining their elements. + * + * @category concatenating + * @since 2.0.0 + */ +const appendAll = exports.appendAll = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => ({ + [Symbol.iterator]() { + const iterA = self[Symbol.iterator](); + let doneA = false; + let iterB; + return { + next() { + if (!doneA) { + const r = iterA.next(); + if (r.done) { + doneA = true; + iterB = that[Symbol.iterator](); + return iterB.next(); + } + return r; + } + return iterB.next(); + } + }; + } +})); +/** + * Reduce an `Iterable` from the left, keeping all intermediate results instead of only the final result. + * + * @category folding + * @since 2.0.0 + */ +const scan = exports.scan = /*#__PURE__*/(0, _Function.dual)(3, (self, b, f) => ({ + [Symbol.iterator]() { + let acc = b; + let iterator; + function next() { + if (iterator === undefined) { + iterator = self[Symbol.iterator](); + return { + done: false, + value: acc + }; + } + const result = iterator.next(); + if (result.done) { + return result; + } + acc = f(acc, result.value); + return { + done: false, + value: acc + }; + } + return { + next + }; + } +})); +/** + * Determine if an `Iterable` is empty + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isEmpty } from "effect/Iterable" + * + * assert.deepStrictEqual(isEmpty([]), true); + * assert.deepStrictEqual(isEmpty([1, 2, 3]), false); + * ``` + * + * @category guards + * @since 2.0.0 + */ +const isEmpty = self => { + const iterator = self[Symbol.iterator](); + return iterator.next().done === true; +}; +/** + * Return the number of elements in a `Iterable`. + * + * @category getters + * @since 2.0.0 + */ +exports.isEmpty = isEmpty; +const size = self => { + const iterator = self[Symbol.iterator](); + let count = 0; + while (!iterator.next().done) { + count++; + } + return count; +}; +/** + * Get the first element of a `Iterable`, or `None` if the `Iterable` is empty. + * + * @category getters + * @since 2.0.0 + */ +exports.size = size; +const head = self => { + const iterator = self[Symbol.iterator](); + const result = iterator.next(); + return result.done ? O.none() : O.some(result.value); +}; +/** + * Get the first element of a `Iterable`, or throw an error if the `Iterable` is empty. + * + * @category getters + * @since 3.3.0 + */ +exports.head = head; +const unsafeHead = self => { + const iterator = self[Symbol.iterator](); + const result = iterator.next(); + if (result.done) throw new Error("unsafeHead: empty iterable"); + return result.value; +}; +/** + * Keep only a max number of elements from the start of an `Iterable`, creating a new `Iterable`. + * + * **Note**. `n` is normalized to a non negative integer. + * + * @category getters + * @since 2.0.0 + */ +exports.unsafeHead = unsafeHead; +const take = exports.take = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => ({ + [Symbol.iterator]() { + let i = 0; + const iterator = self[Symbol.iterator](); + return { + next() { + if (i < n) { + i++; + return iterator.next(); + } + return { + done: true, + value: undefined + }; + } + }; + } +})); +/** + * Calculate the longest initial Iterable for which all element satisfy the specified predicate, creating a new `Iterable`. + * + * @category getters + * @since 2.0.0 + */ +const takeWhile = exports.takeWhile = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => ({ + [Symbol.iterator]() { + const iterator = self[Symbol.iterator](); + let i = 0; + return { + next() { + const result = iterator.next(); + if (result.done || !predicate(result.value, i++)) { + return { + done: true, + value: undefined + }; + } + return result; + } + }; + } +})); +/** + * Drop a max number of elements from the start of an `Iterable` + * + * **Note**. `n` is normalized to a non negative integer. + * + * @category getters + * @since 2.0.0 + */ +const drop = exports.drop = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => ({ + [Symbol.iterator]() { + const iterator = self[Symbol.iterator](); + let i = 0; + return { + next() { + while (i < n) { + const result = iterator.next(); + if (result.done) { + return { + done: true, + value: undefined + }; + } + i++; + } + return iterator.next(); + } + }; + } +})); +/** + * Returns the first element that satisfies the specified + * predicate, or `None` if no such element exists. + * + * @category elements + * @since 2.0.0 + */ +const findFirst = exports.findFirst = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + let i = 0; + for (const a of self) { + const o = f(a, i); + if ((0, _Predicate.isBoolean)(o)) { + if (o) { + return O.some(a); + } + } else { + if (O.isSome(o)) { + return o; + } + } + i++; + } + return O.none(); +}); +/** + * Find the last element for which a predicate holds. + * + * @category elements + * @since 2.0.0 + */ +const findLast = exports.findLast = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + let i = 0; + let last = O.none(); + for (const a of self) { + const o = f(a, i); + if ((0, _Predicate.isBoolean)(o)) { + if (o) { + last = O.some(a); + } + } else { + if (O.isSome(o)) { + last = o; + } + } + i++; + } + return last; +}); +/** + * Takes two `Iterable`s and returns an `Iterable` of corresponding pairs. + * + * @category zipping + * @since 2.0.0 + */ +const zip = exports.zip = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => zipWith(self, that, Tuple.make)); +/** + * Apply a function to pairs of elements at the same index in two `Iterable`s, collecting the results. If one + * input `Iterable` is short, excess elements of the longer `Iterable` are discarded. + * + * @category zipping + * @since 2.0.0 + */ +const zipWith = exports.zipWith = /*#__PURE__*/(0, _Function.dual)(3, (self, that, f) => ({ + [Symbol.iterator]() { + const selfIterator = self[Symbol.iterator](); + const thatIterator = that[Symbol.iterator](); + return { + next() { + const selfResult = selfIterator.next(); + const thatResult = thatIterator.next(); + if (selfResult.done || thatResult.done) { + return { + done: true, + value: undefined + }; + } + return { + done: false, + value: f(selfResult.value, thatResult.value) + }; + } + }; + } +})); +/** + * Places an element in between members of an `Iterable`. + * If the input is a non-empty array, the result is also a non-empty array. + * + * @since 2.0.0 + */ +const intersperse = exports.intersperse = /*#__PURE__*/(0, _Function.dual)(2, (self, middle) => ({ + [Symbol.iterator]() { + const iterator = self[Symbol.iterator](); + let next = iterator.next(); + let emitted = false; + return { + next() { + if (next.done) { + return next; + } else if (emitted) { + emitted = false; + return { + done: false, + value: middle + }; + } + emitted = true; + const result = next; + next = iterator.next(); + return result; + } + }; + } +})); +/** + * Returns a function that checks if an `Iterable` contains a given value using a provided `isEquivalent` function. + * + * @category elements + * @since 2.0.0 + */ +const containsWith = isEquivalent => (0, _Function.dual)(2, (self, a) => { + for (const i of self) { + if (isEquivalent(a, i)) { + return true; + } + } + return false; +}); +exports.containsWith = containsWith; +const _equivalence = /*#__PURE__*/Equal.equivalence(); +/** + * Returns a function that checks if a `Iterable` contains a given value using the default `Equivalence`. + * + * @category elements + * @since 2.0.0 + */ +const contains = exports.contains = /*#__PURE__*/containsWith(_equivalence); +/** + * Splits an `Iterable` into length-`n` pieces. The last piece will be shorter if `n` does not evenly divide the length of + * the `Iterable`. + * + * @category splitting + * @since 2.0.0 + */ +const chunksOf = exports.chunksOf = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => { + const safeN = Math.max(1, Math.floor(n)); + return { + [Symbol.iterator]() { + let iterator = self[Symbol.iterator](); + return { + next() { + if (iterator === undefined) { + return { + done: true, + value: undefined + }; + } + const chunk = []; + for (let i = 0; i < safeN; i++) { + const result = iterator.next(); + if (result.done) { + iterator = undefined; + return chunk.length === 0 ? { + done: true, + value: undefined + } : { + done: false, + value: chunk + }; + } + chunk.push(result.value); + } + return { + done: false, + value: chunk + }; + } + }; + } + }; +}); +/** + * Group equal, consecutive elements of an `Iterable` into `NonEmptyArray`s using the provided `isEquivalent` function. + * + * @category grouping + * @since 2.0.0 + */ +const groupWith = exports.groupWith = /*#__PURE__*/(0, _Function.dual)(2, (self, isEquivalent) => ({ + [Symbol.iterator]() { + const iterator = self[Symbol.iterator](); + let nextResult; + return { + next() { + let result; + if (nextResult !== undefined) { + if (nextResult.done) { + return { + done: true, + value: undefined + }; + } + result = nextResult; + nextResult = undefined; + } else { + result = iterator.next(); + if (result.done) { + return { + done: true, + value: undefined + }; + } + } + const chunk = [result.value]; + while (true) { + const next = iterator.next(); + if (next.done || !isEquivalent(result.value, next.value)) { + nextResult = next; + return { + done: false, + value: chunk + }; + } + chunk.push(next.value); + } + } + }; + } +})); +/** + * Group equal, consecutive elements of an `Iterable` into `NonEmptyArray`s. + * + * @category grouping + * @since 2.0.0 + */ +const group = exports.group = /*#__PURE__*/groupWith(/*#__PURE__*/Equal.equivalence()); +/** + * Splits an `Iterable` into sub-non-empty-arrays stored in an object, based on the result of calling a `string`-returning + * function on each element, and grouping the results according to values returned + * + * @category grouping + * @since 2.0.0 + */ +const groupBy = exports.groupBy = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + const out = {}; + for (const a of self) { + const k = f(a); + if (Object.prototype.hasOwnProperty.call(out, k)) { + out[k].push(a); + } else { + out[k] = [a]; + } + } + return out; +}); +const constEmpty = { + [Symbol.iterator]() { + return constEmptyIterator; + } +}; +const constEmptyIterator = { + next() { + return { + done: true, + value: undefined + }; + } +}; +/** + * @category constructors + * @since 2.0.0 + */ +const empty = () => constEmpty; +/** + * Constructs a new `Iterable
` from the specified value. + * + * @category constructors + * @since 2.0.0 + */ +exports.empty = empty; +const of = a => [a]; +/** + * @category mapping + * @since 2.0.0 + */ +exports.of = of; +const map = exports.map = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => ({ + [Symbol.iterator]() { + const iterator = self[Symbol.iterator](); + let i = 0; + return { + next() { + const result = iterator.next(); + if (result.done) { + return { + done: true, + value: undefined + }; + } + return { + done: false, + value: f(result.value, i++) + }; + } + }; + } +})); +/** + * Applies a function to each element in an Iterable and returns a new Iterable containing the concatenated mapped elements. + * + * @category sequencing + * @since 2.0.0 + */ +const flatMap = exports.flatMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => flatten(map(self, f))); +/** + * Flattens an Iterable of Iterables into a single Iterable + * + * @category sequencing + * @since 2.0.0 + */ +const flatten = self => ({ + [Symbol.iterator]() { + const outerIterator = self[Symbol.iterator](); + let innerIterator; + function next() { + if (innerIterator === undefined) { + const next = outerIterator.next(); + if (next.done) { + return next; + } + innerIterator = next.value[Symbol.iterator](); + } + const result = innerIterator.next(); + if (result.done) { + innerIterator = undefined; + return next(); + } + return result; + } + return { + next + }; + } +}); +/** + * @category filtering + * @since 2.0.0 + */ +exports.flatten = flatten; +const filterMap = exports.filterMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => ({ + [Symbol.iterator]() { + const iterator = self[Symbol.iterator](); + let i = 0; + return { + next() { + let result = iterator.next(); + while (!result.done) { + const b = f(result.value, i++); + if (O.isSome(b)) { + return { + done: false, + value: b.value + }; + } + result = iterator.next(); + } + return { + done: true, + value: undefined + }; + } + }; + } +})); +/** + * Transforms all elements of the `Iterable` for as long as the specified function returns some value + * + * @category filtering + * @since 2.0.0 + */ +const filterMapWhile = exports.filterMapWhile = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => ({ + [Symbol.iterator]() { + const iterator = self[Symbol.iterator](); + let i = 0; + return { + next() { + const result = iterator.next(); + if (result.done) { + return { + done: true, + value: undefined + }; + } + const b = f(result.value, i++); + if (O.isSome(b)) { + return { + done: false, + value: b.value + }; + } + return { + done: true, + value: undefined + }; + } + }; + } +})); +/** + * Retrieves the `Some` values from an `Iterable` of `Option`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Iterable, Option } from "effect" + * + * assert.deepStrictEqual( + * Array.from(Iterable.getSomes([Option.some(1), Option.none(), Option.some(2)])), + * [1, 2] + * ) + * ``` + * + * @category filtering + * @since 2.0.0 + */ +const getSomes = exports.getSomes = /*#__PURE__*/filterMap(_Function.identity); +/** + * Retrieves the `Left` values from an `Iterable` of `Either`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Iterable, Either } from "effect" + * + * assert.deepStrictEqual( + * Array.from(Iterable.getLefts([Either.right(1), Either.left("err"), Either.right(2)])), + * ["err"] + * ) + * ``` + * + * @category filtering + * @since 2.0.0 + */ +const getLefts = self => filterMap(self, E.getLeft); +/** + * Retrieves the `Right` values from an `Iterable` of `Either`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Iterable, Either } from "effect" + * + * assert.deepStrictEqual( + * Array.from(Iterable.getRights([Either.right(1), Either.left("err"), Either.right(2)])), + * [1, 2] + * ) + * ``` + * + * @category filtering + * @since 2.0.0 + */ +exports.getLefts = getLefts; +const getRights = self => filterMap(self, E.getRight); +/** + * @category filtering + * @since 2.0.0 + */ +exports.getRights = getRights; +const filter = exports.filter = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => ({ + [Symbol.iterator]() { + const iterator = self[Symbol.iterator](); + let i = 0; + return { + next() { + let result = iterator.next(); + while (!result.done) { + if (predicate(result.value, i++)) { + return { + done: false, + value: result.value + }; + } + result = iterator.next(); + } + return { + done: true, + value: undefined + }; + } + }; + } +})); +/** + * @category sequencing + * @since 2.0.0 + */ +const flatMapNullable = exports.flatMapNullable = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => filterMap(self, a => { + const b = f(a); + return b == null ? O.none() : O.some(b); +})); +/** + * Check if a predicate holds true for some `Iterable` element. + * + * @category elements + * @since 2.0.0 + */ +const some = exports.some = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => { + let i = 0; + for (const a of self) { + if (predicate(a, i++)) { + return true; + } + } + return false; +}); +/** + * @category constructors + * @since 2.0.0 + */ +const unfold = (b, f) => ({ + [Symbol.iterator]() { + let next = b; + return { + next() { + const o = f(next); + if (O.isNone(o)) { + return { + done: true, + value: undefined + }; + } + const [a, b] = o.value; + next = b; + return { + done: false, + value: a + }; + } + }; + } +}); +/** + * Iterate over the `Iterable` applying `f`. + * + * @since 2.0.0 + */ +exports.unfold = unfold; +const forEach = exports.forEach = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + let i = 0; + for (const a of self) { + f(a, i++); + } +}); +/** + * @category folding + * @since 2.0.0 + */ +const reduce = exports.reduce = /*#__PURE__*/(0, _Function.dual)(3, (self, b, f) => { + if (Array.isArray(self)) { + return self.reduce(f, b); + } + let i = 0; + let result = b; + for (const n of self) { + result = f(result, n, i++); + } + return result; +}); +/** + * Deduplicates adjacent elements that are identical using the provided `isEquivalent` function. + * + * @since 2.0.0 + */ +const dedupeAdjacentWith = exports.dedupeAdjacentWith = /*#__PURE__*/(0, _Function.dual)(2, (self, isEquivalent) => ({ + [Symbol.iterator]() { + const iterator = self[Symbol.iterator](); + let first = true; + let last; + function next() { + const result = iterator.next(); + if (result.done) { + return { + done: true, + value: undefined + }; + } + if (first) { + first = false; + last = result.value; + return result; + } + const current = result.value; + if (isEquivalent(last, current)) { + return next(); + } + last = current; + return result; + } + return { + next + }; + } +})); +/** + * Deduplicates adjacent elements that are identical. + * + * @since 2.0.0 + */ +const dedupeAdjacent = exports.dedupeAdjacent = /*#__PURE__*/dedupeAdjacentWith(/*#__PURE__*/Equal.equivalence()); +/** + * Zips this Iterable crosswise with the specified Iterable using the specified combiner. + * + * @since 2.0.0 + * @category elements + */ +const cartesianWith = exports.cartesianWith = /*#__PURE__*/(0, _Function.dual)(3, (self, that, f) => flatMap(self, a => map(that, b => f(a, b)))); +/** + * Zips this Iterable crosswise with the specified Iterable. + * + * @since 2.0.0 + * @category elements + */ +const cartesian = exports.cartesian = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => cartesianWith(self, that, (a, b) => [a, b])); +/** + * Counts all the element of the given iterable that pass the given predicate + * + * **Example** + * + * ```ts + * import { Iterable } from "effect" + * + * const result = Iterable.countBy([1, 2, 3, 4, 5], n => n % 2 === 0) + * console.log(result) // 2 + * ``` + * + * @category folding + * @since 3.16.0 + */ +const countBy = exports.countBy = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + let count = 0; + let i = 0; + for (const a of self) { + if (f(a, i)) { + count++; + } + i++; + } + return count; +}); +//# sourceMappingURL=Iterable.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Iterable.js.map b/backend/node_modules/effect/dist/cjs/Iterable.js.map new file mode 100644 index 0000000000000000000000000000000000000000..1831fa6937674115db57fe14ba5c3e7311c806ae --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Iterable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Iterable.js","names":["E","_interopRequireWildcard","require","Equal","_Function","O","_Predicate","Tuple","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","makeBy","options","max","length","undefined","Math","floor","Infinity","Symbol","iterator","next","value","done","exports","range","start","end","replicate","dual","a","fromRecord","self","key","prototype","prepend","head","prependAll","that","appendAll","append","last","iterA","doneA","iterB","scan","b","acc","result","isEmpty","size","count","none","some","unsafeHead","Error","take","takeWhile","predicate","drop","findFirst","isBoolean","isSome","findLast","zip","zipWith","make","selfIterator","thatIterator","selfResult","thatResult","intersperse","middle","emitted","containsWith","isEquivalent","_equivalence","equivalence","contains","chunksOf","safeN","chunk","push","groupWith","nextResult","group","groupBy","out","k","constEmpty","constEmptyIterator","empty","of","map","flatMap","flatten","outerIterator","innerIterator","filterMap","filterMapWhile","getSomes","identity","getLefts","getLeft","getRights","getRight","filter","flatMapNullable","unfold","isNone","forEach","reduce","Array","isArray","dedupeAdjacentWith","first","current","dedupeAdjacent","cartesianWith","cartesian","countBy"],"sources":["../../src/Iterable.ts"],"sourcesContent":[null],"mappings":";;;;;;AAQA,IAAAA,CAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAEA,IAAAG,CAAA,GAAAJ,uBAAA,CAAAC,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AAEA,IAAAK,KAAA,GAAAN,uBAAA,CAAAC,OAAA;AAAmC,SAAAD,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,C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O;MACd,OAAOpE,MAAM;IACf;IACA,OAAO;MAAE3B;IAAI,CAAE;EACjB;CACD,CAAC,CAAC;AAEH;;;;;AAKO,MAAMgG,cAAc,GAAA7F,OAAA,CAAA6F,cAAA,gBAA0CH,kBAAkB,cAAC/H,KAAK,CAAC0F,WAAW,EAAE,CAAC;AAE5G;;;;;;AAMO,MAAMyC,aAAa,GAAA9F,OAAA,CAAA8F,aAAA,gBAetB,IAAAzF,cAAI,EACN,CAAC,EACD,CAAUG,IAAiB,EAAEM,IAAiB,EAAEtC,CAAoB,KAClE8F,OAAO,CAAC9D,IAAI,EAAGF,CAAC,IAAK+D,GAAG,CAACvD,IAAI,EAAGQ,CAAC,IAAK9C,CAAC,CAAC8B,CAAC,EAAEgB,CAAC,CAAC,CAAC,CAAC,CAClD;AAED;;;;;;AAMO,MAAMyE,SAAS,GAAA/F,OAAA,CAAA+F,SAAA,gBAelB,IAAA1F,cAAI,EACN,CAAC,EACD,CAAOG,IAAiB,EAAEM,IAAiB,KAAuBgF,aAAa,CAACtF,IAAI,EAAEM,IAAI,EAAE,CAACR,CAAC,EAAEgB,CAAC,KAAK,CAAChB,CAAC,EAAEgB,CAAC,CAAC,CAAC,CAC9G;AAED;;;;;;;;;;;;;;;AAeO,MAAM0E,OAAO,GAAAhG,OAAA,CAAAgG,OAAA,gBAiChB,IAAA3F,cAAI,EACN,CAAC,EACD,CACEG,IAAiB,EACjBhC,CAA+B,KACrB;EACV,IAAImD,KAAK,GAAG,CAAC;EACb,IAAIpD,CAAC,GAAG,CAAC;EACT,KAAK,MAAM+B,CAAC,IAAIE,IAAI,EAAE;IACpB,IAAIhC,CAAC,CAAC8B,CAAC,EAAE/B,CAAC,CAAC,EAAE;MACXoD,KAAK,EAAE;IACT;IACApD,CAAC,EAAE;EACL;EACA,OAAOoD,KAAK;AACd,CAAC,CACF","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/JSONSchema.js b/backend/node_modules/effect/dist/cjs/JSONSchema.js new file mode 100644 index 0000000000000000000000000000000000000000..5168acc8009d4442d25e50176344d79ea5eac497 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/JSONSchema.js @@ -0,0 +1,727 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.fromAST = void 0; +exports.getMetaSchemaUri = getMetaSchemaUri; +exports.make = void 0; +var Arr = _interopRequireWildcard(require("./Array.js")); +var errors_ = _interopRequireWildcard(require("./internal/schema/errors.js")); +var schemaId_ = _interopRequireWildcard(require("./internal/schema/schemaId.js")); +var Option = _interopRequireWildcard(require("./Option.js")); +var ParseResult = _interopRequireWildcard(require("./ParseResult.js")); +var Predicate = _interopRequireWildcard(require("./Predicate.js")); +var Record = _interopRequireWildcard(require("./Record.js")); +var AST = _interopRequireWildcard(require("./SchemaAST.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 3.10.0 + */ + +/** + * Generates a JSON Schema from a schema. + * + * **Options** + * + * - `target`: The target JSON Schema version. Possible values are: + * - `"jsonSchema7"`: JSON Schema draft-07 (default behavior). + * - `"jsonSchema2019-09"`: JSON Schema draft-2019-09. + * - `"jsonSchema2020-12"`: JSON Schema draft-2020-12. + * - `"openApi3.1"`: OpenAPI 3.1. + * + * @category encoding + * @since 3.10.0 + */ +const make = (schema, options) => { + const definitions = {}; + const target = options?.target ?? "jsonSchema7"; + const ast = AST.isTransformation(schema.ast) && isParseJsonTransformation(schema.ast.from) + // Special case top level `parseJson` transformations + ? schema.ast.to : schema.ast; + const jsonSchema = fromAST(ast, { + definitions, + target + }); + const out = { + $schema: getMetaSchemaUri(target), + $defs: {}, + ...jsonSchema + }; + if (Record.isEmptyRecord(definitions)) { + delete out.$defs; + } else { + out.$defs = definitions; + } + return out; +}; +/** @internal */ +exports.make = make; +function getMetaSchemaUri(target) { + switch (target) { + case "jsonSchema7": + return "http://json-schema.org/draft-07/schema#"; + case "jsonSchema2019-09": + return "https://json-schema.org/draft/2019-09/schema"; + case "jsonSchema2020-12": + case "openApi3.1": + return "https://json-schema.org/draft/2020-12/schema"; + } +} +/** + * Returns a JSON Schema with additional options and definitions. + * + * **Warning** + * + * This function is experimental and subject to change. + * + * **Options** + * + * - `definitions`: A record of definitions that are included in the schema. + * - `definitionPath`: The path to the definitions within the schema (defaults + * to "#/$defs/"). + * - `target`: Which spec to target. Possible values are: + * - `'jsonSchema7'`: JSON Schema draft-07 (default behavior). + * - `'jsonSchema2019-09'`: JSON Schema draft-2019-09. + * - `'openApi3.1'`: OpenAPI 3.1. + * - `topLevelReferenceStrategy`: Controls the handling of the top-level + * reference. Possible values are: + * - `"keep"`: Keep the top-level reference (default behavior). + * - `"skip"`: Skip the top-level reference. + * - `additionalPropertiesStrategy`: Controls the handling of additional properties. Possible values are: + * - `"strict"`: Disallow additional properties (default behavior). + * - `"allow"`: Allow additional properties. + * + * @category encoding + * @since 3.11.5 + * @experimental + */ +const fromAST = (ast, options) => { + const definitionPath = options.definitionPath ?? "#/$defs/"; + const getRef = id => definitionPath + id; + const target = options.target ?? "jsonSchema7"; + const topLevelReferenceStrategy = options.topLevelReferenceStrategy ?? "keep"; + const additionalPropertiesStrategy = options.additionalPropertiesStrategy ?? "strict"; + return go(ast, options.definitions, "handle-identifier", [], { + getRef, + target, + topLevelReferenceStrategy, + additionalPropertiesStrategy + }, "handle-annotation", "handle-errors"); +}; +exports.fromAST = fromAST; +const constNever = { + $id: "/schemas/never", + not: {} +}; +const constAny = { + $id: "/schemas/any" +}; +const constUnknown = { + $id: "/schemas/unknown" +}; +const constVoid = { + $id: "/schemas/void" +}; +const constObject = { + $id: "/schemas/object", + "anyOf": [{ + "type": "object" + }, { + "type": "array" + }] +}; +const constEmptyStruct = { + $id: "/schemas/%7B%7D", + "anyOf": [{ + "type": "object" + }, { + "type": "array" + }] +}; +function getRawDescription(annotated) { + if (annotated !== undefined) return Option.getOrUndefined(AST.getDescriptionAnnotation(annotated)); +} +function getRawTitle(annotated) { + if (annotated !== undefined) return Option.getOrUndefined(AST.getTitleAnnotation(annotated)); +} +function getRawDefault(annotated) { + if (annotated !== undefined) return AST.getDefaultAnnotation(annotated); + return Option.none(); +} +function encodeDefault(ast, def) { + const getOption = ParseResult.getOption(ast, false); + return getOption(def); +} +function getRawExamples(annotated) { + if (annotated !== undefined) return Option.getOrUndefined(AST.getExamplesAnnotation(annotated)); +} +function encodeExamples(ast, examples) { + const getOption = ParseResult.getOption(ast, false); + const out = Arr.filterMap(examples, e => getOption(e).pipe(Option.filter(isJsonValue))); + return out.length > 0 ? out : undefined; +} +function filterBuiltIn(ast, annotation, key) { + if (annotation !== undefined) { + switch (ast._tag) { + case "StringKeyword": + return annotation !== AST.stringKeyword.annotations[key] ? annotation : undefined; + case "NumberKeyword": + return annotation !== AST.numberKeyword.annotations[key] ? annotation : undefined; + case "BooleanKeyword": + return annotation !== AST.booleanKeyword.annotations[key] ? annotation : undefined; + } + } + return annotation; +} +function isJsonValue(value, visited = new Set()) { + if (value === null || typeof value === "string" || typeof value === "number" || typeof value === "boolean") { + return true; + } + if (Array.isArray(value) || typeof value === "object") { + // Check for cyclic references + if (visited.has(value)) { + return false; + } + visited.add(value); + try { + if (Array.isArray(value)) { + return value.every(item => isJsonValue(item, visited)); + } + // Exclude non-plain objects (Date, RegExp, etc.) by checking constructor + const proto = Object.getPrototypeOf(value); + if (proto !== null && proto !== Object.prototype) { + return false; + } + // JSON only allows string keys, so exclude objects with Symbol keys + if (Object.getOwnPropertySymbols(value).length > 0) { + return false; + } + // Check all values are JSON values + return Object.values(value).every(v => isJsonValue(v, visited)); + } finally { + visited.delete(value); + } + } + return false; +} +function pruneJsonSchemaAnnotations(ast, description, title, def, examples) { + const out = {}; + if (description !== undefined) out.description = description; + if (title !== undefined) out.title = title; + if (Option.isSome(def)) { + const o = encodeDefault(ast, def.value); + if (Option.isSome(o) && isJsonValue(o.value)) { + out.default = o.value; + } + } + if (examples !== undefined) { + const encodedExamples = encodeExamples(ast, examples); + if (encodedExamples !== undefined) { + out.examples = encodedExamples; + } + } + if (Object.keys(out).length === 0) { + return undefined; + } + return out; +} +function getContextJsonSchemaAnnotations(ast, annotated) { + return pruneJsonSchemaAnnotations(ast, getRawDescription(annotated), getRawTitle(annotated), getRawDefault(annotated), getRawExamples(annotated)); +} +function getJsonSchemaAnnotations(ast) { + return pruneJsonSchemaAnnotations(ast, filterBuiltIn(ast, getRawDescription(ast), AST.DescriptionAnnotationId), filterBuiltIn(ast, getRawTitle(ast), AST.TitleAnnotationId), getRawDefault(ast), getRawExamples(ast)); +} +function mergeJsonSchemaAnnotations(jsonSchema, jsonSchemaAnnotations) { + if (jsonSchemaAnnotations) { + if ("$ref" in jsonSchema) { + return { + allOf: [jsonSchema], + ...jsonSchemaAnnotations + }; + } + return { + ...jsonSchema, + ...jsonSchemaAnnotations + }; + } + return jsonSchema; +} +const pruneUndefined = ast => { + if (Option.isNone(AST.getJSONSchemaAnnotation(ast))) { + return AST.pruneUndefined(ast, pruneUndefined, ast => pruneUndefined(ast.from)); + } +}; +const isParseJsonTransformation = ast => ast.annotations[AST.SchemaIdAnnotationId] === AST.ParseJsonSchemaId; +const isOverrideAnnotation = (ast, jsonSchema) => { + if (AST.isRefinement(ast)) { + const schemaId = ast.annotations[AST.SchemaIdAnnotationId]; + if (schemaId === schemaId_.IntSchemaId) { + return "type" in jsonSchema && jsonSchema.type !== "integer"; + } + } + return "type" in jsonSchema || "oneOf" in jsonSchema || "anyOf" in jsonSchema || "$ref" in jsonSchema; +}; +const mergeRefinements = (from, jsonSchema, ast) => { + const out = { + ...from, + ...getJsonSchemaAnnotations(ast), + ...jsonSchema + }; + out.allOf ??= []; + const handle = (name, filter) => { + if (name in jsonSchema && name in from) { + out.allOf.unshift({ + [name]: from[name] + }); + out.allOf = out.allOf.filter(filter); + } + }; + handle("minLength", i => i.minLength > jsonSchema.minLength); + handle("maxLength", i => i.maxLength < jsonSchema.maxLength); + handle("pattern", i => i.pattern !== jsonSchema.pattern); + handle("minItems", i => i.minItems > jsonSchema.minItems); + handle("maxItems", i => i.maxItems < jsonSchema.maxItems); + handle("minimum", i => i.minimum > jsonSchema.minimum); + handle("maximum", i => i.maximum < jsonSchema.maximum); + handle("exclusiveMinimum", i => i.exclusiveMinimum > jsonSchema.exclusiveMinimum); + handle("exclusiveMaximum", i => i.exclusiveMaximum < jsonSchema.exclusiveMaximum); + handle("multipleOf", i => i.multipleOf !== jsonSchema.multipleOf); + if (out.allOf.length === 0) { + delete out.allOf; + } + return out; +}; +function isContentSchemaSupported(options) { + switch (options.target) { + case "jsonSchema7": + return false; + case "jsonSchema2019-09": + case "jsonSchema2020-12": + case "openApi3.1": + return true; + } +} +function getAdditionalProperties(options) { + switch (options.additionalPropertiesStrategy) { + case "allow": + return true; + case "strict": + return false; + } +} +function addASTAnnotations(jsonSchema, ast) { + return addAnnotations(jsonSchema, getJsonSchemaAnnotations(ast)); +} +function addAnnotations(jsonSchema, annotations) { + if (annotations === undefined || Object.keys(annotations).length === 0) { + return jsonSchema; + } + if ("$ref" in jsonSchema) { + return { + allOf: [jsonSchema], + ...annotations + }; + } + return { + ...jsonSchema, + ...annotations + }; +} +function getIdentifierAnnotation(ast) { + const identifier = Option.getOrUndefined(AST.getJSONIdentifier(ast)); + if (identifier === undefined) { + if (AST.isSuspend(ast)) { + return getIdentifierAnnotation(ast.f()); + } + if (AST.isTransformation(ast) && AST.isTypeLiteral(ast.from) && AST.isDeclaration(ast.to)) { + const to = ast.to; + const surrogate = AST.getSurrogateAnnotation(to); + if (Option.isSome(surrogate)) { + return getIdentifierAnnotation(to); + } + } + } + return identifier; +} +function go(ast, $defs, identifier, path, options, annotation, errors) { + if (identifier === "handle-identifier" && (options.topLevelReferenceStrategy !== "skip" || AST.isSuspend(ast))) { + const id = getIdentifierAnnotation(ast); + if (id !== undefined) { + const escapedId = id.replace(/~/ig, "~0").replace(/\//ig, "~1"); + const out = { + $ref: options.getRef(escapedId) + }; + if (!Record.has($defs, id)) { + $defs[id] = out; + $defs[id] = go(ast, $defs, "ignore-identifier", path, options, "handle-annotation", errors); + } + return out; + } + } + if (annotation === "handle-annotation") { + const hook = AST.getJSONSchemaAnnotation(ast); + if (Option.isSome(hook)) { + const handler = hook.value; + if (isOverrideAnnotation(ast, handler)) { + switch (ast._tag) { + case "Declaration": + return addASTAnnotations(handler, ast); + default: + return handler; + } + } else { + switch (ast._tag) { + case "Refinement": + { + const t = AST.getTransformationFrom(ast); + if (t === undefined) { + return mergeRefinements(go(ast.from, $defs, identifier, path, options, "handle-annotation", errors), handler, ast); + } else { + return go(t, $defs, identifier, path, options, "handle-annotation", errors); + } + } + default: + return { + ...go(ast, $defs, identifier, path, options, "ignore-annotation", errors), + ...handler + }; + } + } + } + } + const surrogate = AST.getSurrogateAnnotation(ast); + if (Option.isSome(surrogate)) { + return go(surrogate.value, $defs, identifier, path, options, "handle-annotation", errors); + } + switch (ast._tag) { + // Unsupported + case "Declaration": + case "UndefinedKeyword": + case "BigIntKeyword": + case "UniqueSymbol": + case "SymbolKeyword": + { + if (errors === "ignore-errors") return addASTAnnotations(constAny, ast); + throw new Error(errors_.getJSONSchemaMissingAnnotationErrorMessage(path, ast)); + } + case "Suspend": + { + if (identifier === "handle-identifier") { + if (errors === "ignore-errors") return addASTAnnotations(constAny, ast); + throw new Error(errors_.getJSONSchemaMissingIdentifierAnnotationErrorMessage(path, ast)); + } + return go(ast.f(), $defs, "ignore-identifier", path, options, "handle-annotation", errors); + } + // Primitives + case "NeverKeyword": + return addASTAnnotations(constNever, ast); + case "VoidKeyword": + return addASTAnnotations(constVoid, ast); + case "UnknownKeyword": + return addASTAnnotations(constUnknown, ast); + case "AnyKeyword": + return addASTAnnotations(constAny, ast); + case "ObjectKeyword": + return addASTAnnotations(constObject, ast); + case "StringKeyword": + return addASTAnnotations({ + type: "string" + }, ast); + case "NumberKeyword": + return addASTAnnotations({ + type: "number" + }, ast); + case "BooleanKeyword": + return addASTAnnotations({ + type: "boolean" + }, ast); + case "Literal": + { + const literal = ast.literal; + if (literal === null) { + return addASTAnnotations({ + type: "null" + }, ast); + } else if (Predicate.isString(literal)) { + return addASTAnnotations({ + type: "string", + enum: [literal] + }, ast); + } else if (Predicate.isNumber(literal)) { + return addASTAnnotations({ + type: "number", + enum: [literal] + }, ast); + } else if (Predicate.isBoolean(literal)) { + return addASTAnnotations({ + type: "boolean", + enum: [literal] + }, ast); + } + if (errors === "ignore-errors") return addASTAnnotations(constAny, ast); + throw new Error(errors_.getJSONSchemaMissingAnnotationErrorMessage(path, ast)); + } + case "Enums": + { + const anyOf = ast.enums.map(e => { + const type = Predicate.isNumber(e[1]) ? "number" : "string"; + return { + type, + title: e[0], + enum: [e[1]] + }; + }); + return anyOf.length >= 1 ? addASTAnnotations({ + $comment: "/schemas/enums", + anyOf + }, ast) : addASTAnnotations(constNever, ast); + } + case "TupleType": + { + const elements = ast.elements.map((e, i) => mergeJsonSchemaAnnotations(go(e.type, $defs, "handle-identifier", path.concat(i), options, "handle-annotation", errors), getContextJsonSchemaAnnotations(e.type, e))); + const rest = ast.rest.map(type => mergeJsonSchemaAnnotations(go(type.type, $defs, "handle-identifier", path, options, "handle-annotation", errors), getContextJsonSchemaAnnotations(type.type, type))); + const output = { + type: "array" + }; + // --------------------------------------------- + // handle elements + // --------------------------------------------- + const len = ast.elements.length; + if (len > 0) { + output.minItems = len - ast.elements.filter(element => element.isOptional).length; + if (options.target === "jsonSchema7") { + output.items = elements; + } else { + output.prefixItems = elements; + } + } + // --------------------------------------------- + // handle rest element + // --------------------------------------------- + const restLength = rest.length; + if (restLength > 0) { + const head = rest[0]; + const isHomogeneous = restLength === 1 && ast.elements.every(e => e.type === ast.rest[0].type); + if (isHomogeneous) { + if (options.target === "jsonSchema7") { + output.items = head; + } else { + output.items = head; + delete output.prefixItems; + } + } else { + if (options.target === "jsonSchema7") { + output.additionalItems = head; + } else { + output.items = head; + } + } + // --------------------------------------------- + // handle post rest elements + // --------------------------------------------- + if (restLength > 1) { + if (errors === "ignore-errors") return addASTAnnotations(constAny, ast); + throw new Error(errors_.getJSONSchemaUnsupportedPostRestElementsErrorMessage(path)); + } + } else { + if (len > 0) { + if (options.target === "jsonSchema7") { + output.additionalItems = false; + } else { + output.items = false; + } + } else { + output.maxItems = 0; + } + } + return addASTAnnotations(output, ast); + } + case "TypeLiteral": + { + if (ast.propertySignatures.length === 0 && ast.indexSignatures.length === 0) { + return addASTAnnotations(constEmptyStruct, ast); + } + const output = { + type: "object", + required: [], + properties: {}, + additionalProperties: getAdditionalProperties(options) + }; + let patternProperties = undefined; + let propertyNames = undefined; + for (const is of ast.indexSignatures) { + const pruned = pruneUndefined(is.type) ?? is.type; + const parameter = is.parameter; + switch (parameter._tag) { + case "StringKeyword": + { + output.additionalProperties = go(pruned, $defs, "handle-identifier", path, options, "handle-annotation", errors); + break; + } + case "TemplateLiteral": + { + patternProperties = go(pruned, $defs, "handle-identifier", path, options, "handle-annotation", errors); + propertyNames = { + type: "string", + pattern: AST.getTemplateLiteralRegExp(parameter).source + }; + break; + } + case "Refinement": + { + patternProperties = go(pruned, $defs, "handle-identifier", path, options, "handle-annotation", errors); + propertyNames = go(parameter, $defs, "handle-identifier", path, options, "handle-annotation", errors); + break; + } + case "SymbolKeyword": + { + const indexSignaturePath = path.concat("[symbol]"); + output.additionalProperties = go(pruned, $defs, "handle-identifier", indexSignaturePath, options, "handle-annotation", errors); + propertyNames = go(parameter, $defs, "handle-identifier", indexSignaturePath, options, "handle-annotation", errors); + break; + } + } + } + // --------------------------------------------- + // handle property signatures + // --------------------------------------------- + for (let i = 0; i < ast.propertySignatures.length; i++) { + const ps = ast.propertySignatures[i]; + const name = ps.name; + if (Predicate.isString(name)) { + const pruned = pruneUndefined(ps.type); + const type = pruned ?? ps.type; + output.properties[name] = mergeJsonSchemaAnnotations(go(type, $defs, "handle-identifier", path.concat(ps.name), options, "handle-annotation", errors), getContextJsonSchemaAnnotations(type, ps)); + // --------------------------------------------- + // handle optional property signatures + // --------------------------------------------- + if (!ps.isOptional && pruned === undefined) { + output.required.push(name); + } + } else { + if (errors === "ignore-errors") return addASTAnnotations(constAny, ast); + throw new Error(errors_.getJSONSchemaUnsupportedKeyErrorMessage(name, path)); + } + } + // --------------------------------------------- + // handle index signatures + // --------------------------------------------- + if (patternProperties !== undefined) { + delete output.additionalProperties; + output.patternProperties = { + "": patternProperties + }; + } + if (propertyNames !== undefined) { + output.propertyNames = propertyNames; + } + return addASTAnnotations(output, ast); + } + case "Union": + { + const members = ast.types.map(t => go(t, $defs, "handle-identifier", path, options, "handle-annotation", errors)); + const anyOf = compactUnion(members); + switch (anyOf.length) { + case 0: + return constNever; + case 1: + return addASTAnnotations(anyOf[0], ast); + default: + return addASTAnnotations({ + anyOf + }, ast); + } + } + case "Refinement": + return go(ast.from, $defs, identifier, path, options, "handle-annotation", errors); + case "TemplateLiteral": + { + const regex = AST.getTemplateLiteralRegExp(ast); + return addASTAnnotations({ + type: "string", + title: String(ast), + description: "a template literal", + pattern: regex.source + }, ast); + } + case "Transformation": + { + if (isParseJsonTransformation(ast.from)) { + const out = { + "type": "string", + "contentMediaType": "application/json" + }; + if (isContentSchemaSupported(options)) { + out["contentSchema"] = go(ast.to, $defs, identifier, path, options, "handle-annotation", errors); + } + return out; + } + const from = go(ast.from, $defs, identifier, path, options, "handle-annotation", errors); + if (ast.transformation._tag === "TypeLiteralTransformation" && isJsonSchema7Object(from)) { + const to = go(ast.to, {}, "ignore-identifier", path, options, "handle-annotation", "ignore-errors"); + if (isJsonSchema7Object(to)) { + for (const t of ast.transformation.propertySignatureTransformations) { + const toKey = t.to; + const fromKey = t.from; + if (Predicate.isString(toKey) && Predicate.isString(fromKey)) { + const toProperty = to.properties[toKey]; + if (Predicate.isRecord(toProperty)) { + const fromProperty = from.properties[fromKey]; + if (Predicate.isRecord(fromProperty)) { + const annotations = {}; + if (Predicate.isString(toProperty.title)) annotations.title = toProperty.title; + if (Predicate.isString(toProperty.description)) annotations.description = toProperty.description; + if (Array.isArray(toProperty.examples)) annotations.examples = toProperty.examples; + if (Object.hasOwn(toProperty, "default") && toProperty.default !== undefined) { + annotations.default = toProperty.default; + } + from.properties[fromKey] = addAnnotations(fromProperty, annotations); + } + } + } + } + } + } + return addASTAnnotations(from, ast); + } + } +} +function isJsonSchema7Object(jsonSchema) { + return Predicate.isRecord(jsonSchema) && jsonSchema.type === "object" && Predicate.isRecord(jsonSchema.properties); +} +function isNeverWithoutCustomAnnotations(jsonSchema) { + return jsonSchema === constNever || Predicate.hasProperty(jsonSchema, "$id") && jsonSchema.$id === constNever.$id && Object.keys(jsonSchema).length === 3 && jsonSchema.title === AST.neverKeyword.annotations[AST.TitleAnnotationId]; +} +function isAny(jsonSchema) { + return "$id" in jsonSchema && jsonSchema.$id === constAny.$id; +} +function isUnknown(jsonSchema) { + return "$id" in jsonSchema && jsonSchema.$id === constUnknown.$id; +} +function isVoid(jsonSchema) { + return "$id" in jsonSchema && jsonSchema.$id === constVoid.$id; +} +function isCompactableLiteral(jsonSchema) { + return Predicate.hasProperty(jsonSchema, "enum") && "type" in jsonSchema && Object.keys(jsonSchema).length === 2; +} +function compactUnion(members) { + const out = []; + for (const m of members) { + if (isNeverWithoutCustomAnnotations(m)) continue; + if (isAny(m) || isUnknown(m) || isVoid(m)) return [m]; + if (isCompactableLiteral(m) && out.length > 0) { + const last = out[out.length - 1]; + if (isCompactableLiteral(last) && last.type === m.type) { + out[out.length - 1] = { + type: last.type, + enum: [...last.enum, ...m.enum] + }; + continue; + } + } + out.push(m); + } + return out; +} +//# sourceMappingURL=JSONSchema.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/KeyedPool.js b/backend/node_modules/effect/dist/cjs/KeyedPool.js new file mode 100644 index 0000000000000000000000000000000000000000..b97cc3613b6263f7d606c0504b0f4c9e0fdc7692 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/KeyedPool.js @@ -0,0 +1,83 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.makeWithTTLBy = exports.makeWithTTL = exports.makeWith = exports.make = exports.invalidate = exports.get = exports.KeyedPoolTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/keyedPool.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const KeyedPoolTypeId = exports.KeyedPoolTypeId = internal.KeyedPoolTypeId; +/** + * Makes a new pool of the specified fixed size. The pool is returned in a + * `Scope`, which governs the lifetime of the pool. When the pool is shutdown + * because the `Scope` is closed, the individual items allocated by the pool + * will be released in some unspecified order. + * + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * Makes a new pool of the specified fixed size. The pool is returned in a + * `Scope`, which governs the lifetime of the pool. When the pool is shutdown + * because the `Scope` is closed, the individual items allocated by the pool + * will be released in some unspecified order. + * + * The size of the underlying pools can be configured per key. + * + * @since 2.0.0 + * @category constructors + */ +const makeWith = exports.makeWith = internal.makeWith; +/** + * Makes a new pool with the specified minimum and maximum sizes and time to + * live before a pool whose excess items are not being used will be shrunk + * down to the minimum size. The pool is returned in a `Scope`, which governs + * the lifetime of the pool. When the pool is shutdown because the `Scope` is + * used, the individual items allocated by the pool will be released in some + * unspecified order. + * + * The size of the underlying pools can be configured per key. + * + * @since 2.0.0 + * @category constructors + */ +const makeWithTTL = exports.makeWithTTL = internal.makeWithTTL; +/** + * Makes a new pool with the specified minimum and maximum sizes and time to + * live before a pool whose excess items are not being used will be shrunk + * down to the minimum size. The pool is returned in a `Scope`, which governs + * the lifetime of the pool. When the pool is shutdown because the `Scope` is + * used, the individual items allocated by the pool will be released in some + * unspecified order. + * + * The size of the underlying pools can be configured per key. + * + * @since 2.0.0 + * @category constructors + */ +const makeWithTTLBy = exports.makeWithTTLBy = internal.makeWithTTLBy; +/** + * Retrieves an item from the pool belonging to the given key in a scoped + * effect. Note that if acquisition fails, then the returned effect will fail + * for that same reason. Retrying a failed acquisition attempt will repeat the + * acquisition attempt. + * + * @since 2.0.0 + * @category combinators + */ +const get = exports.get = internal.get; +/** + * Invalidates the specified item. This will cause the pool to eventually + * reallocate the item, although this reallocation may occur lazily rather + * than eagerly. + * + * @since 2.0.0 + * @category combinators + */ +const invalidate = exports.invalidate = internal.invalidate; +//# sourceMappingURL=KeyedPool.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/KeyedPool.js.map b/backend/node_modules/effect/dist/cjs/KeyedPool.js.map new file mode 100644 index 0000000000000000000000000000000000000000..fa825e2c799581067dcaa1e53733203266444ba3 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/KeyedPool.js.map @@ -0,0 +1 @@ +{"version":3,"file":"KeyedPool.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","KeyedPoolTypeId","exports","make","makeWith","makeWithTTL","makeWithTTLBy","invalidate"],"sources":["../../src/KeyedPool.ts"],"sourcesContent":[null],"mappings":";;;;;;AAKA,IAAAA,QAAA,GAAAC,uBAAA,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B,QAAQ;AAElF;;;;;;;;;;;;;AAaO,MAAMC,WAAW,GAAAH,OAAA,CAAAG,WAAA,GAOyC1B,QAAQ,CAAC0B,WAAW;AAErF;;;;;;;;;;;;;AAaO,MAAMC,aAAa,GAAAJ,OAAA,CAAAI,aAAA,GAOuC3B,QAAQ,CAAC2B,aAAa;AAEvF;;;;;;;;;AASO,MAAMZ,GAAG,GAAAQ,OAAA,CAAAR,GAAA,GAqBZf,QAAQ,CAACe,GAAG;AAEhB;;;;;;;;AAQO,MAAMa,UAAU,GAAAL,OAAA,CAAAK,UAAA,GAmBnB5B,QAAQ,CAAC4B,UAAU","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/LayerMap.js b/backend/node_modules/effect/dist/cjs/LayerMap.js new file mode 100644 index 0000000000000000000000000000000000000000..6366a2ebca60e3e1c15d3bb2977bf7ec290cf8cb --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/LayerMap.js @@ -0,0 +1,212 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.make = exports.fromRecord = exports.TypeId = exports.Service = void 0; +var Context = _interopRequireWildcard(require("./Context.js")); +var Effect = _interopRequireWildcard(require("./Effect.js")); +var FiberRefsPatch = _interopRequireWildcard(require("./FiberRefsPatch.js")); +var _Function = require("./Function.js"); +var core = _interopRequireWildcard(require("./internal/core.js")); +var Layer = _interopRequireWildcard(require("./Layer.js")); +var RcMap = _interopRequireWildcard(require("./RcMap.js")); +var Runtime = _interopRequireWildcard(require("./Runtime.js")); +var Scope = _interopRequireWildcard(require("./Scope.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 3.14.0 + * @experimental + */ + +/** + * @since 3.14.0 + * @category Symbols + */ +const TypeId = exports.TypeId = /*#__PURE__*/Symbol.for("effect/LayerMap"); +/** + * @since 3.14.0 + * @category Constructors + * @experimental + * + * A `LayerMap` allows you to create a map of Layer's that can be used to + * dynamically access resources based on a key. + * + * ```ts + * import { NodeRuntime } from "@effect/platform-node" + * import { Context, Effect, FiberRef, Layer, LayerMap } from "effect" + * + * class Greeter extends Context.Tag("Greeter") + * }>() {} + * + * // create a service that wraps a LayerMap + * class GreeterMap extends LayerMap.Service()("GreeterMap", { + * // define the lookup function for the layer map + * // + * // The returned Layer will be used to provide the Greeter service for the + * // given name. + * lookup: (name: string) => + * Layer.succeed(Greeter, { + * greet: Effect.succeed(`Hello, ${name}!`) + * }).pipe( + * Layer.merge(Layer.locallyScoped(FiberRef.currentConcurrency, 123)) + * ), + * + * // If a layer is not used for a certain amount of time, it can be removed + * idleTimeToLive: "5 seconds", + * + * // Supply the dependencies for the layers in the LayerMap + * dependencies: [] + * }) {} + * + * // usage + * const program: Effect.Effect = Effect.gen(function*() { + * // access and use the Greeter service + * const greeter = yield* Greeter + * yield* Effect.log(yield* greeter.greet) + * }).pipe( + * // use the GreeterMap service to provide a variant of the Greeter service + * Effect.provide(GreeterMap.get("John")) + * ) + * + * // run the program + * program.pipe( + * Effect.provide(GreeterMap.Default), + * NodeRuntime.runMain + * ) + * ``` + */ +const make = exports.make = /*#__PURE__*/Effect.fnUntraced(function* (lookup, options) { + const context = yield* Effect.context(); + // If we are inside another layer build, use the current memo map, + // otherwise create a new one. + const memoMap = context.unsafeMap.has(Layer.CurrentMemoMap.key) ? Context.get(context, Layer.CurrentMemoMap) : yield* Layer.makeMemoMap; + const rcMap = yield* RcMap.make({ + lookup: key => Effect.scopeWith(scope => Effect.diffFiberRefs(Layer.buildWithMemoMap(lookup(key), memoMap, scope))).pipe(Effect.map(([patch, context]) => ({ + layer: Layer.scopedContext(core.withFiberRuntime(fiber => { + const scope = Context.unsafeGet(fiber.currentContext, Scope.Scope); + const oldRefs = fiber.getFiberRefs(); + const newRefs = FiberRefsPatch.patch(patch, fiber.id(), oldRefs); + const revert = FiberRefsPatch.diff(newRefs, oldRefs); + fiber.setFiberRefs(newRefs); + return Effect.as(Scope.addFinalizerExit(scope, () => { + fiber.setFiberRefs(FiberRefsPatch.patch(revert, fiber.id(), fiber.getFiberRefs())); + return Effect.void; + }), context); + })), + runtimeEffect: Effect.withFiberRuntime(fiber => { + const fiberRefs = FiberRefsPatch.patch(patch, fiber.id(), fiber.getFiberRefs()); + return Effect.succeed(Runtime.make({ + context, + fiberRefs, + runtimeFlags: Runtime.defaultRuntime.runtimeFlags + })); + }) + }))), + idleTimeToLive: options?.idleTimeToLive + }); + if (options?.preloadKeys) { + for (const key of options.preloadKeys) { + yield* RcMap.get(rcMap, key); + } + } + return (0, _Function.identity)({ + [TypeId]: TypeId, + rcMap, + get: key => Layer.unwrapScoped(Effect.map(RcMap.get(rcMap, key), ({ + layer + }) => layer)), + runtime: key => Effect.flatMap(RcMap.get(rcMap, key), ({ + runtimeEffect + }) => runtimeEffect), + invalidate: key => RcMap.invalidate(rcMap, key) + }); +}); +/** + * @since 3.14.0 + * @category Constructors + * @experimental + */ +const fromRecord = (layers, options) => make(key => layers[key], { + ...options, + preloadKeys: options?.preload ? Object.keys(layers) : undefined +}); +/** + * @since 3.14.0 + * @category Service + * @experimental + * + * Create a `LayerMap` service that provides a dynamic set of resources based on + * a key. + * + * ```ts + * import { NodeRuntime } from "@effect/platform-node" + * import { Context, Effect, FiberRef, Layer, LayerMap } from "effect" + * + * class Greeter extends Context.Tag("Greeter") + * }>() {} + * + * // create a service that wraps a LayerMap + * class GreeterMap extends LayerMap.Service()("GreeterMap", { + * // define the lookup function for the layer map + * // + * // The returned Layer will be used to provide the Greeter service for the + * // given name. + * lookup: (name: string) => + * Layer.succeed(Greeter, { + * greet: Effect.succeed(`Hello, ${name}!`) + * }).pipe( + * Layer.merge(Layer.locallyScoped(FiberRef.currentConcurrency, 123)) + * ), + * + * // If a layer is not used for a certain amount of time, it can be removed + * idleTimeToLive: "5 seconds", + * + * // Supply the dependencies for the layers in the LayerMap + * dependencies: [] + * }) {} + * + * // usage + * const program: Effect.Effect = Effect.gen(function*() { + * // access and use the Greeter service + * const greeter = yield* Greeter + * yield* Effect.log(yield* greeter.greet) + * }).pipe( + * // use the GreeterMap service to provide a variant of the Greeter service + * Effect.provide(GreeterMap.get("John")) + * ) + * + * // run the program + * program.pipe( + * Effect.provide(GreeterMap.Default), + * NodeRuntime.runMain + * ) + * ``` + */ +exports.fromRecord = fromRecord; +const Service = () => (id, options) => { + const Err = globalThis.Error; + const limit = Err.stackTraceLimit; + Err.stackTraceLimit = 2; + const creationError = new Err(); + Err.stackTraceLimit = limit; + function TagClass() {} + const TagClass_ = TagClass; + Object.setPrototypeOf(TagClass, Object.getPrototypeOf(Context.GenericTag(id))); + TagClass.key = id; + Object.defineProperty(TagClass, "stack", { + get() { + return creationError.stack; + } + }); + TagClass_.DefaultWithoutDependencies = Layer.scoped(TagClass_, "lookup" in options ? make(options.lookup, options) : fromRecord(options.layers, options)); + TagClass_.Default = options.dependencies && options.dependencies.length > 0 ? Layer.provide(TagClass_.DefaultWithoutDependencies, options.dependencies) : TagClass_.DefaultWithoutDependencies; + TagClass_.get = key => Layer.unwrapScoped(Effect.map(TagClass_, layerMap => layerMap.get(key))); + TagClass_.runtime = key => Effect.flatMap(TagClass_, layerMap => layerMap.runtime(key)); + TagClass_.invalidate = key => Effect.flatMap(TagClass_, layerMap => layerMap.invalidate(key)); + return TagClass; +}; +exports.Service = Service; +//# sourceMappingURL=LayerMap.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/List.js b/backend/node_modules/effect/dist/cjs/List.js new file mode 100644 index 0000000000000000000000000000000000000000..a4f2318406874096f30b23b6b2219dafc624c61b --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/List.js @@ -0,0 +1,784 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.unsafeTail = exports.unsafeLast = exports.unsafeHead = exports.toChunk = exports.toArray = exports.take = exports.tail = exports.splitAt = exports.some = exports.size = exports.reverse = exports.reduceRight = exports.reduce = exports.prependAllReversed = exports.prependAll = exports.prepend = exports.partitionMap = exports.partition = exports.of = exports.nil = exports.map = exports.make = exports.last = exports.isNil = exports.isList = exports.isCons = exports.head = exports.getEquivalence = exports.fromIterable = exports.forEach = exports.flatMap = exports.findFirst = exports.filterMap = exports.filter = exports.every = exports.empty = exports.drop = exports.cons = exports.compact = exports.appendAll = exports.append = exports.TypeId = void 0; +var Arr = _interopRequireWildcard(require("./Array.js")); +var Chunk = _interopRequireWildcard(require("./Chunk.js")); +var Either = _interopRequireWildcard(require("./Either.js")); +var Equal = _interopRequireWildcard(require("./Equal.js")); +var Equivalence = _interopRequireWildcard(require("./Equivalence.js")); +var _Function = require("./Function.js"); +var Hash = _interopRequireWildcard(require("./Hash.js")); +var _Inspectable = require("./Inspectable.js"); +var Option = _interopRequireWildcard(require("./Option.js")); +var _Pipeable = require("./Pipeable.js"); +var _Predicate = require("./Predicate.js"); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * A data type for immutable linked lists representing ordered collections of elements of type `A`. + * + * This data type is optimal for last-in-first-out (LIFO), stack-like access patterns. If you need another access pattern, for example, random access or FIFO, consider using a collection more suited to this than `List`. + * + * **Performance** + * + * - Time: `List` has `O(1)` prepend and head/tail access. Most other operations are `O(n)` on the number of elements in the list. This includes the index-based lookup of elements, `length`, `append` and `reverse`. + * - Space: `List` implements structural sharing of the tail list. This means that many operations are either zero- or constant-memory cost. + * + * @since 2.0.0 + */ +/** + * This file is ported from + * + * Scala (https://www.scala-lang.org) + * + * Copyright EPFL and Lightbend, Inc. + * + * Licensed under Apache License 2.0 + * (http://www.apache.org/licenses/LICENSE-2.0). + */ + +/** + * @since 2.0.0 + * @category symbol + */ +const TypeId = exports.TypeId = /*#__PURE__*/Symbol.for("effect/List"); +/** + * Converts the specified `List` to an `Array`. + * + * @category conversions + * @since 2.0.0 + */ +const toArray = self => Arr.fromIterable(self); +/** + * @category equivalence + * @since 2.0.0 + */ +exports.toArray = toArray; +const getEquivalence = isEquivalent => Equivalence.mapInput(Arr.getEquivalence(isEquivalent), toArray); +exports.getEquivalence = getEquivalence; +const _equivalence = /*#__PURE__*/getEquivalence(Equal.equals); +const ConsProto = { + [TypeId]: TypeId, + _tag: "Cons", + toString() { + return (0, _Inspectable.format)(this.toJSON()); + }, + toJSON() { + return { + _id: "List", + _tag: "Cons", + values: toArray(this).map(_Inspectable.toJSON) + }; + }, + [_Inspectable.NodeInspectSymbol]() { + return this.toJSON(); + }, + [Equal.symbol](that) { + return isList(that) && this._tag === that._tag && _equivalence(this, that); + }, + [Hash.symbol]() { + return Hash.cached(this, Hash.array(toArray(this))); + }, + [Symbol.iterator]() { + let done = false; + // eslint-disable-next-line @typescript-eslint/no-this-alias + let self = this; + return { + next() { + if (done) { + return this.return(); + } + if (self._tag === "Nil") { + done = true; + return this.return(); + } + const value = self.head; + self = self.tail; + return { + done, + value + }; + }, + return(value) { + if (!done) { + done = true; + } + return { + done: true, + value + }; + } + }; + }, + pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + } +}; +const makeCons = (head, tail) => { + const cons = Object.create(ConsProto); + cons.head = head; + cons.tail = tail; + return cons; +}; +const NilHash = /*#__PURE__*/Hash.string("Nil"); +const NilProto = { + [TypeId]: TypeId, + _tag: "Nil", + toString() { + return (0, _Inspectable.format)(this.toJSON()); + }, + toJSON() { + return { + _id: "List", + _tag: "Nil" + }; + }, + [_Inspectable.NodeInspectSymbol]() { + return this.toJSON(); + }, + [Hash.symbol]() { + return NilHash; + }, + [Equal.symbol](that) { + return isList(that) && this._tag === that._tag; + }, + [Symbol.iterator]() { + return { + next() { + return { + done: true, + value: undefined + }; + } + }; + }, + pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + } +}; +const _Nil = /*#__PURE__*/Object.create(NilProto); +/** + * Returns `true` if the specified value is a `List`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isList = u => (0, _Predicate.hasProperty)(u, TypeId); +/** + * Returns `true` if the specified value is a `List.Nil`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +exports.isList = isList; +const isNil = self => self._tag === "Nil"; +/** + * Returns `true` if the specified value is a `List.Cons`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +exports.isNil = isNil; +const isCons = self => self._tag === "Cons"; +/** + * Returns the number of elements contained in the specified `List` + * + * @since 2.0.0 + * @category getters + */ +exports.isCons = isCons; +const size = self => { + let these = self; + let len = 0; + while (!isNil(these)) { + len += 1; + these = these.tail; + } + return len; +}; +/** + * Constructs a new empty `List`. + * + * @since 2.0.0 + * @category constructors + */ +exports.size = size; +const nil = () => _Nil; +/** + * Constructs a new `List.Cons` from the specified `head` and `tail` values. + * + * @since 2.0.0 + * @category constructors + */ +exports.nil = nil; +const cons = (head, tail) => makeCons(head, tail); +/** + * Constructs a new empty `List`. + * + * Alias of {@link nil}. + * + * @since 2.0.0 + * @category constructors + */ +exports.cons = cons; +const empty = exports.empty = nil; +/** + * Constructs a new `List` from the specified value. + * + * @since 2.0.0 + * @category constructors + */ +const of = value => makeCons(value, _Nil); +/** + * Creates a new `List` from an iterable collection of values. + * + * @since 2.0.0 + * @category constructors + */ +exports.of = of; +const fromIterable = prefix => { + const iterator = prefix[Symbol.iterator](); + let next; + if ((next = iterator.next()) && !next.done) { + const result = makeCons(next.value, _Nil); + let curr = result; + while ((next = iterator.next()) && !next.done) { + const temp = makeCons(next.value, _Nil); + curr.tail = temp; + curr = temp; + } + return result; + } else { + return _Nil; + } +}; +/** + * Constructs a new `List` from the specified values. + * + * @since 2.0.0 + * @category constructors + */ +exports.fromIterable = fromIterable; +const make = (...elements) => fromIterable(elements); +/** + * Appends the specified element to the end of the `List`, creating a new `Cons`. + * + * @category concatenating + * @since 2.0.0 + */ +exports.make = make; +const append = exports.append = /*#__PURE__*/(0, _Function.dual)(2, (self, element) => appendAll(self, of(element))); +/** + * Concatenates two lists, combining their elements. + * If either list is non-empty, the result is also a non-empty list. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { List } from "effect" + * + * assert.deepStrictEqual( + * List.make(1, 2).pipe(List.appendAll(List.make("a", "b")), List.toArray), + * [1, 2, "a", "b"] + * ) + * ``` + * + * @category concatenating + * @since 2.0.0 + */ +const appendAll = exports.appendAll = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => prependAll(that, self)); +/** + * Prepends the specified element to the beginning of the list. + * + * @category concatenating + * @since 2.0.0 + */ +const prepend = exports.prepend = /*#__PURE__*/(0, _Function.dual)(2, (self, element) => cons(element, self)); +/** + * Prepends the specified prefix list to the beginning of the specified list. + * If either list is non-empty, the result is also a non-empty list. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { List } from "effect" + * + * assert.deepStrictEqual( + * List.make(1, 2).pipe(List.prependAll(List.make("a", "b")), List.toArray), + * ["a", "b", 1, 2] + * ) + * ``` + * + * @category concatenating + * @since 2.0.0 + */ +const prependAll = exports.prependAll = /*#__PURE__*/(0, _Function.dual)(2, (self, prefix) => { + if (isNil(self)) { + return prefix; + } else if (isNil(prefix)) { + return self; + } else { + const result = makeCons(prefix.head, self); + let curr = result; + let that = prefix.tail; + while (!isNil(that)) { + const temp = makeCons(that.head, self); + curr.tail = temp; + curr = temp; + that = that.tail; + } + return result; + } +}); +/** + * Prepends the specified prefix list (in reverse order) to the beginning of the + * specified list. + * + * @category concatenating + * @since 2.0.0 + */ +const prependAllReversed = exports.prependAllReversed = /*#__PURE__*/(0, _Function.dual)(2, (self, prefix) => { + let out = self; + let pres = prefix; + while (isCons(pres)) { + out = makeCons(pres.head, out); + pres = pres.tail; + } + return out; +}); +/** + * Drops the first `n` elements from the specified list. + * + * @since 2.0.0 + * @category combinators + */ +const drop = exports.drop = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => { + if (n <= 0) { + return self; + } + if (n >= size(self)) { + return _Nil; + } + let these = self; + let i = 0; + while (!isNil(these) && i < n) { + these = these.tail; + i += 1; + } + return these; +}); +/** + * Check if a predicate holds true for every `List` element. + * + * @since 2.0.0 + * @category elements + */ +const every = exports.every = /*#__PURE__*/(0, _Function.dual)(2, (self, refinement) => { + for (const a of self) { + if (!refinement(a)) { + return false; + } + } + return true; +}); +/** + * Check if a predicate holds true for some `List` element. + * + * @since 2.0.0 + * @category elements + */ +const some = exports.some = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => { + let these = self; + while (!isNil(these)) { + if (predicate(these.head)) { + return true; + } + these = these.tail; + } + return false; +}); +/** + * Filters a list using the specified predicate. + * + * @since 2.0.0 + * @category combinators + */ +const filter = exports.filter = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => noneIn(self, predicate, false)); +// everything seen so far is not included +const noneIn = (self, predicate, isFlipped) => { + while (true) { + if (isNil(self)) { + return _Nil; + } else { + if (predicate(self.head) !== isFlipped) { + return allIn(self, self.tail, predicate, isFlipped); + } else { + self = self.tail; + } + } + } +}; +// everything from 'start' is included, if everything from this point is in we can return the origin +// start otherwise if we discover an element that is out we must create a new partial list. +const allIn = (start, remaining, predicate, isFlipped) => { + while (true) { + if (isNil(remaining)) { + return start; + } else { + if (predicate(remaining.head) !== isFlipped) { + remaining = remaining.tail; + } else { + return partialFill(start, remaining, predicate, isFlipped); + } + } + } +}; +// we have seen elements that should be included then one that should be excluded, start building +const partialFill = (origStart, firstMiss, predicate, isFlipped) => { + const newHead = makeCons(unsafeHead(origStart), _Nil); + let toProcess = unsafeTail(origStart); + let currentLast = newHead; + // we know that all elements are :: until at least firstMiss.tail + while (!(toProcess === firstMiss)) { + const newElem = makeCons(unsafeHead(toProcess), _Nil); + currentLast.tail = newElem; + currentLast = (0, _Function.unsafeCoerce)(newElem); + toProcess = (0, _Function.unsafeCoerce)(toProcess.tail); + } + // at this point newHead points to a list which is a duplicate of all the 'in' elements up to the first miss. + // currentLast is the last element in that list. + // now we are going to try and share as much of the tail as we can, only moving elements across when we have to. + let next = firstMiss.tail; + let nextToCopy = (0, _Function.unsafeCoerce)(next); // the next element we would need to copy to our list if we cant share. + while (!isNil(next)) { + // generally recommended is next.isNonEmpty but this incurs an extra method call. + const head = unsafeHead(next); + if (predicate(head) !== isFlipped) { + next = next.tail; + } else { + // its not a match - do we have outstanding elements? + while (!(nextToCopy === next)) { + const newElem = makeCons(unsafeHead(nextToCopy), _Nil); + currentLast.tail = newElem; + currentLast = newElem; + nextToCopy = (0, _Function.unsafeCoerce)(nextToCopy.tail); + } + nextToCopy = (0, _Function.unsafeCoerce)(next.tail); + next = next.tail; + } + } + // we have remaining elements - they are unchanged attach them to the end + if (!isNil(nextToCopy)) { + currentLast.tail = nextToCopy; + } + return newHead; +}; +/** + * Filters and maps a list using the specified partial function. The resulting + * list may be smaller than the input list due to the possibility of the partial + * function not being defined for some elements. + * + * @since 2.0.0 + * @category combinators + */ +const filterMap = exports.filterMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + const bs = []; + for (const a of self) { + const oa = f(a); + if (Option.isSome(oa)) { + bs.push(oa.value); + } + } + return fromIterable(bs); +}); +/** + * Removes all `None` values from the specified list. + * + * @since 2.0.0 + * @category combinators + */ +const compact = self => filterMap(self, _Function.identity); +/** + * Returns the first element that satisfies the specified + * predicate, or `None` if no such element exists. + * + * @category elements + * @since 2.0.0 + */ +exports.compact = compact; +const findFirst = exports.findFirst = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => { + let these = self; + while (!isNil(these)) { + if (predicate(these.head)) { + return Option.some(these.head); + } + these = these.tail; + } + return Option.none(); +}); +/** + * Applies a function to each element in a list and returns a new list containing the concatenated mapped elements. + * + * @since 2.0.0 + * @category sequencing + */ +const flatMap = exports.flatMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + let rest = self; + let head = undefined; + let tail = undefined; + while (!isNil(rest)) { + let bs = f(rest.head); + while (!isNil(bs)) { + const next = makeCons(bs.head, _Nil); + if (tail === undefined) { + head = next; + } else { + tail.tail = next; + } + tail = next; + bs = bs.tail; + } + rest = rest.tail; + } + if (head === undefined) { + return _Nil; + } + return head; +}); +/** + * Applies the specified function to each element of the `List`. + * + * @since 2.0.0 + * @category combinators + */ +const forEach = exports.forEach = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + let these = self; + while (!isNil(these)) { + f(these.head); + these = these.tail; + } +}); +/** + * Returns the first element of the specified list, or `None` if the list is + * empty. + * + * @since 2.0.0 + * @category getters + */ +const head = self => isNil(self) ? Option.none() : Option.some(self.head); +/** + * Returns the last element of the specified list, or `None` if the list is + * empty. + * + * @since 2.0.0 + * @category getters + */ +exports.head = head; +const last = self => isNil(self) ? Option.none() : Option.some(unsafeLast(self)); +/** + * Applies the specified mapping function to each element of the list. + * + * @since 2.0.0 + * @category mapping + */ +exports.last = last; +const map = exports.map = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + if (isNil(self)) { + return self; + } else { + let i = 0; + const head = makeCons(f(self.head, i++), _Nil); + let nextHead = head; + let rest = self.tail; + while (!isNil(rest)) { + const next = makeCons(f(rest.head, i++), _Nil); + nextHead.tail = next; + nextHead = next; + rest = rest.tail; + } + return head; + } +}); +/** + * Partition a list into two lists, where the first list contains all elements + * that did not satisfy the specified predicate, and the second list contains + * all elements that did satisfy the specified predicate. + * + * @since 2.0.0 + * @category combinators + */ +const partition = exports.partition = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => { + const left = []; + const right = []; + for (const a of self) { + if (predicate(a)) { + right.push(a); + } else { + left.push(a); + } + } + return [fromIterable(left), fromIterable(right)]; +}); +/** + * Partition a list into two lists, where the first list contains all elements + * for which the specified function returned a `Left`, and the second list + * contains all elements for which the specified function returned a `Right`. + * + * @since 2.0.0 + * @category combinators + */ +const partitionMap = exports.partitionMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + const left = []; + const right = []; + for (const a of self) { + const e = f(a); + if (Either.isLeft(e)) { + left.push(e.left); + } else { + right.push(e.right); + } + } + return [fromIterable(left), fromIterable(right)]; +}); +/** + * Folds over the elements of the list using the specified function, using the + * specified initial value. + * + * @since 2.0.0 + * @category folding + */ +const reduce = exports.reduce = /*#__PURE__*/(0, _Function.dual)(3, (self, zero, f) => { + let acc = zero; + let these = self; + while (!isNil(these)) { + acc = f(acc, these.head); + these = these.tail; + } + return acc; +}); +/** + * Folds over the elements of the list using the specified function, beginning + * with the last element of the list, using the specified initial value. + * + * @since 2.0.0 + * @category folding + */ +const reduceRight = exports.reduceRight = /*#__PURE__*/(0, _Function.dual)(3, (self, zero, f) => { + let acc = zero; + let these = reverse(self); + while (!isNil(these)) { + acc = f(acc, these.head); + these = these.tail; + } + return acc; +}); +/** + * Returns a new list with the elements of the specified list in reverse order. + * + * @since 2.0.0 + * @category elements + */ +const reverse = self => { + let result = empty(); + let these = self; + while (!isNil(these)) { + result = prepend(result, these.head); + these = these.tail; + } + return result; +}; +/** + * Splits the specified list into two lists at the specified index. + * + * @since 2.0.0 + * @category combinators + */ +exports.reverse = reverse; +const splitAt = exports.splitAt = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => [take(self, n), drop(self, n)]); +/** + * Returns the tail of the specified list, or `None` if the list is empty. + * + * @since 2.0.0 + * @category getters + */ +const tail = self => isNil(self) ? Option.none() : Option.some(self.tail); +/** + * Takes the specified number of elements from the beginning of the specified + * list. + * + * @since 2.0.0 + * @category combinators + */ +exports.tail = tail; +const take = exports.take = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => { + if (n <= 0) { + return _Nil; + } + if (n >= size(self)) { + return self; + } + let these = make(unsafeHead(self)); + let current = unsafeTail(self); + for (let i = 1; i < n; i++) { + these = makeCons(unsafeHead(current), these); + current = unsafeTail(current); + } + return reverse(these); +}); +/** + * Converts the specified `List` to a `Chunk`. + * + * @since 2.0.0 + * @category conversions + */ +const toChunk = self => Chunk.fromIterable(self); +exports.toChunk = toChunk; +const getExpectedListToBeNonEmptyErrorMessage = "Expected List to be non-empty"; +/** + * Unsafely returns the first element of the specified `List`. + * + * @since 2.0.0 + * @category unsafe + */ +const unsafeHead = self => { + if (isNil(self)) { + throw new Error(getExpectedListToBeNonEmptyErrorMessage); + } + return self.head; +}; +/** + * Unsafely returns the last element of the specified `List`. + * + * @since 2.0.0 + * @category unsafe + */ +exports.unsafeHead = unsafeHead; +const unsafeLast = self => { + if (isNil(self)) { + throw new Error(getExpectedListToBeNonEmptyErrorMessage); + } + let these = self; + let scout = self.tail; + while (!isNil(scout)) { + these = scout; + scout = scout.tail; + } + return these.head; +}; +/** + * Unsafely returns the tail of the specified `List`. + * + * @since 2.0.0 + * @category unsafe + */ +exports.unsafeLast = unsafeLast; +const unsafeTail = self => { + if (isNil(self)) { + throw new Error(getExpectedListToBeNonEmptyErrorMessage); + } + return self.tail; +}; +exports.unsafeTail = unsafeTail; +//# sourceMappingURL=List.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/List.js.map b/backend/node_modules/effect/dist/cjs/List.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5587784e3ba4db7ea003a2a63bc7522125b9d6b5 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/List.js.map @@ -0,0 +1 @@ +{"version":3,"file":"List.js","names":["Arr","_interopRequireWildcard","require","Chunk","Either","Equal","Equivalence","_Function","Hash","_Inspectable","Option","_Pipeable","_Predicate","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","exports","Symbol","for","toArray","self","fromIterable","getEquivalence","isEquivalent","mapInput","_equivalence","equals","ConsProto","_tag","toString","format","toJSON","_id","values","map","NodeInspectSymbol","symbol","that","isList","cached","array","iterator","done","next","return","value","head","tail","pipe","pipeArguments","arguments","makeCons","cons","create","NilHash","string","NilProto","undefined","_Nil","u","hasProperty","isNil","isCons","size","these","len","nil","empty","of","prefix","result","curr","temp","make","elements","append","dual","element","appendAll","prependAll","prepend","prependAllReversed","out","pres","drop","every","refinement","a","some","predicate","filter","noneIn","isFlipped","allIn","start","remaining","partialFill","origStart","firstMiss","newHead","unsafeHead","toProcess","unsafeTail","currentLast","newElem","unsafeCoerce","nextToCopy","filterMap","bs","oa","isSome","push","compact","identity","findFirst","none","flatMap","rest","forEach","last","unsafeLast","nextHead","partition","left","right","partitionMap","isLeft","reduce","zero","acc","reduceRight","reverse","splitAt","take","current","toChunk","getExpectedListToBeNonEmptyErrorMessage","Error","scout"],"sources":["../../src/List.ts"],"sourcesContent":[null],"mappings":";;;;;;AAuBA,IAAAA,GAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,MAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,KAAA,GAAAJ,uBAAA,CAAAC,OAAA;AACA,IAAAI,WAAA,GAAAL,uBAAA,CAAAC,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,IAAA,GAAAP,uBAAA,CAAAC,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AAEA,IAAAQ,MAAA,GAAAT,uBAAA,CAAAC,OAAA;AAEA,IAAAS,SAAA,GAAAT,OAAA;AACA,IAAAU,UAAA,GAAAV,OAAA;AAA6E,SAAAD,wBAAAY,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CAAC;AAAA/B,OAAA,CAAAsF,UAAA,GAAAA,UAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/LogLevel.js b/backend/node_modules/effect/dist/cjs/LogLevel.js new file mode 100644 index 0000000000000000000000000000000000000000..41c0492ee96d739dcadf0aed83ae7c7ec2717b74 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/LogLevel.js @@ -0,0 +1,143 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.locally = exports.lessThanEqual = exports.lessThan = exports.greaterThanEqual = exports.greaterThan = exports.fromLiteral = exports.allLevels = exports.Warning = exports.Trace = exports.Order = exports.None = exports.Info = exports.Fatal = exports.Error = exports.Debug = exports.All = void 0; +var _Function = require("./Function.js"); +var core = _interopRequireWildcard(require("./internal/core.js")); +var number = _interopRequireWildcard(require("./Number.js")); +var order = _interopRequireWildcard(require("./Order.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category constructors + */ +const All = exports.All = core.logLevelAll; +/** + * @since 2.0.0 + * @category constructors + */ +const Fatal = exports.Fatal = core.logLevelFatal; +/** + * @since 2.0.0 + * @category constructors + */ +const Error = exports.Error = core.logLevelError; +/** + * @since 2.0.0 + * @category constructors + */ +const Warning = exports.Warning = core.logLevelWarning; +/** + * @since 2.0.0 + * @category constructors + */ +const Info = exports.Info = core.logLevelInfo; +/** + * @since 2.0.0 + * @category constructors + */ +const Debug = exports.Debug = core.logLevelDebug; +/** + * @since 2.0.0 + * @category constructors + */ +const Trace = exports.Trace = core.logLevelTrace; +/** + * @since 2.0.0 + * @category constructors + */ +const None = exports.None = core.logLevelNone; +/** + * @since 2.0.0 + * @category constructors + */ +const allLevels = exports.allLevels = core.allLogLevels; +/** + * Temporarily sets a `LogLevel` for an `Effect` workflow. + * + * **Details** + * + * This function allows you to apply a specific `LogLevel` locally to an + * `Effect` workflow. Once the workflow completes, the `LogLevel` reverts to its + * previous state. + * + * **When to Use** + * + * This is particularly useful when you want to adjust the verbosity of logging + * for specific parts of your program without affecting the global log level. + * + * @example + * ```ts + * import { Effect, LogLevel } from "effect" + * + * const program = Effect.gen(function*() { + * yield* Effect.log("message1") + * yield* Effect.gen(function*() { + * yield* Effect.log("message2") + * yield* Effect.log("message3") + * }).pipe(LogLevel.locally(LogLevel.Warning)) + * }) + * + * Effect.runFork(program) + * // timestamp=... level=INFO fiber=#0 message=message1 + * // timestamp=... level=WARN fiber=#0 message=message2 + * // timestamp=... level=WARN fiber=#0 message=message3 + * ``` + * + * @since 2.0.0 + * @category utils + */ +const locally = exports.locally = /*#__PURE__*/(0, _Function.dual)(2, (use, self) => core.fiberRefLocally(use, core.currentLogLevel, self)); +/** + * @since 2.0.0 + * @category instances + */ +const Order = exports.Order = /*#__PURE__*/(0, _Function.pipe)(number.Order, /*#__PURE__*/order.mapInput(level => level.ordinal)); +/** + * @since 2.0.0 + * @category ordering + */ +const lessThan = exports.lessThan = /*#__PURE__*/order.lessThan(Order); +/** + * @since 2.0.0 + * @category ordering + */ +const lessThanEqual = exports.lessThanEqual = /*#__PURE__*/order.lessThanOrEqualTo(Order); +/** + * @since 2.0.0 + * @category ordering + */ +const greaterThan = exports.greaterThan = /*#__PURE__*/order.greaterThan(Order); +/** + * @since 2.0.0 + * @category ordering + */ +const greaterThanEqual = exports.greaterThanEqual = /*#__PURE__*/order.greaterThanOrEqualTo(Order); +/** + * @since 2.0.0 + * @category conversions + */ +const fromLiteral = literal => { + switch (literal) { + case "All": + return All; + case "Debug": + return Debug; + case "Error": + return Error; + case "Fatal": + return Fatal; + case "Info": + return Info; + case "Trace": + return Trace; + case "None": + return None; + case "Warning": + return Warning; + } +}; +exports.fromLiteral = fromLiteral; +//# sourceMappingURL=LogLevel.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/LogLevel.js.map b/backend/node_modules/effect/dist/cjs/LogLevel.js.map new file mode 100644 index 0000000000000000000000000000000000000000..363c1da71ba1cb6e632bc915000d310cc6243553 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/LogLevel.js.map @@ -0,0 +1 @@ +{"version":3,"file":"LogLevel.js","names":["_Function","require","core","_interopRequireWildcard","number","order","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","All","exports","logLevelAll","Fatal","logLevelFatal","Error","logLevelError","Warning","logLevelWarning","Info","logLevelInfo","Debug","logLevelDebug","Trace","logLevelTrace","None","logLevelNone","allLevels","allLogLevels","locally","dual","use","self","fiberRefLocally","currentLogLevel","Order","pipe","mapInput","level","ordinal","lessThan","lessThanEqual","lessThanOrEqualTo","greaterThan","greaterThanEqual","greaterThanOrEqualTo","fromLiteral","literal"],"sources":["../../src/LogLevel.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAD,uBAAA,CAAAF,OAAA;AACA,IAAAI,KAAA,GAAAF,uBAAA,CAAAF,OAAA;AAAmC,SAAAE,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CA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AAG;IACZ,KAAK,OAAO;MACV,OAAOW,KAAK;IACd,KAAK,OAAO;MACV,OAAON,KAAK;IACd,KAAK,OAAO;MACV,OAAOF,KAAK;IACd,KAAK,MAAM;MACT,OAAOM,IAAI;IACb,KAAK,OAAO;MACV,OAAOI,KAAK;IACd,KAAK,MAAM;MACT,OAAOE,IAAI;IACb,KAAK,SAAS;MACZ,OAAOR,OAAO;EAClB;AACF,CAAC;AAAAN,OAAA,CAAAmC,WAAA,GAAAA,WAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/LogSpan.js.map b/backend/node_modules/effect/dist/cjs/LogSpan.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0345d9e11db00e62103f8f5c13dd79dd48271a79 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/LogSpan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"LogSpan.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","make","exports","render"],"sources":["../../src/LogSpan.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAiD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAHjD;;;;AAcA;;;;AAIO,MAAMkB,IAAI,GAAAC,OAAA,CAAAD,IAAA,GAAkDtB,QAAQ,CAACsB,IAAI;AAEhF;;;;AAIO,MAAME,MAAM,GAAAD,OAAA,CAAAC,MAAA,GAA+CxB,QAAQ,CAACwB,MAAM","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Logger.js b/backend/node_modules/effect/dist/cjs/Logger.js new file mode 100644 index 0000000000000000000000000000000000000000..5b037ac3263a4bb15b89a40e6dff40bf776e3155 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Logger.js @@ -0,0 +1,497 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.zipRight = exports.zipLeft = exports.zip = exports.withSpanAnnotations = exports.withMinimumLogLevel = exports.withLeveledConsole = exports.withConsoleLog = exports.withConsoleError = exports.tracerLogger = exports.test = exports.sync = exports.succeed = exports.structuredLogger = exports.structured = exports.stringLogger = exports.simple = exports.replaceScoped = exports.replaceEffect = exports.replace = exports.remove = exports.prettyLoggerDefault = exports.prettyLogger = exports.pretty = exports.none = exports.minimumLogLevel = exports.mapInputOptions = exports.mapInput = exports.map = exports.make = exports.logfmtLogger = exports.logFmt = exports.jsonLogger = exports.json = exports.isLogger = exports.filterLogLevel = exports.defaultLogger = exports.batched = exports.addScoped = exports.addEffect = exports.add = exports.LoggerTypeId = void 0; +var fiberRuntime = _interopRequireWildcard(require("./internal/fiberRuntime.js")); +var circular = _interopRequireWildcard(require("./internal/layer/circular.js")); +var internalCircular = _interopRequireWildcard(require("./internal/logger-circular.js")); +var internal = _interopRequireWildcard(require("./internal/logger.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const LoggerTypeId = exports.LoggerTypeId = internal.LoggerTypeId; +/** + * Creates a custom logger that formats log messages according to the provided + * function. + * + * @example + * ```ts + * import { Effect, Logger, LogLevel } from "effect" + * + * const logger = Logger.make(({ logLevel, message }) => { + * globalThis.console.log(`[${logLevel.label}] ${message}`) + * }) + * + * const task1 = Effect.logDebug("task1 done") + * const task2 = Effect.logDebug("task2 done") + * + * const program = Effect.gen(function*() { + * yield* Effect.log("start") + * yield* task1 + * yield* task2 + * yield* Effect.log("done") + * }).pipe( + * Logger.withMinimumLogLevel(LogLevel.Debug), + * Effect.provide(Logger.replace(Logger.defaultLogger, logger)) + * ) + * + * Effect.runFork(program) + * // [INFO] start + * // [DEBUG] task1 done + * // [DEBUG] task2 done + * // [INFO] done + * ``` + * + * @category constructors + * @since 2.0.0 + */ +const make = exports.make = internal.makeLogger; +/** + * @since 2.0.0 + * @category context + */ +const add = exports.add = circular.addLogger; +/** + * @since 2.0.0 + * @category context + */ +const addEffect = exports.addEffect = circular.addLoggerEffect; +/** + * @since 2.0.0 + * @category context + */ +const addScoped = exports.addScoped = circular.addLoggerScoped; +/** + * @since 2.0.0 + * @category mapping + */ +const mapInput = exports.mapInput = internal.mapInput; +/** + * @since 2.0.0 + * @category mapping + */ +const mapInputOptions = exports.mapInputOptions = internal.mapInputOptions; +/** + * Returns a version of this logger that only logs messages when the log level + * satisfies the specified predicate. + * + * @since 2.0.0 + * @category filtering + */ +const filterLogLevel = exports.filterLogLevel = internal.filterLogLevel; +/** + * @since 2.0.0 + * @category mapping + */ +const map = exports.map = internal.map; +/** + * Creates a batched logger that groups log messages together and processes them + * in intervals. + * + * @example + * ```ts + * import { Console, Effect, Logger } from "effect" + * + * const LoggerLive = Logger.replaceScoped( + * Logger.defaultLogger, + * Logger.logfmtLogger.pipe( + * Logger.batched("500 millis", (messages) => Console.log("BATCH", `[\n${messages.join("\n")}\n]`)) + * ) + * ) + * + * const program = Effect.gen(function*() { + * yield* Effect.log("one") + * yield* Effect.log("two") + * yield* Effect.log("three") + * }).pipe(Effect.provide(LoggerLive)) + * + * Effect.runFork(program) + * // BATCH [ + * // timestamp=... level=INFO fiber=#0 message=one + * // timestamp=... level=INFO fiber=#0 message=two + * // timestamp=... level=INFO fiber=#0 message=three + * // ] + * ``` + * + * @since 2.0.0 + * @category mapping + */ +const batched = exports.batched = fiberRuntime.batchedLogger; +/** + * @since 2.0.0 + * @category console + */ +const withConsoleLog = exports.withConsoleLog = fiberRuntime.loggerWithConsoleLog; +/** + * Takes a `Logger` and returns a logger that calls the respective `Console` method + * based on the log level. + * + * @example + * ```ts + * import { Logger, Effect } from "effect" + * + * const loggerLayer = Logger.replace( + * Logger.defaultLogger, + * Logger.withLeveledConsole(Logger.stringLogger), + * ) + * + * Effect.gen(function* () { + * yield* Effect.logError("an error") + * yield* Effect.logInfo("an info") + * }).pipe(Effect.provide(loggerLayer)) + * ``` + * + * @since 3.8.0 + * @category console + */ +const withLeveledConsole = exports.withLeveledConsole = fiberRuntime.loggerWithLeveledLog; +/** + * @since 2.0.0 + * @category console + */ +const withConsoleError = exports.withConsoleError = fiberRuntime.loggerWithConsoleError; +/** + * A logger that does nothing in response to logging events. + * + * @since 2.0.0 + * @category constructors + */ +const none = exports.none = internal.none; +/** + * @since 2.0.0 + * @category context + */ +const remove = exports.remove = circular.removeLogger; +/** + * @since 2.0.0 + * @category context + */ +const replace = exports.replace = circular.replaceLogger; +/** + * @since 2.0.0 + * @category context + */ +const replaceEffect = exports.replaceEffect = circular.replaceLoggerEffect; +/** + * @since 2.0.0 + * @category context + */ +const replaceScoped = exports.replaceScoped = circular.replaceLoggerScoped; +/** + * @since 2.0.0 + * @category constructors + */ +const simple = exports.simple = internal.simple; +/** + * @since 2.0.0 + * @category constructors + */ +const succeed = exports.succeed = internal.succeed; +/** + * @since 2.0.0 + * @category constructors + */ +const sync = exports.sync = internal.sync; +/** + * @since 2.0.0 + * @category constructors + */ +const test = exports.test = internalCircular.test; +/** + * Sets the minimum log level for subsequent logging operations, allowing + * control over which log messages are displayed based on their severity. + * + * @example + * ```ts + * import { Effect, Logger, LogLevel } from "effect" + * + * const program = Effect.logDebug("message1").pipe(Logger.withMinimumLogLevel(LogLevel.Debug)) + * + * Effect.runFork(program) + * // timestamp=... level=DEBUG fiber=#0 message=message1 + * ``` + * + * @since 2.0.0 + * @category context + */ +const withMinimumLogLevel = exports.withMinimumLogLevel = circular.withMinimumLogLevel; +/** + * @since 2.0.0 + * @category tracing + */ +const withSpanAnnotations = exports.withSpanAnnotations = fiberRuntime.loggerWithSpanAnnotations; +/** + * Combines this logger with the specified logger to produce a new logger that + * logs to both this logger and that logger. + * + * @since 2.0.0 + * @category zipping + */ +const zip = exports.zip = internal.zip; +/** + * @since 2.0.0 + * @category zipping + */ +const zipLeft = exports.zipLeft = internal.zipLeft; +/** + * @since 2.0.0 + * @category zipping + */ +const zipRight = exports.zipRight = internal.zipRight; +/** + * @since 2.0.0 + * @category constructors + */ +const defaultLogger = exports.defaultLogger = fiberRuntime.defaultLogger; +/** + * The `jsonLogger` logger formats log entries as JSON objects, making them easy to + * integrate with logging systems that consume JSON data. + * + * @example + * ```ts + * import { Effect, Logger } from "effect" + * + * const program = Effect.log("message1", "message2").pipe( + * Effect.annotateLogs({ key1: "value1", key2: "value2" }), + * Effect.withLogSpan("myspan") + * ) + * + * Effect.runFork(program.pipe(Effect.provide(Logger.json))) + * // {"message":["message1","message2"],"logLevel":"INFO","timestamp":"...","annotations":{"key2":"value2","key1":"value1"},"spans":{"myspan":0},"fiberId":"#0"} + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const jsonLogger = exports.jsonLogger = internal.jsonLogger; +/** + * This logger outputs logs in a human-readable format that is easy to read + * during development or in a production console. + * + * @example + * ```ts + * import { Effect, Logger } from "effect" + * + * const program = Effect.log("message1", "message2").pipe( + * Effect.annotateLogs({ key1: "value1", key2: "value2" }), + * Effect.withLogSpan("myspan") + * ) + * + * Effect.runFork(program.pipe(Effect.provide(Logger.logFmt))) + * // timestamp=... level=INFO fiber=#0 message=message1 message=message2 myspan=0ms key2=value2 key1=value1 + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const logfmtLogger = exports.logfmtLogger = internal.logfmtLogger; +/** + * @since 2.0.0 + * @category constructors + */ +const stringLogger = exports.stringLogger = internal.stringLogger; +/** + * The pretty logger utilizes the capabilities of the console API to generate + * visually engaging and color-enhanced log outputs. This feature is + * particularly useful for improving the readability of log messages during + * development and debugging processes. + * + * @example + * ```ts + * import { Effect, Logger } from "effect" + * + * const program = Effect.log("message1", "message2").pipe( + * Effect.annotateLogs({ key1: "value1", key2: "value2" }), + * Effect.withLogSpan("myspan") + * ) + * + * Effect.runFork(program.pipe(Effect.provide(Logger.pretty))) + * // green --v v-- bold and cyan + * // [07:51:54.434] INFO (#0) myspan=1ms: message1 + * // message2 + * // v-- bold + * // key2: value2 + * // key1: value1 + * ``` + * + * @since 3.5.0 + * @category constructors + */ +const prettyLogger = exports.prettyLogger = internal.prettyLogger; +/** + * A default version of the pretty logger. + * + * @since 3.8.0 + * @category constructors + */ +const prettyLoggerDefault = exports.prettyLoggerDefault = internal.prettyLoggerDefault; +/** + * The structured logger provides detailed log outputs, structured in a way that + * retains comprehensive traceability of the events, suitable for deeper + * analysis and troubleshooting. + * + * @example + * ```ts + * import { Effect, Logger } from "effect" + * + * const program = Effect.log("message1", "message2").pipe( + * Effect.annotateLogs({ key1: "value1", key2: "value2" }), + * Effect.withLogSpan("myspan") + * ) + * + * Effect.runFork(program.pipe(Effect.provide(Logger.structured))) + * // { + * // message: [ 'message1', 'message2' ], + * // logLevel: 'INFO', + * // timestamp: '2024-07-09T14:05:41.623Z', + * // cause: undefined, + * // annotations: { key2: 'value2', key1: 'value1' }, + * // spans: { myspan: 0 }, + * // fiberId: '#0' + * // } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const structuredLogger = exports.structuredLogger = internal.structuredLogger; +/** + * @since 2.0.0 + * @category constructors + */ +const tracerLogger = exports.tracerLogger = fiberRuntime.tracerLogger; +/** + * The `json` logger formats log entries as JSON objects, making them easy to + * integrate with logging systems that consume JSON data. + * + * @example + * ```ts + * import { Effect, Logger } from "effect" + * + * const program = Effect.log("message1", "message2").pipe( + * Effect.annotateLogs({ key1: "value1", key2: "value2" }), + * Effect.withLogSpan("myspan") + * ) + * + * Effect.runFork(program.pipe(Effect.provide(Logger.json))) + * // {"message":["message1","message2"],"logLevel":"INFO","timestamp":"...","annotations":{"key2":"value2","key1":"value1"},"spans":{"myspan":0},"fiberId":"#0"} + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const json = exports.json = /*#__PURE__*/replace(fiberRuntime.defaultLogger, fiberRuntime.jsonLogger); +/** + * This logger outputs logs in a human-readable format that is easy to read + * during development or in a production console. + * + * @example + * ```ts + * import { Effect, Logger } from "effect" + * + * const program = Effect.log("message1", "message2").pipe( + * Effect.annotateLogs({ key1: "value1", key2: "value2" }), + * Effect.withLogSpan("myspan") + * ) + * + * Effect.runFork(program.pipe(Effect.provide(Logger.logFmt))) + * // timestamp=... level=INFO fiber=#0 message=message1 message=message2 myspan=0ms key2=value2 key1=value1 + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const logFmt = exports.logFmt = /*#__PURE__*/replace(fiberRuntime.defaultLogger, fiberRuntime.logFmtLogger); +/** + * The pretty logger utilizes the capabilities of the console API to generate + * visually engaging and color-enhanced log outputs. This feature is + * particularly useful for improving the readability of log messages during + * development and debugging processes. + * + * @example + * ```ts + * import { Effect, Logger } from "effect" + * + * const program = Effect.log("message1", "message2").pipe( + * Effect.annotateLogs({ key1: "value1", key2: "value2" }), + * Effect.withLogSpan("myspan") + * ) + * + * Effect.runFork(program.pipe(Effect.provide(Logger.pretty))) + * // green --v v-- bold and cyan + * // [07:51:54.434] INFO (#0) myspan=1ms: message1 + * // message2 + * // v-- bold + * // key2: value2 + * // key1: value1 + * ``` + * + * @since 3.5.0 + * @category constructors + */ +const pretty = exports.pretty = /*#__PURE__*/replace(fiberRuntime.defaultLogger, fiberRuntime.prettyLogger); +/** + * The structured logger provides detailed log outputs, structured in a way that + * retains comprehensive traceability of the events, suitable for deeper + * analysis and troubleshooting. + * + * @example + * ```ts + * import { Effect, Logger } from "effect" + * + * const program = Effect.log("message1", "message2").pipe( + * Effect.annotateLogs({ key1: "value1", key2: "value2" }), + * Effect.withLogSpan("myspan") + * ) + * + * Effect.runFork(program.pipe(Effect.provide(Logger.structured))) + * // { + * // message: [ 'message1', 'message2' ], + * // logLevel: 'INFO', + * // timestamp: '2024-07-09T14:05:41.623Z', + * // cause: undefined, + * // annotations: { key2: 'value2', key1: 'value1' }, + * // spans: { myspan: 0 }, + * // fiberId: '#0' + * // } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const structured = exports.structured = /*#__PURE__*/replace(fiberRuntime.defaultLogger, fiberRuntime.structuredLogger); +/** + * Sets the minimum log level for logging operations, allowing control over + * which log messages are displayed based on their severity. + * + * @example + * ```ts + * import { Effect, Logger, LogLevel } from "effect" + * + * const program = Effect.gen(function*() { + * yield* Effect.log("Executing task...") + * yield* Effect.sleep("100 millis") + * console.log("task done") + * }) + * + * // Logging disabled using a layer + * Effect.runFork(program.pipe(Effect.provide(Logger.minimumLogLevel(LogLevel.None)))) + * // task done + * ``` + * + * @since 2.0.0 + * @category context + */ +const minimumLogLevel = exports.minimumLogLevel = circular.minimumLogLevel; +/** + * Returns `true` if the specified value is a `Logger`, otherwise returns `false`. + * + * @since 1.0.0 + * @category guards + */ +const isLogger = exports.isLogger = internal.isLogger; +//# sourceMappingURL=Logger.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/ManagedRuntime.js b/backend/node_modules/effect/dist/cjs/ManagedRuntime.js new file mode 100644 index 0000000000000000000000000000000000000000..3b26186b240e2067485a4b5518a851d8365055a4 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/ManagedRuntime.js @@ -0,0 +1,49 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.make = exports.isManagedRuntime = exports.TypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/managedRuntime.js")); +var circular = _interopRequireWildcard(require("./internal/managedRuntime/circular.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 3.9.0 + * @category symbol + */ +const TypeId = exports.TypeId = circular.TypeId; +/** + * Checks if the provided argument is a `ManagedRuntime`. + * + * @since 3.9.0 + * @category guards + */ +const isManagedRuntime = exports.isManagedRuntime = internal.isManagedRuntime; +/** + * Convert a Layer into an ManagedRuntime, that can be used to run Effect's using + * your services. + * + * @since 2.0.0 + * @category runtime class + * @example + * ```ts + * import { Console, Effect, Layer, ManagedRuntime } from "effect" + * + * class Notifications extends Effect.Tag("Notifications")< + * Notifications, + * { readonly notify: (message: string) => Effect.Effect } + * >() { + * static Live = Layer.succeed(this, { notify: (message) => Console.log(message) }) + * } + * + * async function main() { + * const runtime = ManagedRuntime.make(Notifications.Live) + * await runtime.runPromise(Notifications.notify("Hello, world!")) + * await runtime.dispose() + * } + * + * main() + * ``` + */ +const make = exports.make = internal.make; +//# sourceMappingURL=ManagedRuntime.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/ManagedRuntime.js.map b/backend/node_modules/effect/dist/cjs/ManagedRuntime.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0c73fcb502907be0d5c4a8eb1ac47c0507eda945 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/ManagedRuntime.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ManagedRuntime.js","names":["internal","_interopRequireWildcard","require","circular","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","exports","isManagedRuntime","make"],"sources":["../../src/ManagedRuntime.ts"],"sourcesContent":[null],"mappings":";;;;;;AAMA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,uBAAA,CAAAC,OAAA;AAAiE,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAKjE;;;;AAIO,MAAMkB,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAkBpB,QAAQ,CAACoB,MAAgB;AAQ9D;;;;;;AAMO,MAAME,gBAAgB,GAAAD,OAAA,CAAAC,gBAAA,GAAkEzB,QAAQ,CAACyB,gBAAgB;AAwHxH;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BO,MAAMC,IAAI,GAAAF,OAAA,CAAAE,IAAA,GAGW1B,QAAQ,CAAC0B,IAAI","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Match.js b/backend/node_modules/effect/dist/cjs/Match.js new file mode 100644 index 0000000000000000000000000000000000000000..32911d6e7bd91b7596d37707a2207e46cd9e6b58 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Match.js @@ -0,0 +1,819 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.withReturnType = exports.whenOr = exports.whenAnd = exports.when = exports.valueTags = exports.value = exports.undefined = exports.typeTags = exports.type = exports.tagsExhaustive = exports.tags = exports.tagStartsWith = exports.tag = exports.symbol = exports.string = exports.record = exports.orElseAbsurd = exports.orElse = exports.option = exports.number = exports.null = exports.not = exports.nonEmptyString = exports.is = exports.instanceOfUnsafe = exports.instanceOf = exports.exhaustive = exports.either = exports.discriminatorsExhaustive = exports.discriminators = exports.discriminatorStartsWith = exports.discriminator = exports.defined = exports.date = exports.boolean = exports.bigint = exports.any = exports.SafeRefinementId = exports.MatcherTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/matcher.js")); +var Predicate = _interopRequireWildcard(require("./Predicate.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @category Symbols + * @since 1.0.0 + */ +const MatcherTypeId = exports.MatcherTypeId = internal.TypeId; +/** + * Creates a matcher for a specific type. + * + * **Details** + * + * This function defines a `Matcher` that operates on a given type, allowing you + * to specify conditions for handling different cases. Once the matcher is + * created, you can use pattern-matching functions like {@link when} to define + * how different values should be processed. + * + * **Example** (Matching Numbers and Strings) + * + * ```ts + * import { Match } from "effect" + * + * // Create a matcher for values that are either strings or numbers + * // + * // ┌─── (u: string | number) => string + * // ▼ + * const match = Match.type().pipe( + * // Match when the value is a number + * Match.when(Match.number, (n) => `number: ${n}`), + * // Match when the value is a string + * Match.when(Match.string, (s) => `string: ${s}`), + * // Ensure all possible cases are handled + * Match.exhaustive + * ) + * + * console.log(match(0)) + * // Output: "number: 0" + * + * console.log(match("hello")) + * // Output: "string: hello" + * ``` + * + * @see {@link value} for creating a matcher from a specific value. + * + * @category Creating a matcher + * @since 1.0.0 + */ +const type = exports.type = internal.type; +/** + * Creates a matcher from a specific value. + * + * **Details** + * + * This function allows you to define a `Matcher` directly from a given value, + * rather than from a type. This is useful when working with known values, + * enabling structured pattern matching on objects, primitives, or any data + * structure. + * + * Once the matcher is created, you can use pattern-matching functions like + * {@link when} to define how different cases should be handled. + * + * **Example** (Matching an Object by Property) + * + * ```ts + * import { Match } from "effect" + * + * const input = { name: "John", age: 30 } + * + * // Create a matcher for the specific object + * const result = Match.value(input).pipe( + * // Match when the 'name' property is "John" + * Match.when( + * { name: "John" }, + * (user) => `${user.name} is ${user.age} years old` + * ), + * // Provide a fallback if no match is found + * Match.orElse(() => "Oh, not John") + * ) + * + * console.log(result) + * // Output: "John is 30 years old" + * ``` + * + * @see {@link type} for creating a matcher from a specific type. + * + * @category Creating a matcher + * @since 1.0.0 + */ +const value = exports.value = internal.value; +/** + * @category Creating a matcher + * @since 1.0.0 + */ +const valueTags = exports.valueTags = internal.valueTags; +/** + * @category Creating a matcher + * @since 1.0.0 + */ +const typeTags = exports.typeTags = internal.typeTags; +/** + * Ensures that all branches of a matcher return a specific type. + * + * **Details** + * + * This function enforces a consistent return type across all pattern-matching + * branches. By specifying a return type, TypeScript will check that every + * matching condition produces a value of the expected type. + * + * **Important:** This function must be the first step in the matcher pipeline. + * If used later, TypeScript will not enforce type consistency correctly. + * + * **Example** (Validating Return Type Consistency) + * + * ```ts + * import { Match } from "effect" + * + * const match = Match.type<{ a: number } | { b: string }>().pipe( + * // Ensure all branches return a string + * Match.withReturnType(), + * // ❌ Type error: 'number' is not assignable to type 'string' + * // @ts-expect-error + * Match.when({ a: Match.number }, (_) => _.a), + * // ✅ Correct: returns a string + * Match.when({ b: Match.string }, (_) => _.b), + * Match.exhaustive + * ) + * ``` + * + * @since 1.0.0 + */ +const withReturnType = exports.withReturnType = internal.withReturnType; +/** + * Defines a condition for matching values. + * + * **Details** + * + * This function enables pattern matching by checking whether a given value + * satisfies a condition. It supports both direct value comparisons and + * predicate functions. If the condition is met, the associated function is + * executed. + * + * This function is useful when defining matchers that need to check for + * specific values or apply logical conditions to determine a match. It works + * well with structured objects and primitive types. + * + * **Example** (Matching with Values and Predicates) + * + * ```ts + * import { Match } from "effect" + * + * // Create a matcher for objects with an "age" property + * const match = Match.type<{ age: number }>().pipe( + * // Match when age is greater than 18 + * Match.when({ age: (age) => age > 18 }, (user) => `Age: ${user.age}`), + * // Match when age is exactly 18 + * Match.when({ age: 18 }, () => "You can vote"), + * // Fallback case for all other ages + * Match.orElse((user) => `${user.age} is too young`) + * ) + * + * console.log(match({ age: 20 })) + * // Output: "Age: 20" + * + * console.log(match({ age: 18 })) + * // Output: "You can vote" + * + * console.log(match({ age: 4 })) + * // Output: "4 is too young" + * ``` + * + * @see {@link whenOr} Use this when multiple patterns should match in a single + * condition. + * @see {@link whenAnd} Use this when a value must match all provided patterns. + * @see {@link orElse} Provides a fallback when no patterns match. + * + * @category Defining patterns + * @since 1.0.0 + */ +const when = exports.when = internal.when; +/** + * Matches one of multiple patterns in a single condition. + * + * **Details** + * + * This function allows defining a condition where a value matches any of the + * provided patterns. If a match is found, the associated function is executed. + * It simplifies cases where multiple patterns share the same handling logic. + * + * Unlike {@link when}, which requires separate conditions for each pattern, + * this function enables combining them into a single statement, making the + * matcher more concise. + * + * @example + * ```ts + * import { Match } from "effect" + * + * type ErrorType = + * | { readonly _tag: "NetworkError"; readonly message: string } + * | { readonly _tag: "TimeoutError"; readonly duration: number } + * | { readonly _tag: "ValidationError"; readonly field: string } + * + * const handleError = Match.type().pipe( + * Match.whenOr( + * { _tag: "NetworkError" }, + * { _tag: "TimeoutError" }, + * () => "Retry the request" + * ), + * Match.when({ _tag: "ValidationError" }, (_) => `Invalid field: ${_.field}`), + * Match.exhaustive + * ) + * + * console.log(handleError({ _tag: "NetworkError", message: "No connection" })) + * // Output: "Retry the request" + * + * console.log(handleError({ _tag: "ValidationError", field: "email" })) + * // Output: "Invalid field: email" + * ``` + * + * @category Defining patterns + * @since 1.0.0 + */ +const whenOr = exports.whenOr = internal.whenOr; +/** + * Matches a value that satisfies all provided patterns. + * + * **Details** + * + * This function allows defining a condition where a value must match all the + * given patterns simultaneously. If the value satisfies every pattern, the + * associated function is executed. + * + * Unlike {@link when}, which matches a single pattern at a time, this function + * ensures that multiple conditions are met before executing the callback. It is + * useful when checking for values that need to fulfill multiple criteria at + * once. + * + * @example + * ```ts + * import { Match } from "effect" + * + * type User = { readonly age: number; readonly role: "admin" | "user" } + * + * const checkUser = Match.type().pipe( + * Match.whenAnd( + * { age: (n) => n >= 18 }, + * { role: "admin" }, + * () => "Admin access granted" + * ), + * Match.orElse(() => "Access denied") + * ) + * + * console.log(checkUser({ age: 20, role: "admin" })) + * // Output: "Admin access granted" + * + * console.log(checkUser({ age: 20, role: "user" })) + * // Output: "Access denied" + * ``` + * + * @category Defining patterns + * @since 1.0.0 + */ +const whenAnd = exports.whenAnd = internal.whenAnd; +/** + * Matches values based on a specified discriminant field. + * + * **Details** + * + * This function is used to define pattern matching on objects that follow a + * **discriminated union** structure, where a specific field (e.g., `type`, + * `kind`, `_tag`) determines the variant of the object. It allows matching + * multiple values of the discriminant and provides a function to handle the + * matched cases. + * + * @example + * ```ts + * import { Match, pipe } from "effect" + * + * const match = pipe( + * Match.type<{ type: "A"; a: string } | { type: "B"; b: number } | { type: "C"; c: boolean }>(), + * Match.discriminator("type")("A", "B", (_) => `A or B: ${_.type}`), + * Match.discriminator("type")("C", (_) => `C(${_.c})`), + * Match.exhaustive + * ) + * ``` + * + * @category Defining patterns + * @since 1.0.0 + */ +const discriminator = exports.discriminator = internal.discriminator; +/** + * Matches values where a specified field starts with a given prefix. + * + * **Details** + * + * This function is useful for working with discriminated unions where the + * discriminant field follows a hierarchical or namespaced structure. It allows + * you to match values based on whether the specified field starts with a given + * prefix, making it easier to handle grouped cases. + * + * Instead of checking for exact matches, this function lets you match values + * that share a common prefix. For example, if your discriminant field contains + * hierarchical names like `"A"`, `"A.A"`, and `"B"`, you can match all values + * starting with `"A"` using a single rule. + * + * @example + * ```ts + * import { Match, pipe } from "effect" + * + * const match = pipe( + * Match.type<{ type: "A" } | { type: "B" } | { type: "A.A" } | {}>(), + * Match.discriminatorStartsWith("type")("A", (_) => 1 as const), + * Match.discriminatorStartsWith("type")("B", (_) => 2 as const), + * Match.orElse((_) => 3 as const) + * ) + * + * console.log(match({ type: "A" })) // 1 + * console.log(match({ type: "B" })) // 2 + * console.log(match({ type: "A.A" })) // 1 + * ``` + * + * @category Defining patterns + * @since 1.0.0 + */ +const discriminatorStartsWith = exports.discriminatorStartsWith = internal.discriminatorStartsWith; +/** + * Matches values based on a field that serves as a discriminator, mapping each + * possible value to a corresponding handler. + * + * **Details** + * + * This function simplifies working with discriminated unions by letting you + * define a set of handlers for each possible value of a given field. Instead of + * chaining multiple calls to {@link discriminator}, this function allows + * defining all possible cases at once using an object where the keys are the + * possible values of the field, and the values are the corresponding handler + * functions. + * + * @example + * ```ts + * import { Match, pipe } from "effect" + * + * const match = pipe( + * Match.type<{ type: "A"; a: string } | { type: "B"; b: number } | { type: "C"; c: boolean }>(), + * Match.discriminators("type")({ + * A: (a) => a.a, + * B: (b) => b.b, + * C: (c) => c.c + * }), + * Match.exhaustive + * ) + * ``` + * + * @category Defining patterns + * @since 1.0.0 + */ +const discriminators = exports.discriminators = internal.discriminators; +/** + * Matches values based on a discriminator field and **ensures all cases are + * handled**. + * + * **Details*+ + * + * This function is similar to {@link discriminators}, but **requires that all + * possible cases** are explicitly handled. It is useful when working with + * discriminated unions, where a specific field (e.g., `"type"`) determines the + * shape of an object. Each possible value of the field must have a + * corresponding handler, ensuring **exhaustiveness checking** at compile time. + * + * This function **does not require** `Match.exhaustive` at the end of the + * pipeline because it enforces exhaustiveness by design. + * + * @example + * ```ts + * import { Match, pipe } from "effect" + * + * const match = pipe( + * Match.type<{ type: "A"; a: string } | { type: "B"; b: number } | { type: "C"; c: boolean }>(), + * Match.discriminatorsExhaustive("type")({ + * A: (a) => a.a, + * B: (b) => b.b, + * C: (c) => c.c + * }) + * ) + * ``` + * + * @category Defining patterns + * @since 1.0.0 + */ +const discriminatorsExhaustive = exports.discriminatorsExhaustive = internal.discriminatorsExhaustive; +/** + * The `Match.tag` function allows pattern matching based on the `_tag` field in + * a [Discriminated Union](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes-func.html#discriminated-unions). + * You can specify multiple tags to match within a single pattern. + * + * **Note** + * + * The `Match.tag` function relies on the convention within the Effect ecosystem + * of naming the tag field as `"_tag"`. Ensure that your discriminated unions + * follow this naming convention for proper functionality. + * + * **Example** (Matching a Discriminated Union by Tag) + * + * ```ts + * import { Match } from "effect" + * + * type Event = + * | { readonly _tag: "fetch" } + * | { readonly _tag: "success"; readonly data: string } + * | { readonly _tag: "error"; readonly error: Error } + * | { readonly _tag: "cancel" } + * + * // Create a Matcher for Either + * const match = Match.type().pipe( + * // Match either "fetch" or "success" + * Match.tag("fetch", "success", () => `Ok!`), + * // Match "error" and extract the error message + * Match.tag("error", (event) => `Error: ${event.error.message}`), + * // Match "cancel" + * Match.tag("cancel", () => "Cancelled"), + * Match.exhaustive + * ) + * + * console.log(match({ _tag: "success", data: "Hello" })) + * // Output: "Ok!" + * + * console.log(match({ _tag: "error", error: new Error("Oops!") })) + * // Output: "Error: Oops!" + * ``` + * + * @category Defining patterns + * @since 1.0.0 + */ +const tag = exports.tag = internal.tag; +/** + * Matches values where the `_tag` field starts with a given prefix. + * + * **Details** + * + * This function allows you to match on values in a **discriminated union** + * based on whether the `_tag` field starts with a specified prefix. It is + * useful for handling hierarchical or namespaced tags, where multiple related + * cases share a common prefix. + * + * @example + * ```ts + * import { Match, pipe } from "effect" + * + * const match = pipe( + * Match.type<{ _tag: "A" } | { _tag: "B" } | { _tag: "A.A" } | {}>(), + * Match.tagStartsWith("A", (_) => 1 as const), + * Match.tagStartsWith("B", (_) => 2 as const), + * Match.orElse((_) => 3 as const) + * ) + * + * console.log(match({ _tag: "A" })) // 1 + * console.log(match({ _tag: "B" })) // 2 + * console.log(match({ _tag: "A.A" })) // 1 + * ``` + * + * @category Defining patterns + * @since 1.0.0 + */ +const tagStartsWith = exports.tagStartsWith = internal.tagStartsWith; +/** + * Matches values based on their `_tag` field, mapping each tag to a + * corresponding handler. + * + * **Details** + * + * This function provides a way to handle discriminated unions by mapping `_tag` + * values to specific functions. Each handler receives the matched value and + * returns a transformed result. If all possible tags are handled, you can + * enforce exhaustiveness using `Match.exhaustive` to ensure no case is missed. + * + * @example + * ```ts + * import { Match, pipe } from "effect" + * + * const match = pipe( + * Match.type<{ _tag: "A"; a: string } | { _tag: "B"; b: number } | { _tag: "C"; c: boolean }>(), + * Match.tags({ + * A: (a) => a.a, + * B: (b) => b.b, + * C: (c) => c.c + * }), + * Match.exhaustive + * ) + * ``` + * + * @category Defining patterns + * @since 1.0.0 + */ +const tags = exports.tags = internal.tags; +/** + * Matches values based on their `_tag` field and requires handling of all + * possible cases. + * + * **Details** + * + * This function is designed for **discriminated unions** where every possible + * `_tag` value must have a corresponding handler. Unlike {@link tags}, this + * function ensures **exhaustiveness**, meaning all cases must be explicitly + * handled. If a `_tag` value is missing from the mapping, TypeScript will + * report an error. + * + * @example + * ```ts + * import { Match, pipe } from "effect" + * + * const match = pipe( + * Match.type<{ _tag: "A"; a: string } | { _tag: "B"; b: number } | { _tag: "C"; c: boolean }>(), + * Match.tagsExhaustive({ + * A: (a) => a.a, + * B: (b) => b.b, + * C: (c) => c.c + * }) + * ) + * ``` + * + * @category Defining patterns + * @since 1.0.0 + */ +const tagsExhaustive = exports.tagsExhaustive = internal.tagsExhaustive; +/** + * Excludes a specific value from matching while allowing all others. + * + * **Details** + * + * This function is useful when you need to **handle all values except one or + * more specific cases**. Instead of listing all possible matches manually, this + * function simplifies the logic by allowing you to specify values to exclude. + * Any excluded value will bypass the provided function and continue matching + * through other cases. + * + * **Example** (Ignoring a Specific Value) + * + * ```ts + * import { Match } from "effect" + * + * // Create a matcher for string or number values + * const match = Match.type().pipe( + * // Match any value except "hi", returning "ok" + * Match.not("hi", () => "ok"), + * // Fallback case for when the value is "hi" + * Match.orElse(() => "fallback") + * ) + * + * console.log(match("hello")) + * // Output: "ok" + * + * console.log(match("hi")) + * // Output: "fallback" + * ``` + * + * @category Defining patterns + * @since 1.0.0 + */ +const not = exports.not = internal.not; +/** + * Matches non-empty strings. + * + * @category Predicates + * @since 1.0.0 + */ +const nonEmptyString = exports.nonEmptyString = internal.nonEmptyString; +/** + * Matches a specific set of literal values (e.g., `Match.is("a", 42, true)`). + * + * @category Predicates + * @since 1.0.0 + */ +const is = exports.is = internal.is; +/** + * Matches values of type `string`. + * + * @category Predicates + * @since 1.0.0 + */ +const string = exports.string = Predicate.isString; +/** + * Matches values of type `number`. + * + * @category Predicates + * @since 1.0.0 + */ +const number = exports.number = Predicate.isNumber; +/** + * Matches any value without restrictions. + * + * @category Predicates + * @since 1.0.0 + */ +const any = exports.any = internal.any; +/** + * Matches any defined (non-null and non-undefined) value. + * + * @category Predicates + * @since 1.0.0 + */ +const defined = exports.defined = internal.defined; +/** + * Matches values of type `boolean`. + * + * @category Predicates + * @since 1.0.0 + */ +const boolean = exports.boolean = Predicate.isBoolean; +const _undefined = exports.undefined = Predicate.isUndefined; +const _null = exports.null = Predicate.isNull; +/** + * Matches values of type `bigint`. + * + * @category Predicates + * @since 1.0.0 + */ +const bigint = exports.bigint = Predicate.isBigInt; +/** + * Matches values of type `symbol`. + * + * @category Predicates + * @since 1.0.0 + */ +const symbol = exports.symbol = Predicate.isSymbol; +/** + * Matches values that are instances of `Date`. + * + * @category Predicates + * @since 1.0.0 + */ +const date = exports.date = Predicate.isDate; +/** + * Matches objects where keys are `string` or `symbol` and values are `unknown`. + * + * @category Predicates + * @since 1.0.0 + */ +const record = exports.record = Predicate.isRecord; +/** + * Matches instances of a given class. + * + * @category Predicates + * @since 1.0.0 + */ +const instanceOf = exports.instanceOf = internal.instanceOf; +/** + * @category Predicates + * @since 1.0.0 + */ +const instanceOfUnsafe = exports.instanceOfUnsafe = internal.instanceOf; +/** + * Provides a fallback value when no patterns match. + * + * **Details** + * + * This function ensures that a matcher always returns a valid result, even if + * no defined patterns match. It acts as a default case, similar to the + * `default` clause in a `switch` statement or the final `else` in an `if-else` + * chain. + * + * **Example** (Providing a Default Value When No Patterns Match) + * + * ```ts + * import { Match } from "effect" + * + * // Create a matcher for string or number values + * const match = Match.type().pipe( + * // Match when the value is "a" + * Match.when("a", () => "ok"), + * // Fallback when no patterns match + * Match.orElse(() => "fallback") + * ) + * + * console.log(match("a")) + * // Output: "ok" + * + * console.log(match("b")) + * // Output: "fallback" + * ``` + * + * @category Completion + * @since 1.0.0 + */ +const orElse = exports.orElse = internal.orElse; +// TODO(4.0): Rename to "orThrow"? Like Either.getOrThrow +/** + * Throws an error if no pattern matches. + * + * **Details** + * + * This function finalizes a matcher by ensuring that if no patterns match, an + * error is thrown. It is useful when all cases should be covered, and any + * unexpected input should trigger an error instead of returning a default + * value. + * + * When used, this function removes the need for an explicit fallback case and + * ensures that an unmatched value is never silently ignored. + * + * @category Completion + * @since 1.0.0 + */ +const orElseAbsurd = exports.orElseAbsurd = internal.orElseAbsurd; +/** + * Wraps the match result in an `Either`, distinguishing matched and unmatched + * cases. + * + * **Details** + * + * This function ensures that the result of a matcher is always wrapped in an + * `Either`, allowing clear differentiation between successful matches + * (`Right(value)`) and cases where no pattern matched (`Left(unmatched + * value)`). + * + * This approach is particularly useful when handling optional values or when an + * unmatched case should be explicitly handled rather than returning a default + * value or throwing an error. + * + * **Example** (Extracting a User Role with `Match.either`) + * + * ```ts + * import { Match } from "effect" + * + * type User = { readonly role: "admin" | "editor" | "viewer" } + * + * // Create a matcher to extract user roles + * const getRole = Match.type().pipe( + * Match.when({ role: "admin" }, () => "Has full access"), + * Match.when({ role: "editor" }, () => "Can edit content"), + * Match.either // Wrap the result in an Either + * ) + * + * console.log(getRole({ role: "admin" })) + * // Output: { _id: 'Either', _tag: 'Right', right: 'Has full access' } + * + * console.log(getRole({ role: "viewer" })) + * // Output: { _id: 'Either', _tag: 'Left', left: { role: 'viewer' } } + * ``` + * + * @category Completion + * @since 1.0.0 + */ +const either = exports.either = internal.either; +/** + * Wraps the match result in an `Option`, representing an optional match. + * + * **Details** + * + * This function ensures that the result of a matcher is wrapped in an `Option`, + * making it easy to handle cases where no pattern matches. If a match is found, + * it returns `Some(value)`, otherwise, it returns `None`. + * + * This is useful in cases where a missing match is expected and should be + * handled explicitly rather than throwing an error or returning a default + * value. + * + * **Example** (Extracting a User Role with `Match.option`) + * + * ```ts + * import { Match } from "effect" + * + * type User = { readonly role: "admin" | "editor" | "viewer" } + * + * // Create a matcher to extract user roles + * const getRole = Match.type().pipe( + * Match.when({ role: "admin" }, () => "Has full access"), + * Match.when({ role: "editor" }, () => "Can edit content"), + * Match.option // Wrap the result in an Option + * ) + * + * console.log(getRole({ role: "admin" })) + * // Output: { _id: 'Option', _tag: 'Some', value: 'Has full access' } + * + * console.log(getRole({ role: "viewer" })) + * // Output: { _id: 'Option', _tag: 'None' } + * ``` + * + * @category Completion + * @since 1.0.0 + */ +const option = exports.option = internal.option; +/** + * The `Match.exhaustive` method finalizes the pattern matching process by + * ensuring that all possible cases are accounted for. If any case is missing, + * TypeScript will produce a type error. This is particularly useful when + * working with unions, as it helps prevent unintended gaps in pattern matching. + * + * **Example** (Ensuring All Cases Are Covered) + * + * ```ts + * import { Match } from "effect" + * + * // Create a matcher for string or number values + * const match = Match.type().pipe( + * // Match when the value is a number + * Match.when(Match.number, (n) => `number: ${n}`), + * // Mark the match as exhaustive, ensuring all cases are handled + * // TypeScript will throw an error if any case is missing + * // @ts-expect-error Type 'string' is not assignable to type 'never' + * Match.exhaustive + * ) + * ``` + * + * @category Completion + * @since 1.0.0 + */ +const exhaustive = exports.exhaustive = internal.exhaustive; +/** + * @since 1.0.0 + * @category Symbols + */ +const SafeRefinementId = exports.SafeRefinementId = /*#__PURE__*/Symbol.for("effect/SafeRefinement"); +const Fail = /*#__PURE__*/Symbol.for("effect/Fail"); +//# sourceMappingURL=Match.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Match.js.map b/backend/node_modules/effect/dist/cjs/Match.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a5a908b50a94911c4a7a0d2efad27346d4ac6b59 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Match.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Match.js","names":["internal","_interopRequireWildcard","require","Predicate","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","MatcherTypeId","exports","TypeId","type","value","valueTags","typeTags","withReturnType","when","whenOr","whenAnd","discriminator","discriminatorStartsWith","discriminators","discriminatorsExhaustive","tag","tagStartsWith","tags","tagsExhaustive","not","nonEmptyString","is","string","isString","number","isNumber","any","defined","boolean","isBoolean","_undefined","undefined","isUndefined","_null","null","isNull","bigint","isBigInt","symbol","isSymbol","date","isDate","record","isRecord","instanceOf","instanceOfUnsafe","orElse","orElseAbsurd","either","option","exhaustive","SafeRefinementId","Symbol","for","Fail"],"sources":["../../src/Match.ts"],"sourcesContent":[null],"mappings":";;;;;;AA6BA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAGA,IAAAC,SAAA,GAAAF,uBAAA,CAAAC,OAAA;AAA2C,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBA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[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MergeDecision.js b/backend/node_modules/effect/dist/cjs/MergeDecision.js new file mode 100644 index 0000000000000000000000000000000000000000..c65e11239c72648bdffd0c90f99af9fe25615f48 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MergeDecision.js @@ -0,0 +1,42 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.match = exports.isMergeDecision = exports.MergeDecisionTypeId = exports.Done = exports.AwaitConst = exports.Await = void 0; +var internal = _interopRequireWildcard(require("./internal/channel/mergeDecision.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const MergeDecisionTypeId = exports.MergeDecisionTypeId = internal.MergeDecisionTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +const Done = exports.Done = internal.Done; +/** + * @since 2.0.0 + * @category constructors + */ +const Await = exports.Await = internal.Await; +/** + * @since 2.0.0 + * @category constructors + */ +const AwaitConst = exports.AwaitConst = internal.AwaitConst; +/** + * Returns `true` if the specified value is a `MergeDecision`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isMergeDecision = exports.isMergeDecision = internal.isMergeDecision; +/** + * @since 2.0.0 + * @category folding + */ +const match = exports.match = internal.match; +//# sourceMappingURL=MergeDecision.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MergeDecision.js.map b/backend/node_modules/effect/dist/cjs/MergeDecision.js.map new file mode 100644 index 0000000000000000000000000000000000000000..90573870426c668827ecb5495a5aa470e2e8f822 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MergeDecision.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MergeDecision.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","MergeDecisionTypeId","exports","Done","Await","AwaitConst","isMergeDecision","match"],"sources":["../../src/MergeDecision.ts"],"sourcesContent":[null],"mappings":";;;;;;AAKA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA+D,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAG/D;;;;AAIO,MAAMkB,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAkBtB,QAAQ,CAACsB,mBAAmB;AAiC9E;;;;AAIO,MAAME,IAAI,GAAAD,OAAA,CAAAC,IAAA,GAA0FxB,QAAQ,CAACwB,IAAI;AAExH;;;;AAIO,MAAMC,KAAK,GAAAF,OAAA,CAAAE,KAAA,GAEoBzB,QAAQ,CAACyB,KAAK;AAEpD;;;;AAIO,MAAMC,UAAU,GAAAH,OAAA,CAAAG,UAAA,GACrB1B,QAAQ,CAAC0B,UAAU;AAErB;;;;;;;AAOO,MAAMC,eAAe,GAAAJ,OAAA,CAAAI,eAAA,GAC1B3B,QAAQ,CAAC2B,eAAe;AAE1B;;;;AAIO,MAAMC,KAAK,GAAAL,OAAA,CAAAK,KAAA,GAsBd5B,QAAQ,CAAC4B,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MergeState.js b/backend/node_modules/effect/dist/cjs/MergeState.js new file mode 100644 index 0000000000000000000000000000000000000000..0763997a1ef87afd53e43a9f439f79874b6df005 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MergeState.js @@ -0,0 +1,65 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.match = exports.isRightDone = exports.isMergeState = exports.isLeftDone = exports.isBothRunning = exports.RightDone = exports.MergeStateTypeId = exports.LeftDone = exports.BothRunning = void 0; +var internal = _interopRequireWildcard(require("./internal/channel/mergeState.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const MergeStateTypeId = exports.MergeStateTypeId = internal.MergeStateTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +const BothRunning = exports.BothRunning = internal.BothRunning; +/** + * @since 2.0.0 + * @category constructors + */ +const LeftDone = exports.LeftDone = internal.LeftDone; +/** + * @since 2.0.0 + * @category constructors + */ +const RightDone = exports.RightDone = internal.RightDone; +/** + * Returns `true` if the specified value is a `MergeState`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isMergeState = exports.isMergeState = internal.isMergeState; +/** + * Returns `true` if the specified `MergeState` is a `BothRunning`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isBothRunning = exports.isBothRunning = internal.isBothRunning; +/** + * Returns `true` if the specified `MergeState` is a `LeftDone`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isLeftDone = exports.isLeftDone = internal.isLeftDone; +/** + * Returns `true` if the specified `MergeState` is a `RightDone`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isRightDone = exports.isRightDone = internal.isRightDone; +/** + * @since 2.0.0 + * @category folding + */ +const match = exports.match = internal.match; +//# sourceMappingURL=MergeState.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MergeState.js.map b/backend/node_modules/effect/dist/cjs/MergeState.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0150185b1cf60876316f2fc87a4e358b2699472d --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MergeState.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MergeState.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","MergeStateTypeId","exports","BothRunning","LeftDone","RightDone","isMergeState","isBothRunning","isLeftDone","isRightDone","match"],"sources":["../../src/MergeState.ts"],"sourcesContent":[null],"mappings":";;;;;;AAOA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA4D,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAE5D;;;;AAIO,MAAMkB,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAkBtB,QAAQ,CAACsB,gBAAgB;AAgExE;;;;AAIO,MAAME,WAAW,GAAAD,OAAA,CAAAC,WAAA,GAG0CxB,QAAQ,CAACwB,WAAW;AAEtF;;;;AAIO,MAAMC,QAAQ,GAAAF,OAAA,CAAAE,QAAA,GAE6CzB,QAAQ,CAACyB,QAAQ;AAEnF;;;;AAIO,MAAMC,SAAS,GAAAH,OAAA,CAAAG,SAAA,GAE4C1B,QAAQ,CAAC0B,SAAS;AAEpF;;;;;;AAMO,MAAMC,YAAY,GAAAJ,OAAA,CAAAI,YAAA,GAEsE3B,QAAQ,CAAC2B,YAAY;AAEpH;;;;;;;AAOO,MAAMC,aAAa,GAAAL,OAAA,CAAAK,aAAA,GAEiD5B,QAAQ,CAAC4B,aAAa;AAEjG;;;;;;;AAOO,MAAMC,UAAU,GAAAN,OAAA,CAAAM,UAAA,GAEiD7B,QAAQ,CAAC6B,UAAU;AAE3F;;;;;;;AAOO,MAAMC,WAAW,GAAAP,OAAA,CAAAO,WAAA,GAEiD9B,QAAQ,CAAC8B,WAAW;AAE7F;;;;AAIO,MAAMC,KAAK,GAAAR,OAAA,CAAAQ,KAAA,GA8Bd/B,QAAQ,CAAC+B,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MergeStrategy.js b/backend/node_modules/effect/dist/cjs/MergeStrategy.js new file mode 100644 index 0000000000000000000000000000000000000000..afac26ac2cd42c55fb297b51392cf4be5547a2b9 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MergeStrategy.js @@ -0,0 +1,59 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.match = exports.isMergeStrategy = exports.isBufferSliding = exports.isBackPressure = exports.MergeStrategyTypeId = exports.BufferSliding = exports.BackPressure = void 0; +var internal = _interopRequireWildcard(require("./internal/channel/mergeStrategy.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * @since 2.0.0 + * @category symbols + */ +const MergeStrategyTypeId = exports.MergeStrategyTypeId = internal.MergeStrategyTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +const BackPressure = exports.BackPressure = internal.BackPressure; +/** + * @since 2.0.0 + * @category constructors + */ +const BufferSliding = exports.BufferSliding = internal.BufferSliding; +/** + * Returns `true` if the specified value is a `MergeStrategy`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isMergeStrategy = exports.isMergeStrategy = internal.isMergeStrategy; +/** + * Returns `true` if the specified `MergeStrategy` is a `BackPressure`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isBackPressure = exports.isBackPressure = internal.isBackPressure; +/** + * Returns `true` if the specified `MergeStrategy` is a `BufferSliding`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isBufferSliding = exports.isBufferSliding = internal.isBufferSliding; +/** + * Folds an `MergeStrategy` into a value of type `A`. + * + * @since 2.0.0 + * @category folding + */ +const match = exports.match = internal.match; +//# sourceMappingURL=MergeStrategy.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MergeStrategy.js.map b/backend/node_modules/effect/dist/cjs/MergeStrategy.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0a7a0129e62ee3e9f1fdf3e04e28e341c5d02e05 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MergeStrategy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MergeStrategy.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","MergeStrategyTypeId","exports","BackPressure","BufferSliding","isMergeStrategy","isBackPressure","isBufferSliding","match"],"sources":["../../src/MergeStrategy.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA+D,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAH/D;;;;AAKA;;;;AAIO,MAAMkB,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAkBtB,QAAQ,CAACsB,mBAAmB;AA2C9E;;;;AAIO,MAAME,YAAY,GAAAD,OAAA,CAAAC,YAAA,GAA+BxB,QAAQ,CAACwB,YAAY;AAE7E;;;;AAIO,MAAMC,aAAa,GAAAF,OAAA,CAAAE,aAAA,GAA+BzB,QAAQ,CAACyB,aAAa;AAE/E;;;;;;;AAOO,MAAMC,eAAe,GAAAH,OAAA,CAAAG,eAAA,GAAuC1B,QAAQ,CAAC0B,eAAe;AAE3F;;;;;;;AAOO,MAAMC,cAAc,GAAAJ,OAAA,CAAAI,cAAA,GAAkD3B,QAAQ,CAAC2B,cAAc;AAEpG;;;;;;;AAOO,MAAMC,eAAe,GAAAL,OAAA,CAAAK,eAAA,GAAmD5B,QAAQ,CAAC4B,eAAe;AAEvG;;;;;;AAMO,MAAMC,KAAK,GAAAN,OAAA,CAAAM,KAAA,GA0Bd7B,QAAQ,CAAC6B,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Metric.js.map b/backend/node_modules/effect/dist/cjs/Metric.js.map new file mode 100644 index 0000000000000000000000000000000000000000..cfb33361121a35ff1836b968530c41209a872e47 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Metric.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Metric.js","names":["fiberRuntime","_interopRequireWildcard","require","internal","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","MetricTypeId","exports","globalMetricRegistry","make","mapInput","counter","frequency","withConstantInput","fromMetricKey","gauge","histogram","increment","incrementBy","map","mapType","modify","snapshot","succeed","sync","summary","summaryTimestamp","tagged","taggedWithLabelsInput","taggedWithLabels","timer","timerWithBoundaries","trackAll","trackDefect","trackDefectWith","trackDuration","trackDurationWith","trackError","trackErrorWith","trackSuccess","trackSuccessWith","update","value","withNow","zip","unsafeSnapshot","fiberStarted","fiberSuccesses","fiberFailures","fiberLifetimes","fiberActive"],"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,MAAMC,YAAY,GAAAvC,OAAA,CAAAuC,YAAA,GAA2B/D,YAAY,CAAC+D,YAAY;AAE7E;;;;AAIO,MAAMC,cAAc,GAAAxC,OAAA,CAAAwC,cAAA,GAA2BhE,YAAY,CAACgE,cAAc;AAEjF;;;;AAIO,MAAMC,aAAa,GAAAzC,OAAA,CAAAyC,aAAA,GAA2BjE,YAAY,CAACiE,aAAa;AAE/E;;;;AAIO,MAAMC,cAAc,GAAA1C,OAAA,CAAA0C,cAAA,GACzBlE,YAAY,CAACkE,cAAc;AAE7B;;;;AAIO,MAAMC,WAAW,GAAA3C,OAAA,CAAA2C,WAAA,GAA2BnE,YAAY,CAACmE,WAAW","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MetricBoundaries.js b/backend/node_modules/effect/dist/cjs/MetricBoundaries.js new file mode 100644 index 0000000000000000000000000000000000000000..3816714e1de5de6d3ea8d4d50c1bbaab3585b5d6 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MetricBoundaries.js @@ -0,0 +1,40 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.linear = exports.isMetricBoundaries = exports.fromIterable = exports.exponential = exports.MetricBoundariesTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/metric/boundaries.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const MetricBoundariesTypeId = exports.MetricBoundariesTypeId = internal.MetricBoundariesTypeId; +/** + * @since 2.0.0 + * @category refinements + */ +const isMetricBoundaries = exports.isMetricBoundaries = internal.isMetricBoundaries; +/** + * @since 2.0.0 + * @category constructors + */ +const fromIterable = exports.fromIterable = internal.fromIterable; +/** + * A helper method to create histogram bucket boundaries for a histogram + * with linear increasing values. + * + * @since 2.0.0 + * @category constructors + */ +const linear = exports.linear = internal.linear; +/** + * A helper method to create histogram bucket boundaries for a histogram + * with exponentially increasing values. + * + * @since 2.0.0 + * @category constructors + */ +const exponential = exports.exponential = internal.exponential; +//# sourceMappingURL=MetricBoundaries.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MetricBoundaries.js.map b/backend/node_modules/effect/dist/cjs/MetricBoundaries.js.map new file mode 100644 index 0000000000000000000000000000000000000000..784c601b7e3b11fdf5b3404f8a45d2dfac4c0b46 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MetricBoundaries.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MetricBoundaries.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","MetricBoundariesTypeId","exports","isMetricBoundaries","fromIterable","linear","exponential"],"sources":["../../src/MetricBoundaries.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA2D,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAG3D;;;;AAIO,MAAMkB,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAkBtB,QAAQ,CAACsB,sBAAsB;AAiBpF;;;;AAIO,MAAME,kBAAkB,GAAAD,OAAA,CAAAC,kBAAA,GAA0CxB,QAAQ,CAACwB,kBAAkB;AAEpG;;;;AAIO,MAAMC,YAAY,GAAAF,OAAA,CAAAE,YAAA,GAAqDzB,QAAQ,CAACyB,YAAY;AAEnG;;;;;;;AAOO,MAAMC,MAAM,GAAAH,OAAA,CAAAG,MAAA,GAMK1B,QAAQ,CAAC0B,MAAM;AAEvC;;;;;;;AAOO,MAAMC,WAAW,GAAAJ,OAAA,CAAAI,WAAA,GAMA3B,QAAQ,CAAC2B,WAAW","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MetricHook.js b/backend/node_modules/effect/dist/cjs/MetricHook.js new file mode 100644 index 0000000000000000000000000000000000000000..4a03cd28b92cab252f85d90b5d5a5b5df5511218 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MetricHook.js @@ -0,0 +1,54 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.summary = exports.onUpdate = exports.onModify = exports.make = exports.histogram = exports.gauge = exports.frequency = exports.counter = exports.MetricHookTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/metric/hook.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const MetricHookTypeId = exports.MetricHookTypeId = internal.MetricHookTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * @since 2.0.0 + * @category constructors + */ +const counter = exports.counter = internal.counter; +/** + * @since 2.0.0 + * @category constructors + */ +const frequency = exports.frequency = internal.frequency; +/** + * @since 2.0.0 + * @category constructors + */ +const gauge = exports.gauge = internal.gauge; +/** + * @since 2.0.0 + * @category constructors + */ +const histogram = exports.histogram = internal.histogram; +/** + * @since 2.0.0 + * @category constructors + */ +const summary = exports.summary = internal.summary; +/** + * @since 2.0.0 + * @category utils + */ +const onUpdate = exports.onUpdate = internal.onUpdate; +/** + * @since 3.6.5 + * @category utils + */ +const onModify = exports.onModify = internal.onModify; +//# sourceMappingURL=MetricHook.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MetricKey.js b/backend/node_modules/effect/dist/cjs/MetricKey.js new file mode 100644 index 0000000000000000000000000000000000000000..1a7d7cdbaca8de32a6a0e37f7d8e8a2b5bf360bc --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MetricKey.js @@ -0,0 +1,70 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.taggedWithLabels = exports.tagged = exports.summary = exports.isMetricKey = exports.histogram = exports.gauge = exports.frequency = exports.counter = exports.MetricKeyTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/metric/key.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const MetricKeyTypeId = exports.MetricKeyTypeId = internal.MetricKeyTypeId; +/** + * @since 2.0.0 + * @category refinements + */ +const isMetricKey = exports.isMetricKey = internal.isMetricKey; +/** + * Creates a metric key for a counter, with the specified name. + * + * @since 2.0.0 + * @category constructors + */ +const counter = exports.counter = internal.counter; +/** + * Creates a metric key for a categorical frequency table, with the specified + * name. + * + * @since 2.0.0 + * @category constructors + */ +const frequency = exports.frequency = internal.frequency; +/** + * Creates a metric key for a gauge, with the specified name. + * + * @since 2.0.0 + * @category constructors + */ +const gauge = exports.gauge = internal.gauge; +/** + * Creates a metric key for a histogram, with the specified name and boundaries. + * + * @since 2.0.0 + * @category constructors + */ +const histogram = exports.histogram = internal.histogram; +/** + * Creates a metric key for a summary, with the specified name, maxAge, + * maxSize, error, and quantiles. + * + * @since 2.0.0 + * @category constructors + */ +const summary = exports.summary = internal.summary; +/** + * Returns a new `MetricKey` with the specified tag appended. + * + * @since 2.0.0 + * @category constructors + */ +const tagged = exports.tagged = internal.tagged; +/** + * Returns a new `MetricKey` with the specified tags appended. + * + * @since 2.0.0 + * @category constructors + */ +const taggedWithLabels = exports.taggedWithLabels = internal.taggedWithLabels; +//# sourceMappingURL=MetricKey.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MetricKey.js.map b/backend/node_modules/effect/dist/cjs/MetricKey.js.map new file mode 100644 index 0000000000000000000000000000000000000000..4d8262de6476f06e3695fdb1436d185b52fd4953 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MetricKey.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MetricKey.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","MetricKeyTypeId","exports","isMetricKey","counter","frequency","gauge","histogram","summary","tagged","taggedWithLabels"],"sources":["../../src/MetricKey.ts"],"sourcesContent":[null],"mappings":";;;;;;AAKA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAoD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAA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abel.js new file mode 100644 index 0000000000000000000000000000000000000000..3f19ab88fb6b335967cef419950bf0d430b98515 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MetricLabel.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.make = exports.isMetricLabel = exports.MetricLabelTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/metric/label.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const MetricLabelTypeId = exports.MetricLabelTypeId = internal.MetricLabelTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * @since 2.0.0 + * @category refinements + */ +const isMetricLabel = exports.isMetricLabel = internal.isMetricLabel; +//# sourceMappingURL=MetricLabel.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MetricLabel.js.map b/backend/node_modules/effect/dist/cjs/MetricLabel.js.map new file mode 100644 index 0000000000000000000000000000000000000000..30d3c8f7690b09628fd368fe927abddb09d505a0 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MetricLabel.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MetricLabel.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","MetricLabelTypeId","exports","make","isMetricLabel"],"sources":["../../src/MetricLabel.ts"],"sourcesContent":[null],"m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,CAAAE,aAAA,GAAqCzB,QAAQ,CAACyB,aAAa","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MetricPair.js b/backend/node_modules/effect/dist/cjs/MetricPair.js new file mode 100644 index 0000000000000000000000000000000000000000..40ff7544f65fed073426214dda654d73f9f9581d --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MetricPair.js @@ -0,0 +1,28 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.unsafeMake = exports.make = exports.MetricPairTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/metric/pair.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * @since 2.0.0 + * @category symbols + */ +const MetricPairTypeId = exports.MetricPairTypeId = internal.MetricPairTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * @since 2.0.0 + * @category unsafe + */ +const unsafeMake = exports.unsafeMake = internal.unsafeMake; +//# sourceMappingURL=MetricPair.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MetricPair.js.map b/backend/node_modules/effect/dist/cjs/MetricPair.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e785b8eda027b97d7d91dadff17885fb0a1b58a7 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MetricPair.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MetricPair.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","MetricPairTypeId","exports","make","unsafeMake"],"sources":["../../src/MetricPair.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAqD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAHrD;;;;AAUA;;;;AAIO,MAAMkB,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAkBtB,QAAQ,CAACsB,gBAAgB;AAwCxE;;;;AAIO,MAAME,IAAI,GAAAD,OAAA,CAAAC,IAAA,GAGSxB,QAAQ,CAACwB,IAAI;AAEvC;;;;AAIO,MAAMC,UAAU,GAAAF,OAAA,CAAAE,UAAA,GAGGzB,QAAQ,CAACyB,UAAU","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MetricPolling.js b/backend/node_modules/effect/dist/cjs/MetricPolling.js new file mode 100644 index 0000000000000000000000000000000000000000..fd4bf71c3ce41893eed8fa08c7249abee31473d5 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MetricPolling.js @@ -0,0 +1,66 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.zip = exports.retry = exports.pollAndUpdate = exports.poll = exports.make = exports.launch = exports.collectAll = exports.MetricPollingTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/metric/polling.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const MetricPollingTypeId = exports.MetricPollingTypeId = internal.MetricPollingTypeId; +/** + * Constructs a new polling metric from a metric and poll effect. + * + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * Collects all of the polling metrics into a single polling metric, which + * polls for, updates, and produces the outputs of all individual metrics. + * + * @since 2.0.0 + * @category constructors + */ +const collectAll = exports.collectAll = internal.collectAll; +/** + * Returns an effect that will launch the polling metric in a background + * fiber, using the specified schedule. + * + * @since 2.0.0 + * @category utils + */ +const launch = exports.launch = internal.launch; +/** + * An effect that polls a value that may be fed to the metric. + * + * @since 2.0.0 + * @category utils + */ +const poll = exports.poll = internal.poll; +/** + * An effect that polls for a value and uses the value to update the metric. + * + * @since 2.0.0 + * @category utils + */ +const pollAndUpdate = exports.pollAndUpdate = internal.pollAndUpdate; +/** + * Returns a new polling metric whose poll function will be retried with the + * specified retry policy. + * + * @since 2.0.0 + * @category constructors + */ +const retry = exports.retry = internal.retry; +/** + * Zips this polling metric with the specified polling metric. + * + * @since 2.0.0 + * @category utils + */ +const zip = exports.zip = internal.zip; +//# sourceMappingURL=MetricPolling.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MetricPolling.js.map b/backend/node_modules/effect/dist/cjs/MetricPolling.js.map new file mode 100644 index 0000000000000000000000000000000000000000..752ca4f49bb66f0501cb1ec3e00711d44c69b7a6 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MetricPolling.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MetricPolling.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","MetricPollingTypeId","exports","make","collectAll","launch","poll","pollAndUpdate","retry","zip"],"sources":["../../src/MetricPolling.ts"],"sourcesContent":[null],"mappings":";;;;;;AAKA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAwD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAA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d7B,QAAQ,CAAC6B,KAAK;AAElB;;;;;;AAMO,MAAMC,GAAG,GAAAP,OAAA,CAAAO,GAAA,GAgCZ9B,QAAQ,CAAC8B,GAAG","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MetricRegistry.js b/backend/node_modules/effect/dist/cjs/MetricRegistry.js new file mode 100644 index 0000000000000000000000000000000000000000..0455c8dfe04a303fe187cbfacf0fc90b3e415b34 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MetricRegistry.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.make = exports.MetricRegistryTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/metric/registry.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * @since 2.0.0 + * @category symbols + */ +const MetricRegistryTypeId = exports.MetricRegistryTypeId = internal.MetricRegistryTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +//# sourceMappingURL=MetricRegistry.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MetricState.js b/backend/node_modules/effect/dist/cjs/MetricState.js new file mode 100644 index 0000000000000000000000000000000000000000..0c3a8f0d777a382abaa187b19ee5ca402f0b3cd1 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MetricState.js @@ -0,0 +1,94 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.summary = exports.isSummaryState = exports.isMetricState = exports.isHistogramState = exports.isGaugeState = exports.isFrequencyState = exports.isCounterState = exports.histogram = exports.gauge = exports.frequency = exports.counter = exports.SummaryStateTypeId = exports.MetricStateTypeId = exports.HistogramStateTypeId = exports.GaugeStateTypeId = exports.FrequencyStateTypeId = exports.CounterStateTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/metric/state.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const MetricStateTypeId = exports.MetricStateTypeId = internal.MetricStateTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +const CounterStateTypeId = exports.CounterStateTypeId = internal.CounterStateTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +const FrequencyStateTypeId = exports.FrequencyStateTypeId = internal.FrequencyStateTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +const GaugeStateTypeId = exports.GaugeStateTypeId = internal.GaugeStateTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +const HistogramStateTypeId = exports.HistogramStateTypeId = internal.HistogramStateTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +const SummaryStateTypeId = exports.SummaryStateTypeId = internal.SummaryStateTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +const counter = exports.counter = internal.counter; +/** + * @since 2.0.0 + * @category constructors + */ +const frequency = exports.frequency = internal.frequency; +/** + * @since 2.0.0 + * @category constructors + */ +const gauge = exports.gauge = internal.gauge; +/** + * @since 2.0.0 + * @category constructors + */ +const histogram = exports.histogram = internal.histogram; +/** + * @since 2.0.0 + * @category constructors + */ +const summary = exports.summary = internal.summary; +/** + * @since 2.0.0 + * @category refinements + */ +const isMetricState = exports.isMetricState = internal.isMetricState; +/** + * @since 2.0.0 + * @category refinements + */ +const isCounterState = exports.isCounterState = internal.isCounterState; +/** + * @since 2.0.0 + * @category refinements + */ +const isFrequencyState = exports.isFrequencyState = internal.isFrequencyState; +/** + * @since 2.0.0 + * @category refinements + */ +const isGaugeState = exports.isGaugeState = internal.isGaugeState; +/** + * @since 2.0.0 + * @category refinements + */ +const isHistogramState = exports.isHistogramState = internal.isHistogramState; +/** + * @since 2.0.0 + * @category refinements + */ +const isSummaryState = exports.isSummaryState = internal.isSummaryState; +//# sourceMappingURL=MetricState.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MetricState.js.map b/backend/node_modules/effect/dist/cjs/MetricState.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c1eb84e6c0c3456fa51c8df322596d533816d6c3 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MetricState.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MetricState.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","MetricStateTypeId","exports","CounterStateTypeId","FrequencyStateTypeId","GaugeStateTypeId","HistogramStateTypeId","SummaryStateTypeId","counter","frequency","gauge","histogram","summary","isMetricState","isCounterState","isFrequencyState","isGaugeState","isHistogramState","isSummaryState"],"sources":["../../src/MetricState.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAsD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,C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,GAAkB3B,QAAQ,CAAC2B,oBAAoB;AAQhF;;;;AAIO,MAAMC,kBAAkB,GAAAL,OAAA,CAAAK,kBAAA,GAAkB5B,QAAQ,CAAC4B,kBAAkB;AA+F5E;;;;AAIO,MAAMC,OAAO,GAAAN,OAAA,CAAAM,OAAA,GAWhB7B,QAAQ,CAAC6B,OAAO;AAEpB;;;;AAIO,MAAMC,SAAS,GAAAP,OAAA,CAAAO,SAAA,GAAwE9B,QAAQ,CAAC8B,SAAS;AAEhH;;;;AAIO,MAAMC,KAAK,GAAAR,OAAA,CAAAQ,KAAA,GAWd/B,QAAQ,CAAC+B,KAAK;AAElB;;;;AAIO,MAAMC,SAAS,GAAAT,OAAA,CAAAS,SAAA,GAQOhC,QAAQ,CAACgC,SAAS;AAE/C;;;;AAIO,MAAMC,OAAO,GAAAV,OAAA,CAAAU,OAAA,GASOjC,QAAQ,CAACiC,OAAO;AAE3C;;;;AAIO,MAAMC,aAAa,GAAAX,OAAA,CAAAW,aAAA,GAA8DlC,QAAQ,CAACkC,aAAa;AAE9G;;;;AAIO,MAAMC,cAAc,GAAAZ,OAAA,CAAAY,cAAA,GAA8DnC,QAAQ,CAACmC,cAAc;AAEhH;;;;AAIO,MAAMC,gBAAgB,GAAAb,OAAA,CAAAa,gBAAA,GAA+CpC,QAAQ,CAACoC,gBAAgB;AAErG;;;;AAIO,MAAMC,YAAY,GAAAd,OAAA,CAAAc,YAAA,GAA4DrC,QAAQ,CAACqC,YAAY;AAE1G;;;;AAIO,MAAMC,gBAAgB,GAAAf,OAAA,CAAAe,gBAAA,GAA+CtC,QAAQ,CAACsC,gBAAgB;AAErG;;;;AAIO,MAAMC,cAAc,GAAAhB,OAAA,CAAAgB,cAAA,GAA6CvC,QAAQ,CAACuC,cAAc","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Micro.js b/backend/node_modules/effect/dist/cjs/Micro.js new file mode 100644 index 0000000000000000000000000000000000000000..a9d7ff36612d173b50a4bb61e0fc94e47df82c2f --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Micro.js @@ -0,0 +1,2582 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.onExit = exports.onError = exports.never = exports.matchEffect = exports.matchCauseEffect = exports.matchCause = exports.match = exports.mapErrorCause = exports.mapError = exports.map = exports.let = exports.isMicroExit = exports.isMicroCause = exports.isMicro = exports.interruptible = exports.interrupt = exports.ignoreLogged = exports.ignore = exports.gen = exports.fromOption = exports.fromEither = exports.forkScoped = exports.forkIn = exports.forkDaemon = exports.fork = exports.forever = exports.forEach = exports.flip = exports.flatten = exports.flatMap = exports.filterOrFailCause = exports.filterOrFail = exports.filterMap = exports.filter = exports.fiberJoin = exports.fiberInterruptAll = exports.fiberInterrupt = exports.fiberAwait = exports.failSync = exports.failCauseSync = exports.failCause = exports.fail = exports.exitVoidAll = exports.exitVoid = exports.exitSucceed = exports.exitIsSuccess = exports.exitIsInterrupt = exports.exitIsFailure = exports.exitIsFail = exports.exitIsDie = exports.exitInterrupt = exports.exitFailCause = exports.exitFail = exports.exitDie = exports.exit = exports.ensuring = exports.either = exports.die = exports.delay = exports.context = exports.causeWithTrace = exports.causeSquash = exports.causeIsInterrupt = exports.causeIsFail = exports.causeIsDie = exports.causeInterrupt = exports.causeFail = exports.causeDie = exports.catchTag = exports.catchIf = exports.catchCauseIf = exports.catchAllDefect = exports.catchAllCause = exports.catchAll = exports.bindTo = exports.bind = exports.async = exports.asVoid = exports.asSome = exports.as = exports.andThen = exports.all = exports.addFinalizer = exports.acquireUseRelease = exports.acquireRelease = exports.TypeId = exports.TimeoutException = exports.TaggedError = exports.NoSuchElementException = exports.MicroScopeTypeId = exports.MicroScope = exports.MicroSchedulerDefault = exports.MicroFiberTypeId = exports.MicroExitTypeId = exports.MicroCauseTypeId = exports.MaxOpsBeforeYield = exports.Error = exports.Do = exports.CurrentScheduler = exports.CurrentConcurrency = void 0; +exports.zipWith = exports.zip = exports.yieldNowWith = exports.yieldNow = exports.yieldFlush = exports.withTrace = exports.withMicroFiber = exports.withConcurrency = exports.whileLoop = exports.when = exports.void = exports.updateService = exports.updateContext = exports.uninterruptibleMask = exports.uninterruptible = exports.tryPromise = exports.try = exports.timeoutOrElse = exports.timeoutOption = exports.timeout = exports.tapErrorCauseIf = exports.tapErrorCause = exports.tapError = exports.tapDefect = exports.tap = exports.sync = exports.suspend = exports.succeedSome = exports.succeedNone = exports.succeed = exports.sleep = exports.serviceOption = exports.service = exports.scoped = exports.scopeUnsafeMake = exports.scopeMake = exports.scope = exports.scheduleWithMaxElapsed = exports.scheduleWithMaxDelay = exports.scheduleUnion = exports.scheduleSpaced = exports.scheduleRecurs = exports.scheduleIntersect = exports.scheduleExponential = exports.scheduleAddDelay = exports.sandbox = exports.runSyncExit = exports.runSync = exports.runPromiseExit = exports.runPromise = exports.runFork = exports.retry = exports.replicateEffect = exports.replicate = exports.repeatExit = exports.repeat = exports.raceFirst = exports.raceAllFirst = exports.raceAll = exports.race = exports.provideServiceEffect = exports.provideService = exports.provideScope = exports.provideContext = exports.promise = exports.orElseSucceed = exports.orDie = exports.option = exports.onInterrupt = exports.onExitIf = void 0; +var Arr = _interopRequireWildcard(require("./Array.js")); +var Context = _interopRequireWildcard(require("./Context.js")); +var Effectable = _interopRequireWildcard(require("./Effectable.js")); +var Either = _interopRequireWildcard(require("./Either.js")); +var Equal = _interopRequireWildcard(require("./Equal.js")); +var _Function = require("./Function.js"); +var _GlobalValue = require("./GlobalValue.js"); +var Hash = _interopRequireWildcard(require("./Hash.js")); +var _Inspectable = require("./Inspectable.js"); +var InternalContext = _interopRequireWildcard(require("./internal/context.js")); +var doNotation = _interopRequireWildcard(require("./internal/doNotation.js")); +var _effectable = require("./internal/effectable.js"); +var Option = _interopRequireWildcard(require("./Option.js")); +var _Pipeable = require("./Pipeable.js"); +var _Predicate = require("./Predicate.js"); +var _Utils = require("./Utils.js"); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * A lightweight alternative to the `Effect` data type, with a subset of the functionality. + * + * @since 3.4.0 + * @experimental + */ + +/** + * @since 3.4.0 + * @experimental + * @category type ids + */ +const TypeId = exports.TypeId = /*#__PURE__*/Symbol.for("effect/Micro"); +/** + * @since 3.4.0 + * @experimental + * @category MicroExit + */ +const MicroExitTypeId = exports.MicroExitTypeId = /*#__PURE__*/Symbol.for("effect/Micro/MicroExit"); +/** + * @since 3.4.0 + * @experimental + * @category guards + */ +const isMicro = u => typeof u === "object" && u !== null && TypeId in u; +// ---------------------------------------------------------------------------- +// MicroCause +// ---------------------------------------------------------------------------- +/** + * @since 3.4.6 + * @experimental + * @category MicroCause + */ +exports.isMicro = isMicro; +const MicroCauseTypeId = exports.MicroCauseTypeId = /*#__PURE__*/Symbol.for("effect/Micro/MicroCause"); +/** + * @since 3.6.6 + * @experimental + * @category guards + */ +const isMicroCause = self => (0, _Predicate.hasProperty)(self, MicroCauseTypeId); +exports.isMicroCause = isMicroCause; +const microCauseVariance = { + _E: _Function.identity +}; +class MicroCauseImpl extends globalThis.Error { + _tag; + traces; + [MicroCauseTypeId]; + constructor(_tag, originalError, traces) { + const causeName = `MicroCause.${_tag}`; + let name; + let message; + let stack; + if (originalError instanceof globalThis.Error) { + name = `(${causeName}) ${originalError.name}`; + message = originalError.message; + const messageLines = message.split("\n").length; + stack = originalError.stack ? `(${causeName}) ${originalError.stack.split("\n").slice(0, messageLines + 3).join("\n")}` : `${name}: ${message}`; + } else { + name = causeName; + message = (0, _Inspectable.toStringUnknown)(originalError, 0); + stack = `${name}: ${message}`; + } + if (traces.length > 0) { + stack += `\n ${traces.join("\n ")}`; + } + super(message); + this._tag = _tag; + this.traces = traces; + this[MicroCauseTypeId] = microCauseVariance; + this.name = name; + this.stack = stack; + } + pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + } + toString() { + return this.stack; + } + [_Inspectable.NodeInspectSymbol]() { + return this.stack; + } +} +class Fail extends MicroCauseImpl { + error; + constructor(error, traces = []) { + super("Fail", error, traces); + this.error = error; + } +} +/** + * @since 3.4.6 + * @experimental + * @category MicroCause + */ +const causeFail = (error, traces = []) => new Fail(error, traces); +exports.causeFail = causeFail; +class Die extends MicroCauseImpl { + defect; + constructor(defect, traces = []) { + super("Die", defect, traces); + this.defect = defect; + } +} +/** + * @since 3.4.6 + * @experimental + * @category MicroCause + */ +const causeDie = (defect, traces = []) => new Die(defect, traces); +exports.causeDie = causeDie; +class Interrupt extends MicroCauseImpl { + constructor(traces = []) { + super("Interrupt", "interrupted", traces); + } +} +/** + * @since 3.4.6 + * @experimental + * @category MicroCause + */ +const causeInterrupt = (traces = []) => new Interrupt(traces); +/** + * @since 3.4.6 + * @experimental + * @category MicroCause + */ +exports.causeInterrupt = causeInterrupt; +const causeIsFail = self => self._tag === "Fail"; +/** + * @since 3.4.6 + * @experimental + * @category MicroCause + */ +exports.causeIsFail = causeIsFail; +const causeIsDie = self => self._tag === "Die"; +/** + * @since 3.4.6 + * @experimental + * @category MicroCause + */ +exports.causeIsDie = causeIsDie; +const causeIsInterrupt = self => self._tag === "Interrupt"; +/** + * @since 3.4.6 + * @experimental + * @category MicroCause + */ +exports.causeIsInterrupt = causeIsInterrupt; +const causeSquash = self => self._tag === "Fail" ? self.error : self._tag === "Die" ? self.defect : self; +/** + * @since 3.4.6 + * @experimental + * @category MicroCause + */ +exports.causeSquash = causeSquash; +const causeWithTrace = exports.causeWithTrace = /*#__PURE__*/(0, _Function.dual)(2, (self, trace) => { + const traces = [...self.traces, trace]; + switch (self._tag) { + case "Die": + return causeDie(self.defect, traces); + case "Interrupt": + return causeInterrupt(traces); + case "Fail": + return causeFail(self.error, traces); + } +}); +// ---------------------------------------------------------------------------- +// MicroFiber +// ---------------------------------------------------------------------------- +/** + * @since 3.11.0 + * @experimental + * @category MicroFiber + */ +const MicroFiberTypeId = exports.MicroFiberTypeId = /*#__PURE__*/Symbol.for("effect/Micro/MicroFiber"); +const fiberVariance = { + _A: _Function.identity, + _E: _Function.identity +}; +class MicroFiberImpl { + context; + interruptible; + [MicroFiberTypeId]; + _stack = []; + _observers = []; + _exit; + _children; + currentOpCount = 0; + constructor(context, interruptible = true) { + this.context = context; + this.interruptible = interruptible; + this[MicroFiberTypeId] = fiberVariance; + } + getRef(ref) { + return InternalContext.unsafeGetReference(this.context, ref); + } + addObserver(cb) { + if (this._exit) { + cb(this._exit); + return _Function.constVoid; + } + this._observers.push(cb); + return () => { + const index = this._observers.indexOf(cb); + if (index >= 0) { + this._observers.splice(index, 1); + } + }; + } + _interrupted = false; + unsafeInterrupt() { + if (this._exit) { + return; + } + this._interrupted = true; + if (this.interruptible) { + this.evaluate(exitInterrupt); + } + } + unsafePoll() { + return this._exit; + } + evaluate(effect) { + if (this._exit) { + return; + } else if (this._yielded !== undefined) { + const yielded = this._yielded; + this._yielded = undefined; + yielded(); + } + const exit = this.runLoop(effect); + if (exit === Yield) { + return; + } + // the interruptChildren middlware is added in Micro.fork, so it can be + // tree-shaken if not used + const interruptChildren = fiberMiddleware.interruptChildren && fiberMiddleware.interruptChildren(this); + if (interruptChildren !== undefined) { + return this.evaluate(flatMap(interruptChildren, () => exit)); + } + this._exit = exit; + for (let i = 0; i < this._observers.length; i++) { + this._observers[i](exit); + } + this._observers.length = 0; + } + runLoop(effect) { + let yielding = false; + let current = effect; + this.currentOpCount = 0; + try { + while (true) { + this.currentOpCount++; + if (!yielding && this.getRef(CurrentScheduler).shouldYield(this)) { + yielding = true; + const prev = current; + current = flatMap(yieldNow, () => prev); + } + current = current[evaluate](this); + if (current === Yield) { + const yielded = this._yielded; + if (MicroExitTypeId in yielded) { + this._yielded = undefined; + return yielded; + } + return Yield; + } + } + } catch (error) { + if (!(0, _Predicate.hasProperty)(current, evaluate)) { + return exitDie(`MicroFiber.runLoop: Not a valid effect: ${String(current)}`); + } + return exitDie(error); + } + } + getCont(symbol) { + while (true) { + const op = this._stack.pop(); + if (!op) return undefined; + const cont = op[ensureCont] && op[ensureCont](this); + if (cont) return { + [symbol]: cont + }; + if (op[symbol]) return op; + } + } + // cancel the yielded operation, or for the yielded exit value + _yielded = undefined; + yieldWith(value) { + this._yielded = value; + return Yield; + } + children() { + return this._children ??= new Set(); + } +} +const fiberMiddleware = /*#__PURE__*/(0, _GlobalValue.globalValue)("effect/Micro/fiberMiddleware", () => ({ + interruptChildren: undefined +})); +const fiberInterruptChildren = fiber => { + if (fiber._children === undefined || fiber._children.size === 0) { + return undefined; + } + return fiberInterruptAll(fiber._children); +}; +/** + * @since 3.11.0 + * @experimental + * @category MicroFiber + */ +const fiberAwait = self => async(resume => sync(self.addObserver(exit => resume(succeed(exit))))); +/** + * @since 3.11.2 + * @experimental + * @category MicroFiber + */ +exports.fiberAwait = fiberAwait; +const fiberJoin = self => flatten(fiberAwait(self)); +/** + * @since 3.11.0 + * @experimental + * @category MicroFiber + */ +exports.fiberJoin = fiberJoin; +const fiberInterrupt = self => suspend(() => { + self.unsafeInterrupt(); + return asVoid(fiberAwait(self)); +}); +/** + * @since 3.11.0 + * @experimental + * @category MicroFiber + */ +exports.fiberInterrupt = fiberInterrupt; +const fiberInterruptAll = fibers => suspend(() => { + for (const fiber of fibers) fiber.unsafeInterrupt(); + const iter = fibers[Symbol.iterator](); + const wait = suspend(() => { + let result = iter.next(); + while (!result.done) { + if (result.value.unsafePoll()) { + result = iter.next(); + continue; + } + const fiber = result.value; + return async(resume => { + fiber.addObserver(_ => { + resume(wait); + }); + }); + } + return exitVoid; + }); + return wait; +}); +exports.fiberInterruptAll = fiberInterruptAll; +const identifier = /*#__PURE__*/Symbol.for("effect/Micro/identifier"); +const args = /*#__PURE__*/Symbol.for("effect/Micro/args"); +const evaluate = /*#__PURE__*/Symbol.for("effect/Micro/evaluate"); +const successCont = /*#__PURE__*/Symbol.for("effect/Micro/successCont"); +const failureCont = /*#__PURE__*/Symbol.for("effect/Micro/failureCont"); +const ensureCont = /*#__PURE__*/Symbol.for("effect/Micro/ensureCont"); +const Yield = /*#__PURE__*/Symbol.for("effect/Micro/Yield"); +const microVariance = { + _A: _Function.identity, + _E: _Function.identity, + _R: _Function.identity +}; +const MicroProto = { + ...Effectable.EffectPrototype, + _op: "Micro", + [TypeId]: microVariance, + pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + }, + [Symbol.iterator]() { + return new _Utils.SingleShotGen(new _Utils.YieldWrap(this)); + }, + toJSON() { + return { + _id: "Micro", + op: this[identifier], + ...(args in this ? { + args: this[args] + } : undefined) + }; + }, + toString() { + return (0, _Inspectable.format)(this); + }, + [_Inspectable.NodeInspectSymbol]() { + return (0, _Inspectable.format)(this); + } +}; +function defaultEvaluate(_fiber) { + return exitDie(`Micro.evaluate: Not implemented`); +} +const makePrimitiveProto = options => ({ + ...MicroProto, + [identifier]: options.op, + [evaluate]: options.eval ?? defaultEvaluate, + [successCont]: options.contA, + [failureCont]: options.contE, + [ensureCont]: options.ensure +}); +const makePrimitive = options => { + const Proto = makePrimitiveProto(options); + return function () { + const self = Object.create(Proto); + self[args] = options.single === false ? arguments : arguments[0]; + return self; + }; +}; +const makeExit = options => { + const Proto = { + ...makePrimitiveProto(options), + [MicroExitTypeId]: MicroExitTypeId, + _tag: options.op, + get [options.prop]() { + return this[args]; + }, + toJSON() { + return { + _id: "MicroExit", + _tag: options.op, + [options.prop]: this[args] + }; + }, + [Equal.symbol](that) { + return isMicroExit(that) && that._tag === options.op && Equal.equals(this[args], that[args]); + }, + [Hash.symbol]() { + return Hash.cached(this, Hash.combine(Hash.string(options.op))(Hash.hash(this[args]))); + } + }; + return function (value) { + const self = Object.create(Proto); + self[args] = value; + self[successCont] = undefined; + self[failureCont] = undefined; + self[ensureCont] = undefined; + return self; + }; +}; +/** + * Creates a `Micro` effect that will succeed with the specified constant value. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +const succeed = exports.succeed = /*#__PURE__*/makeExit({ + op: "Success", + prop: "value", + eval(fiber) { + const cont = fiber.getCont(successCont); + return cont ? cont[successCont](this[args], fiber) : fiber.yieldWith(this); + } +}); +/** + * Creates a `Micro` effect that will fail with the specified `MicroCause`. + * + * @since 3.4.6 + * @experimental + * @category constructors + */ +const failCause = exports.failCause = /*#__PURE__*/makeExit({ + op: "Failure", + prop: "cause", + eval(fiber) { + let cont = fiber.getCont(failureCont); + while (causeIsInterrupt(this[args]) && cont && fiber.interruptible) { + cont = fiber.getCont(failureCont); + } + return cont ? cont[failureCont](this[args], fiber) : fiber.yieldWith(this); + } +}); +/** + * Creates a `Micro` effect that fails with the given error. + * + * This results in a `Fail` variant of the `MicroCause` type, where the error is + * tracked at the type level. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +const fail = error => failCause(causeFail(error)); +/** + * Creates a `Micro` effect that succeeds with a lazily evaluated value. + * + * If the evaluation of the value throws an error, the effect will fail with a + * `Die` variant of the `MicroCause` type. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +exports.fail = fail; +const sync = exports.sync = /*#__PURE__*/makePrimitive({ + op: "Sync", + eval(fiber) { + const value = this[args](); + const cont = fiber.getCont(successCont); + return cont ? cont[successCont](value, fiber) : fiber.yieldWith(exitSucceed(value)); + } +}); +/** + * Lazily creates a `Micro` effect from the given side-effect. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +const suspend = exports.suspend = /*#__PURE__*/makePrimitive({ + op: "Suspend", + eval(_fiber) { + return this[args](); + } +}); +/** + * Pause the execution of the current `Micro` effect, and resume it on the next + * scheduler tick. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +const yieldNowWith = exports.yieldNowWith = /*#__PURE__*/makePrimitive({ + op: "Yield", + eval(fiber) { + let resumed = false; + fiber.getRef(CurrentScheduler).scheduleTask(() => { + if (resumed) return; + fiber.evaluate(exitVoid); + }, this[args] ?? 0); + return fiber.yieldWith(() => { + resumed = true; + }); + } +}); +/** + * Pause the execution of the current `Micro` effect, and resume it on the next + * scheduler tick. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +const yieldNow = exports.yieldNow = /*#__PURE__*/yieldNowWith(0); +/** + * Creates a `Micro` effect that will succeed with the value wrapped in `Some`. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +const succeedSome = a => succeed(Option.some(a)); +/** + * Creates a `Micro` effect that succeeds with `None`. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +exports.succeedSome = succeedSome; +const succeedNone = exports.succeedNone = /*#__PURE__*/succeed(/*#__PURE__*/Option.none()); +/** + * Creates a `Micro` effect that will fail with the lazily evaluated `MicroCause`. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +const failCauseSync = evaluate => suspend(() => failCause(evaluate())); +/** + * Creates a `Micro` effect that will die with the specified error. + * + * This results in a `Die` variant of the `MicroCause` type, where the error is + * not tracked at the type level. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +exports.failCauseSync = failCauseSync; +const die = defect => exitDie(defect); +/** + * Creates a `Micro` effect that will fail with the lazily evaluated error. + * + * This results in a `Fail` variant of the `MicroCause` type, where the error is + * tracked at the type level. + * + * @since 3.4.6 + * @experimental + * @category constructors + */ +exports.die = die; +const failSync = error => suspend(() => fail(error())); +/** + * Converts an `Option` into a `Micro` effect, that will fail with + * `NoSuchElementException` if the option is `None`. Otherwise, it will succeed with the + * value of the option. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +exports.failSync = failSync; +const fromOption = option => option._tag === "Some" ? succeed(option.value) : fail(new NoSuchElementException({})); +/** + * Converts an `Either` into a `Micro` effect, that will fail with the left side + * of the either if it is a `Left`. Otherwise, it will succeed with the right + * side of the either. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +exports.fromOption = fromOption; +const fromEither = either => either._tag === "Right" ? succeed(either.right) : fail(either.left); +exports.fromEither = fromEither; +const void_ = exports.void = /*#__PURE__*/succeed(void 0); +const try_ = options => suspend(() => { + try { + return succeed(options.try()); + } catch (err) { + return fail(options.catch(err)); + } +}); +exports.try = try_; +/** + * Wrap a `Promise` into a `Micro` effect. + * + * Any errors will result in a `Die` variant of the `MicroCause` type, where the + * error is not tracked at the type level. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +const promise = evaluate => asyncOptions(function (resume, signal) { + evaluate(signal).then(a => resume(succeed(a)), e => resume(die(e))); +}, evaluate.length !== 0); +/** + * Wrap a `Promise` into a `Micro` effect. Any errors will be caught and + * converted into a specific error type. + * + * @example + * ```ts + * import { Micro } from "effect" + * + * Micro.tryPromise({ + * try: () => Promise.resolve("success"), + * catch: (cause) => new Error("caught", { cause }) + * }) + * ``` + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +exports.promise = promise; +const tryPromise = options => asyncOptions(function (resume, signal) { + try { + options.try(signal).then(a => resume(succeed(a)), e => resume(fail(options.catch(e)))); + } catch (err) { + resume(fail(options.catch(err))); + } +}, options.try.length !== 0); +/** + * Create a `Micro` effect using the current `MicroFiber`. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +exports.tryPromise = tryPromise; +const withMicroFiber = exports.withMicroFiber = /*#__PURE__*/makePrimitive({ + op: "WithMicroFiber", + eval(fiber) { + return this[args](fiber); + } +}); +/** + * Flush any yielded effects that are waiting to be executed. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +const yieldFlush = exports.yieldFlush = /*#__PURE__*/withMicroFiber(fiber => { + fiber.getRef(CurrentScheduler).flush(); + return exitVoid; +}); +const asyncOptions = /*#__PURE__*/makePrimitive({ + op: "Async", + single: false, + eval(fiber) { + const register = this[args][0]; + let resumed = false; + let yielded = false; + const controller = this[args][1] ? new AbortController() : undefined; + const onCancel = register(effect => { + if (resumed) return; + resumed = true; + if (yielded) { + fiber.evaluate(effect); + } else { + yielded = effect; + } + }, controller?.signal); + if (yielded !== false) return yielded; + yielded = true; + fiber._yielded = () => { + resumed = true; + }; + if (controller === undefined && onCancel === undefined) { + return Yield; + } + fiber._stack.push(asyncFinalizer(() => { + resumed = true; + controller?.abort(); + return onCancel ?? exitVoid; + })); + return Yield; + } +}); +const asyncFinalizer = /*#__PURE__*/makePrimitive({ + op: "AsyncFinalizer", + ensure(fiber) { + if (fiber.interruptible) { + fiber.interruptible = false; + fiber._stack.push(setInterruptible(true)); + } + }, + contE(cause, _fiber) { + return causeIsInterrupt(cause) ? flatMap(this[args](), () => failCause(cause)) : failCause(cause); + } +}); +/** + * Create a `Micro` effect from an asynchronous computation. + * + * You can return a cleanup effect that will be run when the effect is aborted. + * It is also passed an `AbortSignal` that is triggered when the effect is + * aborted. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +const async = register => asyncOptions(register, register.length >= 2); +/** + * A `Micro` that will never succeed or fail. It wraps `setInterval` to prevent + * the Javascript runtime from exiting. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +exports.async = async; +const never = exports.never = /*#__PURE__*/async(function () { + const interval = setInterval(_Function.constVoid, 2147483646); + return sync(() => clearInterval(interval)); +}); +/** + * @since 3.4.0 + * @experimental + * @category constructors + */ +const gen = (...args) => suspend(() => fromIterator(args.length === 1 ? args[0]() : args[1].call(args[0]))); +exports.gen = gen; +const fromIterator = /*#__PURE__*/makePrimitive({ + op: "Iterator", + contA(value, fiber) { + const state = this[args].next(value); + if (state.done) return succeed(state.value); + fiber._stack.push(this); + return (0, _Utils.yieldWrapGet)(state.value); + }, + eval(fiber) { + return this[successCont](undefined, fiber); + } +}); +// ---------------------------------------------------------------------------- +// mapping & sequencing +// ---------------------------------------------------------------------------- +/** + * Create a `Micro` effect that will replace the success value of the given + * effect. + * + * @since 3.4.0 + * @experimental + * @category mapping & sequencing + */ +const as = exports.as = /*#__PURE__*/(0, _Function.dual)(2, (self, value) => map(self, _ => value)); +/** + * Wrap the success value of this `Micro` effect in a `Some`. + * + * @since 3.4.0 + * @experimental + * @category mapping & sequencing + */ +const asSome = self => map(self, Option.some); +/** + * Swap the error and success types of the `Micro` effect. + * + * @since 3.4.0 + * @experimental + * @category mapping & sequencing + */ +exports.asSome = asSome; +const flip = self => matchEffect(self, { + onFailure: succeed, + onSuccess: fail +}); +/** + * A more flexible version of `flatMap` that combines `map` and `flatMap` into a + * single API. + * + * It also lets you directly pass a `Micro` effect, which will be executed after + * the current effect. + * + * @since 3.4.0 + * @experimental + * @category mapping & sequencing + */ +exports.flip = flip; +const andThen = exports.andThen = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => flatMap(self, a => { + const value = isMicro(f) ? f : typeof f === "function" ? f(a) : f; + return isMicro(value) ? value : succeed(value); +})); +/** + * Execute a side effect from the success value of the `Micro` effect. + * + * It is similar to the `andThen` api, but the success value is ignored. + * + * @since 3.4.0 + * @experimental + * @category mapping & sequencing + */ +const tap = exports.tap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => flatMap(self, a => { + const value = isMicro(f) ? f : typeof f === "function" ? f(a) : f; + return isMicro(value) ? as(value, a) : succeed(a); +})); +/** + * Replace the success value of the `Micro` effect with `void`. + * + * @since 3.4.0 + * @experimental + * @category mapping & sequencing + */ +const asVoid = self => flatMap(self, _ => exitVoid); +/** + * Access the `MicroExit` of the given `Micro` effect. + * + * @since 3.4.6 + * @experimental + * @category mapping & sequencing + */ +exports.asVoid = asVoid; +const exit = self => matchCause(self, { + onFailure: exitFailCause, + onSuccess: exitSucceed +}); +/** + * Replace the error type of the given `Micro` with the full `MicroCause` object. + * + * @since 3.4.0 + * @experimental + * @category mapping & sequencing + */ +exports.exit = exit; +const sandbox = self => catchAllCause(self, fail); +/** + * Returns an effect that races all the specified effects, + * yielding the value of the first effect to succeed with a value. Losers of + * the race will be interrupted immediately + * + * @since 3.4.0 + * @experimental + * @category sequencing + */ +exports.sandbox = sandbox; +const raceAll = all => withMicroFiber(parent => async(resume => { + const effects = Arr.fromIterable(all); + const len = effects.length; + let doneCount = 0; + let done = false; + const fibers = new Set(); + const causes = []; + const onExit = exit => { + doneCount++; + if (exit._tag === "Failure") { + causes.push(exit.cause); + if (doneCount >= len) { + resume(failCause(causes[0])); + } + return; + } + done = true; + resume(fibers.size === 0 ? exit : flatMap(uninterruptible(fiberInterruptAll(fibers)), () => exit)); + }; + for (let i = 0; i < len; i++) { + if (done) break; + const fiber = unsafeFork(parent, interruptible(effects[i]), true, true); + fibers.add(fiber); + fiber.addObserver(exit => { + fibers.delete(fiber); + onExit(exit); + }); + } + return fiberInterruptAll(fibers); +})); +/** + * Returns an effect that races all the specified effects, + * yielding the value of the first effect to succeed or fail. Losers of + * the race will be interrupted immediately. + * + * @since 3.4.0 + * @experimental + * @category sequencing + */ +exports.raceAll = raceAll; +const raceAllFirst = all => withMicroFiber(parent => async(resume => { + let done = false; + const fibers = new Set(); + const onExit = exit => { + done = true; + resume(fibers.size === 0 ? exit : flatMap(fiberInterruptAll(fibers), () => exit)); + }; + for (const effect of all) { + if (done) break; + const fiber = unsafeFork(parent, interruptible(effect), true, true); + fibers.add(fiber); + fiber.addObserver(exit => { + fibers.delete(fiber); + onExit(exit); + }); + } + return fiberInterruptAll(fibers); +})); +/** + * Returns an effect that races two effects, yielding the value of the first + * effect to succeed. Losers of the race will be interrupted immediately. + * + * @since 3.4.0 + * @experimental + * @category sequencing + */ +exports.raceAllFirst = raceAllFirst; +const race = exports.race = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => raceAll([self, that])); +/** + * Returns an effect that races two effects, yielding the value of the first + * effect to succeed *or* fail. Losers of the race will be interrupted immediately. + * + * @since 3.4.0 + * @experimental + * @category sequencing + */ +const raceFirst = exports.raceFirst = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => raceAllFirst([self, that])); +/** + * Map the success value of this `Micro` effect to another `Micro` effect, then + * flatten the result. + * + * @since 3.4.0 + * @experimental + * @category mapping & sequencing + */ +const flatMap = exports.flatMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + const onSuccess = Object.create(OnSuccessProto); + onSuccess[args] = self; + onSuccess[successCont] = f; + return onSuccess; +}); +const OnSuccessProto = /*#__PURE__*/makePrimitiveProto({ + op: "OnSuccess", + eval(fiber) { + fiber._stack.push(this); + return this[args]; + } +}); +// ---------------------------------------------------------------------------- +// mapping & sequencing +// ---------------------------------------------------------------------------- +/** + * Flattens any nested `Micro` effects, merging the error and requirement types. + * + * @since 3.4.0 + * @experimental + * @category mapping & sequencing + */ +const flatten = self => flatMap(self, _Function.identity); +/** + * Transforms the success value of the `Micro` effect with the specified + * function. + * + * @since 3.4.0 + * @experimental + * @category mapping & sequencing + */ +exports.flatten = flatten; +const map = exports.map = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => flatMap(self, a => succeed(f(a)))); +/** + * @since 3.4.6 + * @experimental + * @category MicroExit + */ +const isMicroExit = u => (0, _Predicate.hasProperty)(u, MicroExitTypeId); +/** + * @since 3.4.6 + * @experimental + * @category MicroExit + */ +exports.isMicroExit = isMicroExit; +const exitSucceed = exports.exitSucceed = succeed; +/** + * @since 3.4.6 + * @experimental + * @category MicroExit + */ +const exitFailCause = exports.exitFailCause = failCause; +/** + * @since 3.4.6 + * @experimental + * @category MicroExit + */ +const exitInterrupt = exports.exitInterrupt = /*#__PURE__*/exitFailCause(/*#__PURE__*/causeInterrupt()); +/** + * @since 3.4.6 + * @experimental + * @category MicroExit + */ +const exitFail = e => exitFailCause(causeFail(e)); +/** + * @since 3.4.6 + * @experimental + * @category MicroExit + */ +exports.exitFail = exitFail; +const exitDie = defect => exitFailCause(causeDie(defect)); +/** + * @since 3.4.6 + * @experimental + * @category MicroExit + */ +exports.exitDie = exitDie; +const exitIsSuccess = self => self._tag === "Success"; +/** + * @since 3.4.6 + * @experimental + * @category MicroExit + */ +exports.exitIsSuccess = exitIsSuccess; +const exitIsFailure = self => self._tag === "Failure"; +/** + * @since 3.4.6 + * @experimental + * @category MicroExit + */ +exports.exitIsFailure = exitIsFailure; +const exitIsInterrupt = self => exitIsFailure(self) && self.cause._tag === "Interrupt"; +/** + * @since 3.4.6 + * @experimental + * @category MicroExit + */ +exports.exitIsInterrupt = exitIsInterrupt; +const exitIsFail = self => exitIsFailure(self) && self.cause._tag === "Fail"; +/** + * @since 3.4.6 + * @experimental + * @category MicroExit + */ +exports.exitIsFail = exitIsFail; +const exitIsDie = self => exitIsFailure(self) && self.cause._tag === "Die"; +/** + * @since 3.4.6 + * @experimental + * @category MicroExit + */ +exports.exitIsDie = exitIsDie; +const exitVoid = exports.exitVoid = /*#__PURE__*/exitSucceed(void 0); +/** + * @since 3.11.0 + * @experimental + * @category MicroExit + */ +const exitVoidAll = exits => { + for (const exit of exits) { + if (exit._tag === "Failure") { + return exit; + } + } + return exitVoid; +}; +exports.exitVoidAll = exitVoidAll; +const setImmediate = "setImmediate" in globalThis ? globalThis.setImmediate : f => setTimeout(f, 0); +/** + * @since 3.5.9 + * @experimental + * @category scheduler + */ +class MicroSchedulerDefault { + tasks = []; + running = false; + /** + * @since 3.5.9 + */ + scheduleTask(task, _priority) { + this.tasks.push(task); + if (!this.running) { + this.running = true; + setImmediate(this.afterScheduled); + } + } + /** + * @since 3.5.9 + */ + afterScheduled = () => { + this.running = false; + this.runTasks(); + }; + /** + * @since 3.5.9 + */ + runTasks() { + const tasks = this.tasks; + this.tasks = []; + for (let i = 0, len = tasks.length; i < len; i++) { + tasks[i](); + } + } + /** + * @since 3.5.9 + */ + shouldYield(fiber) { + return fiber.currentOpCount >= fiber.getRef(MaxOpsBeforeYield); + } + /** + * @since 3.5.9 + */ + flush() { + while (this.tasks.length > 0) { + this.runTasks(); + } + } +} +/** + * Access the given `Context.Tag` from the environment. + * + * @since 3.4.0 + * @experimental + * @category environment + */ +exports.MicroSchedulerDefault = MicroSchedulerDefault; +const service = tag => withMicroFiber(fiber => succeed(Context.unsafeGet(fiber.context, tag))); +/** + * Access the given `Context.Tag` from the environment, without tracking the + * dependency at the type level. + * + * It will return an `Option` of the service, depending on whether it is + * available in the environment or not. + * + * @since 3.4.0 + * @experimental + * @category environment + */ +exports.service = service; +const serviceOption = tag => withMicroFiber(fiber => succeed(Context.getOption(fiber.context, tag))); +/** + * Update the Context with the given mapping function. + * + * @since 3.11.0 + * @experimental + * @category environment + */ +exports.serviceOption = serviceOption; +const updateContext = exports.updateContext = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => withMicroFiber(fiber => { + const prev = fiber.context; + fiber.context = f(prev); + return onExit(self, () => { + fiber.context = prev; + return void_; + }); +})); +/** + * Update the service for the given `Context.Tag` in the environment. + * + * @since 3.11.0 + * @experimental + * @category environment + */ +const updateService = exports.updateService = /*#__PURE__*/(0, _Function.dual)(3, (self, tag, f) => withMicroFiber(fiber => { + const prev = Context.unsafeGet(fiber.context, tag); + fiber.context = Context.add(fiber.context, tag, f(prev)); + return onExit(self, () => { + fiber.context = Context.add(fiber.context, tag, prev); + return void_; + }); +})); +/** + * Access the current `Context` from the environment. + * + * @since 3.4.0 + * @experimental + * @category environment + */ +const context = () => getContext; +exports.context = context; +const getContext = /*#__PURE__*/withMicroFiber(fiber => succeed(fiber.context)); +/** + * Merge the given `Context` with the current context. + * + * @since 3.4.0 + * @experimental + * @category environment + */ +const provideContext = exports.provideContext = /*#__PURE__*/(0, _Function.dual)(2, (self, provided) => updateContext(self, Context.merge(provided))); +/** + * Add the provided service to the current context. + * + * @since 3.4.0 + * @experimental + * @category environment + */ +const provideService = exports.provideService = /*#__PURE__*/(0, _Function.dual)(3, (self, tag, service) => updateContext(self, Context.add(tag, service))); +/** + * Create a service using the provided `Micro` effect, and add it to the + * current context. + * + * @since 3.4.6 + * @experimental + * @category environment + */ +const provideServiceEffect = exports.provideServiceEffect = /*#__PURE__*/(0, _Function.dual)(3, (self, tag, acquire) => flatMap(acquire, service => provideService(self, tag, service))); +// ======================================================================== +// References +// ======================================================================== +/** + * @since 3.11.0 + * @experimental + * @category references + */ +class MaxOpsBeforeYield extends /*#__PURE__*/Context.Reference()("effect/Micro/currentMaxOpsBeforeYield", { + defaultValue: () => 2048 +}) {} +/** + * @since 3.11.0 + * @experimental + * @category environment refs + */ +exports.MaxOpsBeforeYield = MaxOpsBeforeYield; +class CurrentConcurrency extends /*#__PURE__*/Context.Reference()("effect/Micro/currentConcurrency", { + defaultValue: () => "unbounded" +}) {} +/** + * @since 3.11.0 + * @experimental + * @category environment refs + */ +exports.CurrentConcurrency = CurrentConcurrency; +class CurrentScheduler extends /*#__PURE__*/Context.Reference()("effect/Micro/currentScheduler", { + defaultValue: () => new MicroSchedulerDefault() +}) {} +/** + * If you have a `Micro` that uses `concurrency: "inherit"`, you can use this + * api to control the concurrency of that `Micro` when it is run. + * + * @example + * ```ts + * import * as Micro from "effect/Micro" + * + * Micro.forEach([1, 2, 3], (n) => Micro.succeed(n), { + * concurrency: "inherit" + * }).pipe( + * Micro.withConcurrency(2) // use a concurrency of 2 + * ) + * ``` + * + * @since 3.4.0 + * @experimental + * @category environment refs + */ +exports.CurrentScheduler = CurrentScheduler; +const withConcurrency = exports.withConcurrency = /*#__PURE__*/(0, _Function.dual)(2, (self, concurrency) => provideService(self, CurrentConcurrency, concurrency)); +// ---------------------------------------------------------------------------- +// zipping +// ---------------------------------------------------------------------------- +/** + * Combine two `Micro` effects into a single effect that produces a tuple of + * their results. + * + * @since 3.4.0 + * @experimental + * @category zipping + */ +const zip = exports.zip = /*#__PURE__*/(0, _Function.dual)(args => isMicro(args[1]), (self, that, options) => zipWith(self, that, (a, a2) => [a, a2], options)); +/** + * The `Micro.zipWith` function combines two `Micro` effects and allows you to + * apply a function to the results of the combined effects, transforming them + * into a single value. + * + * @since 3.4.3 + * @experimental + * @category zipping + */ +const zipWith = exports.zipWith = /*#__PURE__*/(0, _Function.dual)(args => isMicro(args[1]), (self, that, f, options) => options?.concurrent +// Use `all` exclusively for concurrent cases, as it introduces additional overhead due to the management of concurrency +? map(all([self, that], { + concurrency: 2 +}), ([a, a2]) => f(a, a2)) : flatMap(self, a => map(that, a2 => f(a, a2)))); +// ---------------------------------------------------------------------------- +// filtering & conditionals +// ---------------------------------------------------------------------------- +/** + * Filter the specified effect with the provided function, failing with specified + * `MicroCause` if the predicate fails. + * + * In addition to the filtering capabilities discussed earlier, you have the option to further + * refine and narrow down the type of the success channel by providing a + * + * @since 3.4.0 + * @experimental + * @category filtering & conditionals + */ +const filterOrFailCause = exports.filterOrFailCause = /*#__PURE__*/(0, _Function.dual)(args => isMicro(args[0]), (self, refinement, orFailWith) => flatMap(self, a => refinement(a) ? succeed(a) : failCause(orFailWith(a)))); +/** + * Filter the specified effect with the provided function, failing with specified + * error if the predicate fails. + * + * In addition to the filtering capabilities discussed earlier, you have the option to further + * refine and narrow down the type of the success channel by providing a + * + * @since 3.4.0 + * @experimental + * @category filtering & conditionals + */ +const filterOrFail = exports.filterOrFail = /*#__PURE__*/(0, _Function.dual)(args => isMicro(args[0]), (self, refinement, orFailWith) => flatMap(self, a => refinement(a) ? succeed(a) : fail(orFailWith(a)))); +/** + * The moral equivalent of `if (p) exp`. + * + * @since 3.4.0 + * @experimental + * @category filtering & conditionals + */ +const when = exports.when = /*#__PURE__*/(0, _Function.dual)(2, (self, condition) => flatMap(isMicro(condition) ? condition : sync(condition), pass => pass ? asSome(self) : succeedNone)); +// ---------------------------------------------------------------------------- +// repetition +// ---------------------------------------------------------------------------- +/** + * Repeat the given `Micro` using the provided options. + * + * The `while` predicate will be checked after each iteration, and can use the + * fall `MicroExit` of the effect to determine if the repetition should continue. + * + * @since 3.4.6 + * @experimental + * @category repetition + */ +const repeatExit = exports.repeatExit = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => suspend(() => { + const startedAt = options.schedule ? Date.now() : 0; + let attempt = 0; + const loop = flatMap(exit(self), exit => { + if (options.while !== undefined && !options.while(exit)) { + return exit; + } else if (options.times !== undefined && attempt >= options.times) { + return exit; + } + attempt++; + let delayEffect = yieldNow; + if (options.schedule !== undefined) { + const elapsed = Date.now() - startedAt; + const duration = options.schedule(attempt, elapsed); + if (Option.isNone(duration)) { + return exit; + } + delayEffect = sleep(duration.value); + } + return flatMap(delayEffect, () => loop); + }); + return loop; +})); +/** + * Repeat the given `Micro` effect using the provided options. Only successful + * results will be repeated. + * + * @since 3.4.0 + * @experimental + * @category repetition + */ +const repeat = exports.repeat = /*#__PURE__*/(0, _Function.dual)(args => isMicro(args[0]), (self, options) => repeatExit(self, { + ...options, + while: exit => exit._tag === "Success" && (options?.while === undefined || options.while(exit.value)) +})); +/** + * Replicates the given effect `n` times. + * + * @since 3.11.0 + * @experimental + * @category repetition + */ +const replicate = exports.replicate = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => Array.from({ + length: n +}, () => self)); +/** + * Performs this effect the specified number of times and collects the + * results. + * + * @since 3.11.0 + * @category repetition + */ +const replicateEffect = exports.replicateEffect = /*#__PURE__*/(0, _Function.dual)(args => isMicro(args[0]), (self, n, options) => all(replicate(self, n), options)); +/** + * Repeat the given `Micro` effect forever, only stopping if the effect fails. + * + * @since 3.4.0 + * @experimental + * @category repetition + */ +const forever = self => repeat(self); +/** + * Create a `MicroSchedule` that will stop repeating after the specified number + * of attempts. + * + * @since 3.4.6 + * @experimental + * @category scheduling + */ +exports.forever = forever; +const scheduleRecurs = n => attempt => attempt <= n ? Option.some(0) : Option.none(); +/** + * Create a `MicroSchedule` that will generate a constant delay. + * + * @since 3.4.6 + * @experimental + * @category scheduling + */ +exports.scheduleRecurs = scheduleRecurs; +const scheduleSpaced = millis => () => Option.some(millis); +/** + * Create a `MicroSchedule` that will generate a delay with an exponential backoff. + * + * @since 3.4.6 + * @experimental + * @category scheduling + */ +exports.scheduleSpaced = scheduleSpaced; +const scheduleExponential = (baseMillis, factor = 2) => attempt => Option.some(Math.pow(factor, attempt) * baseMillis); +/** + * Returns a new `MicroSchedule` with an added calculated delay to each delay + * returned by this schedule. + * + * @since 3.4.6 + * @experimental + * @category scheduling + */ +exports.scheduleExponential = scheduleExponential; +const scheduleAddDelay = exports.scheduleAddDelay = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => (attempt, elapsed) => Option.map(self(attempt, elapsed), duration => duration + f())); +/** + * Transform a `MicroSchedule` to one that will have a delay that will never exceed + * the specified maximum. + * + * @since 3.4.6 + * @experimental + * @category scheduling + */ +const scheduleWithMaxDelay = exports.scheduleWithMaxDelay = /*#__PURE__*/(0, _Function.dual)(2, (self, max) => (attempt, elapsed) => Option.map(self(attempt, elapsed), duration => Math.min(duration, max))); +/** + * Transform a `MicroSchedule` to one that will stop repeating after the specified + * amount of time. + * + * @since 3.4.6 + * @experimental + * @category scheduling + */ +const scheduleWithMaxElapsed = exports.scheduleWithMaxElapsed = /*#__PURE__*/(0, _Function.dual)(2, (self, max) => (attempt, elapsed) => elapsed < max ? self(attempt, elapsed) : Option.none()); +/** + * Combines two `MicroSchedule`s, by recurring if either schedule wants to + * recur, using the minimum of the two durations between recurrences. + * + * @since 3.4.6 + * @experimental + * @category scheduling + */ +const scheduleUnion = exports.scheduleUnion = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => (attempt, elapsed) => Option.zipWith(self(attempt, elapsed), that(attempt, elapsed), (d1, d2) => Math.min(d1, d2))); +/** + * Combines two `MicroSchedule`s, by recurring only if both schedules want to + * recur, using the maximum of the two durations between recurrences. + * + * @since 3.4.6 + * @experimental + * @category scheduling + */ +const scheduleIntersect = exports.scheduleIntersect = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => (attempt, elapsed) => Option.zipWith(self(attempt, elapsed), that(attempt, elapsed), (d1, d2) => Math.max(d1, d2))); +// ---------------------------------------------------------------------------- +// error handling +// ---------------------------------------------------------------------------- +/** + * Catch the full `MicroCause` object of the given `Micro` effect, allowing you to + * recover from any kind of cause. + * + * @since 3.4.6 + * @experimental + * @category error handling + */ +const catchAllCause = exports.catchAllCause = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + const onFailure = Object.create(OnFailureProto); + onFailure[args] = self; + onFailure[failureCont] = f; + return onFailure; +}); +const OnFailureProto = /*#__PURE__*/makePrimitiveProto({ + op: "OnFailure", + eval(fiber) { + fiber._stack.push(this); + return this[args]; + } +}); +/** + * Selectively catch a `MicroCause` object of the given `Micro` effect, + * using the provided predicate to determine if the failure should be caught. + * + * @since 3.4.6 + * @experimental + * @category error handling + */ +const catchCauseIf = exports.catchCauseIf = /*#__PURE__*/(0, _Function.dual)(3, (self, predicate, f) => catchAllCause(self, cause => predicate(cause) ? f(cause) : failCause(cause))); +/** + * Catch the error of the given `Micro` effect, allowing you to recover from it. + * + * It only catches expected errors. + * + * @since 3.4.6 + * @experimental + * @category error handling + */ +const catchAll = exports.catchAll = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => catchCauseIf(self, causeIsFail, cause => f(cause.error))); +/** + * Catch any unexpected errors of the given `Micro` effect, allowing you to recover from them. + * + * @since 3.4.6 + * @experimental + * @category error handling + */ +const catchAllDefect = exports.catchAllDefect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => catchCauseIf(self, causeIsDie, die => f(die.defect))); +/** + * Perform a side effect using the full `MicroCause` object of the given `Micro`. + * + * @since 3.4.6 + * @experimental + * @category error handling + */ +const tapErrorCause = exports.tapErrorCause = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => tapErrorCauseIf(self, _Function.constTrue, f)); +/** + * Perform a side effect using if a `MicroCause` object matches the specified + * predicate. + * + * @since 3.4.0 + * @experimental + * @category error handling + */ +const tapErrorCauseIf = exports.tapErrorCauseIf = /*#__PURE__*/(0, _Function.dual)(3, (self, refinement, f) => catchCauseIf(self, refinement, cause => andThen(f(cause), failCause(cause)))); +/** + * Perform a side effect from expected errors of the given `Micro`. + * + * @since 3.4.6 + * @experimental + * @category error handling + */ +const tapError = exports.tapError = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => tapErrorCauseIf(self, causeIsFail, fail => f(fail.error))); +/** + * Perform a side effect from unexpected errors of the given `Micro`. + * + * @since 3.4.6 + * @experimental + * @category error handling + */ +const tapDefect = exports.tapDefect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => tapErrorCauseIf(self, causeIsDie, die => f(die.defect))); +/** + * Catch any expected errors that match the specified predicate. + * + * @since 3.4.0 + * @experimental + * @category error handling + */ +const catchIf = exports.catchIf = /*#__PURE__*/(0, _Function.dual)(3, (self, predicate, f) => catchCauseIf(self, f => causeIsFail(f) && predicate(f.error), fail => f(fail.error))); +/** + * Recovers from the specified tagged error. + * + * @since 3.4.0 + * @experimental + * @category error handling + */ +const catchTag = exports.catchTag = /*#__PURE__*/(0, _Function.dual)(3, (self, k, f) => catchIf(self, (0, _Predicate.isTagged)(k), f)); +/** + * Transform the full `MicroCause` object of the given `Micro` effect. + * + * @since 3.4.6 + * @experimental + * @category error handling + */ +const mapErrorCause = exports.mapErrorCause = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => catchAllCause(self, cause => failCause(f(cause)))); +/** + * Transform any expected errors of the given `Micro` effect. + * + * @since 3.4.0 + * @experimental + * @category error handling + */ +const mapError = exports.mapError = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => catchAll(self, error => fail(f(error)))); +/** + * Elevate any expected errors of the given `Micro` effect to unexpected errors, + * resulting in an error type of `never`. + * + * @since 3.4.0 + * @experimental + * @category error handling + */ +const orDie = self => catchAll(self, die); +/** + * Recover from all errors by succeeding with the given value. + * + * @since 3.4.0 + * @experimental + * @category error handling + */ +exports.orDie = orDie; +const orElseSucceed = exports.orElseSucceed = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => catchAll(self, _ => sync(f))); +/** + * Ignore any expected errors of the given `Micro` effect, returning `void`. + * + * @since 3.4.0 + * @experimental + * @category error handling + */ +const ignore = self => matchEffect(self, { + onFailure: _ => void_, + onSuccess: _ => void_ +}); +/** + * Ignore any expected errors of the given `Micro` effect, returning `void`. + * + * @since 3.4.0 + * @experimental + * @category error handling + */ +exports.ignore = ignore; +const ignoreLogged = self => matchEffect(self, { + // eslint-disable-next-line no-console + onFailure: error => sync(() => console.error(error)), + onSuccess: _ => void_ +}); +/** + * Replace the success value of the given `Micro` effect with an `Option`, + * wrapping the success value in `Some` and returning `None` if the effect fails + * with an expected error. + * + * @since 3.4.0 + * @experimental + * @category error handling + */ +exports.ignoreLogged = ignoreLogged; +const option = self => match(self, { + onFailure: Option.none, + onSuccess: Option.some +}); +/** + * Replace the success value of the given `Micro` effect with an `Either`, + * wrapping the success value in `Right` and wrapping any expected errors with + * a `Left`. + * + * @since 3.4.0 + * @experimental + * @category error handling + */ +exports.option = option; +const either = self => match(self, { + onFailure: Either.left, + onSuccess: Either.right +}); +/** + * Retry the given `Micro` effect using the provided options. + * + * @since 3.4.0 + * @experimental + * @category error handling + */ +exports.either = either; +const retry = exports.retry = /*#__PURE__*/(0, _Function.dual)(args => isMicro(args[0]), (self, options) => repeatExit(self, { + ...options, + while: exit => exit._tag === "Failure" && exit.cause._tag === "Fail" && (options?.while === undefined || options.while(exit.cause.error)) +})); +/** + * Add a stack trace to any failures that occur in the effect. The trace will be + * added to the `traces` field of the `MicroCause` object. + * + * @since 3.4.0 + * @experimental + * @category error handling + */ +const withTrace = function () { + const prevLimit = globalThis.Error.stackTraceLimit; + globalThis.Error.stackTraceLimit = 2; + const error = new globalThis.Error(); + globalThis.Error.stackTraceLimit = prevLimit; + function generate(name, cause) { + const stack = error.stack; + if (!stack) { + return cause; + } + const line = stack.split("\n")[2]?.trim().replace(/^at /, ""); + if (!line) { + return cause; + } + const lineMatch = line.match(/\((.*)\)$/); + return causeWithTrace(cause, `at ${name} (${lineMatch ? lineMatch[1] : line})`); + } + const f = name => self => onError(self, cause => failCause(generate(name, cause))); + if (arguments.length === 2) { + return f(arguments[1])(arguments[0]); + } + return f(arguments[0]); +}; +// ---------------------------------------------------------------------------- +// pattern matching +// ---------------------------------------------------------------------------- +/** + * @since 3.4.6 + * @experimental + * @category pattern matching + */ +exports.withTrace = withTrace; +const matchCauseEffect = exports.matchCauseEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => { + const primitive = Object.create(OnSuccessAndFailureProto); + primitive[args] = self; + primitive[successCont] = options.onSuccess; + primitive[failureCont] = options.onFailure; + return primitive; +}); +const OnSuccessAndFailureProto = /*#__PURE__*/makePrimitiveProto({ + op: "OnSuccessAndFailure", + eval(fiber) { + fiber._stack.push(this); + return this[args]; + } +}); +/** + * @since 3.4.6 + * @experimental + * @category pattern matching + */ +const matchCause = exports.matchCause = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => matchCauseEffect(self, { + onFailure: cause => sync(() => options.onFailure(cause)), + onSuccess: value => sync(() => options.onSuccess(value)) +})); +/** + * @since 3.4.6 + * @experimental + * @category pattern matching + */ +const matchEffect = exports.matchEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => matchCauseEffect(self, { + onFailure: cause => cause._tag === "Fail" ? options.onFailure(cause.error) : failCause(cause), + onSuccess: options.onSuccess +})); +/** + * @since 3.4.0 + * @experimental + * @category pattern matching + */ +const match = exports.match = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => matchEffect(self, { + onFailure: error => sync(() => options.onFailure(error)), + onSuccess: value => sync(() => options.onSuccess(value)) +})); +// ---------------------------------------------------------------------------- +// delays & timeouts +// ---------------------------------------------------------------------------- +/** + * Create a `Micro` effect that will sleep for the specified duration. + * + * @since 3.4.0 + * @experimental + * @category delays & timeouts + */ +const sleep = millis => async(resume => { + const timeout = setTimeout(() => { + resume(void_); + }, millis); + return sync(() => { + clearTimeout(timeout); + }); +}); +/** + * Returns an effect that will delay the execution of this effect by the + * specified duration. + * + * @since 3.4.0 + * @experimental + * @category delays & timeouts + */ +exports.sleep = sleep; +const delay = exports.delay = /*#__PURE__*/(0, _Function.dual)(2, (self, millis) => andThen(sleep(millis), self)); +/** + * Returns an effect that will timeout this effect, that will execute the + * fallback effect if the timeout elapses before the effect has produced a value. + * + * If the timeout elapses, the running effect will be safely interrupted. + * + * @since 3.4.0 + * @experimental + * @category delays & timeouts + */ +const timeoutOrElse = exports.timeoutOrElse = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => raceFirst(self, andThen(interruptible(sleep(options.duration)), options.onTimeout))); +/** + * Returns an effect that will timeout this effect, that will fail with a + * `TimeoutException` if the timeout elapses before the effect has produced a + * value. + * + * If the timeout elapses, the running effect will be safely interrupted. + * + * @since 3.4.0 + * @experimental + * @category delays & timeouts + */ +const timeout = exports.timeout = /*#__PURE__*/(0, _Function.dual)(2, (self, millis) => timeoutOrElse(self, { + duration: millis, + onTimeout: () => fail(new TimeoutException()) +})); +/** + * Returns an effect that will timeout this effect, succeeding with a `None` + * if the timeout elapses before the effect has produced a value; and `Some` of + * the produced value otherwise. + * + * If the timeout elapses, the running effect will be safely interrupted. + * + * @since 3.4.0 + * @experimental + * @category delays & timeouts + */ +const timeoutOption = exports.timeoutOption = /*#__PURE__*/(0, _Function.dual)(2, (self, millis) => raceFirst(asSome(self), as(interruptible(sleep(millis)), Option.none()))); +// ---------------------------------------------------------------------------- +// resources & finalization +// ---------------------------------------------------------------------------- +/** + * @since 3.4.0 + * @experimental + * @category resources & finalization + */ +const MicroScopeTypeId = exports.MicroScopeTypeId = /*#__PURE__*/Symbol.for("effect/Micro/MicroScope"); +/** + * @since 3.4.0 + * @experimental + * @category resources & finalization + */ +const MicroScope = exports.MicroScope = /*#__PURE__*/Context.GenericTag("effect/Micro/MicroScope"); +class MicroScopeImpl { + [MicroScopeTypeId]; + state = { + _tag: "Open", + finalizers: /*#__PURE__*/new Set() + }; + constructor() { + this[MicroScopeTypeId] = MicroScopeTypeId; + } + unsafeAddFinalizer(finalizer) { + if (this.state._tag === "Open") { + this.state.finalizers.add(finalizer); + } + } + addFinalizer(finalizer) { + return suspend(() => { + if (this.state._tag === "Open") { + this.state.finalizers.add(finalizer); + return void_; + } + return finalizer(this.state.exit); + }); + } + unsafeRemoveFinalizer(finalizer) { + if (this.state._tag === "Open") { + this.state.finalizers.delete(finalizer); + } + } + close(microExit) { + return suspend(() => { + if (this.state._tag === "Open") { + const finalizers = Array.from(this.state.finalizers).reverse(); + this.state = { + _tag: "Closed", + exit: microExit + }; + return flatMap(forEach(finalizers, finalizer => exit(finalizer(microExit))), exitVoidAll); + } + return void_; + }); + } + get fork() { + return sync(() => { + const newScope = new MicroScopeImpl(); + if (this.state._tag === "Closed") { + newScope.state = this.state; + return newScope; + } + function fin(exit) { + return newScope.close(exit); + } + this.state.finalizers.add(fin); + newScope.unsafeAddFinalizer(_ => sync(() => this.unsafeRemoveFinalizer(fin))); + return newScope; + }); + } +} +/** + * @since 3.4.0 + * @experimental + * @category resources & finalization + */ +const scopeMake = exports.scopeMake = /*#__PURE__*/sync(() => new MicroScopeImpl()); +/** + * @since 3.4.0 + * @experimental + * @category resources & finalization + */ +const scopeUnsafeMake = () => new MicroScopeImpl(); +/** + * Access the current `MicroScope`. + * + * @since 3.4.0 + * @experimental + * @category resources & finalization + */ +exports.scopeUnsafeMake = scopeUnsafeMake; +const scope = exports.scope = /*#__PURE__*/service(MicroScope); +/** + * Provide a `MicroScope` to an effect. + * + * @since 3.4.0 + * @experimental + * @category resources & finalization + */ +const provideScope = exports.provideScope = /*#__PURE__*/(0, _Function.dual)(2, (self, scope) => provideService(self, MicroScope, scope)); +/** + * Provide a `MicroScope` to the given effect, closing it after the effect has + * finished executing. + * + * @since 3.4.0 + * @experimental + * @category resources & finalization + */ +const scoped = self => suspend(() => { + const scope = new MicroScopeImpl(); + return onExit(provideService(self, MicroScope, scope), exit => scope.close(exit)); +}); +/** + * Create a resource with a cleanup `Micro` effect, ensuring the cleanup is + * executed when the `MicroScope` is closed. + * + * @since 3.4.0 + * @experimental + * @category resources & finalization + */ +exports.scoped = scoped; +const acquireRelease = (acquire, release) => uninterruptible(flatMap(scope, scope => tap(acquire, a => scope.addFinalizer(exit => release(a, exit))))); +/** + * Add a finalizer to the current `MicroScope`. + * + * @since 3.4.0 + * @experimental + * @category resources & finalization + */ +exports.acquireRelease = acquireRelease; +const addFinalizer = finalizer => flatMap(scope, scope => scope.addFinalizer(finalizer)); +/** + * When the `Micro` effect is completed, run the given finalizer effect with the + * `MicroExit` of the executed effect. + * + * @since 3.4.6 + * @experimental + * @category resources & finalization + */ +exports.addFinalizer = addFinalizer; +const onExit = exports.onExit = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => uninterruptibleMask(restore => matchCauseEffect(restore(self), { + onFailure: cause => flatMap(f(exitFailCause(cause)), () => failCause(cause)), + onSuccess: a => flatMap(f(exitSucceed(a)), () => succeed(a)) +}))); +/** + * Regardless of the result of the this `Micro` effect, run the finalizer effect. + * + * @since 3.4.0 + * @experimental + * @category resources & finalization + */ +const ensuring = exports.ensuring = /*#__PURE__*/(0, _Function.dual)(2, (self, finalizer) => onExit(self, _ => finalizer)); +/** + * When the `Micro` effect is completed, run the given finalizer effect if it + * matches the specified predicate. + * + * @since 3.4.6 + * @experimental + * @category resources & finalization + */ +const onExitIf = exports.onExitIf = /*#__PURE__*/(0, _Function.dual)(3, (self, refinement, f) => onExit(self, exit => refinement(exit) ? f(exit) : exitVoid)); +/** + * When the `Micro` effect fails, run the given finalizer effect with the + * `MicroCause` of the executed effect. + * + * @since 3.4.6 + * @experimental + * @category resources & finalization + */ +const onError = exports.onError = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => onExitIf(self, exitIsFailure, exit => f(exit.cause))); +/** + * If this `Micro` effect is aborted, run the finalizer effect. + * + * @since 3.4.6 + * @experimental + * @category resources & finalization + */ +const onInterrupt = exports.onInterrupt = /*#__PURE__*/(0, _Function.dual)(2, (self, finalizer) => onExitIf(self, exitIsInterrupt, _ => finalizer)); +/** + * Acquire a resource, use it, and then release the resource when the `use` + * effect has completed. + * + * @since 3.4.0 + * @experimental + * @category resources & finalization + */ +const acquireUseRelease = (acquire, use, release) => uninterruptibleMask(restore => flatMap(acquire, a => flatMap(exit(restore(use(a))), exit => andThen(release(a, exit), exit)))); +// ---------------------------------------------------------------------------- +// interruption +// ---------------------------------------------------------------------------- +/** + * Abort the current `Micro` effect. + * + * @since 3.4.6 + * @experimental + * @category interruption + */ +exports.acquireUseRelease = acquireUseRelease; +const interrupt = exports.interrupt = /*#__PURE__*/failCause(/*#__PURE__*/causeInterrupt()); +/** + * Flag the effect as uninterruptible, which means that when the effect is + * interrupted, it will be allowed to continue running until completion. + * + * @since 3.4.0 + * @experimental + * @category flags + */ +const uninterruptible = self => withMicroFiber(fiber => { + if (!fiber.interruptible) return self; + fiber.interruptible = false; + fiber._stack.push(setInterruptible(true)); + return self; +}); +exports.uninterruptible = uninterruptible; +const setInterruptible = /*#__PURE__*/makePrimitive({ + op: "SetInterruptible", + ensure(fiber) { + fiber.interruptible = this[args]; + if (fiber._interrupted && fiber.interruptible) { + return () => exitInterrupt; + } + } +}); +/** + * Flag the effect as interruptible, which means that when the effect is + * interrupted, it will be interrupted immediately. + * + * @since 3.4.0 + * @experimental + * @category flags + */ +const interruptible = self => withMicroFiber(fiber => { + if (fiber.interruptible) return self; + fiber.interruptible = true; + fiber._stack.push(setInterruptible(false)); + if (fiber._interrupted) return exitInterrupt; + return self; +}); +/** + * Wrap the given `Micro` effect in an uninterruptible region, preventing the + * effect from being aborted. + * + * You can use the `restore` function to restore a `Micro` effect to the + * interruptibility state before the `uninterruptibleMask` was applied. + * + * @example + * ```ts + * import * as Micro from "effect/Micro" + * + * Micro.uninterruptibleMask((restore) => + * Micro.sleep(1000).pipe( // uninterruptible + * Micro.andThen(restore(Micro.sleep(1000))) // interruptible + * ) + * ) + * ``` + * + * @since 3.4.0 + * @experimental + * @category interruption + */ +exports.interruptible = interruptible; +const uninterruptibleMask = f => withMicroFiber(fiber => { + if (!fiber.interruptible) return f(_Function.identity); + fiber.interruptible = false; + fiber._stack.push(setInterruptible(true)); + return f(interruptible); +}); +/** + * Runs all the provided effects in sequence respecting the structure provided in input. + * + * Supports multiple arguments, a single argument tuple / array or record / struct. + * + * @since 3.4.0 + * @experimental + * @category collecting & elements + */ +exports.uninterruptibleMask = uninterruptibleMask; +const all = (arg, options) => { + if (Array.isArray(arg) || (0, _Predicate.isIterable)(arg)) { + return forEach(arg, _Function.identity, options); + } else if (options?.discard) { + return forEach(Object.values(arg), _Function.identity, options); + } + return suspend(() => { + const out = {}; + return as(forEach(Object.entries(arg), ([key, effect]) => map(effect, value => { + out[key] = value; + }), { + discard: true, + concurrency: options?.concurrency + }), out); + }); +}; +/** + * @since 3.11.0 + * @experimental + * @category collecting & elements + */ +exports.all = all; +const whileLoop = exports.whileLoop = /*#__PURE__*/makePrimitive({ + op: "While", + contA(value, fiber) { + this[args].step(value); + if (this[args].while()) { + fiber._stack.push(this); + return this[args].body(); + } + return exitVoid; + }, + eval(fiber) { + if (this[args].while()) { + fiber._stack.push(this); + return this[args].body(); + } + return exitVoid; + } +}); +/** + * For each element of the provided iterable, run the effect and collect the + * results. + * + * If the `discard` option is set to `true`, the results will be discarded and + * the effect will return `void`. + * + * The `concurrency` option can be set to control how many effects are run + * concurrently. By default, the effects are run sequentially. + * + * @since 3.4.0 + * @experimental + * @category collecting & elements + */ +const forEach = (iterable, f, options) => withMicroFiber(parent => { + const concurrencyOption = options?.concurrency === "inherit" ? parent.getRef(CurrentConcurrency) : options?.concurrency ?? 1; + const concurrency = concurrencyOption === "unbounded" ? Number.POSITIVE_INFINITY : Math.max(1, concurrencyOption); + const items = Arr.fromIterable(iterable); + let length = items.length; + if (length === 0) { + return options?.discard ? void_ : succeed([]); + } + const out = options?.discard ? undefined : new Array(length); + let index = 0; + if (concurrency === 1) { + return as(whileLoop({ + while: () => index < items.length, + body: () => f(items[index], index), + step: out ? b => out[index++] = b : _ => index++ + }), out); + } + return async(resume => { + const fibers = new Set(); + let result = undefined; + let inProgress = 0; + let doneCount = 0; + let pumping = false; + let interrupted = false; + function pump() { + pumping = true; + while (inProgress < concurrency && index < length) { + const currentIndex = index; + const item = items[currentIndex]; + index++; + inProgress++; + try { + const child = unsafeFork(parent, f(item, currentIndex), true, true); + fibers.add(child); + child.addObserver(exit => { + fibers.delete(child); + if (interrupted) { + return; + } else if (exit._tag === "Failure") { + if (result === undefined) { + result = exit; + length = index; + fibers.forEach(fiber => fiber.unsafeInterrupt()); + } + } else if (out !== undefined) { + out[currentIndex] = exit.value; + } + doneCount++; + inProgress--; + if (doneCount === length) { + resume(result ?? succeed(out)); + } else if (!pumping && inProgress < concurrency) { + pump(); + } + }); + } catch (err) { + result = exitDie(err); + length = index; + fibers.forEach(fiber => fiber.unsafeInterrupt()); + } + } + pumping = false; + } + pump(); + return suspend(() => { + interrupted = true; + index = length; + return fiberInterruptAll(fibers); + }); + }); +}); +/** + * Effectfully filter the elements of the provided iterable. + * + * Use the `concurrency` option to control how many elements are processed + * concurrently. + * + * @since 3.4.0 + * @experimental + * @category collecting & elements + */ +exports.forEach = forEach; +const filter = (iterable, f, options) => filterMap(iterable, a => map(f(a), pass => { + pass = options?.negate ? !pass : pass; + return pass ? Option.some(a) : Option.none(); +}), options); +/** + * Effectfully filter the elements of the provided iterable. + * + * Use the `concurrency` option to control how many elements are processed + * concurrently. + * + * @since 3.4.0 + * @experimental + * @category collecting & elements + */ +exports.filter = filter; +const filterMap = (iterable, f, options) => suspend(() => { + const out = []; + return as(forEach(iterable, a => map(f(a), o => { + if (o._tag === "Some") { + out.push(o.value); + } + }), { + discard: true, + concurrency: options?.concurrency + }), out); +}); +// ---------------------------------------------------------------------------- +// do notation +// ---------------------------------------------------------------------------- +/** + * Start a do notation block. + * + * @since 3.4.0 + * @experimental + * @category do notation + */ +exports.filterMap = filterMap; +const Do = exports.Do = /*#__PURE__*/succeed({}); +/** + * Bind the success value of this `Micro` effect to the provided name. + * + * @since 3.4.0 + * @experimental + * @category do notation + */ +const bindTo = exports.bindTo = /*#__PURE__*/doNotation.bindTo(map); +/** + * Bind the success value of this `Micro` effect to the provided name. + * + * @since 3.4.0 + * @experimental + * @category do notation + */ +const bind = exports.bind = /*#__PURE__*/doNotation.bind(map, flatMap); +const let_ = exports.let = /*#__PURE__*/doNotation.let_(map); +// ---------------------------------------------------------------------------- +// fibers & forking +// ---------------------------------------------------------------------------- +/** + * Run the `Micro` effect in a new `MicroFiber` that can be awaited, joined, or + * aborted. + * + * When the parent `Micro` finishes, this `Micro` will be aborted. + * + * @since 3.4.0 + * @experimental + * @category fiber & forking + */ +const fork = self => withMicroFiber(fiber => { + fiberMiddleware.interruptChildren ??= fiberInterruptChildren; + return succeed(unsafeFork(fiber, self)); +}); +exports.fork = fork; +const unsafeFork = (parent, effect, immediate = false, daemon = false) => { + const child = new MicroFiberImpl(parent.context, parent.interruptible); + if (!daemon) { + parent.children().add(child); + child.addObserver(() => parent.children().delete(child)); + } + if (immediate) { + child.evaluate(effect); + } else { + parent.getRef(CurrentScheduler).scheduleTask(() => child.evaluate(effect), 0); + } + return child; +}; +/** + * Run the `Micro` effect in a new `MicroFiber` that can be awaited, joined, or + * aborted. + * + * It will not be aborted when the parent `Micro` finishes. + * + * @since 3.4.0 + * @experimental + * @category fiber & forking + */ +const forkDaemon = self => withMicroFiber(fiber => succeed(unsafeFork(fiber, self, false, true))); +/** + * Run the `Micro` effect in a new `MicroFiber` that can be awaited, joined, or + * aborted. + * + * The lifetime of the handle will be attached to the provided `MicroScope`. + * + * @since 3.4.0 + * @experimental + * @category fiber & forking + */ +exports.forkDaemon = forkDaemon; +const forkIn = exports.forkIn = /*#__PURE__*/(0, _Function.dual)(2, (self, scope) => uninterruptibleMask(restore => flatMap(scope.fork, scope => tap(restore(forkDaemon(onExit(self, exit => scope.close(exit)))), fiber => scope.addFinalizer(_ => fiberInterrupt(fiber)))))); +/** + * Run the `Micro` effect in a new `MicroFiber` that can be awaited, joined, or + * aborted. + * + * The lifetime of the handle will be attached to the current `MicroScope`. + * + * @since 3.4.0 + * @experimental + * @category fiber & forking + */ +const forkScoped = self => flatMap(scope, scope => forkIn(self, scope)); +// ---------------------------------------------------------------------------- +// execution +// ---------------------------------------------------------------------------- +/** + * Execute the `Micro` effect and return a `MicroFiber` that can be awaited, joined, + * or aborted. + * + * You can listen for the result by adding an observer using the handle's + * `addObserver` method. + * + * @example + * ```ts + * import * as Micro from "effect/Micro" + * + * const handle = Micro.succeed(42).pipe( + * Micro.delay(1000), + * Micro.runFork + * ) + * + * handle.addObserver((exit) => { + * console.log(exit) + * }) + * ``` + * + * @since 3.4.0 + * @experimental + * @category execution + */ +exports.forkScoped = forkScoped; +const runFork = (effect, options) => { + const fiber = new MicroFiberImpl(CurrentScheduler.context(options?.scheduler ?? new MicroSchedulerDefault())); + fiber.evaluate(effect); + if (options?.signal) { + if (options.signal.aborted) { + fiber.unsafeInterrupt(); + } else { + const abort = () => fiber.unsafeInterrupt(); + options.signal.addEventListener("abort", abort, { + once: true + }); + fiber.addObserver(() => options.signal.removeEventListener("abort", abort)); + } + } + return fiber; +}; +/** + * Execute the `Micro` effect and return a `Promise` that resolves with the + * `MicroExit` of the computation. + * + * @since 3.4.6 + * @experimental + * @category execution + */ +exports.runFork = runFork; +const runPromiseExit = (effect, options) => new Promise((resolve, _reject) => { + const handle = runFork(effect, options); + handle.addObserver(resolve); +}); +/** + * Execute the `Micro` effect and return a `Promise` that resolves with the + * successful value of the computation. + * + * @since 3.4.0 + * @experimental + * @category execution + */ +exports.runPromiseExit = runPromiseExit; +const runPromise = (effect, options) => runPromiseExit(effect, options).then(exit => { + if (exit._tag === "Failure") { + throw exit.cause; + } + return exit.value; +}); +/** + * Attempt to execute the `Micro` effect synchronously and return the `MicroExit`. + * + * If any asynchronous effects are encountered, the function will return a + * `CauseDie` containing the `MicroFiber`. + * + * @since 3.4.6 + * @experimental + * @category execution + */ +exports.runPromise = runPromise; +const runSyncExit = effect => { + const scheduler = new MicroSchedulerDefault(); + const fiber = runFork(effect, { + scheduler + }); + scheduler.flush(); + return fiber._exit ?? exitDie(fiber); +}; +/** + * Attempt to execute the `Micro` effect synchronously and return the success + * value. + * + * @since 3.4.0 + * @experimental + * @category execution + */ +exports.runSyncExit = runSyncExit; +const runSync = effect => { + const exit = runSyncExit(effect); + if (exit._tag === "Failure") throw exit.cause; + return exit.value; +}; +exports.runSync = runSync; +const YieldableError = /*#__PURE__*/function () { + class YieldableError extends globalThis.Error {} + // @effect-diagnostics-next-line floatingEffect:off + Object.assign(YieldableError.prototype, MicroProto, _effectable.StructuralPrototype, { + [identifier]: "Failure", + [evaluate]() { + return fail(this); + }, + toString() { + return this.message ? `${this.name}: ${this.message}` : this.name; + }, + toJSON() { + return { + ...this + }; + }, + [_Inspectable.NodeInspectSymbol]() { + const stack = this.stack; + if (stack) { + return `${this.toString()}\n${stack.split("\n").slice(1).join("\n")}`; + } + return this.toString(); + } + }); + return YieldableError; +}(); +/** + * @since 3.4.0 + * @experimental + * @category errors + */ +const Error = exports.Error = /*#__PURE__*/function () { + return class extends YieldableError { + constructor(args) { + super(); + if (args) { + Object.assign(this, args); + } + } + }; +}(); +/** + * @since 3.4.0 + * @experimental + * @category errors + */ +const TaggedError = tag => { + class Base extends Error { + _tag = tag; + } + ; + Base.prototype.name = tag; + return Base; +}; +/** + * Represents a checked exception which occurs when an expected element was + * unable to be found. + * + * @since 3.4.4 + * @experimental + * @category errors + */ +exports.TaggedError = TaggedError; +class NoSuchElementException extends /*#__PURE__*/TaggedError("NoSuchElementException") {} +/** + * Represents a checked exception which occurs when a timeout occurs. + * + * @since 3.4.4 + * @experimental + * @category errors + */ +exports.NoSuchElementException = NoSuchElementException; +class TimeoutException extends /*#__PURE__*/TaggedError("TimeoutException") {} +exports.TimeoutException = TimeoutException; +//# sourceMappingURL=Micro.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MutableHashMap.js b/backend/node_modules/effect/dist/cjs/MutableHashMap.js new file mode 100644 index 0000000000000000000000000000000000000000..91bbbdf818383b23328f9dc4cb375b2d694e8ecd --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MutableHashMap.js @@ -0,0 +1,314 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.values = exports.size = exports.set = exports.remove = exports.modifyAt = exports.modify = exports.make = exports.keys = exports.isEmpty = exports.has = exports.get = exports.fromIterable = exports.forEach = exports.empty = exports.clear = void 0; +var Equal = _interopRequireWildcard(require("./Equal.js")); +var _Function = require("./Function.js"); +var Hash = _interopRequireWildcard(require("./Hash.js")); +var _Inspectable = require("./Inspectable.js"); +var Option = _interopRequireWildcard(require("./Option.js")); +var _Pipeable = require("./Pipeable.js"); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +const TypeId = /*#__PURE__*/Symbol.for("effect/MutableHashMap"); +const MutableHashMapProto = { + [TypeId]: TypeId, + [Symbol.iterator]() { + return new MutableHashMapIterator(this); + }, + toString() { + return (0, _Inspectable.format)(this.toJSON()); + }, + toJSON() { + return { + _id: "MutableHashMap", + values: Array.from(this).map(_Inspectable.toJSON) + }; + }, + [_Inspectable.NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + } +}; +class MutableHashMapIterator { + self; + referentialIterator; + bucketIterator; + constructor(self) { + this.self = self; + this.referentialIterator = self.referential[Symbol.iterator](); + } + next() { + if (this.bucketIterator !== undefined) { + return this.bucketIterator.next(); + } + const result = this.referentialIterator.next(); + if (result.done) { + this.bucketIterator = new BucketIterator(this.self.buckets.values()); + return this.next(); + } + return result; + } + [Symbol.iterator]() { + return new MutableHashMapIterator(this.self); + } +} +class BucketIterator { + backing; + constructor(backing) { + this.backing = backing; + } + currentBucket; + next() { + if (this.currentBucket === undefined) { + const result = this.backing.next(); + if (result.done) { + return result; + } + this.currentBucket = result.value[Symbol.iterator](); + } + const result = this.currentBucket.next(); + if (result.done) { + this.currentBucket = undefined; + return this.next(); + } + return result; + } +} +/** + * @since 2.0.0 + * @category constructors + */ +const empty = () => { + const self = Object.create(MutableHashMapProto); + self.referential = new Map(); + self.buckets = new Map(); + self.bucketsSize = 0; + return self; +}; +/** + * @since 2.0.0 + * @category constructors + */ +exports.empty = empty; +const make = (...entries) => fromIterable(entries); +/** + * Creates a new `MutableHashMap` from an iterable collection of key/value pairs. + * + * @since 2.0.0 + * @category constructors + */ +exports.make = make; +const fromIterable = entries => { + const self = empty(); + for (const [key, value] of entries) { + set(self, key, value); + } + return self; +}; +/** + * @since 2.0.0 + * @category elements + */ +exports.fromIterable = fromIterable; +const get = exports.get = /*#__PURE__*/(0, _Function.dual)(2, (self, key) => { + if (Equal.isEqual(key) === false) { + return self.referential.has(key) ? Option.some(self.referential.get(key)) : Option.none(); + } + const hash = key[Hash.symbol](); + const bucket = self.buckets.get(hash); + if (bucket === undefined) { + return Option.none(); + } + return getFromBucket(self, bucket, key); +}); +/** + * @since 3.8.0 + * @category elements + */ +const keys = self => { + const keys = Array.from(self.referential.keys()); + for (const bucket of self.buckets.values()) { + for (let i = 0, len = bucket.length; i < len; i++) { + keys.push(bucket[i][0]); + } + } + return keys; +}; +/** + * @since 3.8.0 + * @category elements + */ +exports.keys = keys; +const values = self => { + const values = Array.from(self.referential.values()); + for (const bucket of self.buckets.values()) { + for (let i = 0, len = bucket.length; i < len; i++) { + values.push(bucket[i][1]); + } + } + return values; +}; +exports.values = values; +const getFromBucket = (self, bucket, key, remove = false) => { + for (let i = 0, len = bucket.length; i < len; i++) { + if (key[Equal.symbol](bucket[i][0])) { + const value = bucket[i][1]; + if (remove) { + bucket.splice(i, 1); + self.bucketsSize--; + } + return Option.some(value); + } + } + return Option.none(); +}; +/** + * @since 2.0.0 + * @category elements + */ +const has = exports.has = /*#__PURE__*/(0, _Function.dual)(2, (self, key) => Option.isSome(get(self, key))); +/** + * @since 2.0.0 + */ +const set = exports.set = /*#__PURE__*/(0, _Function.dual)(3, (self, key, value) => { + if (Equal.isEqual(key) === false) { + self.referential.set(key, value); + return self; + } + const hash = key[Hash.symbol](); + const bucket = self.buckets.get(hash); + if (bucket === undefined) { + self.buckets.set(hash, [[key, value]]); + self.bucketsSize++; + return self; + } + removeFromBucket(self, bucket, key); + bucket.push([key, value]); + self.bucketsSize++; + return self; +}); +const removeFromBucket = (self, bucket, key) => { + for (let i = 0, len = bucket.length; i < len; i++) { + if (key[Equal.symbol](bucket[i][0])) { + bucket.splice(i, 1); + self.bucketsSize--; + return; + } + } +}; +/** + * Updates the value of the specified key within the `MutableHashMap` if it exists. + * + * @since 2.0.0 + */ +const modify = exports.modify = /*#__PURE__*/(0, _Function.dual)(3, (self, key, f) => { + if (Equal.isEqual(key) === false) { + if (self.referential.has(key)) { + self.referential.set(key, f(self.referential.get(key))); + } + return self; + } + const hash = key[Hash.symbol](); + const bucket = self.buckets.get(hash); + if (bucket === undefined) { + return self; + } + const value = getFromBucket(self, bucket, key, true); + if (Option.isNone(value)) { + return self; + } + bucket.push([key, f(value.value)]); + self.bucketsSize++; + return self; +}); +/** + * Set or remove the specified key in the `MutableHashMap` using the specified + * update function. + * + * @since 2.0.0 + */ +const modifyAt = exports.modifyAt = /*#__PURE__*/(0, _Function.dual)(3, (self, key, f) => { + if (Equal.isEqual(key) === false) { + const result = f(get(self, key)); + if (Option.isSome(result)) { + set(self, key, result.value); + } else { + remove(self, key); + } + return self; + } + const hash = key[Hash.symbol](); + const bucket = self.buckets.get(hash); + if (bucket === undefined) { + const result = f(Option.none()); + return Option.isSome(result) ? set(self, key, result.value) : self; + } + const result = f(getFromBucket(self, bucket, key, true)); + if (Option.isNone(result)) { + if (bucket.length === 0) { + self.buckets.delete(hash); + } + return self; + } + bucket.push([key, result.value]); + self.bucketsSize++; + return self; +}); +/** + * @since 2.0.0 + */ +const remove = exports.remove = /*#__PURE__*/(0, _Function.dual)(2, (self, key) => { + if (Equal.isEqual(key) === false) { + self.referential.delete(key); + return self; + } + const hash = key[Hash.symbol](); + const bucket = self.buckets.get(hash); + if (bucket === undefined) { + return self; + } + removeFromBucket(self, bucket, key); + if (bucket.length === 0) { + self.buckets.delete(hash); + } + return self; +}); +/** + * @since 2.0.0 + */ +const clear = self => { + self.referential.clear(); + self.buckets.clear(); + self.bucketsSize = 0; + return self; +}; +/** + * @since 2.0.0 + * @category elements + */ +exports.clear = clear; +const size = self => { + return self.referential.size + self.bucketsSize; +}; +/** + * @since 2.0.0 + */ +exports.size = size; +const isEmpty = self => size(self) === 0; +/** + * @since 2.0.0 + */ +exports.isEmpty = isEmpty; +const forEach = exports.forEach = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + self.referential.forEach(f); + for (const bucket of self.buckets.values()) { + for (const [key, value] of bucket) { + f(value, key); + } + } +}); +//# sourceMappingURL=MutableHashMap.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MutableHashSet.js b/backend/node_modules/effect/dist/cjs/MutableHashSet.js new file mode 100644 index 0000000000000000000000000000000000000000..44b5cc6fb079b7123a20f90a21760bb658792697 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MutableHashSet.js @@ -0,0 +1,524 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.size = exports.remove = exports.make = exports.has = exports.fromIterable = exports.empty = exports.clear = exports.add = void 0; +var Dual = _interopRequireWildcard(require("./Function.js")); +var _Inspectable = require("./Inspectable.js"); +var MutableHashMap = _interopRequireWildcard(require("./MutableHashMap.js")); +var _Pipeable = require("./Pipeable.js"); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * # MutableHashSet + * + * A mutable `MutableHashSet` provides a collection of unique values with + * efficient lookup, insertion and removal. Unlike its immutable sibling + * {@link module:HashSet}, a `MutableHashSet` can be modified in-place; + * operations like add, remove, and clear directly modify the original set + * rather than creating a new one. This mutability offers benefits like improved + * performance in scenarios where you need to build or modify a set + * incrementally. + * + * ## What Problem Does It Solve? + * + * `MutableHashSet` solves the problem of maintaining an unsorted collection + * where each value appears exactly once, with fast operations for checking + * membership and adding/removing values, in contexts where mutability is + * preferred for performance or implementation simplicity. + * + * ## When to Use + * + * Use `MutableHashSet` when you need: + * + * - A collection with no duplicate values + * - Efficient membership testing (**`O(1)`** average complexity) + * - In-place modifications for better performance + * - A set that will be built or modified incrementally + * - Local mutability in otherwise immutable code + * + * ## Advanced Features + * + * MutableHashSet provides operations for: + * + * - Adding and removing elements with direct mutation + * - Checking for element existence + * - Clearing all elements at once + * - Converting to/from other collection types + * + * ## Performance Characteristics + * + * - **Lookup** operations ({@link module:MutableHashSet.has}): **`O(1)`** average + * time complexity + * - **Insertion** operations ({@link module:MutableHashSet.add}): **`O(1)`** + * average time complexity + * - **Removal** operations ({@link module:MutableHashSet.remove}): **`O(1)`** + * average time complexity + * - **Iteration**: **`O(n)`** where n is the size of the set + * + * The MutableHashSet data structure implements the following traits: + * + * - {@link Iterable}: allows iterating over the values in the set + * - {@link Pipeable}: allows chaining operations with the pipe operator + * - {@link Inspectable}: allows inspecting the contents of the set + * + * ## Operations Reference + * + * | Category | Operation | Description | Complexity | + * | ------------ | ------------------------------------------ | ----------------------------------- | ---------- | + * | constructors | {@link module:MutableHashSet.empty} | Creates an empty MutableHashSet | O(1) | + * | constructors | {@link module:MutableHashSet.fromIterable} | Creates a set from an iterable | O(n) | + * | constructors | {@link module:MutableHashSet.make} | Creates a set from multiple values | O(n) | + * | | | | | + * | elements | {@link module:MutableHashSet.has} | Checks if a value exists in the set | O(1) avg | + * | elements | {@link module:MutableHashSet.add} | Adds a value to the set | O(1) avg | + * | elements | {@link module:MutableHashSet.remove} | Removes a value from the set | O(1) avg | + * | elements | {@link module:MutableHashSet.size} | Gets the number of elements | O(1) | + * | elements | {@link module:MutableHashSet.clear} | Removes all values from the set | O(1) | + * + * ## Notes + * + * ### Mutability Considerations: + * + * Unlike most data structures in the Effect ecosystem, `MutableHashSet` is + * mutable. This means that operations like `add`, `remove`, and `clear` modify + * the original set rather than creating a new one. This can lead to more + * efficient code in some scenarios, but requires careful handling to avoid + * unexpected side effects. + * + * ### When to Choose `MutableHashSet` vs {@link module:HashSet}: + * + * - Use `MutableHashSet` when you need to build or modify a set incrementally and + * performance is a priority + * - Use `HashSet` when you want immutability guarantees and functional + * programming patterns + * - Consider using {@link module:HashSet}'s bounded mutation context (via + * {@link module:HashSet.beginMutation}, {@link module:HashSet.endMutation}, and + * {@link module:HashSet.mutate} methods) when you need temporary mutability + * within an otherwise immutable context - this approach might be sufficient + * for many use cases without requiring a separate `MutableHashSet` + * - `MutableHashSet` is often useful for local operations where the mutability is + * contained and doesn't leak into the broader application + * + * @module MutableHashSet + * @since 2.0.0 + */ + +const TypeId = /*#__PURE__*/Symbol.for("effect/MutableHashSet"); +const MutableHashSetProto = { + [TypeId]: TypeId, + [Symbol.iterator]() { + return Array.from(this.keyMap).map(([_]) => _)[Symbol.iterator](); + }, + toString() { + return (0, _Inspectable.format)(this.toJSON()); + }, + toJSON() { + return { + _id: "MutableHashSet", + values: Array.from(this).map(_Inspectable.toJSON) + }; + }, + [_Inspectable.NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + } +}; +const fromHashMap = keyMap => { + const set = Object.create(MutableHashSetProto); + set.keyMap = keyMap; + return set; +}; +/** + * Creates an empty mutable hash set. + * + * This function initializes and returns an empty `MutableHashSet` instance, + * which allows for efficient storage and manipulation of unique elements. + * + * Time complexity: **`O(1)`** + * + * @memberof MutableHashSet + * @since 2.0.0 + * @category constructors + * @example + * + * ```ts + * import { MutableHashSet } from "effect" + * + * type T = unknown // replace with your type + * + * // in places where the type can't be inferred, replace with your type + * const set: MutableHashSet.MutableHashSet = MutableHashSet.empty() + * ``` + * + * @template K - The type of the elements to be stored in the hash set. Defaults + * to `never` if not specified. + * @returns A new mutable instance of `MutableHashSet` containing no elements + * for the specified type `K`. + * @see Other `MutableHashSet` constructors are {@link module:MutableHashSet.make} {@link module:MutableHashSet.fromIterable} + */ +const empty = () => fromHashMap(MutableHashMap.empty()); +/** + * Creates a new `MutableHashSet` from an iterable collection of values. + * Duplicate values are omitted. + * + * Time complexity: **`O(n)`** where n is the number of elements in the iterable + * + * Creating a `MutableHashSet` from an {@link Array} + * + * ```ts + * import { MutableHashSet } from "effect" + * + * const array: Iterable = [1, 2, 3, 4, 5, 1, 2, 3] // Array is also Iterable + * const mutableHashSet: MutableHashSet.MutableHashSet = + * MutableHashSet.fromIterable(array) + * + * console.log( + * // MutableHashSet.MutableHashSet is also an Iterable + * Array.from(mutableHashSet) + * ) // Output: [1, 2, 3, 4, 5] + * ``` + * + * Creating a `MutableHashSet` from a {@link Set} + * + * ```ts + * import { MutableHashSet, pipe } from "effect" + * + * console.log( + * pipe( + * // Set is an Iterable + * new Set(["apple", "banana", "orange", "apple"]), + * // constructs MutableHashSet from an Iterable Set + * MutableHashSet.fromIterable, + * // since MutableHashSet it is itself an Iterable, we can pass it to other functions expecting an Iterable + * Array.from + * ) + * ) // Output: ["apple", "banana", "orange"] + * ``` + * + * Creating a `MutableHashSet` from a {@link Generator} + * + * ```ts + * import { MutableHashSet } from "effect" + * + * // Generator functions return iterables + * function* fibonacci(n: number): Generator { + * let [a, b] = [0, 1] + * for (let i = 0; i < n; i++) { + * yield a + * ;[a, b] = [b, a + b] + * } + * } + * + * // Create a MutableHashSet from the first 10 Fibonacci numbers + * const fibonacciSet = MutableHashSet.fromIterable(fibonacci(10)) + * + * console.log(Array.from(fibonacciSet)) + * // Outputs: [0, 1, 2, 3, 5, 8, 13, 21, 34] but in unsorted order + * ``` + * + * Creating a `MutableHashSet` from another {@link module:MutableHashSet} + * + * ```ts + * import { MutableHashSet, pipe } from "effect" + * + * console.log( + * pipe( + * MutableHashSet.make(1, 2, 3, 4), + * MutableHashSet.fromIterable, + * Array.from + * ) + * ) // Output: [1, 2, 3, 4] + * ``` + * + * Creating a `MutableHashSet` from an {@link module:HashSet} + * + * ```ts + * import { HashSet, MutableHashSet, pipe } from "effect" + * + * console.log( + * pipe( + * HashSet.make(1, 2, 3, 4), // it works also with its immutable HashSet sibling + * MutableHashSet.fromIterable, + * Array.from + * ) + * ) // Output: [1, 2, 3, 4] + * ``` + * + * Creating a `MutableHashSet` from other Effect's data structures like + * {@link Chunk} + * + * ```ts + * import { Chunk, MutableHashSet, pipe } from "effect" + * + * console.log( + * pipe( + * Chunk.make(1, 2, 3, 4), // Chunk is also an Iterable + * MutableHashSet.fromIterable, + * Array.from + * ) + * ) // Outputs: [1, 2, 3, 4] + * ``` + * + * @memberof MutableHashSet + * @since 2.0.0 + * @category constructors + * @template K - The type of elements to be stored in the resulting + * `MutableHashSet`. + * @param keys - An `Iterable` collection containing the keys to be added to the + * `MutableHashSet`. + * @returns A new `MutableHashSet` containing just the unique elements from the + * provided iterable. + * @see Other `MutableHashSet` constructors are {@link module:MutableHashSet.empty} {@link module:MutableHashSet.make} + */ +exports.empty = empty; +const fromIterable = keys => fromHashMap(MutableHashMap.fromIterable(Array.from(keys).map(k => [k, true]))); +/** + * Construct a new `MutableHashSet` from a variable number of values. + * + * Time complexity: **`O(n)`** where n is the number of elements + * + * @memberof MutableHashSet + * @since 2.0.0 + * @category constructors + * @example + * + * ```ts + * import { Equal, Hash, MutableHashSet } from "effect" + * import assert from "node:assert/strict" + * + * class Character implements Equal.Equal { + * readonly name: string + * readonly trait: string + * + * constructor(name: string, trait: string) { + * this.name = name + * this.trait = trait + * } + * + * // Define equality based on name, and trait + * [Equal.symbol](that: Equal.Equal): boolean { + * if (that instanceof Character) { + * return ( + * Equal.equals(this.name, that.name) && + * Equal.equals(this.trait, that.trait) + * ) + * } + * return false + * } + * + * // Generate a hash code based on the sum of the character's name and trait + * [Hash.symbol](): number { + * return Hash.hash(this.name + this.trait) + * } + * + * static readonly of = (name: string, trait: string): Character => { + * return new Character(name, trait) + * } + * } + * + * const mutableCharacterHashSet = MutableHashSet.make( + * Character.of("Alice", "Curious"), + * Character.of("Alice", "Curious"), + * Character.of("White Rabbit", "Always late"), + * Character.of("Mad Hatter", "Tea enthusiast") + * ) + * + * assert.equal( + * MutableHashSet.has( + * mutableCharacterHashSet, + * Character.of("Alice", "Curious") + * ), + * true + * ) + * assert.equal( + * MutableHashSet.has( + * mutableCharacterHashSet, + * Character.of("Fluffy", "Kind") + * ), + * false + * ) + * ``` + * + * @see Other `MutableHashSet` constructors are {@link module:MutableHashSet.fromIterable} {@link module:MutableHashSet.empty} + */ +exports.fromIterable = fromIterable; +const make = (...keys) => fromIterable(keys); +/** + * **Checks** whether the `MutableHashSet` contains the given element, and + * **adds** it if not. + * + * Time complexity: **`O(1)`** average + * + * **Syntax** + * + * ```ts + * import { MutableHashSet, pipe } from "effect" + * + * // with data-last, a.k.a. pipeable API + * pipe( + * MutableHashSet.empty(), + * MutableHashSet.add(0), + * MutableHashSet.add(0) + * ) + * + * // or piped with the pipe function + * MutableHashSet.empty().pipe(MutableHashSet.add(0)) + * + * // or with data-first API + * MutableHashSet.add(MutableHashSet.empty(), 0) + * ``` + * + * @memberof MutableHashSet + * @since 2.0.0 + * @category elements + * @see Other `MutableHashSet` elements are {@link module:MutableHashSet.remove} {@link module:MutableHashSet.size} {@link module:MutableHashSet.clear} {@link module:MutableHashSet.has} + */ +exports.make = make; +const add = exports.add = /*#__PURE__*/Dual.dual(2, (self, key) => (MutableHashMap.set(self.keyMap, key, true), self)); +/** + * Checks if the specified value exists in the `MutableHashSet`. + * + * Time complexity: `O(1)` average + * + * **Syntax** + * + * ```ts + * import { MutableHashSet, pipe } from "effect" + * import assert from "node:assert/strict" + * + * assert.equal( + * // with `data-last`, a.k.a. `pipeable` API + * pipe(MutableHashSet.make(0, 1, 2), MutableHashSet.has(3)), + * false + * ) + * + * assert.equal( + * // or piped with the pipe function + * MutableHashSet.make(0, 1, 2).pipe(MutableHashSet.has(3)), + * false + * ) + * + * assert.equal( + * // or with `data-first` API + * MutableHashSet.has(MutableHashSet.make(0, 1, 2), 3), + * false + * ) + * ``` + * + * @memberof MutableHashSet + * @since 2.0.0 + * @category elements + * @see Other `MutableHashSet` elements are {@link module:MutableHashSet.add} {@link module:MutableHashSet.remove} {@link module:MutableHashSet.size} {@link module:MutableHashSet.clear} + */ +const has = exports.has = /*#__PURE__*/Dual.dual(2, (self, key) => MutableHashMap.has(self.keyMap, key)); +/** + * Removes a value from the `MutableHashSet`. + * + * Time complexity: **`O(1)`** average + * + * **Syntax** + * + * ```ts + * import { MutableHashSet, pipe } from "effect" + * import assert from "node:assert/strict" + * + * assert.equal( + * // with `data-last`, a.k.a. `pipeable` API + * pipe( + * MutableHashSet.make(0, 1, 2), + * MutableHashSet.remove(0), + * MutableHashSet.has(0) + * ), + * false + * ) + * + * assert.equal( + * // or piped with the pipe function + * MutableHashSet.make(0, 1, 2).pipe( + * MutableHashSet.remove(0), + * MutableHashSet.has(0) + * ), + * false + * ) + * + * assert.equal( + * // or with `data-first` API + * MutableHashSet.remove(MutableHashSet.make(0, 1, 2), 0).pipe( + * MutableHashSet.has(0) + * ), + * false + * ) + * ``` + * + * @memberof MutableHashSet + * @since 2.0.0 + * @category elements + * @see Other `MutableHashSet` elements are {@link module:MutableHashSet.add} {@link module:MutableHashSet.has} {@link module:MutableHashSet.size} {@link module:MutableHashSet.clear} + */ +const remove = exports.remove = /*#__PURE__*/Dual.dual(2, (self, key) => (MutableHashMap.remove(self.keyMap, key), self)); +/** + * Calculates the number of values in the `HashSet`. + * + * Time complexity: **`O(1)`** + * + * @memberof MutableHashSet + * @since 2.0.0 + * @category elements + * @example + * + * ```ts + * import { MutableHashSet } from "effect" + * import assert from "node:assert/strict" + * + * assert.equal(MutableHashSet.size(MutableHashSet.empty()), 0) + * + * assert.equal( + * MutableHashSet.size(MutableHashSet.make(1, 2, 2, 3, 4, 3)), + * 4 + * ) + * ``` + * + * @template V - The type of the elements to be stored in the `MutableHashSet`. + * @param self - The `MutableHashSet` instance for which the size is to be + * determined. + * @returns The total number of elements within the `MutableHashSet`. + * @see Other `MutableHashSet` elements are {@link module:MutableHashSet.add} {@link module:MutableHashSet.has} {@link module:MutableHashSet.remove} {@link module:MutableHashSet.clear} + */ +const size = self => MutableHashMap.size(self.keyMap); +/** + * Removes all values from the `MutableHashSet`. + * + * This function operates by delegating the clearing action to the underlying + * key map associated with the given `MutableHashSet`. It ensures that the hash + * set becomes empty while maintaining its existence and structure. + * + * @memberof MutableHashSet + * @since 2.0.0 + * @category elements + * @example + * + * ```ts + * import { MutableHashSet, pipe } from "effect" + * import assert from "node:assert/strict" + * + * assert.deepStrictEqual( + * pipe( + * MutableHashSet.make(1, 2, 3, 4), + * MutableHashSet.clear, + * MutableHashSet.size + * ), + * 0 + * ) + * ``` + * + * @param self - The `MutableHashSet` to clear. + * @returns The same `MutableHashSet` after all elements have been removed. + * @see Other `MutableHashSet` elements are {@link module:MutableHashSet.add} {@link module:MutableHashSet.has} {@link module:MutableHashSet.remove} {@link module:MutableHashSet.size} + */ +exports.size = size; +const clear = self => (MutableHashMap.clear(self.keyMap), self); +exports.clear = clear; +//# sourceMappingURL=MutableHashSet.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MutableHashSet.js.map b/backend/node_modules/effect/dist/cjs/MutableHashSet.js.map new file mode 100644 index 0000000000000000000000000000000000000000..13eb0d3b6dc60efdaa2323b6c7aeaec4b37ffb96 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MutableHashSet.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MutableHashSet.js","names":["Dual","_interopRequireWildcard","require","_Inspectable","MutableHashMap","_Pipeable","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","Symbol","for","MutableHashSetProto","iterator","Array","from","keyMap","map","_","toString","format","toJSON","_id","values","NodeInspectSymbol","pipe","pipeArguments","arguments","fromHashMap","create","empty","exports","fromIterable","keys","k","make","add","dual","self","key","remove","size","clear"],"sources":["../../src/MutableHashSet.ts"],"sourcesContent":[null],"mappings":";;;;;;AA8FA,IAAAA,IAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAH,uBAAA,CAAAC,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AAA6C,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAA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CAAC,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CO,MAAMC,MAAM,GAAAT,OAAA,CAAAS,MAAA,gBAuDfxD,IAAI,CAACqD,IAAI,CAGX,CAAC,EAAE,CAACC,IAAI,EAAEC,GAAG,MAAMnD,cAAc,CAACoD,MAAM,CAACF,IAAI,CAACtB,MAAM,EAAEuB,GAAG,CAAC,EAAED,IAAI,CAAC,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BO,MAAMG,IAAI,GAAOH,IAAuB,IAAalD,cAAc,CAACqD,IAAI,CAACH,IAAI,CAACtB,MAAM,CAAC;AAE5F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAAe,OAAA,CAAAU,IAAA,GAAAA,IAAA;AA8BO,MAAMC,KAAK,GAAOJ,IAAuB,KAC9ClD,cAAc,CAACsD,KAAK,CAACJ,IAAI,CAACtB,MAAM,CAAC,EAAEsB,IAAI,CACxC;AAAAP,OAAA,CAAAW,KAAA,GAAAA,KAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MutableList.js b/backend/node_modules/effect/dist/cjs/MutableList.js new file mode 100644 index 0000000000000000000000000000000000000000..179cf25345c4569fc549dd2fc52bb425d4648ede --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MutableList.js @@ -0,0 +1,258 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.tail = exports.shift = exports.reset = exports.prepend = exports.pop = exports.make = exports.length = exports.isEmpty = exports.head = exports.fromIterable = exports.forEach = exports.empty = exports.append = void 0; +var Dual = _interopRequireWildcard(require("./Function.js")); +var _Inspectable = require("./Inspectable.js"); +var _Pipeable = require("./Pipeable.js"); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +const TypeId = /*#__PURE__*/Symbol.for("effect/MutableList"); +const MutableListProto = { + [TypeId]: TypeId, + [Symbol.iterator]() { + let done = false; + let head = this.head; + return { + next() { + if (done) { + return this.return(); + } + if (head == null) { + done = true; + return this.return(); + } + const value = head.value; + head = head.next; + return { + done, + value + }; + }, + return(value) { + if (!done) { + done = true; + } + return { + done: true, + value + }; + } + }; + }, + toString() { + return (0, _Inspectable.format)(this.toJSON()); + }, + toJSON() { + return { + _id: "MutableList", + values: Array.from(this).map(_Inspectable.toJSON) + }; + }, + [_Inspectable.NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + } +}; +/** @internal */ +const makeNode = value => ({ + value, + removed: false, + prev: undefined, + next: undefined +}); +/** + * Creates an empty `MutableList`. + * + * @since 2.0.0 + * @category constructors + */ +const empty = () => { + const list = Object.create(MutableListProto); + list.head = undefined; + list.tail = undefined; + list._length = 0; + return list; +}; +/** + * Creates a new `MutableList` from an iterable collection of values. + * + * @since 2.0.0 + * @category constructors + */ +exports.empty = empty; +const fromIterable = iterable => { + const list = empty(); + for (const element of iterable) { + append(list, element); + } + return list; +}; +/** + * Creates a new `MutableList` from the specified elements. + * + * @since 2.0.0 + * @category constructors + */ +exports.fromIterable = fromIterable; +const make = (...elements) => fromIterable(elements); +/** + * Returns `true` if the list contains zero elements, `false`, otherwise. + * + * @since 2.0.0 + * @category getters + */ +exports.make = make; +const isEmpty = self => length(self) === 0; +/** + * Returns the length of the list. + * + * @since 2.0.0 + * @category getters + */ +exports.isEmpty = isEmpty; +const length = self => self._length; +/** + * Returns the last element of the list, if it exists. + * + * @since 2.0.0 + * @category getters + */ +exports.length = length; +const tail = self => self.tail === undefined ? undefined : self.tail.value; +/** + * Returns the first element of the list, if it exists. + * + * @since 2.0.0 + * @category getters + */ +exports.tail = tail; +const head = self => self.head === undefined ? undefined : self.head.value; +/** + * Executes the specified function `f` for each element in the list. + * + * @since 2.0.0 + * @category traversing + */ +exports.head = head; +const forEach = exports.forEach = /*#__PURE__*/Dual.dual(2, (self, f) => { + let current = self.head; + while (current !== undefined) { + f(current.value); + current = current.next; + } +}); +/** + * Removes all elements from the doubly-linked list. + * + * @since 2.0.0 + */ +const reset = self => { + ; + self._length = 0; + self.head = undefined; + self.tail = undefined; + return self; +}; +/** + * Appends the specified element to the end of the `MutableList`. + * + * @category concatenating + * @since 2.0.0 + */ +exports.reset = reset; +const append = exports.append = /*#__PURE__*/Dual.dual(2, (self, value) => { + const node = makeNode(value); + if (self.head === undefined) { + self.head = node; + } + if (self.tail === undefined) { + self.tail = node; + } else { + self.tail.next = node; + node.prev = self.tail; + self.tail = node; + } + ; + self._length += 1; + return self; +}); +/** + * Removes the first value from the list and returns it, if it exists. + * + * @since 0.0.1 + */ +const shift = self => { + const head = self.head; + if (head !== undefined) { + remove(self, head); + return head.value; + } + return undefined; +}; +/** + * Removes the last value from the list and returns it, if it exists. + * + * @since 0.0.1 + */ +exports.shift = shift; +const pop = self => { + const tail = self.tail; + if (tail !== undefined) { + remove(self, tail); + return tail.value; + } + return undefined; +}; +/** + * Prepends the specified value to the beginning of the list. + * + * @category concatenating + * @since 2.0.0 + */ +exports.pop = pop; +const prepend = exports.prepend = /*#__PURE__*/Dual.dual(2, (self, value) => { + const node = makeNode(value); + node.next = self.head; + if (self.head !== undefined) { + self.head.prev = node; + } + self.head = node; + if (self.tail === undefined) { + self.tail = node; + } + ; + self._length += 1; + return self; +}); +const remove = (self, node) => { + if (node.removed) { + return; + } + node.removed = true; + if (node.prev !== undefined && node.next !== undefined) { + node.prev.next = node.next; + node.next.prev = node.prev; + } else if (node.prev !== undefined) { + self.tail = node.prev; + node.prev.next = undefined; + } else if (node.next !== undefined) { + self.head = node.next; + node.next.prev = undefined; + } else { + self.tail = undefined; + self.head = undefined; + } + if (self._length > 0) { + ; + self._length -= 1; + } +}; +//# sourceMappingURL=MutableList.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MutableList.js.map b/backend/node_modules/effect/dist/cjs/MutableList.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5b1328acdba961865ee03e79852a260688ff8129 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MutableList.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MutableList.js","names":["Dual","_interopRequireWildcard","require","_Inspectable","_Pipeable","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","Symbol","for","MutableListProto","iterator","done","head","next","return","value","toString","format","toJSON","_id","values","Array","from","map","NodeInspectSymbol","pipe","pipeArguments","arguments","makeNode","removed","prev","undefined","empty","list","create","tail","_length","exports","fromIterable","iterable","element","append","make","elements","isEmpty","self","length","forEach","dual","current","reset","node","shift","remove","pop","prepend"],"sources":["../../src/MutableList.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,IAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IAAAE,SAAA,GAAAF,OAAA;AAA6C,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA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ACjB,IAAI,GAAGkB,SAAS;EAC5B,CAAC,MAAM,IAAIoB,IAAI,CAACtC,IAAI,KAAKkB,SAAS,EAAE;IAClCc,IAAI,CAACjC,IAAI,GAAGuC,IAAI,CAACtC,IAAI;IACrBsC,IAAI,CAACtC,IAAI,CAACiB,IAAI,GAAGC,SAAS;EAC5B,CAAC,MAAM;IACLc,IAAI,CAACV,IAAI,GAAGJ,SAAS;IACrBc,IAAI,CAACjC,IAAI,GAAGmB,SAAS;EACvB;EACA,IAAKc,IAA2B,CAACT,OAAO,GAAG,CAAC,EAAE;IAC5C;IAAES,IAA2B,CAACT,OAAO,IAAI,CAAC;EAC5C;AACF,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MutableQueue.js b/backend/node_modules/effect/dist/cjs/MutableQueue.js new file mode 100644 index 0000000000000000000000000000000000000000..6c6da6f1c44c3d04fb0c1efe057d21c77f824ab6 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MutableQueue.js @@ -0,0 +1,173 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.unbounded = exports.pollUpTo = exports.poll = exports.offerAll = exports.offer = exports.length = exports.isFull = exports.isEmpty = exports.capacity = exports.bounded = exports.EmptyMutableQueue = void 0; +var Chunk = _interopRequireWildcard(require("./Chunk.js")); +var Dual = _interopRequireWildcard(require("./Function.js")); +var _Inspectable = require("./Inspectable.js"); +var MutableList = _interopRequireWildcard(require("./MutableList.js")); +var _Pipeable = require("./Pipeable.js"); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +const TypeId = /*#__PURE__*/Symbol.for("effect/MutableQueue"); +/** + * @since 2.0.0 + * @category symbol + */ +const EmptyMutableQueue = exports.EmptyMutableQueue = /*#__PURE__*/Symbol.for("effect/mutable/MutableQueue/Empty"); +const MutableQueueProto = { + [TypeId]: TypeId, + [Symbol.iterator]() { + return Array.from(this.queue)[Symbol.iterator](); + }, + toString() { + return (0, _Inspectable.format)(this.toJSON()); + }, + toJSON() { + return { + _id: "MutableQueue", + values: Array.from(this).map(_Inspectable.toJSON) + }; + }, + [_Inspectable.NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + } +}; +const make = capacity => { + const queue = Object.create(MutableQueueProto); + queue.queue = MutableList.empty(); + queue.capacity = capacity; + return queue; +}; +/** + * Creates a new bounded `MutableQueue`. + * + * @since 2.0.0 + * @category constructors + */ +const bounded = capacity => make(capacity); +/** + * Creates a new unbounded `MutableQueue`. + * + * @since 2.0.0 + * @category constructors + */ +exports.bounded = bounded; +const unbounded = () => make(undefined); +/** + * Returns the current number of elements in the queue. + * + * @since 2.0.0 + * @category getters + */ +exports.unbounded = unbounded; +const length = self => MutableList.length(self.queue); +/** + * Returns `true` if the queue is empty, `false` otherwise. + * + * @since 2.0.0 + * @category getters + */ +exports.length = length; +const isEmpty = self => MutableList.isEmpty(self.queue); +/** + * Returns `true` if the queue is full, `false` otherwise. + * + * @since 2.0.0 + * @category getters + */ +exports.isEmpty = isEmpty; +const isFull = self => self.capacity === undefined ? false : MutableList.length(self.queue) === self.capacity; +/** + * The **maximum** number of elements that a queue can hold. + * + * **Note**: unbounded queues can still implement this interface with + * `capacity = Infinity`. + * + * @since 2.0.0 + * @category getters + */ +exports.isFull = isFull; +const capacity = self => self.capacity === undefined ? Infinity : self.capacity; +/** + * Offers an element to the queue. + * + * Returns whether the enqueue was successful or not. + * + * @since 2.0.0 + */ +exports.capacity = capacity; +const offer = exports.offer = /*#__PURE__*/Dual.dual(2, (self, value) => { + const queueLength = MutableList.length(self.queue); + if (self.capacity !== undefined && queueLength === self.capacity) { + return false; + } + MutableList.append(value)(self.queue); + return true; +}); +/** + * Enqueues a collection of values into the queue. + * + * Returns a `Chunk` of the values that were **not** able to be enqueued. + * + * @since 2.0.0 + */ +const offerAll = exports.offerAll = /*#__PURE__*/Dual.dual(2, (self, values) => { + const iterator = values[Symbol.iterator](); + let next; + let remainder = Chunk.empty(); + let offering = true; + while (offering && (next = iterator.next()) && !next.done) { + offering = offer(next.value)(self); + } + while (next != null && !next.done) { + remainder = Chunk.prepend(next.value)(remainder); + next = iterator.next(); + } + return Chunk.reverse(remainder); +}); +/** + * Dequeues an element from the queue. + * + * Returns either an element from the queue, or the `def` param. + * + * **Note**: if there is no meaningful default for your type, you can always + * use `poll(MutableQueue.EmptyMutableQueue)`. + * + * @since 2.0.0 + */ +const poll = exports.poll = /*#__PURE__*/Dual.dual(2, (self, def) => { + if (MutableList.isEmpty(self.queue)) { + return def; + } + return MutableList.shift(self.queue); +}); +/** + * Dequeues up to `n` elements from the queue. + * + * Returns a `List` of up to `n` elements. + * + * @since 2.0.0 + */ +const pollUpTo = exports.pollUpTo = /*#__PURE__*/Dual.dual(2, (self, n) => { + let result = Chunk.empty(); + let count = 0; + while (count < n) { + const element = poll(EmptyMutableQueue)(self); + if (element === EmptyMutableQueue) { + break; + } + result = Chunk.prepend(element)(result); + count += 1; + } + return Chunk.reverse(result); +}); +//# sourceMappingURL=MutableQueue.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MutableQueue.js.map b/backend/node_modules/effect/dist/cjs/MutableQueue.js.map new file mode 100644 index 0000000000000000000000000000000000000000..80d2e01965dca61f0990e04bc912534266cab113 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MutableQueue.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MutableQueue.js","names":["Chunk","_interopRequireWildcard","require","Dual","_Inspectable","MutableList","_Pipeable","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","Symbol","for","EmptyMutableQueue","exports","MutableQueueProto","iterator","Array","from","queue","toString","format","toJSON","_id","values","map","NodeInspectSymbol","pipe","pipeArguments","arguments","make","capacity","create","empty","bounded","unbounded","undefined","length","self","isEmpty","isFull","Infinity","offer","dual","value","queueLength","append","offerAll","next","remainder","offering","done","prepend","reverse","poll","def","shift","pollUpTo","result","count","element"],"sources":["../../src/MutableQueue.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAEA,IAAAI,SAAA,GAAAJ,OAAA;AAA6C,SAAAD,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,CAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC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AAI,EAAEiB,GAAG,KAAI;EACjB,IAAIlE,WAAW,CAACkD,OAAO,CAACD,IAAI,CAACnB,KAAK,CAAC,EAAE;IACnC,OAAOoC,GAAG;EACZ;EACA,OAAOlE,WAAW,CAACmE,KAAK,CAAClB,IAAI,CAACnB,KAAK,CAAE;AACvC,CAAC,CAAC;AAEF;;;;;;;AAOO,MAAMsC,QAAQ,GAAA3C,OAAA,CAAA2C,QAAA,gBAiBjBtE,IAAI,CAACwD,IAAI,CAGX,CAAC,EAAE,CAAIL,IAAqB,EAAE3C,CAAS,KAAI;EAC3C,IAAI+D,MAAM,GAAG1E,KAAK,CAACiD,KAAK,EAAK;EAC7B,IAAI0B,KAAK,GAAG,CAAC;EACb,OAAOA,KAAK,GAAGhE,CAAC,EAAE;IAChB,MAAMiE,OAAO,GAAGN,IAAI,CAACzC,iBAAiB,CAAC,CAACyB,IAAI,CAAC;IAC7C,IAAIsB,OAAO,KAAK/C,iBAAiB,EAAE;MACjC;IACF;IACA6C,MAAM,GAAG1E,KAAK,CAACoE,OAAO,CAACQ,OAAO,CAAC,CAACF,MAAM,CAAC;IACvCC,KAAK,IAAI,CAAC;EACZ;EACA,OAAO3E,KAAK,CAACqE,OAAO,CAACK,MAAM,CAAC;AAC9B,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/MutableRef.js b/backend/node_modules/effect/dist/cjs/MutableRef.js new file mode 100644 index 0000000000000000000000000000000000000000..f29d2ba897858f6329c7ae2a7f96d40c7a11be59 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/MutableRef.js @@ -0,0 +1,144 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.updateAndGet = exports.update = exports.toggle = exports.setAndGet = exports.set = exports.make = exports.incrementAndGet = exports.increment = exports.getAndUpdate = exports.getAndSet = exports.getAndIncrement = exports.getAndDecrement = exports.get = exports.decrementAndGet = exports.decrement = exports.compareAndSet = void 0; +var Equal = _interopRequireWildcard(require("./Equal.js")); +var Dual = _interopRequireWildcard(require("./Function.js")); +var _Inspectable = require("./Inspectable.js"); +var _Pipeable = require("./Pipeable.js"); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +const TypeId = /*#__PURE__*/Symbol.for("effect/MutableRef"); +const MutableRefProto = { + [TypeId]: TypeId, + toString() { + return (0, _Inspectable.format)(this.toJSON()); + }, + toJSON() { + return { + _id: "MutableRef", + current: (0, _Inspectable.toJSON)(this.current) + }; + }, + [_Inspectable.NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + } +}; +/** + * @since 2.0.0 + * @category constructors + */ +const make = value => { + const ref = Object.create(MutableRefProto); + ref.current = value; + return ref; +}; +/** + * @since 2.0.0 + * @category general + */ +exports.make = make; +const compareAndSet = exports.compareAndSet = /*#__PURE__*/Dual.dual(3, (self, oldValue, newValue) => { + if (Equal.equals(oldValue, self.current)) { + self.current = newValue; + return true; + } + return false; +}); +/** + * @since 2.0.0 + * @category numeric + */ +const decrement = self => update(self, n => n - 1); +/** + * @since 2.0.0 + * @category numeric + */ +exports.decrement = decrement; +const decrementAndGet = self => updateAndGet(self, n => n - 1); +/** + * @since 2.0.0 + * @category general + */ +exports.decrementAndGet = decrementAndGet; +const get = self => self.current; +/** + * @since 2.0.0 + * @category numeric + */ +exports.get = get; +const getAndDecrement = self => getAndUpdate(self, n => n - 1); +/** + * @since 2.0.0 + * @category numeric + */ +exports.getAndDecrement = getAndDecrement; +const getAndIncrement = self => getAndUpdate(self, n => n + 1); +/** + * @since 2.0.0 + * @category general + */ +exports.getAndIncrement = getAndIncrement; +const getAndSet = exports.getAndSet = /*#__PURE__*/Dual.dual(2, (self, value) => { + const ret = self.current; + self.current = value; + return ret; +}); +/** + * @since 2.0.0 + * @category general + */ +const getAndUpdate = exports.getAndUpdate = /*#__PURE__*/Dual.dual(2, (self, f) => getAndSet(self, f(get(self)))); +/** + * @since 2.0.0 + * @category numeric + */ +const increment = self => update(self, n => n + 1); +/** + * @since 2.0.0 + * @category numeric + */ +exports.increment = increment; +const incrementAndGet = self => updateAndGet(self, n => n + 1); +/** + * @since 2.0.0 + * @category general + */ +exports.incrementAndGet = incrementAndGet; +const set = exports.set = /*#__PURE__*/Dual.dual(2, (self, value) => { + self.current = value; + return self; +}); +/** + * @since 2.0.0 + * @category general + */ +const setAndGet = exports.setAndGet = /*#__PURE__*/Dual.dual(2, (self, value) => { + self.current = value; + return self.current; +}); +/** + * @since 2.0.0 + * @category general + */ +const update = exports.update = /*#__PURE__*/Dual.dual(2, (self, f) => set(self, f(get(self)))); +/** + * @since 2.0.0 + * @category general + */ +const updateAndGet = exports.updateAndGet = /*#__PURE__*/Dual.dual(2, (self, f) => setAndGet(self, f(get(self)))); +/** + * @since 2.0.0 + * @category boolean + */ +const toggle = self => update(self, _ => !_); +exports.toggle = toggle; +//# sourceMappingURL=MutableRef.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/NonEmptyIterable.js.map b/backend/node_modules/effect/dist/cjs/NonEmptyIterable.js.map new file mode 100644 index 0000000000000000000000000000000000000000..49d7f949f3064f757471a2023deb06bc712550b3 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/NonEmptyIterable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"NonEmptyIterable.js","names":["unprepend","self","iterator","Symbol","next","done","Error","value","exports"],"sources":["../../src/NonEmptyIterable.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA;;;AAkBA;;;;AAIO,MAAMA,SAAS,GAAOC,IAAyB,IAAuD;EAC3G,MAAMC,QAAQ,GAAGD,IAAI,CAACE,MAAM,CAACD,QAAQ,CAAC,EAAE;EACxC,MAAME,IAAI,GAAGF,QAAQ,CAACE,IAAI,EAAE;EAC5B,IAAIA,IAAI,CAACC,IAAI,EAAE;IACb,MAAM,IAAIC,KAAK,CACb,kHAAkH,CACnH;EACH;EACA,OAAO,CAACF,IAAI,CAACG,KAAK,EAAEL,QAAQ,CAAC;AAC/B,CAAC;AAAAM,OAAA,CAAAR,SAAA,GAAAA,SAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Number.js b/backend/node_modules/effect/dist/cjs/Number.js new file mode 100644 index 0000000000000000000000000000000000000000..f7ff1593357876e8b1543ea6b2d0b73e04275551 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Number.js @@ -0,0 +1,903 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.unsafeDivide = exports.sumAll = exports.sum = exports.subtract = exports.sign = exports.round = exports.remainder = exports.parse = exports.nextPow2 = exports.negate = exports.multiplyAll = exports.multiply = exports.min = exports.max = exports.lessThanOrEqualTo = exports.lessThan = exports.isNumber = exports.increment = exports.greaterThanOrEqualTo = exports.greaterThan = exports.divide = exports.decrement = exports.clamp = exports.between = exports.Order = exports.Equivalence = void 0; +var equivalence = _interopRequireWildcard(require("./Equivalence.js")); +var _Function = require("./Function.js"); +var option = _interopRequireWildcard(require("./internal/option.js")); +var _Iterable = _interopRequireWildcard(require("./Iterable.js")); +var order = _interopRequireWildcard(require("./Order.js")); +var predicate = _interopRequireWildcard(require("./Predicate.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * # Number + * + * This module provides utility functions and type class instances for working + * with the `number` type in TypeScript. It includes functions for basic + * arithmetic operations, as well as type class instances for `Equivalence` and + * `Order`. + * + * ## Operations Reference + * + * | Category | Operation | Description | Domain | Co-domain | + * | ------------ | ------------------------------------------ | ------------------------------------------------------- | ------------------------------ | --------------------- | + * | constructors | {@link module:Number.parse} | Safely parses a string to a number | `string` | `Option` | + * | | | | | | + * | math | {@link module:Number.sum} | Adds two numbers | `number`, `number` | `number` | + * | math | {@link module:Number.sumAll} | Sums all numbers in a collection | `Iterable` | `number` | + * | math | {@link module:Number.subtract} | Subtracts one number from another | `number`, `number` | `number` | + * | math | {@link module:Number.multiply} | Multiplies two numbers | `number`, `number` | `number` | + * | math | {@link module:Number.multiplyAll} | Multiplies all numbers in a collection | `Iterable` | `number` | + * | math | {@link module:Number.divide} | Safely divides handling division by zero | `number`, `number` | `Option` | + * | math | {@link module:Number.unsafeDivide} | Divides but misbehaves for division by zero | `number`, `number` | `number` | + * | math | {@link module:Number.remainder} | Calculates remainder of division | `number`, `number` | `number` | + * | math | {@link module:Number.increment} | Adds 1 to a number | `number` | `number` | + * | math | {@link module:Number.decrement} | Subtracts 1 from a number | `number` | `number` | + * | math | {@link module:Number.sign} | Determines the sign of a number | `number` | `Ordering` | + * | math | {@link module:Number.nextPow2} | Finds the next power of 2 | `number` | `number` | + * | math | {@link module:Number.round} | Rounds a number with specified precision | `number`, `number` | `number` | + * | | | | | | + * | predicates | {@link module:Number.between} | Checks if a number is in a range | `number`, `{minimum, maximum}` | `boolean` | + * | predicates | {@link module:Number.lessThan} | Checks if one number is less than another | `number`, `number` | `boolean` | + * | predicates | {@link module:Number.lessThanOrEqualTo} | Checks if one number is less than or equal | `number`, `number` | `boolean` | + * | predicates | {@link module:Number.greaterThan} | Checks if one number is greater than another | `number`, `number` | `boolean` | + * | predicates | {@link module:Number.greaterThanOrEqualTo} | Checks if one number is greater or equal | `number`, `number` | `boolean` | + * | | | | | | + * | guards | {@link module:Number.isNumber} | Type guard for JavaScript numbers | `unknown` | `boolean` | + * | | | | | | + * | comparison | {@link module:Number.min} | Returns the minimum of two numbers | `number`, `number` | `number` | + * | comparison | {@link module:Number.max} | Returns the maximum of two numbers | `number`, `number` | `number` | + * | comparison | {@link module:Number.clamp} | Restricts a number to a range | `number`, `{minimum, maximum}` | `number` | + * | | | | | | + * | instances | {@link module:Number.Equivalence} | Equivalence instance for numbers | | `Equivalence` | + * | instances | {@link module:Number.Order} | Order instance for numbers | | `Order` | + * | | | | | | + * | errors | {@link module:Number.DivisionByZeroError} | Error thrown by unsafeDivide | | | + * + * ## Composition Patterns and Type Safety + * + * When building function pipelines, understanding how types flow through + * operations is critical: + * + * ### Composing with type-preserving operations + * + * Most operations in this module are type-preserving (`number → number`), + * making them easily composable in pipelines: + * + * ```ts + * import { pipe } from "effect" + * import * as Number from "effect/Number" + * + * const result = pipe( + * 10, + * Number.increment, // number → number + * Number.multiply(2), // number → number + * Number.round(1) // number → number + * ) // Result: number (21) + * ``` + * + * ### Working with Option results + * + * Operations that might fail (like division by zero) return Option types and + * require Option combinators: + * + * ```ts + * import { pipe, Option } from "effect" + * import * as Number from "effect/Number" + * + * const result = pipe( + * 10, + * Number.divide(0), // number → Option + * Option.getOrElse(() => 0) // Option → number + * ) // Result: number (0) + * ``` + * + * ### Composition best practices + * + * - Chain type-preserving operations for maximum composability + * - Use Option combinators when working with potentially failing operations + * - Consider using Effect for operations that might fail with specific errors + * - Remember that all operations maintain JavaScript's floating-point precision + * limitations + * + * @module Number + * @since 2.0.0 + * @see {@link module:BigInt} for more similar operations on `bigint` types + * @see {@link module:BigDecimal} for more similar operations on `BigDecimal` types + */ + +/** + * Type guard that tests if a value is a member of the set of JavaScript + * numbers. + * + * @memberof Number + * @since 2.0.0 + * @category guards + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import * as Number from "effect/Number" + * + * // Regular numbers + * assert.equal(Number.isNumber(2), true) + * assert.equal(Number.isNumber(-3.14), true) + * assert.equal(Number.isNumber(0), true) + * + * // Special numeric values + * assert.equal(Number.isNumber(Infinity), true) + * assert.equal(Number.isNumber(NaN), true) + * + * // Non-number values + * assert.equal(Number.isNumber("2"), false) + * assert.equal(Number.isNumber(true), false) + * assert.equal(Number.isNumber(null), false) + * assert.equal(Number.isNumber(undefined), false) + * assert.equal(Number.isNumber({}), false) + * assert.equal(Number.isNumber([]), false) + * + * // Using as a type guard in conditionals + * function processValue(value: unknown): string { + * if (Number.isNumber(value)) { + * // TypeScript now knows 'value' is a number + * return `Numeric value: ${value.toFixed(2)}` + * } + * return "Not a number" + * } + * + * assert.strictEqual(processValue(42), "Numeric value: 42.00") + * assert.strictEqual(processValue("hello"), "Not a number") + * + * // Filtering for numbers in an array + * const mixed = [1, "two", 3, false, 5] + * const onlyNumbers = mixed.filter(Number.isNumber) + * assert.equal(onlyNumbers, [1, 3, 5]) + * ``` + * + * @param input - The value to test for membership in the set of JavaScript + * numbers + * + * @returns `true` if the input is a JavaScript number, `false` otherwise + */ +const isNumber = exports.isNumber = predicate.isNumber; +/** + * Returns the additive inverse of a number, effectively negating it. + * + * @memberof Number + * @since 3.14.6 + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { pipe } from "effect" + * import * as Number from "effect/Number" + * + * assert.equal( + * Number.negate(5), // + * -5 + * ) + * + * assert.equal( + * Number.negate(-5), // + * 5 + * ) + * + * assert.equal( + * Number.negate(0), // + * 0 + * ) + * ``` + * + * @param n - The number value to be negated. + * + * @returns The negated number value. + */ +const negate = n => multiply(n, -1); +/** + * Performs addition in the set of JavaScript numbers. + * + * @memberof Number + * @since 2.0.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { pipe } from "effect" + * import * as Number from "effect/Number" + * + * // Data-first style (direct application) + * assert.equal(Number.sum(2, 3), 5) + * assert.equal(Number.sum(-10, 5), -5) + * assert.equal(Number.sum(0.1, 0.2), 0.30000000000000004) // Note: floating-point precision limitation + * + * // Data-last style (pipeable) + * assert.equal( + * pipe( + * 10, + * Number.sum(5) // 10 + 5 = 15 + * ), + * 15 + * ) + * + * // Chaining multiple additions + * assert.equal( + * pipe( + * 1, + * Number.sum(2), // 1 + 2 = 3 + * Number.sum(3), // 3 + 3 = 6 + * Number.sum(4) // 6 + 4 = 10 + * ), + * 10 + * ) + * + * // Identity property: a + 0 = a + * assert.equal(Number.sum(42, 0), 42) + * + * // Commutative property: a + b = b + a + * assert.equal(Number.sum(5, 3), Number.sum(3, 5)) + * ``` + */ +exports.negate = negate; +const sum = exports.sum = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => self + that); +/** + * Computes the sum of all elements in an iterable collection of numbers. + * + * @memberof Number + * @since 2.0.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import * as Number from "effect/Number" + * + * // Basic sums + * assert.equal(Number.sumAll([2, 3, 4]), 9) // 2 + 3 + 4 = 9 + * assert.equal(Number.sumAll([1.1, 2.2, 3.3]), 6.6) // 1.1 + 2.2 + 3.3 = 6.6 + * + * // Empty collection returns the additive identity (0) + * assert.equal(Number.sumAll([]), 0) + * + * // Single element collection + * assert.equal(Number.sumAll([42]), 42) + * + * // Sums with negative numbers + * assert.equal(Number.sumAll([2, -3, 4]), 3) // 2 + (-3) + 4 = 3 + * assert.equal(Number.sumAll([-2, -3, -4]), -9) // (-2) + (-3) + (-4) = -9 + * + * // Works with any iterable + * assert.equal(Number.sumAll(new Set([2, 3, 4])), 9) + * + * // Using with generated sequences + * function* range(start: number, end: number) { + * for (let i = start; i <= end; i++) yield i + * } + * + * // Compute sum of first 5 natural numbers: 1 + 2 + 3 + 4 + 5 = 15 + * assert.equal(Number.sumAll(range(1, 5)), 15) + * + * // Floating point precision example + * assert.equal( + * Number.sumAll([0.1, 0.2]), + * 0.30000000000000004 // Note IEEE 754 precision limitation + * ) + * ``` + * + * @param collection - An `iterable` containing the `numbers` to sum + * + * @returns The sum of all numbers in the collection, or 0 if the collection is + * empty + */ +const sumAll = collection => _Iterable.reduce(collection, 0, sum); +/** + * Performs subtraction in the set of JavaScript numbers. + * + * @memberof Number + * @since 2.0.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { pipe } from "effect" + * import * as Number from "effect/Number" + * + * // Data-first style (direct application) + * assert.equal(Number.subtract(2, 3), -1) // 2 - 3 = -1 + * assert.equal(Number.subtract(10, 5), 5) // 10 - 5 = 5 + * assert.equal(Number.subtract(0.3, 0.1), 0.19999999999999998) // Note: floating-point precision limitation + * + * // Data-last style (pipeable) + * assert.equal( + * pipe( + * 10, + * Number.subtract(5) // 10 - 5 = 5 + * ), + * 5 + * ) + * + * // Chaining multiple subtractions + * assert.equal( + * pipe( + * 20, + * Number.subtract(5), // 20 - 5 = 15 + * Number.subtract(3), // 15 - 3 = 12 + * Number.subtract(2) // 12 - 2 = 10 + * ), + * 10 + * ) + * + * // Right identity property: a - 0 = a + * assert.equal(Number.subtract(42, 0), 42) + * + * // Self-annihilation property: a - a = 0 + * assert.equal(Number.subtract(42, 42), 0) + * + * // Non-commutative property: a - b ≠ b - a + * assert.equal(Number.subtract(5, 3), 2) // 5 - 3 = 2 + * assert.equal(Number.subtract(3, 5), -2) // 3 - 5 = -2 + * + * // Inverse relation: a - b = -(b - a) + * assert.equal(Number.subtract(5, 3), -Number.subtract(3, 5)) + * ``` + */ +exports.sumAll = sumAll; +const subtract = exports.subtract = /*#__PURE__*/(0, _Function.dual)(2, (minuend, subtrahend) => minuend - subtrahend); +/** + * Performs **multiplication** in the set of JavaScript numbers. + * + * @memberof Number + * @since 2.0.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { pipe } from "effect" + * import * as Number from "effect/Number" + * + * // Data-first style (direct application) + * assert.equal(Number.multiply(2, 3), 6) // 2 × 3 = 6 + * assert.equal(Number.multiply(-4, 5), -20) // (-4) × 5 = -20 + * assert.equal(Number.multiply(-3, -2), 6) // (-3) × (-2) = 6 + * assert.equal(Number.multiply(0.1, 0.2), 0.020000000000000004) // Note: floating-point precision limitation + * + * // Data-last style (pipeable) + * assert.equal( + * pipe( + * 10, + * Number.multiply(5) // 10 × 5 = 50 + * ), + * 50 + * ) + * + * // Chaining multiple multiplications + * assert.equal( + * pipe( + * 2, + * Number.multiply(3), // 2 × 3 = 6 + * Number.multiply(4), // 6 × 4 = 24 + * Number.multiply(0.5) // 24 × 0.5 = 12 + * ), + * 12 + * ) + * + * // Identity property: a × 1 = a + * assert.equal(Number.multiply(42, 1), 42) + * + * // Zero property: a × 0 = 0 + * assert.equal(Number.multiply(42, 0), 0) + * + * // Commutative property: a × b = b × a + * assert.equal(Number.multiply(5, 3), Number.multiply(3, 5)) + * + * // Associative property: (a × b) × c = a × (b × c) + * const a = 2, + * b = 3, + * c = 4 + * assert.equal( + * Number.multiply(Number.multiply(a, b), c), + * Number.multiply(a, Number.multiply(b, c)) + * ) + * ``` + */ +const multiply = exports.multiply = /*#__PURE__*/(0, _Function.dual)(2, (multiplier, multiplicand) => multiplier * multiplicand); +/** + * Computes the product of all elements in an iterable collection of numbers. + * + * @memberof Number + * @since 2.0.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import * as Number from "effect/Number" + * + * // Basic products + * assert.equal(Number.multiplyAll([2, 3, 4]), 24) // 2 × 3 × 4 = 24 + * assert.equal(Number.multiplyAll([1.5, 2, 3]), 9) // 1.5 × 2 × 3 = 9 + * + * // Empty collection returns the multiplicative identity (1) + * assert.equal(Number.multiplyAll([]), 1) + * + * // Single element collection + * assert.equal(Number.multiplyAll([42]), 42) + * + * // Products with negative numbers + * assert.equal(Number.multiplyAll([2, -3, 4]), -24) // 2 × (-3) × 4 = -24 + * assert.equal(Number.multiplyAll([-2, -3]), 6) // (-2) × (-3) = 6 + * + * // Zero property - if any element is zero, product is zero + * assert.equal(Number.multiplyAll([2, 0, 3]), 0) + * + * // Works with any iterable + * assert.equal(Number.multiplyAll(new Set([2, 3, 4])), 24) + * + * // Using with generated sequences + * function* range(start: number, end: number) { + * for (let i = start; i <= end; i++) yield i + * } + * + * // Compute factorial: 5! = 5 × 4 × 3 × 2 × 1 = 120 + * assert.equal(Number.multiplyAll(range(1, 5)), 120) + * ``` + * + * @param collection - An `iterable` containing the `numbers` to multiply + * + * @returns The product of all numbers in the collection, or 1 if the collection + * is empty + */ +const multiplyAll = collection => { + let out = 1; + for (const n of collection) { + if (n === 0) { + return 0; + } + out *= n; + } + return out; +}; +/** + * Performs division in the set of JavaScript numbers, returning the result + * wrapped in an `Option` to handle division by zero. + * + * @memberof Number + * @since 2.0.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { pipe, Option } from "effect" + * import * as Number from "effect/Number" + * + * // Data-first style (direct application) + * assert.equal(Number.divide(6, 3), Option.some(2)) // 6 ÷ 3 = 2 + * assert.equal(Number.divide(-8, 4), Option.some(-2)) // (-8) ÷ 4 = -2 + * assert.equal(Number.divide(-10, -5), Option.some(2)) // (-10) ÷ (-5) = 2 + * assert.equal(Number.divide(1, 3), Option.some(0.3333333333333333)) // Note: floating-point approximation + * + * // Handling division by zero + * assert.equal(Number.divide(6, 0), Option.none()) // 6 ÷ 0 is undefined + * + * // Data-last style (pipeable) + * assert.equal( + * pipe( + * 10, + * Number.divide(2) // 10 ÷ 2 = 5 + * ), + * Option.some(5) + * ) + * + * // Chaining multiple divisions using Option combinators + * assert.equal( + * pipe( + * Option.some(24), + * Option.flatMap((n) => Number.divide(n, 2)), // 24 ÷ 2 = 12 + * Option.flatMap(Number.divide(3)), // 12 ÷ 3 = 4 + * Option.flatMap(Number.divide(2)) // 4 ÷ 2 = 2 + * ), + * Option.some(2) + * ) + * + * // Division-by-one property: a ÷ 1 = a + * assert.equal(Number.divide(42, 1), Option.some(42)) + * + * // Self-division property: a ÷ a = 1 (for a ≠ 0) + * assert.equal(Number.divide(42, 42), Option.some(1)) + * + * // Non-commutative property: a ÷ b ≠ b ÷ a + * assert.notDeepStrictEqual( + * Number.divide(6, 3), // 6 ÷ 3 = 2 + * Number.divide(3, 6) // 3 ÷ 6 = 0.5 + * ) + * ``` + */ +exports.multiplyAll = multiplyAll; +const divide = exports.divide = /*#__PURE__*/(0, _Function.dual)(2, (dividend, divisor) => divisor === 0 ? option.none : option.some(dividend / divisor)); +/** + * Performs division in the set of JavaScript numbers, but misbehaves for + * division by zero. + * + * Unlike {@link module:Number.divide} which returns an Option, this function + * directly returns a number or `Infinity` or `NaN`. + * + * - If the `divisor` is zero, it returns `Infinity`. + * - If both the `dividend` and the `divisor` are zero, then it returns `NaN`. + * + * @memberof Number + * @since 2.0.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { pipe } from "effect" + * import * as Number from "effect/Number" + * + * // Data-first style (direct application) + * assert.equal(Number.unsafeDivide(6, 3), 2) // 6 ÷ 3 = 2 + * assert.equal(Number.unsafeDivide(-8, 4), -2) // (-8) ÷ 4 = -2 + * assert.equal(Number.unsafeDivide(-10, -5), 2) // (-10) ÷ (-5) = 2 + * assert.equal(Number.unsafeDivide(1, 3), 0.3333333333333333) + * + * // Data-last style (pipeable) + * assert.equal( + * pipe( + * 10, + * Number.unsafeDivide(2) // 10 ÷ 2 = 5 + * ), + * 5 + * ) + * + * // Chaining multiple divisions + * assert.equal( + * pipe( + * 24, + * Number.unsafeDivide(2), // 24 ÷ 2 = 12 + * Number.unsafeDivide(3), // 12 ÷ 3 = 4 + * Number.unsafeDivide(2) // 4 ÷ 2 = 2 + * ), + * 2 + * ) + * + * assert.equal(Number.unsafeDivide(6, 0), Infinity) + * + * assert.equal(Number.unsafeDivide(0, 0), NaN) + * + * // Compare with safe division + * const safeResult = Number.divide(6, 3) // Option.some(2) + * const unsafeResult = Number.unsafeDivide(6, 3) // 2 directly + * ``` + * + * @throws - An {@link module:Number.DivisionByZeroError} if the divisor is zero. + * @see {@link module:Number.divide} - Safe division returning an Option + */ +const unsafeDivide = exports.unsafeDivide = /*#__PURE__*/(0, _Function.dual)(2, (dividend, divisor) => dividend / divisor); +/** + * Returns the result of adding `1` to a given number. + * + * @memberof Number + * @since 2.0.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { increment } from "effect/Number" + * + * assert.equal(increment(2), 3) + * ``` + */ +const increment = n => sum(n, 1); +/** + * Decrements a number by `1`. + * + * @memberof Number + * @since 2.0.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { decrement } from "effect/Number" + * + * assert.equal(decrement(3), 2) + * ``` + */ +exports.increment = increment; +const decrement = n => subtract(n, 1); +/** + * @memberof Number + * @since 2.0.0 + * @category instances + */ +exports.decrement = decrement; +const Equivalence = exports.Equivalence = equivalence.number; +/** + * @memberof Number + * @since 2.0.0 + * @category instances + */ +const Order = exports.Order = order.number; +/** + * Returns `true` if the first argument is less than the second, otherwise + * `false`. + * + * @memberof Number + * @since 2.0.0 + * @category predicates + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { lessThan } from "effect/Number" + * + * assert.equal(lessThan(2, 3), true) + * assert.equal(lessThan(3, 3), false) + * assert.equal(lessThan(4, 3), false) + * ``` + */ +const lessThan = exports.lessThan = /*#__PURE__*/order.lessThan(Order); +/** + * Returns a function that checks if a given `number` is less than or equal to + * the provided one. + * + * @memberof Number + * @since 2.0.0 + * @category predicates + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { lessThanOrEqualTo } from "effect/Number" + * + * assert.equal(lessThanOrEqualTo(2, 3), true) + * assert.equal(lessThanOrEqualTo(3, 3), true) + * assert.equal(lessThanOrEqualTo(4, 3), false) + * ``` + */ +const lessThanOrEqualTo = exports.lessThanOrEqualTo = /*#__PURE__*/order.lessThanOrEqualTo(Order); +/** + * Returns `true` if the first argument is greater than the second, otherwise + * `false`. + * + * @memberof Number + * @since 2.0.0 + * @category predicates + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { greaterThan } from "effect/Number" + * + * assert.equal(greaterThan(2, 3), false) + * assert.equal(greaterThan(3, 3), false) + * assert.equal(greaterThan(4, 3), true) + * ``` + */ +const greaterThan = exports.greaterThan = /*#__PURE__*/order.greaterThan(Order); +/** + * Returns a function that checks if a given `number` is greater than or equal + * to the provided one. + * + * @memberof Number + * @since 2.0.0 + * @category predicates + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { greaterThanOrEqualTo } from "effect/Number" + * + * assert.equal(greaterThanOrEqualTo(2, 3), false) + * assert.equal(greaterThanOrEqualTo(3, 3), true) + * assert.equal(greaterThanOrEqualTo(4, 3), true) + * ``` + */ +const greaterThanOrEqualTo = exports.greaterThanOrEqualTo = /*#__PURE__*/order.greaterThanOrEqualTo(Order); +/** + * Checks if a `number` is between a `minimum` and `maximum` value (inclusive). + * + * @memberof Number + * @since 2.0.0 + * @category predicates + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { Number } from "effect" + * + * const between = Number.between({ minimum: 0, maximum: 5 }) + * + * assert.equal(between(3), true) + * assert.equal(between(-1), false) + * assert.equal(between(6), false) + * ``` + */ +const between = exports.between = /*#__PURE__*/order.between(Order); +/** + * Restricts the given `number` to be within the range specified by the + * `minimum` and `maximum` values. + * + * - If the `number` is less than the `minimum` value, the function returns the + * `minimum` value. + * - If the `number` is greater than the `maximum` value, the function returns the + * `maximum` value. + * - Otherwise, it returns the original `number`. + * + * @memberof Number + * @since 2.0.0 + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { Number } from "effect" + * + * const clamp = Number.clamp({ minimum: 1, maximum: 5 }) + * + * assert.equal(clamp(3), 3) + * assert.equal(clamp(0), 1) + * assert.equal(clamp(6), 5) + * ``` + */ +const clamp = exports.clamp = /*#__PURE__*/order.clamp(Order); +/** + * Returns the minimum between two `number`s. + * + * @memberof Number + * @since 2.0.0 + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { min } from "effect/Number" + * + * assert.equal(min(2, 3), 2) + * ``` + */ +const min = exports.min = /*#__PURE__*/order.min(Order); +/** + * Returns the maximum between two `number`s. + * + * @memberof Number + * @since 2.0.0 + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { max } from "effect/Number" + * + * assert.equal(max(2, 3), 3) + * ``` + */ +const max = exports.max = /*#__PURE__*/order.max(Order); +/** + * Determines the sign of a given `number`. + * + * @memberof Number + * @since 2.0.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { sign } from "effect/Number" + * + * assert.equal(sign(-5), -1) + * assert.equal(sign(0), 0) + * assert.equal(sign(5), 1) + * ``` + */ +const sign = n => Order(n, 0); +/** + * Returns the remainder left over when one operand is divided by a second + * operand. + * + * It always takes the sign of the dividend. + * + * @memberof Number + * @since 2.0.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { remainder } from "effect/Number" + * + * assert.equal(remainder(2, 2), 0) + * assert.equal(remainder(3, 2), 1) + * assert.equal(remainder(-4, 2), -0) + * ``` + */ +exports.sign = sign; +const remainder = exports.remainder = /*#__PURE__*/(0, _Function.dual)(2, (dividend, divisor) => { + // https://stackoverflow.com/questions/3966484/why-does-modulus-operator-return-fractional-number-in-javascript/31711034#31711034 + const selfDecCount = (dividend.toString().split(".")[1] || "").length; + const divisorDecCount = (divisor.toString().split(".")[1] || "").length; + const decCount = selfDecCount > divisorDecCount ? selfDecCount : divisorDecCount; + const selfInt = parseInt(dividend.toFixed(decCount).replace(".", "")); + const divisorInt = parseInt(divisor.toFixed(decCount).replace(".", "")); + return selfInt % divisorInt / Math.pow(10, decCount); +}); +/** + * Returns the next power of 2 greater than or equal to the given number. + * + * - For `positive` inputs, returns the smallest power of 2 that is >= the input + * - For `zero`, returns 2 + * - For `negative` inputs, returns NaN (as logarithms of negative numbers are + * undefined) + * - For `NaN` input, returns NaN + * - For `Infinity`, returns Infinity + * + * @memberof Number + * @since 2.0.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { nextPow2 } from "effect/Number" + * + * assert.equal(nextPow2(5), 8) + * assert.equal(nextPow2(17), 32) + * assert.equal(nextPow2(0), 2) + * assert.equal(Number.isNaN(nextPow2(-1)), true) // Negative inputs result in NaN + * ``` + */ +const nextPow2 = n => { + const nextPow = Math.ceil(Math.log(n) / Math.log(2)); + return Math.max(Math.pow(2, nextPow), 2); +}; +/** + * Tries to parse a `number` from a `string` using the `Number()` function. The + * following special string values are supported: "NaN", "Infinity", + * "-Infinity". + * + * @memberof Number + * @since 2.0.0 + * @category constructors + */ +exports.nextPow2 = nextPow2; +const parse = s => { + if (s === "NaN") { + return option.some(NaN); + } + if (s === "Infinity") { + return option.some(Infinity); + } + if (s === "-Infinity") { + return option.some(-Infinity); + } + if (s.trim() === "") { + return option.none; + } + const n = Number(s); + return Number.isNaN(n) ? option.none : option.some(n); +}; +/** + * Returns the number rounded with the given precision. + * + * @memberof Number + * @since 3.8.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { round } from "effect/Number" + * + * assert.equal(round(1.1234, 2), 1.12) + * assert.equal(round(1.567, 2), 1.57) + * ``` + */ +exports.parse = parse; +const round = exports.round = /*#__PURE__*/(0, _Function.dual)(2, (self, precision) => { + const factor = Math.pow(10, precision); + return Math.round(self * factor) / factor; +}); +//# sourceMappingURL=Number.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Number.js.map b/backend/node_modules/effect/dist/cjs/Number.js.map new file mode 100644 index 0000000000000000000000000000000000000000..32b5271c49ecc026db84cdfcfa280fb0710fd499 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Number.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Number.js","names":["equivalence","_interopRequireWildcard","require","_Function","option","_Iterable","order","predicate","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","isNumber","exports","negate","multiply","sum","dual","self","that","sumAll","collection","reduce","subtract","minuend","subtrahend","multiplier","multiplicand","multiplyAll","out","divide","dividend","divisor","none","some","unsafeDivide","increment","decrement","Equivalence","number","Order","lessThan","lessThanOrEqualTo","greaterThan","greaterThanOrEqualTo","between","clamp","min","max","sign","remainder","selfDecCount","toString","split","length","divisorDecCount","decCount","selfInt","parseInt","toFixed","replace","divisorInt","Math","pow","nextPow2","nextPow","ceil","log","parse","s","NaN","Infinity","trim","Number","isNaN","round","precision","factor"],"sources":["../../src/Number.ts"],"sourcesContent":[null],"mappings":";;;;;;AAiGA,IAAAA,WAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,SAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAEA,IAAAI,KAAA,GAAAL,uBAAA,CAAAC,OAAA;AAEA,IAAAK,SAAA,GAAAN,uBAAA,CAAAC,OAAA;AAA2C,SAAAD,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAA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A8D,KAAA,gBAmCd,IAAA1D,cAAI,EAAC,CAAC,EAAE,CAACC,IAAY,EAAE0D,SAAiB,KAAY;EACtD,MAAMC,MAAM,GAAGf,IAAI,CAACC,GAAG,CAAC,EAAE,EAAEa,SAAS,CAAC;EACtC,OAAOd,IAAI,CAACa,KAAK,CAACzD,IAAI,GAAG2D,MAAM,CAAC,GAAGA,MAAM;AAC3C,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Option.js b/backend/node_modules/effect/dist/cjs/Option.js new file mode 100644 index 0000000000000000000000000000000000000000..da90d699c27cd2ca803f7fa36fae64da20418e49 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Option.js @@ -0,0 +1,1769 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.zipWith = exports.zipRight = exports.zipLeft = exports.void = exports.toRefinement = exports.toArray = exports.tap = exports.some = exports.reduceCompact = exports.productMany = exports.product = exports.partitionMap = exports.orElseSome = exports.orElseEither = exports.orElse = exports.none = exports.mergeWith = exports.match = exports.map = exports.liftThrowable = exports.liftPredicate = exports.liftNullable = exports.lift2 = exports.let = exports.isSome = exports.isOption = exports.isNone = exports.getRight = exports.getOrder = exports.getOrUndefined = exports.getOrThrowWith = exports.getOrThrow = exports.getOrNull = exports.getOrElse = exports.getLeft = exports.getEquivalence = exports.gen = exports.fromNullable = exports.fromIterable = exports.flatten = exports.flatMapNullable = exports.flatMap = exports.firstSomeOf = exports.filterMap = exports.filter = exports.exists = exports.containsWith = exports.contains = exports.composeK = exports.bindTo = exports.bind = exports.asVoid = exports.as = exports.ap = exports.andThen = exports.all = exports.TypeId = exports.Do = void 0; +var Equal = _interopRequireWildcard(require("./Equal.js")); +var Equivalence = _interopRequireWildcard(require("./Equivalence.js")); +var _Function = require("./Function.js"); +var doNotation = _interopRequireWildcard(require("./internal/doNotation.js")); +var either = _interopRequireWildcard(require("./internal/either.js")); +var option = _interopRequireWildcard(require("./internal/option.js")); +var order = _interopRequireWildcard(require("./Order.js")); +var Gen = _interopRequireWildcard(require("./Utils.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @category Symbols + * @since 2.0.0 + */ +const TypeId = exports.TypeId = /*#__PURE__*/Symbol.for("effect/Option"); +/** + * Represents the absence of a value by creating an empty `Option`. + * + * `Option.none` returns an `Option`, which is a subtype of `Option`. + * This means you can use it in place of any `Option` regardless of the type + * `A`. + * + * **Example** (Creating an Option with No Value) + * + * ```ts + * import { Option } from "effect" + * + * // An Option holding no value + * // + * // ┌─── Option + * // ▼ + * const noValue = Option.none() + * + * console.log(noValue) + * // Output: { _id: 'Option', _tag: 'None' } + * ``` + * + * @see {@link some} for the opposite operation. + * + * @category Constructors + * @since 2.0.0 + */ +const none = () => option.none; +/** + * Wraps the given value into an `Option` to represent its presence. + * + * **Example** (Creating an Option with a Value) + * + * ```ts + * import { Option } from "effect" + * + * // An Option holding the number 1 + * // + * // ┌─── Option + * // ▼ + * const value = Option.some(1) + * + * console.log(value) + * // Output: { _id: 'Option', _tag: 'Some', value: 1 } + * ``` + * + * @see {@link none} for the opposite operation. + * + * @category Constructors + * @since 2.0.0 + */ +exports.none = none; +const some = exports.some = option.some; +/** + * Determines whether the given value is an `Option`. + * + * **Details** + * + * This function checks if a value is an instance of `Option`. It returns `true` + * if the value is either `Option.some` or `Option.none`, and `false` otherwise. + * This is particularly useful when working with unknown values or when you need + * to ensure type safety in your code. + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.isOption(Option.some(1))) + * // Output: true + * + * console.log(Option.isOption(Option.none())) + * // Output: true + * + * console.log(Option.isOption({})) + * // Output: false + * ``` + * + * @category Guards + * @since 2.0.0 + */ +const isOption = exports.isOption = option.isOption; +/** + * Checks whether an `Option` represents the absence of a value (`None`). + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.isNone(Option.some(1))) + * // Output: false + * + * console.log(Option.isNone(Option.none())) + * // Output: true + * ``` + * + * @see {@link isSome} for the opposite check. + * + * @category Guards + * @since 2.0.0 + */ +const isNone = exports.isNone = option.isNone; +/** + * Checks whether an `Option` contains a value (`Some`). + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.isSome(Option.some(1))) + * // Output: true + * + * console.log(Option.isSome(Option.none())) + * // Output: false + * ``` + * + * @see {@link isNone} for the opposite check. + * + * @category Guards + * @since 2.0.0 + */ +const isSome = exports.isSome = option.isSome; +/** + * Performs pattern matching on an `Option` to handle both `Some` and `None` + * cases. + * + * **Details** + * + * This function allows you to match against an `Option` and handle both + * scenarios: when the `Option` is `None` (i.e., contains no value), and when + * the `Option` is `Some` (i.e., contains a value). It executes one of the + * provided functions based on the case: + * + * - If the `Option` is `None`, the `onNone` function is executed and its result + * is returned. + * - If the `Option` is `Some`, the `onSome` function is executed with the + * contained value, and its result is returned. + * + * This function provides a concise and functional way to handle optional values + * without resorting to `if` or manual checks, making your code more declarative + * and readable. + * + * **Example** (Pattern Matching with Option) + * + * ```ts + * import { Option } from "effect" + * + * const foo = Option.some(1) + * + * const message = Option.match(foo, { + * onNone: () => "Option is empty", + * onSome: (value) => `Option has a value: ${value}` + * }) + * + * console.log(message) + * // Output: "Option has a value: 1" + * ``` + * + * @category Pattern matching + * @since 2.0.0 + */ +const match = exports.match = /*#__PURE__*/(0, _Function.dual)(2, (self, { + onNone, + onSome +}) => isNone(self) ? onNone() : onSome(self.value)); +/** + * Converts an `Option`-returning function into a type guard. + * + * **Details** + * + * This function transforms a function that returns an `Option` into a type + * guard, ensuring type safety when validating or narrowing types. The returned + * type guard function checks whether the input satisfies the condition defined + * in the original `Option`-returning function. + * + * If the original function returns `Option.some`, the type guard evaluates to + * `true`, confirming the input is of the desired type. If the function returns + * `Option.none`, the type guard evaluates to `false`. + * + * This utility is especially useful for validating types in union types, + * filtering arrays, or ensuring safe handling of specific subtypes. + * + * @example + * ```ts + * import { Option } from "effect" + * + * type MyData = string | number + * + * const parseString = (data: MyData): Option.Option => + * typeof data === "string" ? Option.some(data) : Option.none() + * + * // ┌─── (a: MyData) => a is string + * // ▼ + * const isString = Option.toRefinement(parseString) + * + * console.log(isString("a")) + * // Output: true + * + * console.log(isString(1)) + * // Output: false + * ``` + * + * @category Conversions + * @since 2.0.0 + */ +const toRefinement = f => a => isSome(f(a)); +/** + * Converts an `Iterable` into an `Option`, wrapping the first element if it + * exists. + * + * **Details** + * + * This function takes an `Iterable` (e.g., an array, a generator, or any object + * implementing the `Iterable` interface) and returns an `Option` based on its + * content: + * + * - If the `Iterable` contains at least one element, the first element is + * wrapped in a `Some` and returned. + * - If the `Iterable` is empty, `None` is returned, representing the absence of + * a value. + * + * This utility is useful for safely handling collections that might be empty, + * ensuring you explicitly handle both cases where a value exists or doesn't. + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.fromIterable([1, 2, 3])) + * // Output: { _id: 'Option', _tag: 'Some', value: 1 } + * + * console.log(Option.fromIterable([])) + * // Output: { _id: 'Option', _tag: 'None' } + * ``` + * + * @category Constructors + * @since 2.0.0 + */ +exports.toRefinement = toRefinement; +const fromIterable = collection => { + for (const a of collection) { + return some(a); + } + return none(); +}; +/** + * Converts an `Either` into an `Option` by discarding the error and extracting + * the right value. + * + * **Details** + * + * This function takes an `Either` and returns an `Option` based on its value: + * + * - If the `Either` is a `Right`, its value is wrapped in a `Some` and + * returned. + * - If the `Either` is a `Left`, the error is discarded, and `None` is + * returned. + * + * This is particularly useful when you only care about the success case + * (`Right`) of an `Either` and want to handle the result using `Option`. By + * using this function, you can convert `Either` into a simpler structure for + * cases where error handling is not required. + * + * @example + * ```ts + * import { Either, Option } from "effect" + * + * console.log(Option.getRight(Either.right("ok"))) + * // Output: { _id: 'Option', _tag: 'Some', value: 'ok' } + * + * console.log(Option.getRight(Either.left("err"))) + * // Output: { _id: 'Option', _tag: 'None' } + * ``` + * + * @see {@link getLeft} for the opposite operation. + * + * @category Conversions + * @since 2.0.0 + */ +exports.fromIterable = fromIterable; +const getRight = exports.getRight = either.getRight; +/** + * Converts an `Either` into an `Option` by discarding the right value and + * extracting the left value. + * + * **Details** + * + * This function transforms an `Either` into an `Option` as follows: + * + * - If the `Either` is a `Left`, its value is wrapped in a `Some` and returned. + * - If the `Either` is a `Right`, the value is discarded, and `None` is + * returned. + * + * This utility is useful when you only care about the error case (`Left`) of an + * `Either` and want to handle it as an `Option`. By discarding the right value, + * it simplifies error-focused workflows. + * + * @example + * ```ts + * import { Either, Option } from "effect" + * + * console.log(Option.getLeft(Either.right("ok"))) + * // Output: { _id: 'Option', _tag: 'None' } + * + * console.log(Option.getLeft(Either.left("err"))) + * // Output: { _id: 'Option', _tag: 'Some', value: 'err' } + * ``` + * + * @see {@link getRight} for the opposite operation. + * + * @category Conversions + * @since 2.0.0 + */ +const getLeft = exports.getLeft = either.getLeft; +/** + * Returns the value contained in the `Option` if it is `Some`, otherwise + * evaluates and returns the result of `onNone`. + * + * **Details** + * + * This function allows you to provide a fallback value or computation for when + * an `Option` is `None`. If the `Option` contains a value (`Some`), that value + * is returned. If it is empty (`None`), the `onNone` function is executed, and + * its result is returned instead. + * + * This utility is helpful for safely handling `Option` values by ensuring you + * always receive a meaningful result, whether or not the `Option` contains a + * value. It is particularly useful for providing default values or alternative + * logic when working with optional values. + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.some(1).pipe(Option.getOrElse(() => 0))) + * // Output: 1 + * + * console.log(Option.none().pipe(Option.getOrElse(() => 0))) + * // Output: 0 + * ``` + * + * @see {@link getOrNull} for a version that returns `null` instead of executing a function. + * @see {@link getOrUndefined} for a version that returns `undefined` instead of executing a function. + * + * @category Getters + * @since 2.0.0 + */ +const getOrElse = exports.getOrElse = /*#__PURE__*/(0, _Function.dual)(2, (self, onNone) => isNone(self) ? onNone() : self.value); +/** + * Returns the provided `Option` `that` if the current `Option` (`self`) is + * `None`; otherwise, it returns `self`. + * + * **Details** + * + * This function provides a fallback mechanism for `Option` values. If the + * current `Option` is `None` (i.e., it contains no value), the `that` function + * is evaluated, and its resulting `Option` is returned. If the current `Option` + * is `Some` (i.e., it contains a value), the original `Option` is returned + * unchanged. + * + * This is particularly useful for chaining fallback values or computations, + * allowing you to provide alternative `Option` values when the first one is + * empty. + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.none().pipe(Option.orElse(() => Option.none()))) + * // Output: { _id: 'Option', _tag: 'None' } + * + * console.log(Option.some("a").pipe(Option.orElse(() => Option.none()))) + * // Output: { _id: 'Option', _tag: 'Some', value: 'a' } + * + * console.log(Option.none().pipe(Option.orElse(() => Option.some("b")))) + * // Output: { _id: 'Option', _tag: 'Some', value: 'b' } + * + * console.log(Option.some("a").pipe(Option.orElse(() => Option.some("b")))) + * // Output: { _id: 'Option', _tag: 'Some', value: 'a' } + * ``` + * + * @category Error handling + * @since 2.0.0 + */ +const orElse = exports.orElse = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => isNone(self) ? that() : self); +/** + * Returns the provided default value wrapped in `Some` if the current `Option` + * (`self`) is `None`; otherwise, returns `self`. + * + * **Details** + * + * This function provides a way to supply a default value for cases where an + * `Option` is `None`. If the current `Option` is empty (`None`), the `onNone` + * function is executed to compute the default value, which is then wrapped in a + * `Some`. If the current `Option` contains a value (`Some`), it is returned as + * is. + * + * This is particularly useful for handling optional values where a fallback + * default needs to be provided explicitly in case of absence. + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.none().pipe(Option.orElseSome(() => "b"))) + * // Output: { _id: 'Option', _tag: 'Some', value: 'b' } + * + * console.log(Option.some("a").pipe(Option.orElseSome(() => "b"))) + * // Output: { _id: 'Option', _tag: 'Some', value: 'a' } + * ``` + * + * @category Error handling + * @since 2.0.0 + */ +const orElseSome = exports.orElseSome = /*#__PURE__*/(0, _Function.dual)(2, (self, onNone) => isNone(self) ? some(onNone()) : self); +/** + * Similar to {@link orElse}, but returns an `Either` wrapped in an `Option` to + * indicate the source of the value. + * + * **Details** + * + * This function allows you to provide a fallback `Option` in case the current + * `Option` (`self`) is `None`. However, unlike `orElse`, it returns the value + * wrapped in an `Either` object, providing additional information about where + * the value came from: + * + * - If the value is from the fallback `Option` (`that`), it is wrapped in an + * `Either.right`. + * - If the value is from the original `Option` (`self`), it is wrapped in an + * `Either.left`. + * + * This is especially useful when you need to differentiate between values + * originating from the primary `Option` and those coming from the fallback, + * while still maintaining the `Option`-style handling. + * + * @category Error handling + * @since 2.0.0 + */ +const orElseEither = exports.orElseEither = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => isNone(self) ? map(that(), either.right) : map(self, either.left)); +/** + * Returns the first `Some` value found in an `Iterable` collection of + * `Option`s, or `None` if no `Some` is found. + * + * **Details** + * + * This function iterates over a collection of `Option` values and returns the + * first `Some` it encounters. If the collection contains only `None` values, + * the result will also be `None`. This utility is useful for efficiently + * finding the first valid value in a sequence of potentially empty or invalid + * options. + * + * The iteration stops as soon as a `Some` is found, making this function + * efficient for large collections. + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.firstSomeOf([ + * Option.none(), + * Option.some(1), + * Option.some(2) + * ])) + * // Output: { _id: 'Option', _tag: 'Some', value: 1 } + * ``` + * + * @category Error handling + * @since 2.0.0 + */ +const firstSomeOf = collection => { + let out = none(); + for (out of collection) { + if (isSome(out)) { + return out; + } + } + return out; +}; +/** + * Converts a nullable value into an `Option`. Returns `None` if the value is + * `null` or `undefined`, otherwise wraps the value in a `Some`. + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.fromNullable(undefined)) + * // Output: { _id: 'Option', _tag: 'None' } + * + * console.log(Option.fromNullable(null)) + * // Output: { _id: 'Option', _tag: 'None' } + * + * console.log(Option.fromNullable(1)) + * // Output: { _id: 'Option', _tag: 'Some', value: 1 } + * ``` + * + * @category Conversions + * @since 2.0.0 + */ +exports.firstSomeOf = firstSomeOf; +const fromNullable = nullableValue => nullableValue == null ? none() : some(nullableValue); +/** + * Lifts a function that returns `null` or `undefined` into the `Option` + * context. + * + * **Details** + * + * This function takes a function `f` that might return `null` or `undefined` + * and transforms it into a function that returns an `Option`. The resulting + * function will return: + * - `Some` if the original function produces a non-null, non-undefined value. + * - `None` if the original function produces `null` or `undefined`. + * + * @example + * ```ts + * import { Option } from "effect" + * + * const parse = (s: string): number | undefined => { + * const n = parseFloat(s) + * return isNaN(n) ? undefined : n + * } + * + * const parseOption = Option.liftNullable(parse) + * + * console.log(parseOption("1")) + * // Output: { _id: 'Option', _tag: 'Some', value: 1 } + * + * console.log(parseOption("not a number")) + * // Output: { _id: 'Option', _tag: 'None' } + * ``` + * + * @category Conversions + * @since 2.0.0 + */ +exports.fromNullable = fromNullable; +const liftNullable = f => (...a) => fromNullable(f(...a)); +/** + * Returns the value contained in the `Option` if it is `Some`; otherwise, + * returns `null`. + * + * **Details** + * + * This function provides a way to extract the value of an `Option` while + * falling back to `null` if the `Option` is `None`. + * + * It is particularly useful in scenarios where `null` is an acceptable + * placeholder for the absence of a value, such as when interacting with APIs or + * systems that use `null` as a default for missing values. + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.getOrNull(Option.some(1))) + * // Output: 1 + * + * console.log(Option.getOrNull(Option.none())) + * // Output: null + * ``` + * + * @category Getters + * @since 2.0.0 + */ +exports.liftNullable = liftNullable; +const getOrNull = exports.getOrNull = /*#__PURE__*/getOrElse(_Function.constNull); +/** + * Returns the value contained in the `Option` if it is `Some`; otherwise, + * returns `undefined`. + * + * **Details** + * + * This function provides a way to extract the value of an `Option` while + * falling back to `undefined` if the `Option` is `None`. + * + * It is particularly useful in scenarios where `undefined` is an acceptable + * placeholder for the absence of a value, such as when interacting with APIs or + * systems that use `undefined` as a default for missing values. + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.getOrUndefined(Option.some(1))) + * // Output: 1 + * + * console.log(Option.getOrUndefined(Option.none())) + * // Output: undefined + * ``` + * + * @category Getters + * @since 2.0.0 + */ +const getOrUndefined = exports.getOrUndefined = /*#__PURE__*/getOrElse(_Function.constUndefined); +/** + * Lifts a function that throws exceptions into a function that returns an + * `Option`. + * + * **Details** + * + * This utility function takes a function `f` that might throw an exception and + * transforms it into a safer function that returns an `Option`. If the original + * function executes successfully, the result is wrapped in a `Some`. If an + * exception is thrown, the result is `None`, allowing the developer to handle + * errors in a functional, type-safe way. + * + * @example + * ```ts + * import { Option } from "effect" + * + * const parse = Option.liftThrowable(JSON.parse) + * + * console.log(parse("1")) + * // Output: { _id: 'Option', _tag: 'Some', value: 1 } + * + * console.log(parse("")) + * // Output: { _id: 'Option', _tag: 'None' } + * ``` + * + * @category Conversions + * @since 2.0.0 + */ +const liftThrowable = f => (...a) => { + try { + return some(f(...a)); + } catch { + return none(); + } +}; +/** + * Extracts the value of an `Option` or throws an error if the `Option` is + * `None`, using a custom error factory. + * + * **Details** + * + * This function allows you to extract the value of an `Option` when it is + * `Some`. If the `Option` is `None`, it throws an error generated by the + * provided `onNone` function. This utility is particularly useful when you need + * a fail-fast behavior for empty `Option` values and want to provide a custom + * error message or object. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Option } from "effect" + * + * assert.deepStrictEqual( + * Option.getOrThrowWith(Option.some(1), () => new Error('Unexpected None')), + * 1 + * ) + * assert.throws(() => Option.getOrThrowWith(Option.none(), () => new Error('Unexpected None'))) + * ``` + * + * @see {@link getOrThrow} for a version that throws a default error. + * + * @category Conversions + * @since 2.0.0 + */ +exports.liftThrowable = liftThrowable; +const getOrThrowWith = exports.getOrThrowWith = /*#__PURE__*/(0, _Function.dual)(2, (self, onNone) => { + if (isSome(self)) { + return self.value; + } + throw onNone(); +}); +/** + * Extracts the value of an `Option` or throws a default error if the `Option` + * is `None`. + * + * **Details** + * + * This function extracts the value from an `Option` if it is `Some`. If the + * `Option` is `None`, it throws a default error. It is useful for fail-fast + * scenarios where the absence of a value is treated as an exceptional case and + * a default error is sufficient. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Option } from "effect" + * + * assert.deepStrictEqual(Option.getOrThrow(Option.some(1)), 1) + * assert.throws(() => Option.getOrThrow(Option.none())) + * ``` + * + * @see {@link getOrThrowWith} for a version that allows you to provide a custom error. + * + * @category Conversions + * @since 2.0.0 + */ +const getOrThrow = exports.getOrThrow = /*#__PURE__*/getOrThrowWith(() => new Error("getOrThrow called on a None")); +/** + * Transforms the value inside a `Some` to a new value using the provided + * function, while leaving `None` unchanged. + * + * **Details** + * + * This function applies a mapping function `f` to the value inside an `Option` + * if it is a `Some`. If the `Option` is `None`, it remains unchanged. The + * result is a new `Option` with the transformed value (if it was a `Some`) or + * still `None`. + * + * This utility is particularly useful for chaining transformations in a + * functional way without needing to manually handle `None` cases. + * + * @example + * ```ts + * import { Option } from "effect" + * + * // Mapping over a `Some` + * const someValue = Option.some(2) + * + * console.log(Option.map(someValue, (n) => n * 2)) + * // Output: { _id: 'Option', _tag: 'Some', value: 4 } + * + * // Mapping over a `None` + * const noneValue = Option.none() + * + * console.log(Option.map(noneValue, (n) => n * 2)) + * // Output: { _id: 'Option', _tag: 'None' } + * ``` + * + * @category Mapping + * @since 2.0.0 + */ +const map = exports.map = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => isNone(self) ? none() : some(f(self.value))); +/** + * Replaces the value inside a `Some` with the specified constant value, leaving + * `None` unchanged. + * + * **Details** + * + * This function transforms an `Option` by replacing the value inside a `Some` + * with the given constant value `b`. If the `Option` is `None`, it remains + * unchanged. + * + * This is useful when you want to preserve the presence of a value (`Some`) but + * replace its content with a fixed value. + * + * @example + * ```ts + * import { Option } from "effect" + * + * // Replacing the value of a `Some` + * const someValue = Option.some(42) + * + * console.log(Option.as(someValue, "new value")) + * // Output: { _id: 'Option', _tag: 'Some', value: 'new value' } + * + * // Replacing a `None` (no effect) + * const noneValue = Option.none() + * + * console.log(Option.as(noneValue, "new value")) + * // Output: { _id: 'Option', _tag: 'None' } + * ``` + * + * @category Mapping + * @since 2.0.0 + */ +const as = exports.as = /*#__PURE__*/(0, _Function.dual)(2, (self, b) => map(self, () => b)); +/** + * Replaces the value inside a `Some` with the constant value `void`, leaving + * `None` unchanged. + * + * **Details** + * + * This function transforms an `Option` by replacing the value inside a `Some` + * with `void`. If the `Option` is `None`, it remains unchanged. + * + * This is particularly useful in scenarios where the presence or absence of a + * value is significant, but the actual content of the value is irrelevant. + * + * @category Mapping + * @since 2.0.0 + */ +const asVoid = exports.asVoid = /*#__PURE__*/as(undefined); +const void_ = exports.void = /*#__PURE__*/some(undefined); +/** + * Applies a function to the value of a `Some` and flattens the resulting + * `Option`. If the input is `None`, it remains `None`. + * + * **Details** + * + * This function allows you to chain computations that return `Option` values. + * If the input `Option` is `Some`, the provided function `f` is applied to the + * contained value, and the resulting `Option` is returned. If the input is + * `None`, the function is not applied, and the result remains `None`. + * + * This utility is particularly useful for sequencing operations that may fail + * or produce optional results, enabling clean and concise workflows for + * handling such cases. + * + * @example + * ```ts + * import { Option } from "effect" + * + * interface Address { + * readonly city: string + * readonly street: Option.Option + * } + * + * interface User { + * readonly id: number + * readonly username: string + * readonly email: Option.Option + * readonly address: Option.Option
+ * } + * + * const user: User = { + * id: 1, + * username: "john_doe", + * email: Option.some("john.doe@example.com"), + * address: Option.some({ + * city: "New York", + * street: Option.some("123 Main St") + * }) + * } + * + * // Use flatMap to extract the street value + * const street = user.address.pipe( + * Option.flatMap((address) => address.street) + * ) + * + * console.log(street) + * // Output: { _id: 'Option', _tag: 'Some', value: '123 Main St' } + * ``` + * + * @category Sequencing + * @since 2.0.0 + */ +const flatMap = exports.flatMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => isNone(self) ? none() : f(self.value)); +/** + * Chains two `Option`s together. The second `Option` can either be a static + * value or depend on the result of the first `Option`. + * + * **Details** + * + * This function enables sequencing of two `Option` computations. If the first + * `Option` is `Some`, the second `Option` is evaluated. The second `Option` can + * either: + * + * - Be a static `Option` value. + * - Be a function that produces an `Option`, optionally based on the value of + * the first `Option`. + * + * If the first `Option` is `None`, the function skips the evaluation of the + * second `Option` and directly returns `None`. + * + * @category Sequencing + * @since 2.0.0 + */ +const andThen = exports.andThen = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => flatMap(self, a => { + const b = (0, _Function.isFunction)(f) ? f(a) : f; + return isOption(b) ? b : some(b); +})); +/** + * Combines `flatMap` and `fromNullable`, transforming the value inside a `Some` + * using a function that may return `null` or `undefined`. + * + * **Details** + * + * This function applies a transformation function `f` to the value inside a + * `Some`. The function `f` may return a value, `null`, or `undefined`. If `f` + * returns a value, it is wrapped in a `Some`. If `f` returns `null` or + * `undefined`, the result is `None`. If the input `Option` is `None`, the + * function is not applied, and `None` is returned. + * + * This utility is particularly useful when working with deeply nested optional + * values or chaining computations that may result in `null` or `undefined` at + * some point. + * + * @example + * ```ts + * import { Option } from "effect" + * + * interface Employee { + * company?: { + * address?: { + * street?: { + * name?: string + * } + * } + * } + * } + * + * const employee1: Employee = { company: { address: { street: { name: "high street" } } } } + * + * // Extracting a deeply nested property + * console.log( + * Option.some(employee1) + * .pipe(Option.flatMapNullable((employee) => employee.company?.address?.street?.name)) + * ) + * // Output: { _id: 'Option', _tag: 'Some', value: 'high street' } + * + * const employee2: Employee = { company: { address: { street: {} } } } + * + * // Property does not exist + * console.log( + * Option.some(employee2) + * .pipe(Option.flatMapNullable((employee) => employee.company?.address?.street?.name)) + * ) + * // Output: { _id: 'Option', _tag: 'None' } + * ``` + * + * @category Sequencing + * @since 2.0.0 + */ +const flatMapNullable = exports.flatMapNullable = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => isNone(self) ? none() : fromNullable(f(self.value))); +/** + * Flattens an `Option` of `Option` into a single `Option`. + * + * **Details** + * + * This function takes an `Option` that wraps another `Option` and flattens it + * into a single `Option`. If the outer `Option` is `Some`, the function + * extracts the inner `Option`. If the outer `Option` is `None`, the result + * remains `None`. + * + * This is useful for simplifying nested `Option` structures that may arise + * during functional operations. + * + * @category Sequencing + * @since 2.0.0 + */ +const flatten = exports.flatten = /*#__PURE__*/flatMap(_Function.identity); +/** + * Combines two `Option`s, keeping the value from the second `Option` if both + * are `Some`. + * + * **Details** + * + * This function takes two `Option`s and returns the second one if the first is + * `Some`. If the first `Option` is `None`, the result will also be `None`, + * regardless of the second `Option`. It effectively "zips" the two `Option`s + * while discarding the value from the first `Option`. + * + * This is particularly useful when sequencing computations where the result of + * the first computation is not needed, and you only care about the result of + * the second computation. + * + * @category Zipping + * @since 2.0.0 + */ +const zipRight = exports.zipRight = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => flatMap(self, () => that)); +/** + * Combines two `Option`s, keeping the value from the first `Option` if both are + * `Some`. + * + * **Details** + * + * This function takes two `Option`s and returns the first one if it is `Some`. + * If either the first `Option` or the second `Option` is `None`, the result + * will be `None`. This operation "zips" the two `Option`s while discarding the + * value from the second `Option`. + * + * This is useful when sequencing computations where the second `Option` + * represents a dependency or condition that must hold, but its value is + * irrelevant. + * + * @category Zipping + * @since 2.0.0 + */ +const zipLeft = exports.zipLeft = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => tap(self, () => that)); +/** + * Composes two functions that return `Option` values, creating a new function + * that chains them together. + * + * **Details** + * + * This function allows you to compose two computations, each represented by a + * function that returns an `Option`. The result of the first function is passed + * to the second function if it is `Some`. If the first function returns `None`, + * the composed function short-circuits and returns `None` without invoking the + * second function. + * + * @example + * ```ts + * import { Option } from "effect" + * + * const parse = (s: string): Option.Option => isNaN(Number(s)) ? Option.none() : Option.some(Number(s)) + * + * const double = (n: number): Option.Option => n > 0 ? Option.some(n * 2) : Option.none() + * + * const parseAndDouble = Option.composeK(parse, double) + * + * console.log(parseAndDouble("42")) + * // Output: { _id: 'Option', _tag: 'Some', value: 84 } + * + * console.log(parseAndDouble("not a number")) + * // Output: { _id: 'Option', _tag: 'None' } + * ``` + * + * @category Sequencing + * @since 2.0.0 + */ +const composeK = exports.composeK = /*#__PURE__*/(0, _Function.dual)(2, (afb, bfc) => a => flatMap(afb(a), bfc)); +/** + * Applies the provided function `f` to the value of the `Option` if it is + * `Some` and returns the original `Option`, unless `f` returns `None`, in which + * case it returns `None`. + * + * **Details** + * + * This function allows you to perform additional computations on the value of + * an `Option` without modifying its original value. If the `Option` is `Some`, + * the provided function `f` is executed with the value, and its result + * determines whether the original `Option` is returned (`Some`) or the result + * is `None` if `f` returns `None`. If the input `Option` is `None`, the + * function is not executed, and `None` is returned. + * + * This is particularly useful for applying side conditions or performing + * validation checks while retaining the original `Option`'s value. + * + * @example + * ```ts + * import { Option } from "effect" + * + * const getInteger = (n: number) => Number.isInteger(n) ? Option.some(n) : Option.none() + * + * console.log(Option.tap(Option.none(), getInteger)) + * // Output: { _id: 'Option', _tag: 'None' } + * + * console.log(Option.tap(Option.some(1), getInteger)) + * // Output: { _id: 'Option', _tag: 'Some', value: 1 } + * + * console.log(Option.tap(Option.some(1.14), getInteger)) + * // Output: { _id: 'Option', _tag: 'None' } + * ``` + * + * @category Sequencing + * @since 2.0.0 + */ +const tap = exports.tap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => flatMap(self, a => map(f(a), () => a))); +/** + * Combines two `Option` values into a single `Option` containing a tuple of + * their values if both are `Some`. + * + * **Details** + * + * This function takes two `Option`s and combines their values into a tuple `[A, + * B]` if both are `Some`. If either of the `Option`s is `None`, the result is + * `None`. This is particularly useful for combining multiple `Option` values + * into a single one, ensuring both contain valid values. + * + * @category Combining + * @since 2.0.0 + */ +const product = (self, that) => isSome(self) && isSome(that) ? some([self.value, that.value]) : none(); +/** + * Combines an `Option` with a collection of `Option`s into a single `Option` + * containing a tuple of their values if all are `Some`. + * + * **Details** + * + * This function takes a primary `Option` and a collection of `Option`s and + * combines their values into a tuple `[A, ...Array]` if all are `Some`. If + * the primary `Option` or any `Option` in the collection is `None`, the result + * is `None`. + * + * @category Combining + * @since 2.0.0 + */ +exports.product = product; +const productMany = (self, collection) => { + if (isNone(self)) { + return none(); + } + const out = [self.value]; + for (const o of collection) { + if (isNone(o)) { + return none(); + } + out.push(o.value); + } + return some(out); +}; +/** + * Combines a structure of `Option`s into a single `Option` containing the + * values with the same structure. + * + * **Details** + * + * This function takes a structure of `Option`s (a tuple, struct, or iterable) + * and produces a single `Option` that contains the values from the input + * structure if all `Option`s are `Some`. If any `Option` in the input is + * `None`, the result is `None`. The structure of the input is preserved in the + * output. + * + * - If the input is a tuple (e.g., an array), the result will be an `Option` + * containing a tuple with the same length. + * - If the input is a struct (e.g., an object), the result will be an `Option` + * containing a struct with the same keys. + * - If the input is an iterable, the result will be an `Option` containing an + * array. + * + * @example + * ```ts + * import { Option } from "effect" + * + * const maybeName: Option.Option = Option.some("John") + * const maybeAge: Option.Option = Option.some(25) + * + * // ┌─── Option<[string, number]> + * // ▼ + * const tuple = Option.all([maybeName, maybeAge]) + * console.log(tuple) + * // Output: + * // { _id: 'Option', _tag: 'Some', value: [ 'John', 25 ] } + * + * // ┌─── Option<{ name: string; age: number; }> + * // ▼ + * const struct = Option.all({ name: maybeName, age: maybeAge }) + * console.log(struct) + * // Output: + * // { _id: 'Option', _tag: 'Some', value: { name: 'John', age: 25 } } + * ``` + * + * @category Combining + * @since 2.0.0 + */ +// @ts-expect-error +exports.productMany = productMany; +const all = input => { + if (Symbol.iterator in input) { + const out = []; + for (const o of input) { + if (isNone(o)) { + return none(); + } + out.push(o.value); + } + return some(out); + } + const out = {}; + for (const key of Object.keys(input)) { + const o = input[key]; + if (isNone(o)) { + return none(); + } + out[key] = o.value; + } + return some(out); +}; +/** + * Combines two `Option` values into a new `Option` by applying a provided + * function to their values. + * + * **Details** + * + * This function takes two `Option` values (`self` and `that`) and a combining + * function `f`. If both `Option` values are `Some`, the function `f` is applied + * to their values, and the result is wrapped in a new `Some`. If either + * `Option` is `None`, the result is `None`. + * + * This utility is useful for combining two optional computations into a single + * result while maintaining type safety and avoiding explicit checks for `None`. + * + * @example + * ```ts + * import { Option } from "effect" + * + * const maybeName: Option.Option = Option.some("John") + * const maybeAge: Option.Option = Option.some(25) + * + * // Combine the name and age into a person object + * const person = Option.zipWith(maybeName, maybeAge, (name, age) => ({ + * name: name.toUpperCase(), + * age + * })) + * + * console.log(person) + * // Output: + * // { _id: 'Option', _tag: 'Some', value: { name: 'JOHN', age: 25 } } + * ``` + * + * @category Zipping + * @since 2.0.0 + */ +exports.all = all; +const zipWith = exports.zipWith = /*#__PURE__*/(0, _Function.dual)(3, (self, that, f) => map(product(self, that), ([a, b]) => f(a, b))); +/** + * Applies a function inside a `Some` to a value inside another `Some`, + * combining them into a new `Option`. + * + * **Details** + * + * This function allows you to apply a function wrapped in an `Option` (`self`) + * to a value wrapped in another `Option` (`that`). If both `Option`s are + * `Some`, the function is applied to the value, and the result is wrapped in a + * new `Some`. If either `Option` is `None`, the result is `None`. + * + * @category Combining + * @since 2.0.0 + */ +const ap = exports.ap = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => zipWith(self, that, (f, a) => f(a))); +/** + * Reduces an `Iterable` of `Option` to a single value of type `B`, ignoring + * elements that are `None`. + * + * **Details** + * + * This function takes an initial value of type `B` and a reducing function `f` + * that combines the accumulator with values of type `A`. It processes an + * iterable of `Option`, applying `f` only to the `Some` values while + * ignoring the `None` values. The result is a single value of type `B`. + * + * This utility is particularly useful for aggregating values from an iterable + * of `Option`s while skipping the absent (`None`) values. + * + * @example + * ```ts + * import { Option, pipe } from "effect" + * + * const iterable = [Option.some(1), Option.none(), Option.some(2), Option.none()] + * + * console.log(pipe(iterable, Option.reduceCompact(0, (b, a) => b + a))) + * // Output: 3 + * ``` + * + * @category Reducing + * @since 2.0.0 + */ +const reduceCompact = exports.reduceCompact = /*#__PURE__*/(0, _Function.dual)(3, (self, b, f) => { + let out = b; + for (const oa of self) { + if (isSome(oa)) { + out = f(out, oa.value); + } + } + return out; +}); +/** + * Converts an `Option` into an `Array`. + * If the input is `None`, an empty array is returned. + * If the input is `Some`, its value is wrapped in a single-element array. + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.toArray(Option.some(1))) + * // Output: [1] + * + * console.log(Option.toArray(Option.none())) + * // Output: [] + * ``` + * + * @category Conversions + * @since 2.0.0 + */ +const toArray = self => isNone(self) ? [] : [self.value]; +/** + * Splits an `Option` into two `Option`s based on the result of a mapping + * function that produces an `Either`. + * + * **Details** + * + * This function takes an `Option` and a mapping function `f` that converts its + * value into an `Either`. It returns a tuple of two `Option`s: + * + * - The first `Option` (`left`) contains the value from the `Left` side of the + * `Either` if it exists, otherwise `None`. + * - The second `Option` (`right`) contains the value from the `Right` side of + * the `Either` if it exists, otherwise `None`. + * + * If the input `Option` is `None`, both returned `Option`s are `None`. + * + * This utility is useful for filtering and categorizing the contents of an + * `Option` based on a bifurcating computation. + * + * @category Filtering + * @since 2.0.0 + */ +exports.toArray = toArray; +const partitionMap = exports.partitionMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + if (isNone(self)) { + return [none(), none()]; + } + const e = f(self.value); + return either.isLeft(e) ? [some(e.left), none()] : [none(), some(e.right)]; +}); +// TODO(4.0): remove? +/** + * Alias of {@link flatMap}. + * + * @example + * ```ts + * import { Option } from "effect" + * + * // Transform and filter numbers + * const transformEven = (n: Option.Option): Option.Option => + * Option.filterMap(n, (n) => (n % 2 === 0 ? Option.some(`Even: ${n}`) : Option.none())) + * + * console.log(transformEven(Option.none())) + * // Output: { _id: 'Option', _tag: 'None' } + * + * console.log(transformEven(Option.some(1))) + * // Output: { _id: 'Option', _tag: 'None' } + * + * console.log(transformEven(Option.some(2))) + * // Output: { _id: 'Option', _tag: 'Some', value: 'Even: 2' } + * ``` + * + * @category Filtering + * @since 2.0.0 + */ +const filterMap = exports.filterMap = flatMap; +/** + * Filters an `Option` using a predicate. If the predicate is not satisfied or the `Option` is `None` returns `None`. + * + * If you need to change the type of the `Option` in addition to filtering, see `filterMap`. + * + * @example + * ```ts + * import { Option } from "effect" + * + * const removeEmptyString = (input: Option.Option) => + * Option.filter(input, (value) => value !== "") + * + * console.log(removeEmptyString(Option.none())) + * // Output: { _id: 'Option', _tag: 'None' } + * + * console.log(removeEmptyString(Option.some(""))) + * // Output: { _id: 'Option', _tag: 'None' } + * + * console.log(removeEmptyString(Option.some("a"))) + * // Output: { _id: 'Option', _tag: 'Some', value: 'a' } + * ``` + * + * @category Filtering + * @since 2.0.0 + */ +const filter = exports.filter = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => filterMap(self, b => predicate(b) ? option.some(b) : option.none)); +/** + * Creates an `Equivalence` instance for comparing `Option` values, using a + * provided `Equivalence` for the inner type. + * + * **Details** + * + * This function takes an `Equivalence` instance for a specific type `A` and + * produces an `Equivalence` instance for `Option`. The resulting + * `Equivalence` determines whether two `Option` values are equivalent: + * + * - Two `None`s are considered equivalent. + * - A `Some` and a `None` are not equivalent. + * - Two `Some` values are equivalent if their inner values are equivalent + * according to the provided `Equivalence`. + * + * **Example** (Comparing Optional Numbers for Equivalence) + * + * ```ts + * import { Number, Option } from "effect" + * + * const isEquivalent = Option.getEquivalence(Number.Equivalence) + * + * console.log(isEquivalent(Option.none(), Option.none())) + * // Output: true + * + * console.log(isEquivalent(Option.none(), Option.some(1))) + * // Output: false + * + * console.log(isEquivalent(Option.some(1), Option.none())) + * // Output: false + * + * console.log(isEquivalent(Option.some(1), Option.some(2))) + * // Output: false + * + * console.log(isEquivalent(Option.some(1), Option.some(1))) + * // Output: true + * ``` + * + * @category Equivalence + * @since 2.0.0 + */ +const getEquivalence = isEquivalent => Equivalence.make((x, y) => isNone(x) ? isNone(y) : isNone(y) ? false : isEquivalent(x.value, y.value)); +/** + * Creates an `Order` instance for comparing `Option` values, using a provided + * `Order` for the inner type. + * + * **Details** + * + * This function produces an `Order` instance for `Option`, allowing `Option` + * values to be compared: + * + * - `None` is always considered less than any `Some` value. + * - If both are `Some`, their inner values are compared using the provided + * `Order` instance. + * + * @example + * ```ts + * import { Number, Option } from "effect" + * + * const order = Option.getOrder(Number.Order) + * + * console.log(order(Option.none(), Option.none())) + * // Output: 0 + * + * console.log(order(Option.none(), Option.some(1))) + * // Output: -1 + * + * console.log(order(Option.some(1), Option.none())) + * // Output: 1 + * + * console.log(order(Option.some(1), Option.some(2))) + * // Output: -1 + * + * console.log(order(Option.some(1), Option.some(1))) + * // Output: 0 + * ``` + * + * @category Sorting + * @since 2.0.0 + */ +exports.getEquivalence = getEquivalence; +const getOrder = O => order.make((self, that) => isSome(self) ? isSome(that) ? O(self.value, that.value) : 1 : -1); +/** + * Lifts a binary function to work with `Option` values, allowing the function + * to operate on two `Option`s. + * + * **Details** + * + * This function takes a binary function `f` and returns a new function that + * applies `f` to the values of two `Option`s (`self` and `that`). If both + * `Option`s are `Some`, the binary function `f` is applied to their values, and + * the result is wrapped in a new `Some`. If either `Option` is `None`, the + * result is `None`. + * + * @example + * ```ts + * import { Option } from "effect" + * + * // A binary function to add two numbers + * const add = (a: number, b: number): number => a + b + * + * // Lift the `add` function to work with `Option` values + * const addOptions = Option.lift2(add) + * + * // Both `Option`s are `Some` + * console.log(addOptions(Option.some(2), Option.some(3))) + * // Output: { _id: 'Option', _tag: 'Some', value: 5 } + * + * // One `Option` is `None` + * console.log(addOptions(Option.some(2), Option.none())) + * // Output: { _id: 'Option', _tag: 'None' } + * ``` + * + * @category Lifting + * @since 2.0.0 + */ +exports.getOrder = getOrder; +const lift2 = f => (0, _Function.dual)(2, (self, that) => zipWith(self, that, f)); +/** + * Lifts a `Predicate` or `Refinement` into the `Option` context, returning a + * `Some` of the input value if the predicate is satisfied, or `None` otherwise. + * + * **Details** + * + * This function transforms a `Predicate` (or a more specific `Refinement`) into + * a function that produces an `Option`. If the predicate evaluates to `true`, + * the input value is wrapped in a `Some`. If the predicate evaluates to + * `false`, the result is `None`. + * + * @example + * ```ts + * import { Option } from "effect" + * + * // Check if a number is positive + * const isPositive = (n: number) => n > 0 + * + * // ┌─── (b: number) => Option + * // ▼ + * const parsePositive = Option.liftPredicate(isPositive) + * + * console.log(parsePositive(1)) + * // Output: { _id: 'Option', _tag: 'Some', value: 1 } + * + * console.log(parsePositive(-1)) + * // OUtput: { _id: 'Option', _tag: 'None' } + * ``` + * + * @category Lifting + * @since 2.0.0 + */ +exports.lift2 = lift2; +const liftPredicate = exports.liftPredicate = /*#__PURE__*/(0, _Function.dual)(2, (b, predicate) => predicate(b) ? some(b) : none()); +/** + * Returns a function that checks if an `Option` contains a specified value, + * using a provided equivalence function. + * + * **Details** + * + * This function allows you to check whether an `Option` contains a specific + * value. It uses an equivalence function `isEquivalent` to compare the value + * inside the `Option` to the provided value. If the `Option` is `Some` and the + * equivalence function returns `true`, the result is `true`. If the `Option` is + * `None` or the values are not equivalent, the result is `false`. + * + * @example + * ```ts + * import { Number, Option } from "effect" + * + * const contains = Option.containsWith(Number.Equivalence) + * + * console.log(Option.some(2).pipe(contains(2))) + * // Output: true + * + * console.log(Option.some(1).pipe(contains(2))) + * // Output: false + * + * console.log(Option.none().pipe(contains(2))) + * // Output: false + * ``` + * + * @see {@link contains} for a version that uses the default `Equivalence`. + * + * @category Elements + * @since 2.0.0 + */ +const containsWith = isEquivalent => (0, _Function.dual)(2, (self, a) => isNone(self) ? false : isEquivalent(self.value, a)); +exports.containsWith = containsWith; +const _equivalence = /*#__PURE__*/Equal.equivalence(); +/** + * Returns a function that checks if an `Option` contains a specified value + * using the default `Equivalence`. + * + * **Details** + * + * This function allows you to check whether an `Option` contains a specific + * value. It uses the default `Equivalence` for equality comparison. If the + * `Option` is `Some` and its value is equivalent to the provided value, the + * result is `true`. If the `Option` is `None` or the values are not equivalent, + * the result is `false`. + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.some(2).pipe(Option.contains(2))) + * // Output: true + * + * console.log(Option.some(1).pipe(Option.contains(2))) + * // Output: false + * + * console.log(Option.none().pipe(Option.contains(2))) + * // Output: false + * ``` + * + * @see {@link containsWith} for a version that allows you to specify a custom equivalence function. + * + * @category Elements + * @since 2.0.0 + */ +const contains = exports.contains = /*#__PURE__*/containsWith(_equivalence); +/** + * Checks if a value in an `Option` satisfies a given predicate or refinement. + * + * **Details** + * + * This function allows you to check if a value inside a `Some` meets a + * specified condition. If the `Option` is `None`, the result is `false`. If the + * `Option` is `Some`, the provided predicate or refinement is applied to the + * value: + * + * - If the condition is met, the result is `true`. + * - If the condition is not met, the result is `false`. + * + * @example + * ```ts + * import { Option } from "effect" + * + * const isEven = (n: number) => n % 2 === 0 + * + * console.log(Option.some(2).pipe(Option.exists(isEven))) + * // Output: true + * + * console.log(Option.some(1).pipe(Option.exists(isEven))) + * // Output: false + * + * console.log(Option.none().pipe(Option.exists(isEven))) + * // Output: false + * ``` + * + * @category Elements + * @since 2.0.0 + */ +const exists = exports.exists = /*#__PURE__*/(0, _Function.dual)(2, (self, refinement) => isNone(self) ? false : refinement(self.value)); +// ------------------------------------------------------------------------------------- +// do notation +// ------------------------------------------------------------------------------------- +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Option` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * 5. Regular `Option` functions like `map` and `filter` can still be used within the do simulation. These functions will receive the accumulated variables as arguments within the scope + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Option, pipe } from "effect" + * + * const result = pipe( + * Option.Do, + * Option.bind("x", () => Option.some(2)), + * Option.bind("y", () => Option.some(3)), + * Option.let("sum", ({ x, y }) => x + y), + * Option.filter(({ x, y }) => x * y > 5) + * ) + * assert.deepStrictEqual(result, Option.some({ x: 2, y: 3, sum: 5 })) + * ``` + * + * @see {@link Do} + * @see {@link bind} + * @see {@link let_ let} + * + * @category Do notation + * @since 2.0.0 + */ +const bindTo = exports.bindTo = /*#__PURE__*/doNotation.bindTo(map); +const let_ = exports.let = /*#__PURE__*/doNotation.let_(map); +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Option` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * 5. Regular `Option` functions like `map` and `filter` can still be used within the do simulation. These functions will receive the accumulated variables as arguments within the scope + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Option, pipe } from "effect" + * + * const result = pipe( + * Option.Do, + * Option.bind("x", () => Option.some(2)), + * Option.bind("y", () => Option.some(3)), + * Option.let("sum", ({ x, y }) => x + y), + * Option.filter(({ x, y }) => x * y > 5) + * ) + * assert.deepStrictEqual(result, Option.some({ x: 2, y: 3, sum: 5 })) + * ``` + * + * @see {@link Do} + * @see {@link bindTo} + * @see {@link let_ let} + * + * @category Do notation + * @since 2.0.0 + */ +const bind = exports.bind = /*#__PURE__*/doNotation.bind(map, flatMap); +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Option` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * 5. Regular `Option` functions like `map` and `filter` can still be used within the do simulation. These functions will receive the accumulated variables as arguments within the scope + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Option, pipe } from "effect" + * + * const result = pipe( + * Option.Do, + * Option.bind("x", () => Option.some(2)), + * Option.bind("y", () => Option.some(3)), + * Option.let("sum", ({ x, y }) => x + y), + * Option.filter(({ x, y }) => x * y > 5) + * ) + * assert.deepStrictEqual(result, Option.some({ x: 2, y: 3, sum: 5 })) + * ``` + * + * @see {@link bindTo} + * @see {@link bind} + * @see {@link let_ let} + * + * @category Do notation + * @since 2.0.0 + */ +const Do = exports.Do = /*#__PURE__*/some({}); +const adapter = /*#__PURE__*/Gen.adapter(); +/** + * Similar to `Effect.gen`, `Option.gen` provides a more readable, + * generator-based syntax for working with `Option` values, making code that + * involves `Option` easier to write and understand. This approach is similar to + * using `async/await` but tailored for `Option`. + * + * **Example** (Using `Option.gen` to Create a Combined Value) + * + * ```ts + * import { Option } from "effect" + * + * const maybeName: Option.Option = Option.some("John") + * const maybeAge: Option.Option = Option.some(25) + * + * const person = Option.gen(function* () { + * const name = (yield* maybeName).toUpperCase() + * const age = yield* maybeAge + * return { name, age } + * }) + * + * console.log(person) + * // Output: + * // { _id: 'Option', _tag: 'Some', value: { name: 'JOHN', age: 25 } } + * ``` + * + * @category Generators + * @since 2.0.0 + */ +const gen = (...args) => { + const f = args.length === 1 ? args[0] : args[1].bind(args[0]); + const iterator = f(adapter); + let state = iterator.next(); + while (!state.done) { + const current = Gen.isGenKind(state.value) ? state.value.value : Gen.yieldWrapGet(state.value); + if (isNone(current)) { + return current; + } + state = iterator.next(current.value); + } + return some(state.value); +}; +/** + * Merges two optional values, applying a function if both exist. + * Unlike {@link zipWith}, this function returns `None` only if both inputs are `None`. + * + * @internal + */ +exports.gen = gen; +const mergeWith = f => (o1, o2) => { + if (isNone(o1)) { + return o2; + } else if (isNone(o2)) { + return o1; + } + return some(f(o1.value, o2.value)); +}; +exports.mergeWith = mergeWith; +//# sourceMappingURL=Option.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Order.js b/backend/node_modules/effect/dist/cjs/Order.js new file mode 100644 index 0000000000000000000000000000000000000000..672c1ff58a829c4a33dd29f4ecb4e147703359a2 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Order.js @@ -0,0 +1,275 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.tuple = exports.struct = exports.string = exports.reverse = exports.productMany = exports.product = exports.number = exports.min = exports.max = exports.mapInput = exports.make = exports.lessThanOrEqualTo = exports.lessThan = exports.greaterThanOrEqualTo = exports.greaterThan = exports.empty = exports.combineMany = exports.combineAll = exports.combine = exports.clamp = exports.boolean = exports.bigint = exports.between = exports.array = exports.all = exports.Date = void 0; +var _Function = require("./Function.js"); +/** + * This module provides an implementation of the `Order` type class which is used to define a total ordering on some type `A`. + * An order is defined by a relation `<=`, which obeys the following laws: + * + * - either `x <= y` or `y <= x` (totality) + * - if `x <= y` and `y <= x`, then `x == y` (antisymmetry) + * - if `x <= y` and `y <= z`, then `x <= z` (transitivity) + * + * The truth table for compare is defined as follows: + * + * | `x <= y` | `x >= y` | Ordering | | + * | -------- | -------- | -------- | --------------------- | + * | `true` | `true` | `0` | corresponds to x == y | + * | `true` | `false` | `< 0` | corresponds to x < y | + * | `false` | `true` | `> 0` | corresponds to x > y | + * + * @since 2.0.0 + */ + +/** + * @category constructors + * @since 2.0.0 + */ +const make = compare => (self, that) => self === that ? 0 : compare(self, that); +/** + * @category instances + * @since 2.0.0 + */ +exports.make = make; +const string = exports.string = /*#__PURE__*/make((self, that) => self < that ? -1 : 1); +/** + * @category instances + * @since 2.0.0 + */ +const number = exports.number = /*#__PURE__*/make((self, that) => self < that ? -1 : 1); +/** + * @category instances + * @since 2.0.0 + */ +const boolean = exports.boolean = /*#__PURE__*/make((self, that) => self < that ? -1 : 1); +/** + * @category instances + * @since 2.0.0 + */ +const bigint = exports.bigint = /*#__PURE__*/make((self, that) => self < that ? -1 : 1); +/** + * @since 2.0.0 + */ +const reverse = O => make((self, that) => O(that, self)); +/** + * @category combining + * @since 2.0.0 + */ +exports.reverse = reverse; +const combine = exports.combine = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => make((a1, a2) => { + const out = self(a1, a2); + if (out !== 0) { + return out; + } + return that(a1, a2); +})); +/** + * @category combining + * @since 2.0.0 + */ +const combineMany = exports.combineMany = /*#__PURE__*/(0, _Function.dual)(2, (self, collection) => make((a1, a2) => { + let out = self(a1, a2); + if (out !== 0) { + return out; + } + for (const O of collection) { + out = O(a1, a2); + if (out !== 0) { + return out; + } + } + return out; +})); +/** + * @since 2.0.0 + */ +const empty = () => make(() => 0); +/** + * @category combining + * @since 2.0.0 + */ +exports.empty = empty; +const combineAll = collection => combineMany(empty(), collection); +/** + * @category mapping + * @since 2.0.0 + */ +exports.combineAll = combineAll; +const mapInput = exports.mapInput = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => make((b1, b2) => self(f(b1), f(b2)))); +/** + * @category instances + * @since 2.0.0 + */ +const Date = exports.Date = /*#__PURE__*/mapInput(number, date => date.getTime()); +/** + * @category combining + * @since 2.0.0 + */ +const product = exports.product = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => make(([xa, xb], [ya, yb]) => { + const o = self(xa, ya); + return o !== 0 ? o : that(xb, yb); +})); +/** + * @category combining + * @since 2.0.0 + */ +const all = collection => { + return make((x, y) => { + const len = Math.min(x.length, y.length); + let collectionLength = 0; + for (const O of collection) { + if (collectionLength >= len) { + break; + } + const o = O(x[collectionLength], y[collectionLength]); + if (o !== 0) { + return o; + } + collectionLength++; + } + return 0; + }); +}; +/** + * @category combining + * @since 2.0.0 + */ +exports.all = all; +const productMany = exports.productMany = /*#__PURE__*/(0, _Function.dual)(2, (self, collection) => { + const O = all(collection); + return make((x, y) => { + const o = self(x[0], y[0]); + return o !== 0 ? o : O(x.slice(1), y.slice(1)); + }); +}); +/** + * Similar to `Promise.all` but operates on `Order`s. + * + * ``` + * [Order, Order, ...] -> Order<[A, B, ...]> + * ``` + * + * This function creates and returns a new `Order` for a tuple of values based on the given `Order`s for each element in the tuple. + * The returned `Order` compares two tuples of the same type by applying the corresponding `Order` to each element in the tuple. + * It is useful when you need to compare two tuples of the same type and you have a specific way of comparing each element + * of the tuple. + * + * @category combinators + * @since 2.0.0 + */ +const tuple = (...elements) => all(elements); +/** + * This function creates and returns a new `Order` for an array of values based on a given `Order` for the elements of the array. + * The returned `Order` compares two arrays by applying the given `Order` to each element in the arrays. + * If all elements are equal, the arrays are then compared based on their length. + * It is useful when you need to compare two arrays of the same type and you have a specific way of comparing each element of the array. + * + * @category combinators + * @since 2.0.0 + */ +exports.tuple = tuple; +const array = O => make((self, that) => { + const aLen = self.length; + const bLen = that.length; + const len = Math.min(aLen, bLen); + for (let i = 0; i < len; i++) { + const o = O(self[i], that[i]); + if (o !== 0) { + return o; + } + } + return number(aLen, bLen); +}); +/** + * This function creates and returns a new `Order` for a struct of values based on the given `Order`s + * for each property in the struct. + * + * @category combinators + * @since 2.0.0 + */ +exports.array = array; +const struct = fields => { + const keys = Object.keys(fields); + return make((self, that) => { + for (const key of keys) { + const o = fields[key](self[key], that[key]); + if (o !== 0) { + return o; + } + } + return 0; + }); +}; +/** + * Test whether one value is _strictly less than_ another. + * + * @since 2.0.0 + */ +exports.struct = struct; +const lessThan = O => (0, _Function.dual)(2, (self, that) => O(self, that) === -1); +/** + * Test whether one value is _strictly greater than_ another. + * + * @since 2.0.0 + */ +exports.lessThan = lessThan; +const greaterThan = O => (0, _Function.dual)(2, (self, that) => O(self, that) === 1); +/** + * Test whether one value is _non-strictly less than_ another. + * + * @since 2.0.0 + */ +exports.greaterThan = greaterThan; +const lessThanOrEqualTo = O => (0, _Function.dual)(2, (self, that) => O(self, that) !== 1); +/** + * Test whether one value is _non-strictly greater than_ another. + * + * @since 2.0.0 + */ +exports.lessThanOrEqualTo = lessThanOrEqualTo; +const greaterThanOrEqualTo = O => (0, _Function.dual)(2, (self, that) => O(self, that) !== -1); +/** + * Take the minimum of two values. If they are considered equal, the first argument is chosen. + * + * @since 2.0.0 + */ +exports.greaterThanOrEqualTo = greaterThanOrEqualTo; +const min = O => (0, _Function.dual)(2, (self, that) => self === that || O(self, that) < 1 ? self : that); +/** + * Take the maximum of two values. If they are considered equal, the first argument is chosen. + * + * @since 2.0.0 + */ +exports.min = min; +const max = O => (0, _Function.dual)(2, (self, that) => self === that || O(self, that) > -1 ? self : that); +/** + * Clamp a value between a minimum and a maximum. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Order, Number } from "effect" + * + * const clamp = Order.clamp(Number.Order)({ minimum: 1, maximum: 5 }) + * + * assert.equal(clamp(3), 3) + * assert.equal(clamp(0), 1) + * assert.equal(clamp(6), 5) + * ``` + * + * @since 2.0.0 + */ +exports.max = max; +const clamp = O => (0, _Function.dual)(2, (self, options) => min(O)(options.maximum, max(O)(options.minimum, self))); +/** + * Test whether a value is between a minimum and a maximum (inclusive). + * + * @since 2.0.0 + */ +exports.clamp = clamp; +const between = O => (0, _Function.dual)(2, (self, options) => !lessThan(O)(self, options.minimum) && !greaterThan(O)(self, options.maximum)); +exports.between = between; +//# sourceMappingURL=Order.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Order.js.map b/backend/node_modules/effect/dist/cjs/Order.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b0408dfdf517b017ef770bc731bf55b1c9228b33 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Order.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Order.js","names":["_Function","require","make","compare","self","that","exports","string","number","boolean","bigint","reverse","O","combine","dual","a1","a2","out","combineMany","collection","empty","combineAll","mapInput","f","b1","b2","Date","date","getTime","product","xa","xb","ya","yb","o","all","x","y","len","Math","min","length","collectionLength","productMany","slice","tuple","elements","array","aLen","bLen","i","struct","fields","keys","Object","key","lessThan","greaterThan","lessThanOrEqualTo","greaterThanOrEqualTo","max","clamp","options","maximum","minimum","between"],"sources":["../../src/Order.ts"],"sourcesContent":[null],"mappings":";;;;;;AAkBA,IAAAA,SAAA,GAAAC,OAAA;AAlBA;;;;;;;;;;;;;;;;;;;AAqCA;;;;AAI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ACR,IAAI,EAAE0D,OAAO,CAACC,OAAO,CAAC,CAC7F;AAAAzD,OAAA,CAAA2D,OAAA,GAAAA,OAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Ordering.js.map b/backend/node_modules/effect/dist/cjs/Ordering.js.map new file mode 100644 index 0000000000000000000000000000000000000000..26d68d77b1c931242865247d181729f286418c59 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Ordering.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Ordering.js","names":["_Function","require","reverse","o","exports","match","dual","self","onEqual","onGreaterThan","onLessThan","combine","that","combineMany","collection","ordering","combineAll"],"sources":["../../src/Ordering.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,SAAA,GAAAC,OAAA;AAQA;;;;;;;;;;;;;;;AAeO,MAAMC,OAAO,GAAIC,CAAW,IAAgBA,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,GAAGA,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAE;AAEnF;;;;;;;;;;;;;;;;;;;;;;;AAAAC,OAAA,CAAAF,OAAA,GAAAA,OAAA;AAuBO,MAAMG,KAAK,GAAAD,OAAA,CAAAC,KAAA,gBA8Dd,IAAAC,cAAI,EAAC,CAAC,EAAE,CACVC,IAAc,EACd;EAAEC,OAAO;EAAEC,aAAa;EAAEC;AAAU,CAInC,KACaH,IAAI,KAAK,CAAC,CAAC,GAAGG,UAAU,EAAE,GAAGH,IAAI,KAAK,CAAC,GAAGC,OAAO,EAAE,GAAGC,aAAa,EAAE,CAAC;AAEtF;;;;AAIO,MAAME,OAAO,GAAAP,OAAA,CAAAO,OAAA,gBAWhB,IAAAL,cAAI,EAAC,CAAC,EAAE,CAACC,IAAc,EAAEK,IAAc,KAAeL,IAAI,KAAK,CAAC,GAAGA,IAAI,GAAGK,IAAI,CAAC;AAEnF;;;;AAIO,MAAMC,WAAW,GAAAT,OAAA,CAAAS,WAAA,gBAWpB,IAAAP,cAAI,EAAC,CAAC,EAAE,CAACC,IAAc,EAAEO,UAA8B,KAAc;EACvE,IAAIC,QAAQ,GAAGR,IAAI;EACnB,IAAIQ,QAAQ,KAAK,CAAC,EAAE;IAClB,OAAOA,QAAQ;EACjB;EACA,KAAKA,QAAQ,IAAID,UAAU,EAAE;IAC3B,IAAIC,QAAQ,KAAK,CAAC,EAAE;MAClB,OAAOA,QAAQ;IACjB;EACF;EACA,OAAOA,QAAQ;AACjB,CAAC,CAAC;AAEF;;;;AAIO,MAAMC,UAAU,GAAIF,UAA8B,IAAeD,WAAW,CAAC,CAAC,EAAEC,UAAU,CAAC;AAAAV,OAAA,CAAAY,UAAA,GAAAA,UAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/ParseResult.js b/backend/node_modules/effect/dist/cjs/ParseResult.js new file mode 100644 index 0000000000000000000000000000000000000000..c8e3bdbb33e348619ea3eec0d08cb2f15dd9e155 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/ParseResult.js @@ -0,0 +1,1594 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getOption = exports.getLiterals = exports.getFinalTransformation = exports.fromOption = exports.flatMap = exports.fail = exports.encodeUnknownSync = exports.encodeUnknownPromise = exports.encodeUnknownOption = exports.encodeUnknownEither = exports.encodeUnknown = exports.encodeSync = exports.encodePromise = exports.encodeOption = exports.encodeEither = exports.encode = exports.eitherOrUndefined = exports.decodeUnknownSync = exports.decodeUnknownPromise = exports.decodeUnknownOption = exports.decodeUnknownEither = exports.decodeUnknown = exports.decodeSync = exports.decodePromise = exports.decodeOption = exports.decodeEither = exports.decode = exports.asserts = exports.Unexpected = exports.Type = exports.TreeFormatter = exports.Transformation = exports.Refinement = exports.Pointer = exports.ParseErrorTypeId = exports.ParseError = exports.Missing = exports.Forbidden = exports.Composite = exports.ArrayFormatter = void 0; +exports.getRefinementExpected = getRefinementExpected; +exports.validateSync = exports.validatePromise = exports.validateOption = exports.validateEither = exports.validate = exports.try = exports.succeed = exports.parseError = exports.orElse = exports.mergeInternalOptions = exports.mapError = exports.mapBoth = exports.map = exports.isParseError = exports.isComposite = exports.is = exports.getSearchTree = void 0; +var Arr = _interopRequireWildcard(require("./Array.js")); +var Cause = _interopRequireWildcard(require("./Cause.js")); +var _Data = require("./Data.js"); +var Effect = _interopRequireWildcard(require("./Effect.js")); +var Either = _interopRequireWildcard(require("./Either.js")); +var Exit = _interopRequireWildcard(require("./Exit.js")); +var _Function = require("./Function.js"); +var _GlobalValue = require("./GlobalValue.js"); +var Inspectable = _interopRequireWildcard(require("./Inspectable.js")); +var util_ = _interopRequireWildcard(require("./internal/schema/util.js")); +var Option = _interopRequireWildcard(require("./Option.js")); +var Predicate = _interopRequireWildcard(require("./Predicate.js")); +var Scheduler = _interopRequireWildcard(require("./Scheduler.js")); +var AST = _interopRequireWildcard(require("./SchemaAST.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 3.10.0 + */ + +/** + * @category model + * @since 3.10.0 + */ +class Pointer { + path; + actual; + issue; + /** + * @since 3.10.0 + */ + _tag = "Pointer"; + constructor(path, actual, issue) { + this.path = path; + this.actual = actual; + this.issue = issue; + } +} +/** + * Error that occurs when an unexpected key or index is present. + * + * @category model + * @since 3.10.0 + */ +exports.Pointer = Pointer; +class Unexpected { + actual; + message; + /** + * @since 3.10.0 + */ + _tag = "Unexpected"; + constructor(actual, + /** + * @since 3.10.0 + */ + message) { + this.actual = actual; + this.message = message; + } +} +/** + * Error that occurs when a required key or index is missing. + * + * @category model + * @since 3.10.0 + */ +exports.Unexpected = Unexpected; +class Missing { + ast; + message; + /** + * @since 3.10.0 + */ + _tag = "Missing"; + /** + * @since 3.10.0 + */ + actual = undefined; + constructor( + /** + * @since 3.10.0 + */ + ast, + /** + * @since 3.10.0 + */ + message) { + this.ast = ast; + this.message = message; + } +} +/** + * Error that contains multiple issues. + * + * @category model + * @since 3.10.0 + */ +exports.Missing = Missing; +class Composite { + ast; + actual; + issues; + output; + /** + * @since 3.10.0 + */ + _tag = "Composite"; + constructor(ast, actual, issues, output) { + this.ast = ast; + this.actual = actual; + this.issues = issues; + this.output = output; + } +} +/** + * Error that occurs when a refinement has an error. + * + * @category model + * @since 3.10.0 + */ +exports.Composite = Composite; +class Refinement { + ast; + actual; + kind; + issue; + /** + * @since 3.10.0 + */ + _tag = "Refinement"; + constructor(ast, actual, kind, issue) { + this.ast = ast; + this.actual = actual; + this.kind = kind; + this.issue = issue; + } +} +/** + * Error that occurs when a transformation has an error. + * + * @category model + * @since 3.10.0 + */ +exports.Refinement = Refinement; +class Transformation { + ast; + actual; + kind; + issue; + /** + * @since 3.10.0 + */ + _tag = "Transformation"; + constructor(ast, actual, kind, issue) { + this.ast = ast; + this.actual = actual; + this.kind = kind; + this.issue = issue; + } +} +/** + * The `Type` variant of the `ParseIssue` type represents an error that occurs when the `actual` value is not of the expected type. + * The `ast` field specifies the expected type, and the `actual` field contains the value that caused the error. + * + * @category model + * @since 3.10.0 + */ +exports.Transformation = Transformation; +class Type { + ast; + actual; + message; + /** + * @since 3.10.0 + */ + _tag = "Type"; + constructor(ast, actual, message) { + this.ast = ast; + this.actual = actual; + this.message = message; + } +} +/** + * The `Forbidden` variant of the `ParseIssue` type represents a forbidden operation, such as when encountering an Effect that is not allowed to execute (e.g., using `runSync`). + * + * @category model + * @since 3.10.0 + */ +exports.Type = Type; +class Forbidden { + ast; + actual; + message; + /** + * @since 3.10.0 + */ + _tag = "Forbidden"; + constructor(ast, actual, message) { + this.ast = ast; + this.actual = actual; + this.message = message; + } +} +/** + * @category type id + * @since 3.10.0 + */ +exports.Forbidden = Forbidden; +const ParseErrorTypeId = exports.ParseErrorTypeId = /*#__PURE__*/Symbol.for("effect/Schema/ParseErrorTypeId"); +/** + * @since 3.10.0 + */ +const isParseError = u => Predicate.hasProperty(u, ParseErrorTypeId); +/** + * @since 3.10.0 + */ +exports.isParseError = isParseError; +class ParseError extends /*#__PURE__*/(0, _Data.TaggedError)("ParseError") { + /** + * @since 3.10.0 + */ + [ParseErrorTypeId] = ParseErrorTypeId; + get message() { + return this.toString(); + } + /** + * @since 3.10.0 + */ + toString() { + return TreeFormatter.formatIssueSync(this.issue); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _id: "ParseError", + message: this.toString() + }; + } + /** + * @since 3.10.0 + */ + [Inspectable.NodeInspectSymbol]() { + return this.toJSON(); + } +} +/** + * @category constructors + * @since 3.10.0 + */ +exports.ParseError = ParseError; +const parseError = issue => new ParseError({ + issue +}); +/** + * @category constructors + * @since 3.10.0 + */ +exports.parseError = parseError; +const succeed = exports.succeed = Either.right; +/** + * @category constructors + * @since 3.10.0 + */ +const fail = exports.fail = Either.left; +const _try = exports.try = Either.try; +/** + * @category constructors + * @since 3.10.0 + */ +const fromOption = exports.fromOption = Either.fromOption; +const isEither = Either.isEither; +/** + * @category optimisation + * @since 3.10.0 + */ +const flatMap = exports.flatMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + return isEither(self) ? Either.match(self, { + onLeft: Either.left, + onRight: f + }) : Effect.flatMap(self, f); +}); +/** + * @category optimisation + * @since 3.10.0 + */ +const map = exports.map = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + return isEither(self) ? Either.map(self, f) : Effect.map(self, f); +}); +/** + * @category optimisation + * @since 3.10.0 + */ +const mapError = exports.mapError = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + return isEither(self) ? Either.mapLeft(self, f) : Effect.mapError(self, f); +}); +// TODO(4.0): remove +/** + * @category optimisation + * @since 3.10.0 + */ +const eitherOrUndefined = self => { + if (isEither(self)) { + return self; + } +}; +/** + * @category optimisation + * @since 3.10.0 + */ +exports.eitherOrUndefined = eitherOrUndefined; +const mapBoth = exports.mapBoth = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => { + return isEither(self) ? Either.mapBoth(self, { + onLeft: options.onFailure, + onRight: options.onSuccess + }) : Effect.mapBoth(self, options); +}); +/** + * @category optimisation + * @since 3.10.0 + */ +const orElse = exports.orElse = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { + return isEither(self) ? Either.match(self, { + onLeft: f, + onRight: Either.right + }) : Effect.catchAll(self, f); +}); +/** @internal */ +const mergeInternalOptions = (options, overrideOptions) => { + if (overrideOptions === undefined || Predicate.isNumber(overrideOptions)) { + return options; + } + if (options === undefined) { + return overrideOptions; + } + return { + ...options, + ...overrideOptions + }; +}; +exports.mergeInternalOptions = mergeInternalOptions; +const getEither = (ast, isDecoding, options) => { + const parser = goMemo(ast, isDecoding); + return (u, overrideOptions) => parser(u, mergeInternalOptions(options, overrideOptions)); +}; +const getSync = (ast, isDecoding, options) => { + const parser = getEither(ast, isDecoding, options); + return (input, overrideOptions) => Either.getOrThrowWith(parser(input, overrideOptions), parseError); +}; +/** @internal */ +const getOption = (ast, isDecoding, options) => { + const parser = getEither(ast, isDecoding, options); + return (input, overrideOptions) => Option.getRight(parser(input, overrideOptions)); +}; +exports.getOption = getOption; +const getEffect = (ast, isDecoding, options) => { + const parser = goMemo(ast, isDecoding); + return (input, overrideOptions) => parser(input, { + ...mergeInternalOptions(options, overrideOptions), + isEffectAllowed: true + }); +}; +/** + * @throws `ParseError` + * @category decoding + * @since 3.10.0 + */ +const decodeUnknownSync = (schema, options) => getSync(schema.ast, true, options); +/** + * @category decoding + * @since 3.10.0 + */ +exports.decodeUnknownSync = decodeUnknownSync; +const decodeUnknownOption = (schema, options) => getOption(schema.ast, true, options); +/** + * @category decoding + * @since 3.10.0 + */ +exports.decodeUnknownOption = decodeUnknownOption; +const decodeUnknownEither = (schema, options) => getEither(schema.ast, true, options); +/** + * @category decoding + * @since 3.10.0 + */ +exports.decodeUnknownEither = decodeUnknownEither; +const decodeUnknownPromise = (schema, options) => { + const parser = decodeUnknown(schema, options); + return (u, overrideOptions) => Effect.runPromise(parser(u, overrideOptions)); +}; +/** + * @category decoding + * @since 3.10.0 + */ +exports.decodeUnknownPromise = decodeUnknownPromise; +const decodeUnknown = (schema, options) => getEffect(schema.ast, true, options); +/** + * @throws `ParseError` + * @category encoding + * @since 3.10.0 + */ +exports.decodeUnknown = decodeUnknown; +const encodeUnknownSync = (schema, options) => getSync(schema.ast, false, options); +/** + * @category encoding + * @since 3.10.0 + */ +exports.encodeUnknownSync = encodeUnknownSync; +const encodeUnknownOption = (schema, options) => getOption(schema.ast, false, options); +/** + * @category encoding + * @since 3.10.0 + */ +exports.encodeUnknownOption = encodeUnknownOption; +const encodeUnknownEither = (schema, options) => getEither(schema.ast, false, options); +/** + * @category encoding + * @since 3.10.0 + */ +exports.encodeUnknownEither = encodeUnknownEither; +const encodeUnknownPromise = (schema, options) => { + const parser = encodeUnknown(schema, options); + return (u, overrideOptions) => Effect.runPromise(parser(u, overrideOptions)); +}; +/** + * @category encoding + * @since 3.10.0 + */ +exports.encodeUnknownPromise = encodeUnknownPromise; +const encodeUnknown = (schema, options) => getEffect(schema.ast, false, options); +/** + * @category decoding + * @since 3.10.0 + */ +exports.encodeUnknown = encodeUnknown; +const decodeSync = exports.decodeSync = decodeUnknownSync; +/** + * @category decoding + * @since 3.10.0 + */ +const decodeOption = exports.decodeOption = decodeUnknownOption; +/** + * @category decoding + * @since 3.10.0 + */ +const decodeEither = exports.decodeEither = decodeUnknownEither; +/** + * @category decoding + * @since 3.10.0 + */ +const decodePromise = exports.decodePromise = decodeUnknownPromise; +/** + * @category decoding + * @since 3.10.0 + */ +const decode = exports.decode = decodeUnknown; +/** + * @throws `ParseError` + * @category validation + * @since 3.10.0 + */ +const validateSync = (schema, options) => getSync(AST.typeAST(schema.ast), true, options); +/** + * @category validation + * @since 3.10.0 + */ +exports.validateSync = validateSync; +const validateOption = (schema, options) => getOption(AST.typeAST(schema.ast), true, options); +/** + * @category validation + * @since 3.10.0 + */ +exports.validateOption = validateOption; +const validateEither = (schema, options) => getEither(AST.typeAST(schema.ast), true, options); +/** + * @category validation + * @since 3.10.0 + */ +exports.validateEither = validateEither; +const validatePromise = (schema, options) => { + const parser = validate(schema, options); + return (u, overrideOptions) => Effect.runPromise(parser(u, overrideOptions)); +}; +/** + * @category validation + * @since 3.10.0 + */ +exports.validatePromise = validatePromise; +const validate = (schema, options) => getEffect(AST.typeAST(schema.ast), true, options); +/** + * By default the option `exact` is set to `true`. + * + * @category validation + * @since 3.10.0 + */ +exports.validate = validate; +const is = (schema, options) => { + const parser = goMemo(AST.typeAST(schema.ast), true); + return (u, overrideOptions) => Either.isRight(parser(u, { + exact: true, + ...mergeInternalOptions(options, overrideOptions) + })); +}; +/** + * By default the option `exact` is set to `true`. + * + * @throws `ParseError` + * @category validation + * @since 3.10.0 + */ +exports.is = is; +const asserts = (schema, options) => { + const parser = goMemo(AST.typeAST(schema.ast), true); + return (u, overrideOptions) => { + const result = parser(u, { + exact: true, + ...mergeInternalOptions(options, overrideOptions) + }); + if (Either.isLeft(result)) { + throw parseError(result.left); + } + }; +}; +/** + * @category encoding + * @since 3.10.0 + */ +exports.asserts = asserts; +const encodeSync = exports.encodeSync = encodeUnknownSync; +/** + * @category encoding + * @since 3.10.0 + */ +const encodeOption = exports.encodeOption = encodeUnknownOption; +/** + * @category encoding + * @since 3.10.0 + */ +const encodeEither = exports.encodeEither = encodeUnknownEither; +/** + * @category encoding + * @since 3.10.0 + */ +const encodePromise = exports.encodePromise = encodeUnknownPromise; +/** + * @category encoding + * @since 3.10.0 + */ +const encode = exports.encode = encodeUnknown; +const decodeMemoMap = /*#__PURE__*/(0, _GlobalValue.globalValue)(/*#__PURE__*/Symbol.for("effect/ParseResult/decodeMemoMap"), () => new WeakMap()); +const encodeMemoMap = /*#__PURE__*/(0, _GlobalValue.globalValue)(/*#__PURE__*/Symbol.for("effect/ParseResult/encodeMemoMap"), () => new WeakMap()); +const goMemo = (ast, isDecoding) => { + const memoMap = isDecoding ? decodeMemoMap : encodeMemoMap; + const memo = memoMap.get(ast); + if (memo) { + return memo; + } + const raw = go(ast, isDecoding); + const parseOptionsAnnotation = AST.getParseOptionsAnnotation(ast); + const parserWithOptions = Option.isSome(parseOptionsAnnotation) ? (i, options) => raw(i, mergeInternalOptions(options, parseOptionsAnnotation.value)) : raw; + const decodingFallbackAnnotation = AST.getDecodingFallbackAnnotation(ast); + const parser = isDecoding && Option.isSome(decodingFallbackAnnotation) ? (i, options) => handleForbidden(orElse(parserWithOptions(i, options), decodingFallbackAnnotation.value), ast, i, options) : parserWithOptions; + memoMap.set(ast, parser); + return parser; +}; +const getConcurrency = ast => Option.getOrUndefined(AST.getConcurrencyAnnotation(ast)); +const getBatching = ast => Option.getOrUndefined(AST.getBatchingAnnotation(ast)); +const go = (ast, isDecoding) => { + switch (ast._tag) { + case "Refinement": + { + if (isDecoding) { + const from = goMemo(ast.from, true); + return (i, options) => { + options = options ?? AST.defaultParseOption; + const allErrors = options?.errors === "all"; + const result = flatMap(orElse(from(i, options), ef => { + const issue = new Refinement(ast, i, "From", ef); + if (allErrors && AST.hasStableFilter(ast) && isComposite(ef)) { + return Option.match(ast.filter(i, options, ast), { + onNone: () => Either.left(issue), + onSome: ep => Either.left(new Composite(ast, i, [issue, new Refinement(ast, i, "Predicate", ep)])) + }); + } + return Either.left(issue); + }), a => Option.match(ast.filter(a, options, ast), { + onNone: () => Either.right(a), + onSome: ep => Either.left(new Refinement(ast, i, "Predicate", ep)) + })); + return handleForbidden(result, ast, i, options); + }; + } else { + const from = goMemo(AST.typeAST(ast), true); + const to = goMemo(dropRightRefinement(ast.from), false); + return (i, options) => handleForbidden(flatMap(from(i, options), a => to(a, options)), ast, i, options); + } + } + case "Transformation": + { + const transform = getFinalTransformation(ast.transformation, isDecoding); + const from = isDecoding ? goMemo(ast.from, true) : goMemo(ast.to, false); + const to = isDecoding ? goMemo(ast.to, true) : goMemo(ast.from, false); + return (i, options) => handleForbidden(flatMap(mapError(from(i, options), e => new Transformation(ast, i, isDecoding ? "Encoded" : "Type", e)), a => flatMap(mapError(transform(a, options ?? AST.defaultParseOption, ast, i), e => new Transformation(ast, i, "Transformation", e)), i2 => mapError(to(i2, options), e => new Transformation(ast, i, isDecoding ? "Type" : "Encoded", e)))), ast, i, options); + } + case "Declaration": + { + const parse = isDecoding ? ast.decodeUnknown(...ast.typeParameters) : ast.encodeUnknown(...ast.typeParameters); + return (i, options) => handleForbidden(parse(i, options ?? AST.defaultParseOption, ast), ast, i, options); + } + case "Literal": + return fromRefinement(ast, u => u === ast.literal); + case "UniqueSymbol": + return fromRefinement(ast, u => u === ast.symbol); + case "UndefinedKeyword": + return fromRefinement(ast, Predicate.isUndefined); + case "NeverKeyword": + return fromRefinement(ast, Predicate.isNever); + case "UnknownKeyword": + case "AnyKeyword": + case "VoidKeyword": + return Either.right; + case "StringKeyword": + return fromRefinement(ast, Predicate.isString); + case "NumberKeyword": + return fromRefinement(ast, Predicate.isNumber); + case "BooleanKeyword": + return fromRefinement(ast, Predicate.isBoolean); + case "BigIntKeyword": + return fromRefinement(ast, Predicate.isBigInt); + case "SymbolKeyword": + return fromRefinement(ast, Predicate.isSymbol); + case "ObjectKeyword": + return fromRefinement(ast, Predicate.isObject); + case "Enums": + return fromRefinement(ast, u => ast.enums.some(([_, value]) => value === u)); + case "TemplateLiteral": + { + const regex = AST.getTemplateLiteralRegExp(ast); + return fromRefinement(ast, u => Predicate.isString(u) && regex.test(u)); + } + case "TupleType": + { + const elements = ast.elements.map(e => goMemo(e.type, isDecoding)); + const rest = ast.rest.map(annotatedAST => goMemo(annotatedAST.type, isDecoding)); + let requiredTypes = ast.elements.filter(e => !e.isOptional); + if (ast.rest.length > 0) { + requiredTypes = requiredTypes.concat(ast.rest.slice(1)); + } + const requiredLen = requiredTypes.length; + const expectedIndexes = ast.elements.length > 0 ? ast.elements.map((_, i) => i).join(" | ") : "never"; + const concurrency = getConcurrency(ast); + const batching = getBatching(ast); + return (input, options) => { + if (!Arr.isArray(input)) { + return Either.left(new Type(ast, input)); + } + const allErrors = options?.errors === "all"; + const es = []; + let stepKey = 0; + const output = []; + // --------------------------------------------- + // handle missing indexes + // --------------------------------------------- + const len = input.length; + for (let i = len; i <= requiredLen - 1; i++) { + const e = new Pointer(i, input, new Missing(requiredTypes[i - len])); + if (allErrors) { + es.push([stepKey++, e]); + continue; + } else { + return Either.left(new Composite(ast, input, e, output)); + } + } + // --------------------------------------------- + // handle excess indexes + // --------------------------------------------- + if (ast.rest.length === 0) { + for (let i = ast.elements.length; i <= len - 1; i++) { + const e = new Pointer(i, input, new Unexpected(input[i], `is unexpected, expected: ${expectedIndexes}`)); + if (allErrors) { + es.push([stepKey++, e]); + continue; + } else { + return Either.left(new Composite(ast, input, e, output)); + } + } + } + let i = 0; + let queue = undefined; + // --------------------------------------------- + // handle elements + // --------------------------------------------- + for (; i < elements.length; i++) { + if (len < i + 1) { + if (ast.elements[i].isOptional) { + // the input element is missing + continue; + } + } else { + const parser = elements[i]; + const te = parser(input[i], options); + if (isEither(te)) { + if (Either.isLeft(te)) { + // the input element is present but is not valid + const e = new Pointer(i, input, te.left); + if (allErrors) { + es.push([stepKey++, e]); + continue; + } else { + return Either.left(new Composite(ast, input, e, sortByIndex(output))); + } + } + output.push([stepKey++, te.right]); + } else { + const nk = stepKey++; + const index = i; + if (!queue) { + queue = []; + } + queue.push(({ + es, + output + }) => Effect.flatMap(Effect.either(te), t => { + if (Either.isLeft(t)) { + // the input element is present but is not valid + const e = new Pointer(index, input, t.left); + if (allErrors) { + es.push([nk, e]); + return Effect.void; + } else { + return Either.left(new Composite(ast, input, e, sortByIndex(output))); + } + } + output.push([nk, t.right]); + return Effect.void; + })); + } + } + } + // --------------------------------------------- + // handle rest element + // --------------------------------------------- + if (Arr.isNonEmptyReadonlyArray(rest)) { + const [head, ...tail] = rest; + for (; i < len - tail.length; i++) { + const te = head(input[i], options); + if (isEither(te)) { + if (Either.isLeft(te)) { + const e = new Pointer(i, input, te.left); + if (allErrors) { + es.push([stepKey++, e]); + continue; + } else { + return Either.left(new Composite(ast, input, e, sortByIndex(output))); + } + } else { + output.push([stepKey++, te.right]); + } + } else { + const nk = stepKey++; + const index = i; + if (!queue) { + queue = []; + } + queue.push(({ + es, + output + }) => Effect.flatMap(Effect.either(te), t => { + if (Either.isLeft(t)) { + const e = new Pointer(index, input, t.left); + if (allErrors) { + es.push([nk, e]); + return Effect.void; + } else { + return Either.left(new Composite(ast, input, e, sortByIndex(output))); + } + } else { + output.push([nk, t.right]); + return Effect.void; + } + })); + } + } + // --------------------------------------------- + // handle post rest elements + // --------------------------------------------- + for (let j = 0; j < tail.length; j++) { + const index = i + j; + if (len < index + 1) { + continue; + } else { + const te = tail[j](input[index], options); + if (isEither(te)) { + if (Either.isLeft(te)) { + // the input element is present but is not valid + const e = new Pointer(index, input, te.left); + if (allErrors) { + es.push([stepKey++, e]); + continue; + } else { + return Either.left(new Composite(ast, input, e, sortByIndex(output))); + } + } + output.push([stepKey++, te.right]); + } else { + const nk = stepKey++; + if (!queue) { + queue = []; + } + queue.push(({ + es, + output + }) => Effect.flatMap(Effect.either(te), t => { + if (Either.isLeft(t)) { + // the input element is present but is not valid + const e = new Pointer(index, input, t.left); + if (allErrors) { + es.push([nk, e]); + return Effect.void; + } else { + return Either.left(new Composite(ast, input, e, sortByIndex(output))); + } + } + output.push([nk, t.right]); + return Effect.void; + })); + } + } + } + } + // --------------------------------------------- + // compute result + // --------------------------------------------- + const computeResult = ({ + es, + output + }) => Arr.isNonEmptyArray(es) ? Either.left(new Composite(ast, input, sortByIndex(es), sortByIndex(output))) : Either.right(sortByIndex(output)); + if (queue && queue.length > 0) { + const cqueue = queue; + return Effect.suspend(() => { + const state = { + es: Arr.copy(es), + output: Arr.copy(output) + }; + return Effect.flatMap(Effect.forEach(cqueue, f => f(state), { + concurrency, + batching, + discard: true + }), () => computeResult(state)); + }); + } + return computeResult({ + output, + es + }); + }; + } + case "TypeLiteral": + { + if (ast.propertySignatures.length === 0 && ast.indexSignatures.length === 0) { + return fromRefinement(ast, Predicate.isNotNullable); + } + const propertySignatures = []; + const expectedKeysMap = {}; + const expectedKeys = []; + for (const ps of ast.propertySignatures) { + propertySignatures.push([goMemo(ps.type, isDecoding), ps]); + expectedKeysMap[ps.name] = null; + expectedKeys.push(ps.name); + } + const indexSignatures = ast.indexSignatures.map(is => [goMemo(is.parameter, isDecoding), goMemo(is.type, isDecoding), is.parameter]); + const expectedAST = AST.Union.make(ast.indexSignatures.map(is => is.parameter).concat(expectedKeys.map(key => Predicate.isSymbol(key) ? new AST.UniqueSymbol(key) : new AST.Literal(key)))); + const expected = goMemo(expectedAST, isDecoding); + const concurrency = getConcurrency(ast); + const batching = getBatching(ast); + return (input, options) => { + if (!Predicate.isRecord(input)) { + return Either.left(new Type(ast, input)); + } + const allErrors = options?.errors === "all"; + const es = []; + let stepKey = 0; + // --------------------------------------------- + // handle excess properties + // --------------------------------------------- + const onExcessPropertyError = options?.onExcessProperty === "error"; + const onExcessPropertyPreserve = options?.onExcessProperty === "preserve"; + const output = {}; + let inputKeys; + if (onExcessPropertyError || onExcessPropertyPreserve) { + inputKeys = Reflect.ownKeys(input); + for (const key of inputKeys) { + const te = expected(key, options); + if (isEither(te) && Either.isLeft(te)) { + // key is unexpected + if (onExcessPropertyError) { + const e = new Pointer(key, input, new Unexpected(input[key], `is unexpected, expected: ${String(expectedAST)}`)); + if (allErrors) { + es.push([stepKey++, e]); + continue; + } else { + return Either.left(new Composite(ast, input, e, output)); + } + } else { + // preserve key + output[key] = input[key]; + } + } + } + } + let queue = undefined; + const isExact = options?.exact === true; + for (let i = 0; i < propertySignatures.length; i++) { + const ps = propertySignatures[i][1]; + const name = ps.name; + const hasKey = Object.prototype.hasOwnProperty.call(input, name); + if (!hasKey) { + if (ps.isOptional) { + continue; + } else if (isExact) { + const e = new Pointer(name, input, new Missing(ps)); + if (allErrors) { + es.push([stepKey++, e]); + continue; + } else { + return Either.left(new Composite(ast, input, e, output)); + } + } + } + const parser = propertySignatures[i][0]; + const te = parser(input[name], options); + if (isEither(te)) { + if (Either.isLeft(te)) { + const e = new Pointer(name, input, hasKey ? te.left : new Missing(ps)); + if (allErrors) { + es.push([stepKey++, e]); + continue; + } else { + return Either.left(new Composite(ast, input, e, output)); + } + } + output[name] = te.right; + } else { + const nk = stepKey++; + const index = name; + if (!queue) { + queue = []; + } + queue.push(({ + es, + output + }) => Effect.flatMap(Effect.either(te), t => { + if (Either.isLeft(t)) { + const e = new Pointer(index, input, hasKey ? t.left : new Missing(ps)); + if (allErrors) { + es.push([nk, e]); + return Effect.void; + } else { + return Either.left(new Composite(ast, input, e, output)); + } + } + output[index] = t.right; + return Effect.void; + })); + } + } + // --------------------------------------------- + // handle index signatures + // --------------------------------------------- + for (let i = 0; i < indexSignatures.length; i++) { + const indexSignature = indexSignatures[i]; + const parameter = indexSignature[0]; + const type = indexSignature[1]; + const keys = util_.getKeysForIndexSignature(input, indexSignature[2]); + for (const key of keys) { + // --------------------------------------------- + // handle keys + // --------------------------------------------- + const keu = parameter(key, options); + if (isEither(keu) && Either.isRight(keu)) { + // --------------------------------------------- + // handle values + // --------------------------------------------- + const vpr = type(input[key], options); + if (isEither(vpr)) { + if (Either.isLeft(vpr)) { + const e = new Pointer(key, input, vpr.left); + if (allErrors) { + es.push([stepKey++, e]); + continue; + } else { + return Either.left(new Composite(ast, input, e, output)); + } + } else { + if (!Object.prototype.hasOwnProperty.call(expectedKeysMap, key)) { + output[key] = vpr.right; + } + } + } else { + const nk = stepKey++; + const index = key; + if (!queue) { + queue = []; + } + queue.push(({ + es, + output + }) => Effect.flatMap(Effect.either(vpr), tv => { + if (Either.isLeft(tv)) { + const e = new Pointer(index, input, tv.left); + if (allErrors) { + es.push([nk, e]); + return Effect.void; + } else { + return Either.left(new Composite(ast, input, e, output)); + } + } else { + if (!Object.prototype.hasOwnProperty.call(expectedKeysMap, key)) { + output[key] = tv.right; + } + return Effect.void; + } + })); + } + } + } + } + // --------------------------------------------- + // compute result + // --------------------------------------------- + const computeResult = ({ + es, + output + }) => { + if (Arr.isNonEmptyArray(es)) { + return Either.left(new Composite(ast, input, sortByIndex(es), output)); + } + if (options?.propertyOrder === "original") { + // preserve input keys order + const keys = inputKeys || Reflect.ownKeys(input); + for (const name of expectedKeys) { + if (keys.indexOf(name) === -1) { + keys.push(name); + } + } + const out = {}; + for (const key of keys) { + if (Object.prototype.hasOwnProperty.call(output, key)) { + out[key] = output[key]; + } + } + return Either.right(out); + } + return Either.right(output); + }; + if (queue && queue.length > 0) { + const cqueue = queue; + return Effect.suspend(() => { + const state = { + es: Arr.copy(es), + output: Object.assign({}, output) + }; + return Effect.flatMap(Effect.forEach(cqueue, f => f(state), { + concurrency, + batching, + discard: true + }), () => computeResult(state)); + }); + } + return computeResult({ + es, + output + }); + }; + } + case "Union": + { + const searchTree = getSearchTree(ast.types, isDecoding); + const ownKeys = Reflect.ownKeys(searchTree.keys); + const ownKeysLen = ownKeys.length; + const astTypesLen = ast.types.length; + const map = new Map(); + for (let i = 0; i < astTypesLen; i++) { + map.set(ast.types[i], goMemo(ast.types[i], isDecoding)); + } + const concurrency = getConcurrency(ast) ?? 1; + const batching = getBatching(ast); + return (input, options) => { + const es = []; + let stepKey = 0; + let candidates = []; + if (ownKeysLen > 0) { + if (Predicate.isRecordOrArray(input)) { + for (let i = 0; i < ownKeysLen; i++) { + const name = ownKeys[i]; + const buckets = searchTree.keys[name].buckets; + // for each property that should contain a literal, check if the input contains that property + if (Object.prototype.hasOwnProperty.call(input, name)) { + const literal = String(input[name]); + // check that the value obtained from the input for the property corresponds to an existing bucket + if (Object.prototype.hasOwnProperty.call(buckets, literal)) { + // retrive the minimal set of candidates for decoding + candidates = candidates.concat(buckets[literal]); + } else { + const { + candidates, + literals + } = searchTree.keys[name]; + const literalsUnion = AST.Union.make(literals); + const errorAst = candidates.length === astTypesLen ? new AST.TypeLiteral([new AST.PropertySignature(name, literalsUnion, false, true)], []) : AST.Union.make(candidates); + es.push([stepKey++, new Composite(errorAst, input, new Pointer(name, input, new Type(literalsUnion, input[name])))]); + } + } else { + const { + candidates, + literals + } = searchTree.keys[name]; + const fakePropertySignature = new AST.PropertySignature(name, AST.Union.make(literals), false, true); + const errorAst = candidates.length === astTypesLen ? new AST.TypeLiteral([fakePropertySignature], []) : AST.Union.make(candidates); + es.push([stepKey++, new Composite(errorAst, input, new Pointer(name, input, new Missing(fakePropertySignature)))]); + } + } + } else { + const errorAst = searchTree.candidates.length === astTypesLen ? ast : AST.Union.make(searchTree.candidates); + es.push([stepKey++, new Type(errorAst, input)]); + } + } + if (searchTree.otherwise.length > 0) { + candidates = candidates.concat(searchTree.otherwise); + } + let queue = undefined; + for (let i = 0; i < candidates.length; i++) { + const candidate = candidates[i]; + const pr = map.get(candidate)(input, options); + // the members of a union are ordered based on which one should be decoded first, + // therefore if one member has added a task, all subsequent members must + // also add a task to the queue even if they are synchronous + if (isEither(pr) && (!queue || queue.length === 0)) { + if (Either.isRight(pr)) { + return pr; + } else { + es.push([stepKey++, pr.left]); + } + } else { + const nk = stepKey++; + if (!queue) { + queue = []; + } + queue.push(state => Effect.suspend(() => { + if ("finalResult" in state) { + return Effect.void; + } else { + return Effect.flatMap(Effect.either(pr), t => { + if (Either.isRight(t)) { + state.finalResult = t; + } else { + state.es.push([nk, t.left]); + } + return Effect.void; + }); + } + })); + } + } + // --------------------------------------------- + // compute result + // --------------------------------------------- + const computeResult = es => Arr.isNonEmptyArray(es) ? es.length === 1 && es[0][1]._tag === "Type" ? Either.left(es[0][1]) : Either.left(new Composite(ast, input, sortByIndex(es))) : + // this should never happen + Either.left(new Type(ast, input)); + if (queue && queue.length > 0) { + const cqueue = queue; + return Effect.suspend(() => { + const state = { + es: Arr.copy(es) + }; + return Effect.flatMap(Effect.forEach(cqueue, f => f(state), { + concurrency, + batching, + discard: true + }), () => { + if ("finalResult" in state) { + return state.finalResult; + } + return computeResult(state.es); + }); + }); + } + return computeResult(es); + }; + } + case "Suspend": + { + const get = util_.memoizeThunk(() => goMemo(ast.f(), isDecoding)); + return (a, options) => get()(a, options); + } + } +}; +const fromRefinement = (ast, refinement) => u => refinement(u) ? Either.right(u) : Either.left(new Type(ast, u)); +/** @internal */ +const getLiterals = (ast, isDecoding) => { + switch (ast._tag) { + case "Declaration": + { + const annotation = AST.getSurrogateAnnotation(ast); + if (Option.isSome(annotation)) { + return getLiterals(annotation.value, isDecoding); + } + break; + } + case "TypeLiteral": + { + const out = []; + for (let i = 0; i < ast.propertySignatures.length; i++) { + const propertySignature = ast.propertySignatures[i]; + const type = isDecoding ? AST.encodedAST(propertySignature.type) : AST.typeAST(propertySignature.type); + if (AST.isLiteral(type) && !propertySignature.isOptional) { + out.push([propertySignature.name, type]); + } + } + return out; + } + case "TupleType": + { + const out = []; + for (let i = 0; i < ast.elements.length; i++) { + const element = ast.elements[i]; + const type = isDecoding ? AST.encodedAST(element.type) : AST.typeAST(element.type); + if (AST.isLiteral(type) && !element.isOptional) { + out.push([i, type]); + } + } + return out; + } + case "Refinement": + return getLiterals(ast.from, isDecoding); + case "Suspend": + return getLiterals(ast.f(), isDecoding); + case "Transformation": + return getLiterals(isDecoding ? ast.from : ast.to, isDecoding); + } + return []; +}; +/** + * The purpose of the algorithm is to narrow down the pool of possible + * candidates for decoding as much as possible. + * + * This function separates the schemas into two groups, `keys` and `otherwise`: + * + * - `keys`: the schema has at least one property with a literal value + * - `otherwise`: the schema has no properties with a literal value + * + * If a schema has at least one property with a literal value, so it ends up in + * `keys`, first a namespace is created for the name of the property containing + * the literal, and then within this namespace a "bucket" is created for the + * literal value in which to store all the schemas that have the same property + * and literal value. + * + * @internal + */ +exports.getLiterals = getLiterals; +const getSearchTree = (members, isDecoding) => { + const keys = {}; + const otherwise = []; + const candidates = []; + for (let i = 0; i < members.length; i++) { + const member = members[i]; + const tags = getLiterals(member, isDecoding); + if (tags.length > 0) { + candidates.push(member); + for (let j = 0; j < tags.length; j++) { + const [key, literal] = tags[j]; + const hash = String(literal.literal); + keys[key] = keys[key] || { + buckets: {}, + literals: [], + candidates: [] + }; + const buckets = keys[key].buckets; + if (Object.prototype.hasOwnProperty.call(buckets, hash)) { + if (j < tags.length - 1) { + continue; + } + buckets[hash].push(member); + keys[key].literals.push(literal); + keys[key].candidates.push(member); + } else { + buckets[hash] = [member]; + keys[key].literals.push(literal); + keys[key].candidates.push(member); + break; + } + } + } else { + otherwise.push(member); + } + } + return { + keys, + otherwise, + candidates + }; +}; +exports.getSearchTree = getSearchTree; +const dropRightRefinement = ast => AST.isRefinement(ast) ? dropRightRefinement(ast.from) : ast; +const handleForbidden = (effect, ast, actual, options) => { + // If effects are allowed, return the original effect + if (options?.isEffectAllowed === true) { + return effect; + } + // If the effect is already an Either, return it directly + if (isEither(effect)) { + return effect; + } + // Otherwise, attempt to execute the effect synchronously + const scheduler = new Scheduler.SyncScheduler(); + const fiber = Effect.runFork(effect, { + scheduler + }); + scheduler.flush(); + const exit = fiber.unsafePoll(); + if (exit) { + if (Exit.isSuccess(exit)) { + // If the effect successfully resolves, wrap the value in a Right + return Either.right(exit.value); + } + const cause = exit.cause; + if (Cause.isFailType(cause)) { + // The effect executed synchronously but failed due to a ParseIssue + return Either.left(cause.error); + } + // The effect executed synchronously but failed due to a defect (e.g., a missing dependency) + return Either.left(new Forbidden(ast, actual, Cause.pretty(cause))); + } + // The effect could not be resolved synchronously, meaning it performs async work + return Either.left(new Forbidden(ast, actual, "cannot be be resolved synchronously, this is caused by using runSync on an effect that performs async work")); +}; +const compare = ([a], [b]) => a > b ? 1 : a < b ? -1 : 0; +function sortByIndex(es) { + return es.sort(compare).map(t => t[1]); +} +// ------------------------------------------------------------------------------------- +// transformations interpreter +// ------------------------------------------------------------------------------------- +/** @internal */ +const getFinalTransformation = (transformation, isDecoding) => { + switch (transformation._tag) { + case "FinalTransformation": + return isDecoding ? transformation.decode : transformation.encode; + case "ComposeTransformation": + return Either.right; + case "TypeLiteralTransformation": + return input => { + let out = Either.right(input); + // --------------------------------------------- + // handle property signature transformations + // --------------------------------------------- + for (const pst of transformation.propertySignatureTransformations) { + const [from, to] = isDecoding ? [pst.from, pst.to] : [pst.to, pst.from]; + const transformation = isDecoding ? pst.decode : pst.encode; + const f = input => { + const o = transformation(Object.prototype.hasOwnProperty.call(input, from) ? Option.some(input[from]) : Option.none()); + delete input[from]; + if (Option.isSome(o)) { + input[to] = o.value; + } + return input; + }; + out = map(out, f); + } + return out; + }; + } +}; +exports.getFinalTransformation = getFinalTransformation; +const makeTree = (value, forest = []) => ({ + value, + forest +}); +/** + * @category formatting + * @since 3.10.0 + */ +const TreeFormatter = exports.TreeFormatter = { + formatIssue: issue => map(formatTree(issue), drawTree), + formatIssueSync: issue => { + const e = TreeFormatter.formatIssue(issue); + return isEither(e) ? Either.getOrThrow(e) : Effect.runSync(e); + }, + formatError: error => TreeFormatter.formatIssue(error.issue), + formatErrorSync: error => TreeFormatter.formatIssueSync(error.issue) +}; +const drawTree = tree => tree.value + draw("\n", tree.forest); +const draw = (indentation, forest) => { + let r = ""; + const len = forest.length; + let tree; + for (let i = 0; i < len; i++) { + tree = forest[i]; + const isLast = i === len - 1; + r += indentation + (isLast ? "└" : "├") + "─ " + tree.value; + r += draw(indentation + (len > 1 && !isLast ? "│ " : " "), tree.forest); + } + return r; +}; +const formatTransformationKind = kind => { + switch (kind) { + case "Encoded": + return "Encoded side transformation failure"; + case "Transformation": + return "Transformation process failure"; + case "Type": + return "Type side transformation failure"; + } +}; +const formatRefinementKind = kind => { + switch (kind) { + case "From": + return "From side refinement failure"; + case "Predicate": + return "Predicate refinement failure"; + } +}; +const getAnnotated = issue => "ast" in issue ? Option.some(issue.ast) : Option.none(); +// TODO: replace with Either.void when 3.13 lands +const Either_void = /*#__PURE__*/Either.right(undefined); +const getCurrentMessage = issue => getAnnotated(issue).pipe(Option.flatMap(AST.getMessageAnnotation), Option.match({ + onNone: () => Either_void, + onSome: messageAnnotation => { + const union = messageAnnotation(issue); + if (Predicate.isString(union)) { + return Either.right({ + message: union, + override: false + }); + } + if (Effect.isEffect(union)) { + return Effect.map(union, message => ({ + message, + override: false + })); + } + if (Predicate.isString(union.message)) { + return Either.right({ + message: union.message, + override: union.override + }); + } + return Effect.map(union.message, message => ({ + message, + override: union.override + })); + } +})); +const createParseIssueGuard = tag => issue => issue._tag === tag; +/** + * Returns `true` if the value is a `Composite`. + * + * @category guards + * @since 3.10.0 + */ +const isComposite = exports.isComposite = /*#__PURE__*/createParseIssueGuard("Composite"); +const isRefinement = /*#__PURE__*/createParseIssueGuard("Refinement"); +const isTransformation = /*#__PURE__*/createParseIssueGuard("Transformation"); +const getMessage = issue => flatMap(getCurrentMessage(issue), currentMessage => { + if (currentMessage !== undefined) { + const useInnerMessage = !currentMessage.override && (isComposite(issue) || isRefinement(issue) && issue.kind === "From" || isTransformation(issue) && issue.kind !== "Transformation"); + return useInnerMessage ? isTransformation(issue) || isRefinement(issue) ? getMessage(issue.issue) : Either_void : Either.right(currentMessage.message); + } + return Either_void; +}); +const getParseIssueTitleAnnotation = issue => getAnnotated(issue).pipe(Option.flatMap(AST.getParseIssueTitleAnnotation), Option.flatMapNullable(annotation => annotation(issue)), Option.getOrUndefined); +/** @internal */ +function getRefinementExpected(ast) { + return AST.getDescriptionAnnotation(ast).pipe(Option.orElse(() => AST.getTitleAnnotation(ast)), Option.orElse(() => AST.getAutoTitleAnnotation(ast)), Option.orElse(() => AST.getIdentifierAnnotation(ast)), Option.getOrElse(() => `{ ${ast.from} | filter }`)); +} +function getDefaultTypeMessage(issue) { + if (issue.message !== undefined) { + return issue.message; + } + const expected = AST.isRefinement(issue.ast) ? getRefinementExpected(issue.ast) : String(issue.ast); + return `Expected ${expected}, actual ${Inspectable.formatUnknown(issue.actual)}`; +} +const formatTypeMessage = issue => map(getMessage(issue), message => message ?? getParseIssueTitleAnnotation(issue) ?? getDefaultTypeMessage(issue)); +const getParseIssueTitle = issue => getParseIssueTitleAnnotation(issue) ?? String(issue.ast); +const formatForbiddenMessage = issue => issue.message ?? "is forbidden"; +const formatUnexpectedMessage = issue => issue.message ?? "is unexpected"; +const formatMissingMessage = issue => { + const missingMessageAnnotation = AST.getMissingMessageAnnotation(issue.ast); + if (Option.isSome(missingMessageAnnotation)) { + const annotation = missingMessageAnnotation.value(); + return Predicate.isString(annotation) ? Either.right(annotation) : annotation; + } + return Either.right(issue.message ?? "is missing"); +}; +const formatTree = issue => { + switch (issue._tag) { + case "Type": + return map(formatTypeMessage(issue), makeTree); + case "Forbidden": + return Either.right(makeTree(getParseIssueTitle(issue), [makeTree(formatForbiddenMessage(issue))])); + case "Unexpected": + return Either.right(makeTree(formatUnexpectedMessage(issue))); + case "Missing": + return map(formatMissingMessage(issue), makeTree); + case "Transformation": + return flatMap(getMessage(issue), message => { + if (message !== undefined) { + return Either.right(makeTree(message)); + } + return map(formatTree(issue.issue), tree => makeTree(getParseIssueTitle(issue), [makeTree(formatTransformationKind(issue.kind), [tree])])); + }); + case "Refinement": + return flatMap(getMessage(issue), message => { + if (message !== undefined) { + return Either.right(makeTree(message)); + } + return map(formatTree(issue.issue), tree => makeTree(getParseIssueTitle(issue), [makeTree(formatRefinementKind(issue.kind), [tree])])); + }); + case "Pointer": + return map(formatTree(issue.issue), tree => makeTree(util_.formatPath(issue.path), [tree])); + case "Composite": + return flatMap(getMessage(issue), message => { + if (message !== undefined) { + return Either.right(makeTree(message)); + } + const parseIssueTitle = getParseIssueTitle(issue); + return util_.isNonEmpty(issue.issues) ? map(Effect.forEach(issue.issues, formatTree), forest => makeTree(parseIssueTitle, forest)) : map(formatTree(issue.issues), tree => makeTree(parseIssueTitle, [tree])); + }); + } +}; +const makeArrayFormatterIssue = (_tag, path, message) => ({ + _tag, + path, + message +}); +/** + * @category formatting + * @since 3.10.0 + */ +const ArrayFormatter = exports.ArrayFormatter = { + formatIssue: issue => getArrayFormatterIssues(issue, undefined, []), + formatIssueSync: issue => { + const e = ArrayFormatter.formatIssue(issue); + return isEither(e) ? Either.getOrThrow(e) : Effect.runSync(e); + }, + formatError: error => ArrayFormatter.formatIssue(error.issue), + formatErrorSync: error => ArrayFormatter.formatIssueSync(error.issue) +}; +const getArrayFormatterIssues = (issue, parentTag, path) => { + const _tag = issue._tag; + switch (_tag) { + case "Type": + return map(formatTypeMessage(issue), message => [makeArrayFormatterIssue(parentTag ?? _tag, path, message)]); + case "Forbidden": + return Either.right([makeArrayFormatterIssue(_tag, path, formatForbiddenMessage(issue))]); + case "Unexpected": + return Either.right([makeArrayFormatterIssue(_tag, path, formatUnexpectedMessage(issue))]); + case "Missing": + return map(formatMissingMessage(issue), message => [makeArrayFormatterIssue(_tag, path, message)]); + case "Pointer": + return getArrayFormatterIssues(issue.issue, undefined, path.concat(issue.path)); + case "Composite": + return flatMap(getMessage(issue), message => { + if (message !== undefined) { + return Either.right([makeArrayFormatterIssue(_tag, path, message)]); + } + return util_.isNonEmpty(issue.issues) ? map(Effect.forEach(issue.issues, issue => getArrayFormatterIssues(issue, undefined, path)), Arr.flatten) : getArrayFormatterIssues(issue.issues, undefined, path); + }); + case "Refinement": + return flatMap(getMessage(issue), message => { + if (message !== undefined) { + return Either.right([makeArrayFormatterIssue(_tag, path, message)]); + } + return getArrayFormatterIssues(issue.issue, issue.kind === "Predicate" ? _tag : undefined, path); + }); + case "Transformation": + return flatMap(getMessage(issue), message => { + if (message !== undefined) { + return Either.right([makeArrayFormatterIssue(_tag, path, message)]); + } + return getArrayFormatterIssues(issue.issue, issue.kind === "Transformation" ? _tag : undefined, path); + }); + } +}; +//# sourceMappingURL=ParseResult.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/ParseResult.js.map b/backend/node_modules/effect/dist/cjs/ParseResult.js.map new file mode 100644 index 0000000000000000000000000000000000000000..8cddda053e0ac2429c2be7f4812eaed131149010 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/ParseResult.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ParseResult.js","names":["Arr","_interopRequireWildcard","require","Cause","_Data","Effect","Either","Exit","_Function","_GlobalValue","Inspectable","util_","Option","Predicate","Scheduler","AST","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Pointer","path","actual","issue","_tag","constructor","exports","Unexpected","message","Missing","ast","undefined","Composite","issues","output","Refinement","kind","Transformation","Type","Forbidden","ParseErrorTypeId","Symbol","for","isParseError","u","hasProperty","ParseError","TaggedError","toString","TreeFormatter","formatIssueSync","toJSON","_id","NodeInspectSymbol","parseError","succeed","right","fail","left","_try","try","fromOption","isEither","flatMap","dual","self","match","onLeft","onRight","map","mapError","mapLeft","eitherOrUndefined","mapBoth","options","onFailure","onSuccess","orElse","catchAll","mergeInternalOptions","overrideOptions","isNumber","getEither","isDecoding","parser","goMemo","getSync","input","getOrThrowWith","getOption","getRight","getEffect","isEffectAllowed","decodeUnknownSync","schema","decodeUnknownOption","decodeUnknownEither","decodeUnknownPromise","decodeUnknown","runPromise","encodeUnknownSync","encodeUnknownOption","encodeUnknownEither","encodeUnknownPromise","encodeUnknown","decodeSync","decodeOption","decodeEither","decodePromise","decode","validateSync","typeAST","validateOption","validateEither","validatePromise","validate","is","isRight","exact","asserts","result","isLeft","encodeSync","encodeOption","encodeEither","encodePromise","encode","decodeMemoMap","globalValue","encodeMemoMap","memoMap","memo","raw","go","parseOptionsAnnotation","getParseOptionsAnnotation","parserWithOptions","isSome","value","decodingFallbackAnnotation","getDecodingFallbackAnnotation","handleForbidden","getConcurrency","getOrUndefined","getConcurrencyAnnotation","getBatching","getBatchingAnnotation","from","defaultParseOption","allErrors","errors","ef","hasStableFilter","isComposite","filter","onNone","onSome","ep","a","to","dropRightRefinement","transform","getFinalTransformation","transformation","i2","parse","typeParameters","fromRefinement","literal","symbol","isUndefined","isNever","isString","isBoolean","isBigInt","isSymbol","isObject","enums","some","_","regex","getTemplateLiteralRegExp","test","elements","type","rest","annotatedAST","requiredTypes","isOptional","length","concat","slice","requiredLen","expectedIndexes","join","concurrency","batching","isArray","es","stepKey","len","push","queue","te","sortByIndex","nk","index","either","void","isNonEmptyReadonlyArray","head","tail","j","computeResult","isNonEmptyArray","cqueue","suspend","state","copy","forEach","discard","propertySignatures","indexSignatures","isNotNullable","expectedKeysMap","expectedKeys","ps","name","parameter","expectedAST","Union","make","key","UniqueSymbol","Literal","expected","isRecord","onExcessPropertyError","onExcessProperty","onExcessPropertyPreserve","inputKeys","Reflect","ownKeys","String","isExact","hasKey","prototype","indexSignature","keys","getKeysForIndexSignature","keu","vpr","tv","propertyOrder","indexOf","out","assign","searchTree","getSearchTree","types","ownKeysLen","astTypesLen","Map","candidates","isRecordOrArray","buckets","literals","literalsUnion","errorAst","TypeLiteral","PropertySignature","fakePropertySignature","otherwise","candidate","pr","finalResult","memoizeThunk","refinement","getLiterals","annotation","getSurrogateAnnotation","propertySignature","encodedAST","isLiteral","element","members","member","tags","hash","isRefinement","effect","scheduler","SyncScheduler","fiber","runFork","flush","exit","unsafePoll","isSuccess","cause","isFailType","error","pretty","compare","b","sort","pst","propertySignatureTransformations","none","makeTree","forest","formatIssue","formatTree","drawTree","getOrThrow","runSync","formatError","formatErrorSync","tree","draw","indentation","isLast","formatTransformationKind","formatRefinementKind","getAnnotated","Either_void","getCurrentMessage","pipe","getMessageAnnotation","messageAnnotation","union","override","isEffect","createParseIssueGuard","tag","isTransformation","getMessage","currentMessage","useInnerMessage","getParseIssueTitleAnnotation","flatMapNullable","getRefinementExpected","getDescriptionAnnotation","getTitleAnnotation","getAutoTitleAnnotation","getIdentifierAnnotation","getOrElse","getDefaultTypeMessage","formatUnknown","formatTypeMessage","getParseIssueTitle","formatForbiddenMessage","formatUnexpectedMessage","formatMissingMessage","missingMessageAnnotation","getMissingMessageAnnotation","formatPath","parseIssueTitle","isNonEmpty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AAuB,CAAClV,KAAK,CAACA,KAAK,EAAEA,KAAK,CAACa,IAAI,KAAK,WAAW,GAAGZ,IAAI,GAAGO,SAAS,EAAEV,IAAI,CAAC;MAClG,CAAC,CAAC;IACJ,KAAK,gBAAgB;MACnB,OAAO0C,OAAO,CAACiR,UAAU,CAACzT,KAAK,CAAC,EAAGK,OAAO,IAAI;QAC5C,IAAIA,OAAO,KAAKG,SAAS,EAAE;UACzB,OAAOxC,MAAM,CAACiE,KAAK,CAAC,CAAC+S,uBAAuB,CAAC/U,IAAI,EAAEH,IAAI,EAAEO,OAAO,CAAC,CAAC,CAAC;QACrE;QACA,OAAO6U,uBAAuB,CAAClV,KAAK,CAACA,KAAK,EAAEA,KAAK,CAACa,IAAI,KAAK,gBAAgB,GAAGZ,IAAI,GAAGO,SAAS,EAAEV,IAAI,CAAC;MACvG,CAAC,CAAC;EACN;AACF,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/PartitionedSemaphore.js.map b/backend/node_modules/effect/dist/cjs/PartitionedSemaphore.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0703754ab979738be937115938fdec8c5ab7d1d2 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/PartitionedSemaphore.js.map @@ -0,0 +1 @@ +{"version":3,"file":"PartitionedSemaphore.js","names":["Effect","_interopRequireWildcard","require","Iterable","MutableHashMap","Option","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","exports","makeUnsafe","options","maxPermits","Math","max","permits","Number","isFinite","withPermits","effect","totalPermits","waitingPermits","partitions","empty","take","key","async","resume","never","void","needed","taken","waiters","getOrElse","Set","entry","cleanup","delete","size","remove","add","sync","releaseUnsafe","iterator","Symbol","state","next","done","unsafeHead","value","takePermits","release","matchCauseEffect","onFailure","cause","failCause","onSuccess","succeed","uninterruptibleMask","restore","flatMap","make"],"sources":["../../src/PartitionedSemaphore.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c,EAAE;MAChB,IAAIc,KAAK,CAACpB,OAAO,KAAK,CAAC,EAAEoB,KAAK,CAACR,MAAM,EAAE;MACvCZ,OAAO,EAAE;IACX;EACF,CAAC;EAED,OAAO;IACL,CAACP,MAAM,GAAGA,MAAM;IAChBU,WAAW,EAAEA,CAACO,GAAG,EAAEV,OAAO,KAAI;MAC5B,MAAMmC,WAAW,GAAG1B,IAAI,CAACC,GAAG,EAAEV,OAAO,CAAC;MACtC,MAAMoC,OAAO,GAAwEpE,MAAM,CAACqE,gBAAgB,CAAC;QAC3GC,SAASA,CAACC,KAAK;UACbZ,aAAa,CAAC3B,OAAO,CAAC;UACtB,OAAOhC,MAAM,CAACwE,SAAS,CAACD,KAAK,CAAC;QAChC,CAAC;QACDE,SAASA,CAACP,KAAK;UACbP,aAAa,CAAC3B,OAAO,CAAC;UACtB,OAAOhC,MAAM,CAAC0E,OAAO,CAACR,KAAK,CAAC;QAC9B;OACD,CAAC;MACF,OAAQ9B,MAAM,IACZpC,MAAM,CAAC2E,mBAAmB,CAAEC,OAAO,IACjC5E,MAAM,CAAC6E,OAAO,CACZD,OAAO,CAACT,WAAW,CAAC,EACpB,MAAMC,OAAO,CAACQ,OAAO,CAACxC,MAAM,CAAC,CAAC,CAC/B,CACF;IACL;GACD;AACH,CAAC;AAED;;;;;;;;;;;;;;;;AAAAV,OAAA,CAAAC,UAAA,GAAAA,UAAA;AAgBO,MAAMmD,IAAI,GAAiBlD,OAEjC,IAA6C5B,MAAM,CAAC0D,IAAI,CAAC,MAAM/B,UAAU,CAAIC,OAAO,CAAC,CAAC;AAAAF,OAAA,CAAAoD,IAAA,GAAAA,IAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Pipeable.js b/backend/node_modules/effect/dist/cjs/Pipeable.js new file mode 100644 index 0000000000000000000000000000000000000000..85ae2ce04cae7a48dd87167e7ec8c300bbb4fb35 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Pipeable.js @@ -0,0 +1,70 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.pipeArguments = exports.Prototype = exports.Class = void 0; +/** + * @since 2.0.0 + */ +/** + * @since 2.0.0 + */ +const pipeArguments = (self, args) => { + switch (args.length) { + case 0: + return self; + case 1: + return args[0](self); + case 2: + return args[1](args[0](self)); + case 3: + return args[2](args[1](args[0](self))); + case 4: + return args[3](args[2](args[1](args[0](self)))); + case 5: + return args[4](args[3](args[2](args[1](args[0](self))))); + case 6: + return args[5](args[4](args[3](args[2](args[1](args[0](self)))))); + case 7: + return args[6](args[5](args[4](args[3](args[2](args[1](args[0](self))))))); + case 8: + return args[7](args[6](args[5](args[4](args[3](args[2](args[1](args[0](self)))))))); + case 9: + return args[8](args[7](args[6](args[5](args[4](args[3](args[2](args[1](args[0](self))))))))); + default: + { + let ret = self; + for (let i = 0, len = args.length; i < len; i++) { + ret = args[i](ret); + } + return ret; + } + } +}; +/** + * @since 3.15.0 + * @category Prototypes + */ +exports.pipeArguments = pipeArguments; +const Prototype = exports.Prototype = { + pipe() { + return pipeArguments(this, arguments); + } +}; +const Base = /*#__PURE__*/function () { + function PipeableBase() {} + PipeableBase.prototype = Prototype; + return PipeableBase; +}(); +/** + * @since 3.15.0 + * @category Constructors + */ +const Class = klass => klass ? class extends klass { + pipe() { + return pipeArguments(this, arguments); + } +} : Base; +exports.Class = Class; +//# sourceMappingURL=Pipeable.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Pipeable.js.map b/backend/node_modules/effect/dist/cjs/Pipeable.js.map new file mode 100644 index 0000000000000000000000000000000000000000..512c8616665dca6ddbc425d3c7b2f78fdd6e4c97 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Pipeable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Pipeable.js","names":["pipeArguments","self","args","length","ret","i","len","exports","Prototype","pipe","arguments","Base","PipeableBase","prototype","Class","klass"],"sources":["../../src/Pipeable.ts"],"sourcesContent":[null],"mappings":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,GAAAD,OAAA,CAAAC,SAAA,GAAa;EACjCC,IAAIA,CAAA;IACF,OAAOT,aAAa,CAAC,IAAI,EAAEU,SAAS,CAAC;EACvC;CACD;AAED,MAAMC,IAAI,gBAAyB;EACjC,SAASC,YAAYA,CAAA,GAAI;EACzBA,YAAY,CAACC,SAAS,GAAGL,SAAS;EAClC,OAAOI,YAAmB;AAC5B,CAAC,CAAC,CAAE;AAEJ;;;;AAIO,MAAME,KAAK,GAWbC,KAAY,IACfA,KAAK,GACH,cAAcA,KAAK;EACjBN,IAAIA,CAAA;IACF,OAAOT,aAAa,CAAC,IAAI,EAAEU,SAAS,CAAC;EACvC;CACD,GACCC,IAAI;AAAAJ,OAAA,CAAAO,KAAA,GAAAA,KAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Pool.js b/backend/node_modules/effect/dist/cjs/Pool.js new file mode 100644 index 0000000000000000000000000000000000000000..7f6c2293ad1694792df29d75e760803b71b56216 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Pool.js @@ -0,0 +1,107 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.makeWithTTL = exports.make = exports.isPool = exports.invalidate = exports.get = exports.PoolTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/pool.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const PoolTypeId = exports.PoolTypeId = internal.PoolTypeId; +/** + * Returns `true` if the specified value is a `Pool`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isPool = exports.isPool = internal.isPool; +/** + * Makes a new pool of the specified fixed size. The pool is returned in a + * `Scope`, which governs the lifetime of the pool. When the pool is shutdown + * because the `Scope` is closed, the individual items allocated by the pool + * will be released in some unspecified order. + * + * By setting the `concurrency` parameter, you can control the level of concurrent + * access per pool item. By default, the number of permits is set to `1`. + * + * `targetUtilization` determines when to create new pool items. It is a value + * between 0 and 1, where 1 means only create new pool items when all the existing + * items are fully utilized. + * + * A `targetUtilization` of 0.5 will create new pool items when the existing items are + * 50% utilized. + * + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * Makes a new pool with the specified minimum and maximum sizes and time to + * live before a pool whose excess items are not being used will be shrunk + * down to the minimum size. The pool is returned in a `Scope`, which governs + * the lifetime of the pool. When the pool is shutdown because the `Scope` is + * used, the individual items allocated by the pool will be released in some + * unspecified order. + * + * By setting the `concurrency` parameter, you can control the level of concurrent + * access per pool item. By default, the number of permits is set to `1`. + * + * `targetUtilization` determines when to create new pool items. It is a value + * between 0 and 1, where 1 means only create new pool items when all the existing + * items are fully utilized. + * + * A `targetUtilization` of 0.5 will create new pool items when the existing items are + * 50% utilized. + * + * The `timeToLiveStrategy` determines how items are invalidated. If set to + * "creation", then items are invalidated based on their creation time. If set + * to "usage", then items are invalidated based on pool usage. + * + * By default, the `timeToLiveStrategy` is set to "usage". + * + * ```ts skip-type-checking + * import { createConnection } from "mysql2"; + * import { Duration, Effect, Pool } from "effect" + * + * const acquireDBConnection = Effect.acquireRelease( + * Effect.sync(() => createConnection('mysql://...')), + * (connection) => Effect.sync(() => connection.end(() => {})), + * ) + * + * const connectionPool = Effect.flatMap( + * Pool.makeWithTTL({ + * acquire: acquireDBConnection, + * min: 10, + * max: 20, + * timeToLive: Duration.seconds(60) + * }), + * (pool) => pool.get + * ) + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const makeWithTTL = exports.makeWithTTL = internal.makeWithTTL; +/** + * Retrieves an item from the pool in a scoped effect. Note that if + * acquisition fails, then the returned effect will fail for that same reason. + * Retrying a failed acquisition attempt will repeat the acquisition attempt. + * + * @since 2.0.0 + * @category getters + */ +const get = exports.get = internal.get; +/** + * Invalidates the specified item. This will cause the pool to eventually + * reallocate the item, although this reallocation may occur lazily rather + * than eagerly. + * + * @since 2.0.0 + * @category combinators + */ +const invalidate = exports.invalidate = internal.invalidate; +//# sourceMappingURL=Pool.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Pool.js.map b/backend/node_modules/effect/dist/cjs/Pool.js.map new file mode 100644 index 0000000000000000000000000000000000000000..487332b3c2419056be33d509da255ba5628a86f9 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Pool.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Pool.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","PoolTypeId","exports","isPool","make","makeWithTTL","invalidate"],"sources":["../../src/Pool.ts"],"sourcesContent":[null],"mappings":";;;;;;AAKA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA8C,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAM9C;;;;AAIO,MAAMkB,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAkBtB,QAAQ,CAACsB,UAAU;AAwE5D;;;;;;AAMO,MAAME,MAAM,GAAAD,OAAA,CAAAC,MAAA,GAAgDxB,QAAQ,CAACwB,MAAM;AAElF;;;;;;;;;;;;;;;;;;;AAmBO,MAAMC,IAAI,GAAAF,OAAA,CAAAE,IAAA,GAOwCzB,QAAQ,CAACyB,IAAI;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CO,MAAMC,WAAW,GAAAH,OAAA,CAAAG,WAAA,GAUiC1B,QAAQ,CAAC0B,WAAW;AAE7E;;;;;;;;AAQO,MAAMX,GAAG,GAAAQ,OAAA,CAAAR,GAAA,GAAiEf,QAAQ,CAACe,GAAG;AAE7F;;;;;;;;AAQO,MAAMY,UAAU,GAAAJ,OAAA,CAAAI,UAAA,GAmBnB3B,QAAQ,CAAC2B,UAAU","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Predicate.js.map b/backend/node_modules/effect/dist/cjs/Predicate.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ea8aab7593f762941eb89b6ff7e2f433c2ca8359 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Predicate.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Predicate.js","names":["_Function","require","mapInput","exports","dual","self","f","b","isTupleOf","n","length","isTupleOfAtLeast","isTruthy","input","isSet","Set","isMap","Map","isString","isNumber","isBoolean","isBigInt","isSymbol","isPropertyKey","u","isFunction","isFunction_","isUndefined","undefined","isNotUndefined","isNull","isNotNull","isNever","_","isUnknown","isRecordOrArray","isObject","hasProperty","property","isTagged","tag","isNullable","isNotNullable","isError","Error","isUint8Array","Uint8Array","isDate","Date","isIterable","Symbol","iterator","isRecord","Array","isArray","isReadonlyRecord","isPromise","then","catch","isPromiseLike","isRegExp","RegExp","compose","ab","bc","a","product","that","all","collection","as","collectionIndex","p","productMany","rest","head","tail","tuple","elements","struct","fields","keys","Object","key","not","or","and","xor","eqv","implies","antecedent","consequent","nor","nand","every","some"],"sources":["../../src/Predicate.ts"],"sourcesContent":[null],"mappings":";;;;;;AAkBA,IAAAA,SAAA,GAAAC,OAAA;AAlBA;;;;;;;;;;;;;;;;;;;AAgKA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BO,MAAMC,QAAQ,GAAAC,OAAA,CAAAD,QAAA,gBAuDjB,IAAAE,cAAI,EAAC,CAAC,EAAE,CAAOC,IAAkB,EAAEC,CAAc,KAAoBC,CAAC,IAAKF,IAAI,CAACC,CAAC,CAACC,CAAC,CAAC,CAAC,CAAC;AAE1F;;;;;;;;;;;;;;;;;;;;;;;;;AAyBO,MAAMC,SAAS,GAAAL,OAAA,CAAAK,SAAA,gBAqDlB,IAAAJ,cAAI,EAAC,CAAC,EAAE,CAAsBC,IAAsB,EAAEI,CAAI,KAA4BJ,IAAI,CAACK,MAAM,KAAKD,CAAC,CAAC;AAE5G;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BO,MAAME,gBAAgB,GAAAR,OAAA,CAAAQ,gBAAA,gBAuDzB,IAAAP,cAAI,EAAC,CAAC,EAAE,C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,CAACG,CAAC,CAACP,CAAC,CAAC,EAAE;MACT,OAAO,KAAK;IACd;EACF;EACA,OAAO,IAAI;AACb,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;AAAA9D,OAAA,CAAA2F,KAAA,GAAAA,KAAA;AAyBO,MAAMC,IAAI,GAAO1B,UAAkC,IAAoBJ,CAAC,IAAI;EACjF,KAAK,MAAMO,CAAC,IAAIH,UAAU,EAAE;IAC1B,IAAIG,CAAC,CAACP,CAAC,CAAC,EAAE;MACR,OAAO,IAAI;IACb;EACF;EACA,OAAO,KAAK;AACd,CAAC;AAAA9D,OAAA,CAAA4F,IAAA,GAAAA,IAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/PrimaryKey.js b/backend/node_modules/effect/dist/cjs/PrimaryKey.js new file mode 100644 index 0000000000000000000000000000000000000000..91b3c4a231f2f7ed10050e94e29df3eae16ca44a --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/PrimaryKey.js @@ -0,0 +1,21 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.value = exports.symbol = void 0; +/** + * @since 2.0.0 + */ +/** + * @since 2.0.0 + * @category symbols + */ +const symbol = exports.symbol = /*#__PURE__*/Symbol.for("effect/PrimaryKey"); +/** + * @since 2.0.0 + * @category accessors + */ +const value = self => self[symbol](); +exports.value = value; +//# sourceMappingURL=PrimaryKey.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/PrimaryKey.js.map b/backend/node_modules/effect/dist/cjs/PrimaryKey.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5565e3e696ee7e0a40e77ed1ab6d4143c99f9970 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/PrimaryKey.js.map @@ -0,0 +1 @@ +{"version":3,"file":"PrimaryKey.js","names":["symbol","exports","Symbol","for","value","self"],"sources":["../../src/PrimaryKey.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA;;;AAIA;;;;AAIO,MAAMA,MAAM,GAAAC,OAAA,CAAAD,MAAA,gBAAkBE,MAAM,CAACC,GAAG,CAAC,mBAAmB,CAAC;AAUpE;;;;AAIO,MAAMC,KAAK,GAAIC,IAAgB,IAAaA,IAAI,CAACL,MAAM,CAAC,EAAE;AAAAC,OAAA,CAAAG,KAAA,GAAAA,KAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/PubSub.js.map b/backend/node_modules/effect/dist/cjs/PubSub.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b4f248c32c5bea1afe0803839c86e607fee461bb --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/PubSub.js.map @@ -0,0 +1 @@ +{"version":3,"file":"PubSub.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","bounded","exports","dropping","sliding","unbounded","capacity","size","isFull","isEmpty","shutdown","isShutdown","awaitShutdown","publish","publishAll","subscribe"],"sources":["../../src/PubSub.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAgD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GA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,CAAAQ,QAAA,GAAgD/B,QAAQ,CAAC+B,QAAQ;AAEtF;;;;;;AAMO,MAAMC,UAAU,GAAAT,OAAA,CAAAS,UAAA,GAAmDhC,QAAQ,CAACgC,UAAU;AAE7F;;;;;;;;AAQO,MAAMC,aAAa,GAAAV,OAAA,CAAAU,aAAA,GAAgDjC,QAAQ,CAACiC,aAAa;AAEhG;;;;;;;AAOO,MAAMC,OAAO,GAAAX,OAAA,CAAAW,OAAA,GAiBhBlC,QAAQ,CAACkC,OAAO;AAEpB;;;;;;;AAOO,MAAMC,UAAU,GAAAZ,OAAA,CAAAY,UAAA,GAiBnBnC,QAAQ,CAACmC,UAAU;AAEvB;;;;;;;;AAQO,MAAMC,SAAS,GAAAb,OAAA,CAAAa,SAAA,GAAgFpC,QAAQ,CAACoC,SAAS","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Queue.js b/backend/node_modules/effect/dist/cjs/Queue.js new file mode 100644 index 0000000000000000000000000000000000000000..4ccbf45c072fe253f5046470a63db6abe403b947 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Queue.js @@ -0,0 +1,255 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.unsafeOffer = exports.unbounded = exports.takeUpTo = exports.takeN = exports.takeBetween = exports.takeAll = exports.take = exports.slidingStrategy = exports.sliding = exports.size = exports.shutdown = exports.poll = exports.offerAll = exports.offer = exports.make = exports.isShutdown = exports.isQueue = exports.isFull = exports.isEnqueue = exports.isEmpty = exports.isDequeue = exports.droppingStrategy = exports.dropping = exports.capacity = exports.bounded = exports.backPressureStrategy = exports.awaitShutdown = exports.QueueStrategyTypeId = exports.EnqueueTypeId = exports.DequeueTypeId = exports.BackingQueueTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/queue.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const EnqueueTypeId = exports.EnqueueTypeId = internal.EnqueueTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +const DequeueTypeId = exports.DequeueTypeId = internal.DequeueTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +const QueueStrategyTypeId = exports.QueueStrategyTypeId = internal.QueueStrategyTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +const BackingQueueTypeId = exports.BackingQueueTypeId = internal.BackingQueueTypeId; +/** + * Returns `true` if the specified value is a `Queue`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isQueue = exports.isQueue = internal.isQueue; +/** + * Returns `true` if the specified value is a `Dequeue`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isDequeue = exports.isDequeue = internal.isDequeue; +/** + * Returns `true` if the specified value is a `Enqueue`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isEnqueue = exports.isEnqueue = internal.isEnqueue; +/** + * @since 2.0.0 + * @category strategies + */ +const backPressureStrategy = exports.backPressureStrategy = internal.backPressureStrategy; +/** + * @since 2.0.0 + * @category strategies + */ +const droppingStrategy = exports.droppingStrategy = internal.droppingStrategy; +/** + * @since 2.0.0 + * @category strategies + */ +const slidingStrategy = exports.slidingStrategy = internal.slidingStrategy; +/** + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * Makes a new bounded `Queue`. When the capacity of the queue is reached, any + * additional calls to `offer` will be suspended until there is more room in + * the queue. + * + * **Note**: When possible use only power of 2 capacities; this will provide + * better performance by utilising an optimised version of the underlying + * `RingBuffer`. + * + * @since 2.0.0 + * @category constructors + */ +const bounded = exports.bounded = internal.bounded; +/** + * Makes a new bounded `Queue` with the dropping strategy. + * + * When the capacity of the queue is reached, new elements will be dropped and the + * old elements will remain. + * + * **Note**: When possible use only power of 2 capacities; this will provide + * better performance by utilising an optimised version of the underlying + * `RingBuffer`. + * + * @since 2.0.0 + * @category constructors + */ +const dropping = exports.dropping = internal.dropping; +/** + * Makes a new bounded `Queue` with the sliding strategy. + * + * When the capacity of the queue is reached, new elements will be added and the + * old elements will be dropped. + * + * **Note**: When possible use only power of 2 capacities; this will provide + * better performance by utilising an optimised version of the underlying + * `RingBuffer`. + * + * @since 2.0.0 + * @category constructors + */ +const sliding = exports.sliding = internal.sliding; +/** + * Creates a new unbounded `Queue`. + * + * @since 2.0.0 + * @category constructors + */ +const unbounded = exports.unbounded = internal.unbounded; +/** + * Returns the number of elements the queue can hold. + * + * @since 2.0.0 + * @category getters + */ +const capacity = exports.capacity = internal.capacity; +/** + * Retrieves the size of the queue, which is equal to the number of elements + * in the queue. This may be negative if fibers are suspended waiting for + * elements to be added to the queue. + * + * @since 2.0.0 + * @category getters + */ +const size = exports.size = internal.size; +/** + * Returns `true` if the `Queue` contains zero elements, `false` otherwise. + * + * @since 2.0.0 + * @category getters + */ +const isEmpty = exports.isEmpty = internal.isEmpty; +/** + * Returns `true` if the `Queue` contains at least one element, `false` + * otherwise. + * + * @since 2.0.0 + * @category getters + */ +const isFull = exports.isFull = internal.isFull; +/** + * Returns `true` if `shutdown` has been called, otherwise returns `false`. + * + * @since 2.0.0 + * @category getters + */ +const isShutdown = exports.isShutdown = internal.isShutdown; +/** + * Waits until the queue is shutdown. The `Effect` returned by this method will + * not resume until the queue has been shutdown. If the queue is already + * shutdown, the `Effect` will resume right away. + * + * @since 2.0.0 + * @category utils + */ +const awaitShutdown = exports.awaitShutdown = internal.awaitShutdown; +/** + * Interrupts any fibers that are suspended on `offer` or `take`. Future calls + * to `offer*` and `take*` will be interrupted immediately. + * + * @since 2.0.0 + * @category utils + */ +const shutdown = exports.shutdown = internal.shutdown; +/** + * Places one value in the queue. + * + * @since 2.0.0 + * @category utils + */ +const offer = exports.offer = internal.offer; +/** + * Places one value in the queue. + * + * @since 2.0.0 + * @category utils + */ +const unsafeOffer = exports.unsafeOffer = internal.unsafeOffer; +/** + * For Bounded Queue: uses the `BackPressure` Strategy, places the values in + * the queue and always returns true. If the queue has reached capacity, then + * the fiber performing the `offerAll` will be suspended until there is room + * in the queue. + * + * For Unbounded Queue: Places all values in the queue and returns true. + * + * For Sliding Queue: uses `Sliding` Strategy If there is room in the queue, + * it places the values otherwise it removes the old elements and enqueues the + * new ones. Always returns true. + * + * For Dropping Queue: uses `Dropping` Strategy, It places the values in the + * queue but if there is no room it will not enqueue them and return false. + * + * @since 2.0.0 + * @category utils + */ +const offerAll = exports.offerAll = internal.offerAll; +/** + * Returns the first value in the `Queue` as a `Some`, or `None` if the queue + * is empty. + * + * @since 2.0.0 + * @category utils + */ +const poll = exports.poll = internal.poll; +/** + * Takes the oldest value in the queue. If the queue is empty, this will return + * a computation that resumes when an item has been added to the queue. + * + * @since 2.0.0 + * @category utils + */ +const take = exports.take = internal.take; +/** + * Takes all the values in the queue and returns the values. If the queue is + * empty returns an empty collection. + * + * @since 2.0.0 + * @category utils + */ +const takeAll = exports.takeAll = internal.takeAll; +/** + * Takes up to max number of values from the queue. + * + * @since 2.0.0 + * @category utils + */ +const takeUpTo = exports.takeUpTo = internal.takeUpTo; +/** + * Takes a number of elements from the queue between the specified minimum and + * maximum. If there are fewer than the minimum number of elements available, + * suspends until at least the minimum number of elements have been collected. + * + * @since 2.0.0 + * @category utils + */ +const takeBetween = exports.takeBetween = internal.takeBetween; +/** + * Takes the specified number of elements from the queue. If there are fewer + * than the specified number of elements available, it suspends until they + * become available. + * + * @since 2.0.0 + * @category utils + */ +const takeN = exports.takeN = internal.takeN; +//# sourceMappingURL=Queue.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Random.js b/backend/node_modules/effect/dist/cjs/Random.js new file mode 100644 index 0000000000000000000000000000000000000000..0cdeab543988eafe825521496a123d753f6975ae --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Random.js @@ -0,0 +1,145 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.shuffle = exports.randomWith = exports.nextRange = exports.nextIntBetween = exports.nextInt = exports.nextBoolean = exports.next = exports.make = exports.fixed = exports.choice = exports.RandomTypeId = exports.Random = void 0; +var defaultServices = _interopRequireWildcard(require("./internal/defaultServices.js")); +var internal = _interopRequireWildcard(require("./internal/random.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const RandomTypeId = exports.RandomTypeId = internal.RandomTypeId; +/** + * Returns the next numeric value from the pseudo-random number generator. + * + * @since 2.0.0 + * @category constructors + */ +const next = exports.next = defaultServices.next; +/** + * Returns the next integer value from the pseudo-random number generator. + * + * @since 2.0.0 + * @category constructors + */ +const nextInt = exports.nextInt = defaultServices.nextInt; +/** + * Returns the next boolean value from the pseudo-random number generator. + * + * @since 2.0.0 + * @category constructors + */ +const nextBoolean = exports.nextBoolean = defaultServices.nextBoolean; +/** + * Returns the next numeric value in the specified range from the + * pseudo-random number generator. + * + * @since 2.0.0 + * @category constructors + */ +const nextRange = exports.nextRange = defaultServices.nextRange; +/** + * Returns the next integer value in the specified range from the + * pseudo-random number generator. + * + * @since 2.0.0 + * @category constructors + */ +const nextIntBetween = exports.nextIntBetween = defaultServices.nextIntBetween; +/** + * Uses the pseudo-random number generator to shuffle the specified iterable. + * + * @since 2.0.0 + * @category constructors + */ +const shuffle = exports.shuffle = defaultServices.shuffle; +/** + * Get a random element from an iterable. + * + * @example + * ```ts + * import { Effect, Random } from "effect" + * + * Effect.gen(function* () { + * const randomItem = yield* Random.choice([1, 2, 3]) + * console.log(randomItem) + * }) + * ``` + * + * @since 3.6.0 + * @category constructors + */ +const choice = exports.choice = defaultServices.choice; +/** + * Retreives the `Random` service from the context and uses it to run the + * specified workflow. + * + * @since 2.0.0 + * @category constructors + */ +const randomWith = exports.randomWith = defaultServices.randomWith; +/** + * @since 2.0.0 + * @category context + */ +const Random = exports.Random = internal.randomTag; +/** + * Constructs the `Random` service, seeding the pseudo-random number generator + * with an hash of the specified seed. + * This constructor is useful for generating predictable sequences of random values for specific use cases. + * + * Example uses: + * - Generating random UI data for visual tests. + * - Creating data that needs to change daily but remain the same throughout a single day, such as using a date as the seed. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Effect, Random } from "effect" + * + * const random1 = Random.make("myseed") + * const random2 = Random.make("myseed") + * + * assert.equal(Effect.runSync(random1.next), Effect.runSync(random2.next)) + * ``` + * + * @since 3.5.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * Constructs the `Random` service from an array of literal values. + * The service will cycle through the provided values in order when generating random values. + * This constructor is useful for creating deterministic sequences for testing or when specific values need to be returned. + * + * @example + * ```ts + * import { Effect, Random } from "effect" + * + * Effect.gen(function* () { + * console.log(yield* Random.next) // 0.2 + * console.log(yield* Random.next) // 0.5 + * console.log(yield* Random.next) // 0.8 + * console.log(yield* Random.next) // 0.2 (cycles back) + * }).pipe(Effect.withRandom(Random.fixed([0.2, 0.5, 0.8]))) + * ``` + * + * @example + * ```ts + * import { Effect, Random } from "effect" + * + * Effect.gen(function* () { + * console.log(yield* Random.nextBoolean) // true + * console.log(yield* Random.nextBoolean) // false + * console.log(yield* Random.nextBoolean) // true + * }).pipe(Effect.withRandom(Random.fixed([true, false, true]))) + * ``` + * + * @since 3.11.0 + * @category constructors + */ +const fixed = exports.fixed = internal.fixed; +//# sourceMappingURL=Random.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Random.js.map b/backend/node_modules/effect/dist/cjs/Random.js.map new file mode 100644 index 0000000000000000000000000000000000000000..18e41c97edd85c4d995069ef493477a9218eb2fb --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Random.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Random.js","names":["defaultServices","_interopRequireWildcard","require","internal","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","RandomTypeId","exports","next","nextInt","nextBoolean","nextRange","nextIntBetween","shuffle","choice","randomWith","Random","randomTag","make","fixed"],"sources":["../../src/Random.ts"],"sourcesContent":[null],"mappings":";;;;;;AAQA,IAAAA,eAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,uBAAA,CAAAC,OAAA;AAAgD,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAA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OAAA,CAAAS,MAAA,GAAgC9B,QAAQ,CAAC+B,SAAS;AAErE;;;;;;;;;;;;;;;;;;;;;;;AAuBO,MAAMC,IAAI,GAAAX,OAAA,CAAAW,IAAA,GAA2BhC,QAAQ,CAACgC,IAAI;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BO,MAAMC,KAAK,GAAAZ,OAAA,CAAAY,KAAA,GAAoEjC,QAAQ,CAACiC,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/RateLimiter.js b/backend/node_modules/effect/dist/cjs/RateLimiter.js new file mode 100644 index 0000000000000000000000000000000000000000..043959cffc25770f278233e543fdcb6acd79d5f8 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/RateLimiter.js @@ -0,0 +1,84 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.withCost = exports.make = void 0; +var internal = _interopRequireWildcard(require("./internal/rateLimiter.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * Constructs a new `RateLimiter` which will utilize the specified algorithm + * to limit requests (defaults to `token-bucket`). + * + * Notes + * - Only the moment of starting the effect is rate limited. The number of concurrent executions is not bounded. + * - Instances of `RateLimiter` can be composed. + * - The "cost" per effect can be changed. See {@link withCost} + * + * @example + * ```ts + * import { Effect, RateLimiter } from "effect"; + * import { compose } from "effect/Function" + * + * const program = Effect.scoped( + * Effect.gen(function* ($) { + * const perMinuteRL = yield* $(RateLimiter.make({ limit: 30, interval: "1 minutes" })) + * const perSecondRL = yield* $(RateLimiter.make({ limit: 2, interval: "1 seconds" })) + * + * // This rate limiter respects both the 30 calls per minute + * // and the 2 calls per second constraints. + * const rateLimit = compose(perMinuteRL, perSecondRL) + * + * // simulate repeated calls + * for (let n = 0; n < 100; n++) { + * // wrap the effect we want to limit with rateLimit + * yield* $(rateLimit(Effect.log("Calling RateLimited Effect"))); + * } + * }) + * ); + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * Alters the per-effect cost of the rate-limiter. + * + * This can be used for "credit" based rate-limiting where different API endpoints + * cost a different number of credits within a time window. + * Eg: 1000 credits / hour, where a query costs 1 credit and a mutation costs 5 credits. + * + * @example + * ```ts + * import { Effect, RateLimiter } from "effect"; + * import { compose } from "effect/Function"; + * + * const program = Effect.scoped( + * Effect.gen(function* ($) { + * // Create a rate limiter that has an hourly limit of 1000 credits + * const rateLimiter = yield* $(RateLimiter.make({ limit: 1000, interval: "1 hours" })); + * // Query API costs 1 credit per call ( 1 is the default cost ) + * const queryAPIRL = compose(rateLimiter, RateLimiter.withCost(1)); + * // Mutation API costs 5 credits per call + * const mutationAPIRL = compose(rateLimiter, RateLimiter.withCost(5)); + + * // Use the pre-defined rate limiters + * yield* $(queryAPIRL(Effect.log("Sample Query"))); + * yield* $(mutationAPIRL(Effect.log("Sample Mutation"))); + * + * // Or set a cost on-the-fly + * yield* $( + * rateLimiter(Effect.log("Another query with a different cost")).pipe( + * RateLimiter.withCost(3) + * ) + * ); + * }) + * ); + * ``` + * + * @since 2.0.0 + * @category combinators + */ +const withCost = exports.withCost = internal.withCost; +//# sourceMappingURL=RateLimiter.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/RateLimiter.js.map b/backend/node_modules/effect/dist/cjs/RateLimiter.js.map new file mode 100644 index 0000000000000000000000000000000000000000..6d12c1b5ddd8036caaefdf7acf4525f4be1a2a2f --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/RateLimiter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RateLimiter.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","make","exports","withCost"],"sources":["../../src/RateLimiter.ts"],"sourcesContent":[null],"mappings":";;;;;;AAOA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAqD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAuDrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCO,MAAMkB,IAAI,GAAAC,OAAA,CAAAD,IAAA,GAAwEtB,QAAQ,CAACsB,IAAI;AAEtG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCO,MAAME,QAAQ,GAAAD,OAAA,CAAAC,QAAA,GAA4ExB,QAAQ,CAACwB,QAAQ","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/RcMap.js b/backend/node_modules/effect/dist/cjs/RcMap.js new file mode 100644 index 0000000000000000000000000000000000000000..4b5bc2b5b4f3a998edb565d7adb9f50f3451c913 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/RcMap.js @@ -0,0 +1,77 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.touch = exports.make = exports.keys = exports.invalidate = exports.has = exports.get = exports.TypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/rcMap.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 3.5.0 + * @category type ids + */ +const TypeId = exports.TypeId = internal.TypeId; +/** + * An `RcMap` can contain multiple reference counted resources that can be indexed + * by a key. The resources are lazily acquired on the first call to `get` and + * released when the last reference is released. + * + * Complex keys can extend `Equal` and `Hash` to allow lookups by value. + * + * **Options** + * + * - `capacity`: The maximum number of resources that can be held in the map. + * - `idleTimeToLive`: When the reference count reaches zero, the resource will be released after this duration. + * Can be a static duration or a function that returns a duration based on the key. + * + * @since 3.5.0 + * @category models + * @example + * ```ts + * import { Effect, RcMap } from "effect" + * + * Effect.gen(function*() { + * const map = yield* RcMap.make({ + * lookup: (key: string) => + * Effect.acquireRelease( + * Effect.succeed(`acquired ${key}`), + * () => Effect.log(`releasing ${key}`) + * ) + * }) + * + * // Get "foo" from the map twice, which will only acquire it once. + * // It will then be released once the scope closes. + * yield* RcMap.get(map, "foo").pipe( + * Effect.andThen(RcMap.get(map, "foo")), + * Effect.scoped + * ) + * }) + * ``` + */ +const make = exports.make = internal.make; +/** + * @since 3.5.0 + * @category combinators + */ +const get = exports.get = internal.get; +/** + * @since 3.17.7 + * @category combinators + */ +const has = exports.has = internal.has; +/** + * @since 3.8.0 + * @category combinators + */ +const keys = exports.keys = internal.keys; +/** + * @since 3.13.0 + * @category combinators + */ +const invalidate = exports.invalidate = internal.invalidate; +/** + * @since 3.13.0 + * @category combinators + */ +const touch = exports.touch = internal.touch; +//# sourceMappingURL=RcMap.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/RcMap.js.map b/backend/node_modules/effect/dist/cjs/RcMap.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c77e2f936cf323dfa547bae551e319f88077b743 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/RcMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RcMap.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","exports","make","keys","invalidate","touch"],"sources":["../../src/RcMap.ts"],"sourcesContent":[null],"mappings":";;;;;;AAMA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA+C,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SA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A+DzB,QAAQ,CAACyB,IAAI;AAE7F;;;;AAIO,MAAMC,UAAU,GAAAH,OAAA,CAAAG,UAAA,GAWnB1B,QAAQ,CAAC0B,UAAU;AAEvB;;;;AAIO,MAAMC,KAAK,GAAAJ,OAAA,CAAAI,KAAA,GAWd3B,QAAQ,CAAC2B,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/RcRef.js b/backend/node_modules/effect/dist/cjs/RcRef.js new file mode 100644 index 0000000000000000000000000000000000000000..9611f0e104da1d085cce87d04b228b24b44b7c34 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/RcRef.js @@ -0,0 +1,58 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.make = exports.invalidate = exports.get = exports.TypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/rcRef.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 3.5.0 + * @category type ids + */ +const TypeId = exports.TypeId = internal.TypeId; +/** + * Create an `RcRef` from an acquire `Effect`. + * + * An RcRef wraps a reference counted resource that can be acquired and released + * multiple times. + * + * The resource is lazily acquired on the first call to `get` and released when + * the last reference is released. + * + * @since 3.5.0 + * @category constructors + * @example + * ```ts + * import { Effect, RcRef } from "effect" + * + * Effect.gen(function*() { + * const ref = yield* RcRef.make({ + * acquire: Effect.acquireRelease( + * Effect.succeed("foo"), + * () => Effect.log("release foo") + * ) + * }) + * + * // will only acquire the resource once, and release it + * // when the scope is closed + * yield* RcRef.get(ref).pipe( + * Effect.andThen(RcRef.get(ref)), + * Effect.scoped + * ) + * }) + * ``` + */ +const make = exports.make = internal.make; +/** + * @since 3.5.0 + * @category combinators + */ +const get = exports.get = internal.get; +/** + * @since 3.19.6 + * @category combinators + * @experimental + */ +const invalidate = exports.invalidate = internal.invalidate; +//# sourceMappingURL=RcRef.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/RcRef.js.map b/backend/node_modules/effect/dist/cjs/RcRef.js.map new file mode 100644 index 0000000000000000000000000000000000000000..25621055a8d052116da1ccc723b50aeb018df641 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/RcRef.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RcRef.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","exports","make","invalidate"],"sources":["../../src/RcRef.ts"],"sourcesContent":[null],"mappings":";;;;;;AAKA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA+C,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAM/C;;;;AAIO,MAAMkB,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAkBtB,QAAQ,CAACsB,MAAM;AAoDpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCO,MAAME,IAAI,GAAAD,OAAA,CAAAC,IAAA,GASyCxB,QAAQ,CAACwB,IAAI;AAEvE;;;;AAIO,MAAMT,GAAG,GAAAQ,OAAA,CAAAR,GAAA,GAAkEf,QAAQ,CAACe,GAAG;AAE9F;;;;;AAKO,MAAMU,UAAU,GAAAF,OAAA,CAAAE,UAAA,GAAqDzB,QAAQ,CAACyB,UAAU","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Readable.js b/backend/node_modules/effect/dist/cjs/Readable.js new file mode 100644 index 0000000000000000000000000000000000000000..d220303dc40632e186cf60b41f05705e9d908d9c --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Readable.js @@ -0,0 +1,55 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.unwrap = exports.mapEffect = exports.map = exports.make = exports.isReadable = exports.TypeId = void 0; +var _Function = require("./Function.js"); +var core = _interopRequireWildcard(require("./internal/core.js")); +var _Pipeable = require("./Pipeable.js"); +var _Predicate = require("./Predicate.js"); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category type ids + */ +const TypeId = exports.TypeId = /*#__PURE__*/Symbol.for("effect/Readable"); +/** + * @since 2.0.0 + * @category refinements + */ +const isReadable = u => (0, _Predicate.hasProperty)(u, TypeId); +exports.isReadable = isReadable; +const Proto = { + [TypeId]: TypeId, + pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + } +}; +/** + * @since 2.0.0 + * @category constructors + */ +const make = get => { + const self = Object.create(Proto); + self.get = get; + return self; +}; +/** + * @since 2.0.0 + * @category combinators + */ +exports.make = make; +const map = exports.map = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => make(core.map(self.get, f))); +/** + * @since 2.0.0 + * @category combinators + */ +const mapEffect = exports.mapEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => make(core.flatMap(self.get, f))); +/** + * @since 2.0.0 + * @category constructors + */ +const unwrap = effect => make(core.flatMap(effect, s => s.get)); +exports.unwrap = unwrap; +//# sourceMappingURL=Readable.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Readable.js.map b/backend/node_modules/effect/dist/cjs/Readable.js.map new file mode 100644 index 0000000000000000000000000000000000000000..817663e2ed34fa0d7109fea5dc9554b9c7f312cd --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Readable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Readable.js","names":["_Function","require","core","_interopRequireWildcard","_Pipeable","_Predicate","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","exports","Symbol","for","isReadable","u","hasProperty","Proto","pipe","pipeArguments","arguments","make","self","create","map","dual","mapEffect","flatMap","unwrap","effect","s"],"sources":["../../src/Readable.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AAA4C,SAAAE,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,W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G,CAAC,CACnC;AAAAQ,OAAA,CAAAiB,MAAA,GAAAA,MAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Record.js.map b/backend/node_modules/effect/dist/cjs/Record.js.map new file mode 100644 index 0000000000000000000000000000000000000000..724f1e491d9616f53e000205be5c76c08ea7e0fc --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Record.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Record.js","names":["E","_interopRequireWildcard","require","Equal","_Function","Option","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","empty","exports","isEmptyRecord","self","keys","length","isEmptyReadonlyRecord","fromIterableWith","dual","out","a","k","b","fromIterableBy","items","fromEntries","collect","key","push","toEntries","value","size","prototype","some","none","modify","modifyOption","replaceOption","remove","pop","map","mapKeys","mapEntries","filterMap","isSome","filter","predicate","getSomes","identity","getLefts","isLeft","left","getRights","isRight","right","partitionMap","separate","partition","values","_","replace","isSubrecordBy","equivalence","that","isSubrecord","reduce","zero","every","refinement","union","combine","intersection","difference","getEquivalence","is","singleton","findFirst"],"sources":["../../src/Record.ts"],"sourcesContent":[null],"mappings":";;;;;;AAOA,IAAAA,CAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAF,uBAAA,CAAAC,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAAqC,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,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AC,GAAGuB,CAAC,CAACN,MAAM,EAAEjB,CAAC,EAAE,EAAE;IACjC,MAAM6B,GAAG,GAAGN,CAAC,CAACvB,CAAC,CAAC;IAChB,IAAIC,CAAC,CAACc,IAAI,CAACc,GAAG,CAAC,EAAEA,GAAG,CAAC,EAAE;MACrB,OAAOrC,MAAM,CAAC2C,IAAI,CAAC,CAACN,GAAG,EAAEd,IAAI,CAACc,GAAG,CAAC,CAAC,CAAC;IACtC;EACF;EACA,OAAOrC,MAAM,CAAC4C,IAAI,EAAE;AACtB,CAAC,CACF","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/RedBlackTree.js b/backend/node_modules/effect/dist/cjs/RedBlackTree.js new file mode 100644 index 0000000000000000000000000000000000000000..dbfa8ce680ae3241d4cce17858269f1e3e47eb64 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/RedBlackTree.js @@ -0,0 +1,266 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.valuesReversed = exports.values = exports.size = exports.reversed = exports.removeFirst = exports.reduce = exports.make = exports.lessThanReversed = exports.lessThanEqualReversed = exports.lessThanEqual = exports.lessThan = exports.last = exports.keysReversed = exports.keys = exports.isRedBlackTree = exports.insert = exports.has = exports.greaterThanReversed = exports.greaterThanEqualReversed = exports.greaterThanEqual = exports.greaterThan = exports.getOrder = exports.getAt = exports.fromIterable = exports.forEachLessThan = exports.forEachGreaterThanEqual = exports.forEachBetween = exports.forEach = exports.first = exports.findFirst = exports.findAll = exports.empty = exports.atReversed = exports.at = exports.Direction = void 0; +var RBT = _interopRequireWildcard(require("./internal/redBlackTree.js")); +var RBTI = _interopRequireWildcard(require("./internal/redBlackTree/iterator.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +const TypeId = RBT.RedBlackTreeTypeId; +/** + * @since 2.0.0 + * @category constants + */ +const Direction = exports.Direction = RBTI.Direction; +/** + * @since 2.0.0 + * @category refinements + */ +const isRedBlackTree = exports.isRedBlackTree = RBT.isRedBlackTree; +/** + * Creates an empty `RedBlackTree`. + * + * @since 2.0.0 + * @category constructors + */ +const empty = exports.empty = RBT.empty; +/** + * Creates a new `RedBlackTree` from an iterable collection of key/value pairs. + * + * @since 2.0.0 + * @category constructors + */ +const fromIterable = exports.fromIterable = RBT.fromIterable; +/** + * Constructs a new `RedBlackTree` from the specified entries. + * + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = RBT.make; +/** + * Returns an iterator that points to the element at the specified index of the + * tree. + * + * **Note**: The iterator will run through elements in order. + * + * @since 2.0.0 + * @category traversing + */ +const at = exports.at = RBT.atForwards; +/** + * Returns an iterator that points to the element at the specified index of the + * tree. + * + * **Note**: The iterator will run through elements in reverse order. + * + * @since 2.0.0 + * @category traversing + */ +const atReversed = exports.atReversed = RBT.atBackwards; +/** + * Finds all values in the tree associated with the specified key. + * + * @since 2.0.0 + * @category elements + */ +const findAll = exports.findAll = RBT.findAll; +/** + * Finds the first value in the tree associated with the specified key, if it exists. + * + * @category elements + * @since 2.0.0 + */ +const findFirst = exports.findFirst = RBT.findFirst; +/** + * Returns the first entry in the tree, if it exists. + * + * @since 2.0.0 + * @category getters + */ +const first = exports.first = RBT.first; +/** + * Returns the element at the specified index within the tree or `None` if the + * specified index does not exist. + * + * @since 2.0.0 + * @category elements + */ +const getAt = exports.getAt = RBT.getAt; +/** + * Gets the `Order` that the `RedBlackTree` is using. + * + * @since 2.0.0 + * @category getters + */ +const getOrder = exports.getOrder = RBT.getOrder; +/** + * Returns an iterator that traverse entries in order with keys greater than the + * specified key. + * + * @since 2.0.0 + * @category traversing + */ +const greaterThan = exports.greaterThan = RBT.greaterThanForwards; +/** + * Returns an iterator that traverse entries in reverse order with keys greater + * than the specified key. + * + * @since 2.0.0 + * @category traversing + */ +const greaterThanReversed = exports.greaterThanReversed = RBT.greaterThanBackwards; +/** + * Returns an iterator that traverse entries in order with keys greater than or + * equal to the specified key. + * + * @since 2.0.0 + * @category traversing + */ +const greaterThanEqual = exports.greaterThanEqual = RBT.greaterThanEqualForwards; +/** + * Returns an iterator that traverse entries in reverse order with keys greater + * than or equal to the specified key. + * + * @since 2.0.0 + * @category traversing + */ +const greaterThanEqualReversed = exports.greaterThanEqualReversed = RBT.greaterThanEqualBackwards; +/** + * Finds the item with key, if it exists. + * + * @since 2.0.0 + * @category elements + */ +const has = exports.has = RBT.has; +/** + * Insert a new item into the tree. + * + * @since 2.0.0 + */ +const insert = exports.insert = RBT.insert; +/** + * Get all the keys present in the tree in order. + * + * @since 2.0.0 + * @category getters + */ +const keys = exports.keys = RBT.keysForward; +/** + * Get all the keys present in the tree in reverse order. + * + * @since 2.0.0 + * @category getters + */ +const keysReversed = exports.keysReversed = RBT.keysBackward; +/** + * Returns the last entry in the tree, if it exists. + * + * @since 2.0.0 + * @category getters + */ +const last = exports.last = RBT.last; +/** + * Returns an iterator that traverse entries in order with keys less than the + * specified key. + * + * @since 2.0.0 + * @category traversing + */ +const lessThan = exports.lessThan = RBT.lessThanForwards; +/** + * Returns an iterator that traverse entries in reverse order with keys less + * than the specified key. + * + * @since 2.0.0 + * @category traversing + */ +const lessThanReversed = exports.lessThanReversed = RBT.lessThanBackwards; +/** + * Returns an iterator that traverse entries in order with keys less than or + * equal to the specified key. + * + * @since 2.0.0 + * @category traversing + */ +const lessThanEqual = exports.lessThanEqual = RBT.lessThanEqualForwards; +/** + * Returns an iterator that traverse entries in reverse order with keys less + * than or equal to the specified key. + * + * @since 2.0.0 + * @category traversing + */ +const lessThanEqualReversed = exports.lessThanEqualReversed = RBT.lessThanEqualBackwards; +/** + * Execute the specified function for each node of the tree, in order. + * + * @since 2.0.0 + * @category traversing + */ +const forEach = exports.forEach = RBT.forEach; +/** + * Visit each node of the tree in order with key greater then or equal to max. + * + * @since 2.0.0 + * @category traversing + */ +const forEachGreaterThanEqual = exports.forEachGreaterThanEqual = RBT.forEachGreaterThanEqual; +/** + * Visit each node of the tree in order with key lower then max. + * + * @since 2.0.0 + * @category traversing + */ +const forEachLessThan = exports.forEachLessThan = RBT.forEachLessThan; +/** + * Visit each node of the tree in order with key lower than max and greater + * than or equal to min. + * + * @since 2.0.0 + * @category traversing + */ +const forEachBetween = exports.forEachBetween = RBT.forEachBetween; +/** + * Reduce a state over the entries of the tree. + * + * @since 2.0.0 + * @category folding + */ +const reduce = exports.reduce = RBT.reduce; +/** + * Removes the entry with the specified key, if it exists. + * + * @since 2.0.0 + */ +const removeFirst = exports.removeFirst = RBT.removeFirst; +/** + * Traverse the tree in reverse order. + * + * @since 2.0.0 + * @category traversing + */ +const reversed = exports.reversed = RBT.reversed; +/** + * Returns the size of the tree. + * + * @since 2.0.0 + * @category getters + */ +const size = exports.size = RBT.size; +/** + * Get all values present in the tree in order. + * + * @since 2.0.0 + * @category getters + */ +const values = exports.values = RBT.valuesForward; +/** + * Get all values present in the tree in reverse order. + * + * @since 2.0.0 + * @category getters + */ +const valuesReversed = exports.valuesReversed = RBT.valuesBackward; +//# sourceMappingURL=RedBlackTree.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/RedBlackTree.js.map b/backend/node_modules/effect/dist/cjs/RedBlackTree.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c6a5fb0c587e1db807ff56a4a7bc31cc3d5dbbb8 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/RedBlackTree.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RedBlackTree.js","names":["RBT","_interopRequireWildcard","require","RBTI","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","RedBlackTreeTypeId","Direction","exports","isRedBlackTree","empty","fromIterable","make","at","atForwards","atReversed","atBackwards","findAll","findFirst","first","getAt","getOrder","greaterThan","greaterThanForwards","greaterThanReversed","greaterThanBackwards","greaterThanEqual","greaterThanEqualForwards","greaterThanEqualReversed","greaterThanEqualBackwards","insert","keys","keysForward","keysReversed","keysBackward","last","lessThan","lessThanForwards","lessThanReversed","lessThanBackwards","lessThanEqual","lessThanEqualForwards","lessThanEqualReversed","lessThanEqualBackwards","forEach","forEachGreaterThanEqual","forEachLessThan","forEachBetween","reduce","removeFirst","reversed","size","values","valuesForward","valuesReversed","valuesBackward"],"sources":["../../src/RedBlackTree.ts"],"sourcesContent":[null],"mappings":";;;;;;AAMA,IAAAA,GAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAF,uBAAA,CAAAC,OAAA;AAA2D,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CA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;;;;;;AAOO,MAAMC,aAAa,GAAAhC,OAAA,CAAAgC,aAAA,GAiBtB1D,GAAG,CAAC2D,qBAAqB;AAE7B;;;;;;;AAOO,MAAMC,qBAAqB,GAAAlC,OAAA,CAAAkC,qBAAA,GAiB9B5D,GAAG,CAAC6D,sBAAsB;AAE9B;;;;;;AAMO,MAAMC,OAAO,GAAApC,OAAA,CAAAoC,OAAA,GAehB9D,GAAG,CAAC8D,OAAO;AAEf;;;;;;AAMO,MAAMC,uBAAuB,GAAArC,OAAA,CAAAqC,uBAAA,GAehC/D,GAAG,CAAC+D,uBAAuB;AAE/B;;;;;;AAMO,MAAMC,eAAe,GAAAtC,OAAA,CAAAsC,eAAA,GAexBhE,GAAG,CAACgE,eAAe;AAEvB;;;;;;;AAOO,MAAMC,cAAc,GAAAvC,OAAA,CAAAuC,cAAA,GA8BvBjE,GAAG,CAACiE,cAAc;AAEtB;;;;;;AAMO,MAAMC,MAAM,GAAAxC,OAAA,CAAAwC,MAAA,GAmBflE,GAAG,CAACkE,MAAM;AAEd;;;;;AAKO,MAAMC,WAAW,GAAAzC,OAAA,CAAAyC,WAAA,GAapBnE,GAAG,CAACmE,WAAW;AAEnB;;;;;;AAMO,MAAMC,QAAQ,GAAA1C,OAAA,CAAA0C,QAAA,GAAyDpE,GAAG,CAACoE,QAAQ;AAE1F;;;;;;AAMO,MAAMC,IAAI,GAAA3C,OAAA,CAAA2C,IAAA,GAA+CrE,GAAG,CAACqE,IAAI;AAExE;;;;;;AAMO,MAAMC,MAAM,GAAA5C,OAAA,CAAA4C,MAAA,GAA4DtE,GAAG,CAACuE,aAAa;AAEhG;;;;;;AAMO,MAAMC,cAAc,GAAA9C,OAAA,CAAA8C,cAAA,GAA4DxE,GAAG,CAACyE,cAAc","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Redacted.js b/backend/node_modules/effect/dist/cjs/Redacted.js new file mode 100644 index 0000000000000000000000000000000000000000..e26f5738b0d8c8ee7ce66939c4e410d7276ebc99 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Redacted.js @@ -0,0 +1,101 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.value = exports.unsafeWipe = exports.make = exports.isRedacted = exports.getEquivalence = exports.RedactedTypeId = void 0; +var Equivalence = _interopRequireWildcard(require("./Equivalence.js")); +var redacted_ = _interopRequireWildcard(require("./internal/redacted.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 3.3.0 + * @category symbols + */ +const RedactedTypeId = exports.RedactedTypeId = redacted_.RedactedTypeId; +/** + * @since 3.3.0 + * @category refinements + */ +const isRedacted = exports.isRedacted = redacted_.isRedacted; +/** + * This function creates a `Redacted` instance from a given value `A`, + * securely hiding its content. + * + * @example + * ```ts + * import { Redacted } from "effect" + * + * const API_KEY = Redacted.make("1234567890") + * ``` + * + * @since 3.3.0 + * @category constructors + */ +const make = exports.make = redacted_.make; +/** + * Retrieves the original value from a `Redacted` instance. Use this function + * with caution, as it exposes the sensitive data. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Redacted } from "effect" + * + * const API_KEY = Redacted.make("1234567890") + * + * assert.equal(Redacted.value(API_KEY), "1234567890") + * ``` + * + * @since 3.3.0 + * @category getters + */ +const value = exports.value = redacted_.value; +/** + * Erases the underlying value of a `Redacted` instance, rendering it unusable. + * This function is intended to ensure that sensitive data does not remain in + * memory longer than necessary. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Redacted } from "effect" + * + * const API_KEY = Redacted.make("1234567890") + * + * assert.equal(Redacted.value(API_KEY), "1234567890") + * + * Redacted.unsafeWipe(API_KEY) + * + * assert.throws(() => Redacted.value(API_KEY), new Error("Unable to get redacted value")) + * ``` + * + * @since 3.3.0 + * @category unsafe + */ +const unsafeWipe = exports.unsafeWipe = redacted_.unsafeWipe; +/** + * Generates an equivalence relation for `Redacted` values based on an + * equivalence relation for the underlying values `A`. This function is useful + * for comparing `Redacted` instances without exposing their contents. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Redacted, Equivalence } from "effect" + * + * const API_KEY1 = Redacted.make("1234567890") + * const API_KEY2 = Redacted.make("1-34567890") + * const API_KEY3 = Redacted.make("1234567890") + * + * const equivalence = Redacted.getEquivalence(Equivalence.string) + * + * assert.equal(equivalence(API_KEY1, API_KEY2), false) + * assert.equal(equivalence(API_KEY1, API_KEY3), true) + * ``` + * + * @category equivalence + * @since 3.3.0 + */ +const getEquivalence = isEquivalent => Equivalence.make((x, y) => isEquivalent(value(x), value(y))); +exports.getEquivalence = getEquivalence; +//# sourceMappingURL=Redacted.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Ref.js.map b/backend/node_modules/effect/dist/cjs/Ref.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a2000ddf8a0ca716d771405a6fc717e50178dd0f --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Ref.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Ref.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","RefTypeId","exports","make","getAndSet","getAndUpdate","getAndUpdateSome","modify","modifySome","setAndGet","update","updateAndGet","updateSome","updateSomeAndGet","unsafeMake"],"sources":["../../src/Ref.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA6C,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AS,GAAAF,OAAA,CAAAE,SAAA,GAWlBzB,QAAQ,CAACyB,SAAS;AAEtB;;;;AAIO,MAAMC,YAAY,GAAAH,OAAA,CAAAG,YAAA,GAWrB1B,QAAQ,CAAC0B,YAAY;AAEzB;;;;AAIO,MAAMC,gBAAgB,GAAAJ,OAAA,CAAAI,gBAAA,GAWzB3B,QAAQ,CAAC2B,gBAAgB;AAE7B;;;;AAIO,MAAMC,MAAM,GAAAL,OAAA,CAAAK,MAAA,GAWf5B,QAAQ,CAAC4B,MAAM;AAEnB;;;;AAIO,MAAMC,UAAU,GAAAN,OAAA,CAAAM,UAAA,GAWnB7B,QAAQ,CAAC6B,UAAU;AAEvB;;;;AAIO,MAAMb,GAAG,GAAAO,OAAA,CAAAP,GAAA,GAWZhB,QAAQ,CAACgB,GAAG;AAEhB;;;;AAIO,MAAMc,SAAS,GAAAP,OAAA,CAAAO,SAAA,GAWlB9B,QAAQ,CAAC8B,SAAS;AAEtB;;;;AAIO,MAAMC,MAAM,GAAAR,OAAA,CAAAQ,MAAA,GAWf/B,QAAQ,CAAC+B,MAAM;AAEnB;;;;AAIO,MAAMC,YAAY,GAAAT,OAAA,CAAAS,YAAA,GAWrBhC,QAAQ,CAACgC,YAAY;AAEzB;;;;AAIO,MAAMC,UAAU,GAAAV,OAAA,CAAAU,UAAA,GAWnBjC,QAAQ,CAACiC,UAAU;AAEvB;;;;AAIO,MAAMC,gBAAgB,GAAAX,OAAA,CAAAW,gBAAA,GAWzBlC,QAAQ,CAACkC,gBAAgB;AAE7B;;;;AAIO,MAAMC,UAAU,GAAAZ,OAAA,CAAAY,UAAA,GAA4BnC,QAAQ,CAACmC,UAAU","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/RegExp.js.map b/backend/node_modules/effect/dist/cjs/RegExp.js.map new file mode 100644 index 0000000000000000000000000000000000000000..9dab4c48e7ba35a3cd429ef88137c091b87ae2a3 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/RegExp.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RegExp.js","names":["predicate","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","isRegExp","exports","escape","string","replace"],"sources":["../../src/RegExp.ts"],"sourcesContent":[null],"mappings":";;;;;;AAKA,IAAAA,SAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA2C,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAL3C;;;;;;AAOA;;;;;;;;;;;;;;;AAeO,MAAMkB,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAwCtB,SAAS,CAACsB,QAAQ;AAE/E;;;;;;;;;;;;;AAaO,MAAME,MAAM,GAAIC,MAAc,IAAaA,MAAM,CAACC,OAAO,CAAC,sBAAsB,EAAE,MAAM,CAAC;AAAAH,OAAA,CAAAC,MAAA,GAAAA,MAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Reloadable.js b/backend/node_modules/effect/dist/cjs/Reloadable.js new file mode 100644 index 0000000000000000000000000000000000000000..d3fdbcf831fee791723718d1c132af3fd3298c2b --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Reloadable.js @@ -0,0 +1,66 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.tag = exports.reloadFork = exports.reload = exports.manual = exports.get = exports.autoFromConfig = exports.auto = exports.ReloadableTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/reloadable.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const ReloadableTypeId = exports.ReloadableTypeId = internal.ReloadableTypeId; +/** + * Makes a new reloadable service from a layer that describes the construction + * of a static service. The service is automatically reloaded according to the + * provided schedule. + * + * @since 2.0.0 + * @category constructors + */ +const auto = exports.auto = internal.auto; +/** + * Makes a new reloadable service from a layer that describes the construction + * of a static service. The service is automatically reloaded according to a + * schedule, which is extracted from the input to the layer. + * + * @since 2.0.0 + * @category constructors + */ +const autoFromConfig = exports.autoFromConfig = internal.autoFromConfig; +/** + * Retrieves the current version of the reloadable service. + * + * @since 2.0.0 + * @category getters + */ +const get = exports.get = internal.get; +/** + * Makes a new reloadable service from a layer that describes the construction + * of a static service. + * + * @since 2.0.0 + * @category constructors + */ +const manual = exports.manual = internal.manual; +/** + * Reloads the specified service. + * + * @since 2.0.0 + * @category constructors + */ +const reload = exports.reload = internal.reload; +/** + * @since 2.0.0 + * @category context + */ +const tag = exports.tag = internal.reloadableTag; +/** + * Forks the reload of the service in the background, ignoring any errors. + * + * @since 2.0.0 + * @category constructors + */ +const reloadFork = exports.reloadFork = internal.reloadFork; +//# sourceMappingURL=Reloadable.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Request.js b/backend/node_modules/effect/dist/cjs/Request.js new file mode 100644 index 0000000000000000000000000000000000000000..f9a5c073c02c4734f4edd50d1f4f7df1e461eacf --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Request.js @@ -0,0 +1,148 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.tagged = exports.succeed = exports.of = exports.makeEntry = exports.makeCache = exports.isRequest = exports.isEntry = exports.interruptWhenPossible = exports.failCause = exports.fail = exports.completeEffect = exports.complete = exports.TaggedClass = exports.RequestTypeId = exports.EntryTypeId = exports.Class = void 0; +var RequestBlock_ = _interopRequireWildcard(require("./internal/blockedRequests.js")); +var cache = _interopRequireWildcard(require("./internal/cache.js")); +var core = _interopRequireWildcard(require("./internal/core.js")); +var fiberRuntime = _interopRequireWildcard(require("./internal/fiberRuntime.js")); +var internal = _interopRequireWildcard(require("./internal/request.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const RequestTypeId = exports.RequestTypeId = internal.RequestTypeId; +/** + * Returns `true` if the specified value is a `Request`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isRequest = exports.isRequest = internal.isRequest; +/** + * Constructs a new `Request`. + * + * @since 2.0.0 + * @category constructors + */ +const of = exports.of = internal.of; +/** + * Constructs a new `Request`. + * + * @since 2.0.0 + * @category constructors + */ +const tagged = exports.tagged = internal.tagged; +/** + * Provides a constructor for a Request Class. + * + * @example + * ```ts + * import { Request } from "effect" + * + * type Success = string + * type Error = never + * + * class MyRequest extends Request.Class {} + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const Class = exports.Class = internal.Class; +/** + * Provides a Tagged constructor for a Request Class. + * + * @example + * ```ts + * import { Request } from "effect" + * + * type Success = string + * type Error = never + * + * class MyRequest extends Request.TaggedClass("MyRequest") {} + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const TaggedClass = exports.TaggedClass = internal.TaggedClass; +/** + * Complete a `Request` with the specified result. + * + * @since 2.0.0 + * @category request completion + */ +const complete = exports.complete = internal.complete; +/** + * Interrupts the child effect when requests are no longer needed + * + * @since 2.0.0 + * @category request completion + */ +const interruptWhenPossible = exports.interruptWhenPossible = fiberRuntime.interruptWhenPossible; +/** + * Complete a `Request` with the specified effectful computation, failing the + * request with the error from the effect workflow if it fails, and completing + * the request with the value of the effect workflow if it succeeds. + * + * @since 2.0.0 + * @category request completion + */ +const completeEffect = exports.completeEffect = internal.completeEffect; +/** + * Complete a `Request` with the specified error. + * + * @since 2.0.0 + * @category request completion + */ +const fail = exports.fail = internal.fail; +/** + * Complete a `Request` with the specified cause. + * + * @since 2.0.0 + * @category request completion + */ +const failCause = exports.failCause = internal.failCause; +/** + * Complete a `Request` with the specified value. + * + * @since 2.0.0 + * @category request completion + */ +const succeed = exports.succeed = internal.succeed; +/** + * @since 2.0.0 + * @category models + */ +const makeCache = options => cache.make({ + ...options, + lookup: () => core.map(core.deferredMake(), handle => ({ + listeners: new internal.Listeners(), + handle + })) +}); +/** + * @since 2.0.0 + * @category symbols + */ +exports.makeCache = makeCache; +const EntryTypeId = exports.EntryTypeId = /*#__PURE__*/Symbol.for("effect/RequestBlock.Entry"); +/** + * @since 2.0.0 + * @category guards + */ +const isEntry = exports.isEntry = RequestBlock_.isEntry; +/** + * @since 2.0.0 + * @category constructors + */ +const makeEntry = exports.makeEntry = RequestBlock_.makeEntry; +//# sourceMappingURL=Request.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Request.js.map b/backend/node_modules/effect/dist/cjs/Request.js.map new file mode 100644 index 0000000000000000000000000000000000000000..372cc7530c9c97244e74be1d104442adf8b16ef7 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Request.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Request.js","names":["RequestBlock_","_interopRequireWildcard","require","cache","core","fiberRuntime","internal","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","RequestTypeId","exports","isRequest","of","tagged","Class","TaggedClass","complete","interruptWhenPossible","completeEffect","fail","failCause","succeed","makeCache","options","make","lookup","map","deferredMake","handle","listeners","Listeners","EntryTypeId","Symbol","for","isEntry","makeEntry"],"sources":["../../src/Request.ts"],"sourcesContent":[null],"mappings":";;;;;;AAUA,IAAAA,aAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,IAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,YAAA,GAAAJ,uBAAA,CAAAC,OAAA;AACA,IAAAI,QAAA,GAAAL,uBA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AAA,gBAAkBC,MAAM,CAACC,GAAG,CAAC,2BAA2B,CAAC;AA+CjF;;;;AAIO,MAAMC,OAAO,GAAAxB,OAAA,CAAAwB,OAAA,GAAGnD,aAAa,CAACmD,OAAO;AAE5C;;;;AAIO,MAAMC,SAAS,GAAAzB,OAAA,CAAAyB,SAAA,GAAGpD,aAAa,CAACoD,SAAS","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/RequestBlock.js b/backend/node_modules/effect/dist/cjs/RequestBlock.js new file mode 100644 index 0000000000000000000000000000000000000000..88c3273ae3e472a7e53b7bc8fb05b0f93f37369d --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/RequestBlock.js @@ -0,0 +1,43 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.single = exports.sequential = exports.reduce = exports.parallel = exports.mapRequestResolvers = exports.empty = void 0; +var RequestBlock_ = _interopRequireWildcard(require("./internal/blockedRequests.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * @since 2.0.0 + * @category constructors + */ +const single = exports.single = RequestBlock_.single; +/** + * @since 2.0.0 + * @category constructors + */ +const empty = exports.empty = RequestBlock_.empty; +/** + * @since 2.0.0 + * @category constructors + */ +const mapRequestResolvers = exports.mapRequestResolvers = RequestBlock_.mapRequestResolvers; +/** + * @since 2.0.0 + * @category constructors + */ +const parallel = exports.parallel = RequestBlock_.par; +/** + * @since 2.0.0 + * @category constructors + */ +const reduce = exports.reduce = RequestBlock_.reduce; +/** + * @since 2.0.0 + * @category constructors + */ +const sequential = exports.sequential = RequestBlock_.seq; +//# sourceMappingURL=RequestBlock.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/RequestBlock.js.map b/backend/node_modules/effect/dist/cjs/RequestBlock.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c9359c4a68d9b3fb32aa335a8b833258af3ad1fd --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/RequestBlock.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RequestBlock.js","names":["RequestBlock_","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","single","exports","empty","mapRequestResolvers","parallel","par","reduce","sequential","seq"],"sources":["../../src/RequestBlock.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,aAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA8D,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAH9D;;;;AA6EA;;;;AAIO,MAAMkB,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAGCtB,aAAa,CAACsB,MAAM;AAExC;;;;AAIO,MAAME,KAAK,GAAAD,OAAA,CAAAC,KAAA,GAAiBxB,aAAa,CAACwB,KAAK;AAEtD;;;;AAIO,MAAMC,mBAAmB,GAAAF,OAAA,CAAAE,mBAAA,GAGZzB,aAAa,CAACyB,mBAAmB;AAErD;;;;AAIO,MAAMC,QAAQ,GAAAH,OAAA,CAAAG,QAAA,GAA6D1B,aAAa,CAAC2B,GAAG;AAEnG;;;;AAIO,MAAMC,MAAM,GAAAL,OAAA,CAAAK,MAAA,GAAmE5B,aAAa,CAAC4B,MAAM;AAE1G;;;;AAIO,MAAMC,UAAU,GAAAN,OAAA,CAAAM,UAAA,GAA6D7B,aAAa,CAAC8B,GAAG","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/RequestResolver.js b/backend/node_modules/effect/dist/cjs/RequestResolver.js new file mode 100644 index 0000000000000000000000000000000000000000..877840aabba248513c1f2358eaeab7a935e9ac3f --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/RequestResolver.js @@ -0,0 +1,185 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.race = exports.provideContext = exports.never = exports.mapInputContext = exports.makeWithEntry = exports.makeBatched = exports.make = exports.locally = exports.isRequestResolver = exports.fromFunctionBatched = exports.fromFunction = exports.fromEffectTagged = exports.fromEffect = exports.eitherWith = exports.contextFromServices = exports.contextFromEffect = exports.batchN = exports.aroundRequests = exports.around = exports.RequestResolverTypeId = void 0; +var Context = _interopRequireWildcard(require("./Context.js")); +var Effect = _interopRequireWildcard(require("./Effect.js")); +var core = _interopRequireWildcard(require("./internal/core.js")); +var internal = _interopRequireWildcard(require("./internal/dataSource.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * @since 2.0.0 + * @category symbols + */ +const RequestResolverTypeId = exports.RequestResolverTypeId = core.RequestResolverTypeId; +/** + * @since 2.0.0 + * @category utils + */ +const contextFromEffect = self => Effect.contextWith(_ => provideContext(self, _)); +/** + * @since 2.0.0 + * @category utils + */ +exports.contextFromEffect = contextFromEffect; +const contextFromServices = (...services) => self => Effect.contextWith(_ => provideContext(self, Context.pick(...services)(_))); +/** + * Returns `true` if the specified value is a `RequestResolver`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +exports.contextFromServices = contextFromServices; +const isRequestResolver = exports.isRequestResolver = core.isRequestResolver; +/** + * Constructs a data source with the specified identifier and method to run + * requests. + * + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * Constructs a data source with the specified identifier and method to run + * requests. + * + * @since 2.0.0 + * @category constructors + */ +const makeWithEntry = exports.makeWithEntry = internal.makeWithEntry; +/** + * Constructs a data source from a function taking a collection of requests. + * + * @since 2.0.0 + * @category constructors + */ +const makeBatched = exports.makeBatched = internal.makeBatched; +/** + * A data source aspect that executes requests between two effects, `before` + * and `after`, where the result of `before` can be used by `after`. + * + * @since 2.0.0 + * @category combinators + */ +const around = exports.around = internal.around; +/** + * A data source aspect that executes requests between two effects, `before` + * and `after`, where the result of `before` can be used by `after`. + * + * The `before` and `after` effects are provided with the requests being executed. + * + * @since 2.0.0 + * @category combinators + * @example + * ```ts + * import { Effect, Request, RequestResolver } from "effect" + * + * interface GetUserById extends Request.Request { + * readonly id: number + * } + * + * const resolver = RequestResolver.fromFunction( + * (request: GetUserById) => ({ id: request.id, name: "John" }) + * ) + * + * RequestResolver.aroundRequests( + * resolver, + * (requests) => Effect.log(`got ${requests.length} requests`), + * (requests, _) => Effect.log(`finised running ${requests.length} requests`) + * ) + * ``` + */ +const aroundRequests = exports.aroundRequests = internal.aroundRequests; +/** + * Returns a data source that executes at most `n` requests in parallel. + * + * @since 2.0.0 + * @category combinators + */ +const batchN = exports.batchN = internal.batchN; +/** + * Provides this data source with part of its required context. + * + * @since 2.0.0 + * @category context + */ +const mapInputContext = exports.mapInputContext = internal.mapInputContext; +/** + * Returns a new data source that executes requests of type `C` using the + * specified function to transform `C` requests into requests that either this + * data source or that data source can execute. + * + * @since 2.0.0 + * @category combinators + */ +const eitherWith = exports.eitherWith = internal.eitherWith; +/** + * Constructs a data source from a pure function. + * + * @since 2.0.0 + * @category constructors + */ +const fromFunction = exports.fromFunction = internal.fromFunction; +/** + * Constructs a data source from a pure function that takes a list of requests + * and returns a list of results of the same size. Each item in the result + * list must correspond to the item at the same index in the request list. + * + * @since 2.0.0 + * @category constructors + */ +const fromFunctionBatched = exports.fromFunctionBatched = internal.fromFunctionBatched; +/** + * Constructs a data source from an effectual function. + * + * @since 2.0.0 + * @category constructors + */ +const fromEffect = exports.fromEffect = internal.fromEffect; +/** + * Constructs a data source from a list of tags paired to functions, that takes + * a list of requests and returns a list of results of the same size. Each item + * in the result list must correspond to the item at the same index in the + * request list. + * + * @since 2.0.0 + * @category constructors + */ +const fromEffectTagged = exports.fromEffectTagged = internal.fromEffectTagged; +/** + * A data source that never executes requests. + * + * @since 2.0.0 + * @category constructors + */ +const never = exports.never = internal.never; +/** + * Provides this data source with its required context. + * + * @since 2.0.0 + * @category context + */ +const provideContext = exports.provideContext = internal.provideContext; +/** + * Returns a new data source that executes requests by sending them to this + * data source and that data source, returning the results from the first data + * source to complete and safely interrupting the loser. + * + * @since 2.0.0 + * @category combinators + */ +const race = exports.race = internal.race; +/** + * Returns a new data source with a localized FiberRef + * + * @since 2.0.0 + * @category combinators + */ +const locally = exports.locally = core.resolverLocally; +//# sourceMappingURL=RequestResolver.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/RequestResolver.js.map b/backend/node_modules/effect/dist/cjs/RequestResolver.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e8f999aa3decd828671a4c54c37f0289d2dea051 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/RequestResolver.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RequestResolver.js","names":["Context","_interopRequireWildcard","require","Effect","core","internal","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","RequestResolverTypeId","exports","contextFromEffect","self","contextWith","_","provideContext","contextFromServices","services","pick","isRequestResolver","make","makeWithEntry","makeBatched","around","aroundRequests","batchN","mapInputContext","eitherWith","fromFunction","fromFunctionBatched","fromEffect","fromEffectTagged","never","race","locally","resolverLocally"],"sources":["../../src/RequestResolver.ts"],"sourcesContent":[null],"mappings":";;;;;;AAKA,IAAAA,OAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,uBAAA,CAAAC,OAAA;AAIA,IAAAE,IAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,QAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAAoD,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,O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xC,QAAQ,CAACwC,mBAAmB;AAEtD;;;;;;AAMO,MAAMC,UAAU,GAAApB,OAAA,CAAAoB,UAAA,GAEMzC,QAAQ,CAACyC,UAAU;AAEhD;;;;;;;;;AASO,MAAMC,gBAAgB,GAAArB,OAAA,CAAAqB,gBAAA,GAW3B1C,QAAQ,CAAC0C,gBAAgB;AAE3B;;;;;;AAMO,MAAMC,KAAK,GAAAtB,OAAA,CAAAsB,KAAA,GAA2B3C,QAAQ,CAAC2C,KAAK;AAE3D;;;;;;AAMO,MAAMjB,cAAc,GAAAL,OAAA,CAAAK,cAAA,GAevB1B,QAAQ,CAAC0B,cAAc;AAE3B;;;;;;;;AAQO,MAAMkB,IAAI,GAAAvB,OAAA,CAAAuB,IAAA,GAmBb5C,QAAQ,CAAC4C,IAAI;AAEjB;;;;;;AAMO,MAAMC,OAAO,GAAAxB,OAAA,CAAAwB,OAAA,GAehB9C,IAAI,CAAC+C,eAAe","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Resource.js b/backend/node_modules/effect/dist/cjs/Resource.js new file mode 100644 index 0000000000000000000000000000000000000000..f404f16695e0403c6cdc75be1fdd1f1ac5e8a908 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Resource.js @@ -0,0 +1,51 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.refresh = exports.manual = exports.get = exports.auto = exports.ResourceTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/resource.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const ResourceTypeId = exports.ResourceTypeId = internal.ResourceTypeId; +/** + * Creates a new `Resource` value that is automatically refreshed according to + * the specified policy. Note that error retrying is not performed + * automatically, so if you want to retry on errors, you should first apply + * retry policies to the acquisition effect before passing it to this + * constructor. + * + * @since 2.0.0 + * @category constructors + */ +const auto = exports.auto = internal.auto; +/** + * Retrieves the current value stored in the cache. + * + * @since 2.0.0 + * @category getters + */ +const get = exports.get = internal.get; +/** + * Creates a new `Resource` value that must be manually refreshed by calling + * the refresh method. Note that error retrying is not performed + * automatically, so if you want to retry on errors, you should first apply + * retry policies to the acquisition effect before passing it to this + * constructor. + * + * @since 2.0.0 + * @category constructors + */ +const manual = exports.manual = internal.manual; +/** + * Refreshes the cache. This method will not return until either the refresh + * is successful, or the refresh operation fails. + * + * @since 2.0.0 + * @category utils + */ +const refresh = exports.refresh = internal.refresh; +//# sourceMappingURL=Resource.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Resource.js.map b/backend/node_modules/effect/dist/cjs/Resource.js.map new file mode 100644 index 0000000000000000000000000000000000000000..666862bda921e7b787952bc280a2d249203e762a --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Resource.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Resource.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ResourceTypeId","exports","auto","manual","refresh"],"sources":["../../src/Resource.ts"],"sourcesContent":[null],"mappings":";;;;;;AAKA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAkD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,S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CAAC0B,OAAO","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Runtime.js b/backend/node_modules/effect/dist/cjs/Runtime.js new file mode 100644 index 0000000000000000000000000000000000000000..d849d08b6bc174843e2ee6ef975acfbde529189d --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Runtime.js @@ -0,0 +1,188 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.updateRuntimeFlags = exports.updateFiberRefs = exports.updateContext = exports.setFiberRef = exports.runSyncExit = exports.runSync = exports.runPromiseExit = exports.runPromise = exports.runFork = exports.runCallback = exports.provideService = exports.makeFiberFailure = exports.make = exports.isFiberFailure = exports.isAsyncFiberException = exports.enableRuntimeFlag = exports.disableRuntimeFlag = exports.deleteFiberRef = exports.defaultRuntimeFlags = exports.defaultRuntime = exports.FiberFailureId = exports.FiberFailureCauseId = void 0; +var internal = _interopRequireWildcard(require("./internal/runtime.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * Executes the effect using the provided Scheduler or using the global + * Scheduler if not provided + * + * @since 2.0.0 + * @category execution + */ +const runFork = exports.runFork = internal.unsafeFork; +/** + * Executes the effect synchronously returning the exit. + * + * This method is effectful and should only be invoked at the edges of your + * program. + * + * @since 2.0.0 + * @category execution + */ +const runSyncExit = exports.runSyncExit = internal.unsafeRunSyncExit; +/** + * Executes the effect synchronously throwing in case of errors or async boundaries. + * + * This method is effectful and should only be invoked at the edges of your + * program. + * + * @since 2.0.0 + * @category execution + */ +const runSync = exports.runSync = internal.unsafeRunSync; +/** + * Executes the effect asynchronously, eventually passing the exit value to + * the specified callback. + * + * This method is effectful and should only be invoked at the edges of your + * program. + * + * @since 2.0.0 + * @category execution + */ +const runCallback = exports.runCallback = internal.unsafeRunCallback; +/** + * Runs the `Effect`, returning a JavaScript `Promise` that will be resolved + * with the value of the effect once the effect has been executed, or will be + * rejected with the first error or exception throw by the effect. + * + * This method is effectful and should only be used at the edges of your + * program. + * + * @since 2.0.0 + * @category execution + */ +const runPromise = exports.runPromise = internal.unsafeRunPromise; +/** + * Runs the `Effect`, returning a JavaScript `Promise` that will be resolved + * with the `Exit` state of the effect once the effect has been executed. + * + * This method is effectful and should only be used at the edges of your + * program. + * + * @since 2.0.0 + * @category execution + */ +const runPromiseExit = exports.runPromiseExit = internal.unsafeRunPromiseExit; +/** + * @since 2.0.0 + * @category constructors + */ +const defaultRuntime = exports.defaultRuntime = internal.defaultRuntime; +/** + * @since 2.0.0 + * @category constructors + */ +const defaultRuntimeFlags = exports.defaultRuntimeFlags = internal.defaultRuntimeFlags; +/** + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * @since 2.0.0 + * @category symbols + */ +const FiberFailureId = exports.FiberFailureId = /*#__PURE__*/Symbol.for("effect/Runtime/FiberFailure"); +/** + * @since 2.0.0 + * @category symbols + */ +const FiberFailureCauseId = exports.FiberFailureCauseId = internal.FiberFailureCauseId; +/** + * @since 2.0.0 + * @category guards + */ +const isAsyncFiberException = exports.isAsyncFiberException = internal.isAsyncFiberException; +/** + * @since 2.0.0 + * @category guards + */ +const isFiberFailure = exports.isFiberFailure = internal.isFiberFailure; +/** + * @since 2.0.0 + * @category constructors + */ +const makeFiberFailure = exports.makeFiberFailure = internal.fiberFailure; +/** + * @since 2.0.0 + * @category runtime flags + */ +const updateRuntimeFlags = exports.updateRuntimeFlags = internal.updateRuntimeFlags; +/** + * @since 2.0.0 + * @category runtime flags + */ +const enableRuntimeFlag = exports.enableRuntimeFlag = internal.enableRuntimeFlag; +/** + * @since 2.0.0 + * @category runtime flags + */ +const disableRuntimeFlag = exports.disableRuntimeFlag = internal.disableRuntimeFlag; +/** + * @since 2.0.0 + * @category context + */ +const updateContext = exports.updateContext = internal.updateContext; +/** + * @since 2.0.0 + * @category context + * @example + * ```ts + * import { Context, Runtime } from "effect" + * + * class Name extends Context.Tag("Name")() {} + * + * const runtime: Runtime.Runtime = Runtime.defaultRuntime.pipe( + * Runtime.provideService(Name, "John") + * ) + * ``` + */ +const provideService = exports.provideService = internal.provideService; +/** + * @since 2.0.0 + * @category fiber refs + */ +const updateFiberRefs = exports.updateFiberRefs = internal.updateFiberRefs; +/** + * @since 2.0.0 + * @category fiber refs + * @example + * ```ts + * import { Effect, FiberRef, Runtime } from "effect" + * + * const ref = FiberRef.unsafeMake(0) + * + * const updatedRuntime = Runtime.defaultRuntime.pipe( + * Runtime.setFiberRef(ref, 1) + * ) + * + * // returns 1 + * const result = Runtime.runSync(updatedRuntime)(FiberRef.get(ref)) + * ``` + */ +const setFiberRef = exports.setFiberRef = internal.setFiberRef; +/** + * @since 2.0.0 + * @category fiber refs + * @example + * ```ts + * import { Effect, FiberRef, Runtime } from "effect" + * + * const ref = FiberRef.unsafeMake(0) + * + * const updatedRuntime = Runtime.defaultRuntime.pipe( + * Runtime.setFiberRef(ref, 1), + * Runtime.deleteFiberRef(ref) + * ) + * + * // returns 0 + * const result = Runtime.runSync(updatedRuntime)(FiberRef.get(ref)) + * ``` + */ +const deleteFiberRef = exports.deleteFiberRef = internal.deleteFiberRef; +//# sourceMappingURL=Runtime.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/RuntimeFlags.js b/backend/node_modules/effect/dist/cjs/RuntimeFlags.js new file mode 100644 index 0000000000000000000000000000000000000000..9f6679b4dd52dd219c80639be9f29f56abd7ef2d --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/RuntimeFlags.js @@ -0,0 +1,259 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.windDown = exports.toSet = exports.runtimeMetrics = exports.render = exports.patch = exports.opSupervision = exports.none = exports.make = exports.isEnabled = exports.isDisabled = exports.interruption = exports.interruptible = exports.enableWindDown = exports.enableRuntimeMetrics = exports.enableOpSupervision = exports.enableInterruption = exports.enableCooperativeYielding = exports.enableAll = exports.enable = exports.disableWindDown = exports.disableRuntimeMetrics = exports.disableOpSupervision = exports.disableInterruption = exports.disableCooperativeYielding = exports.disableAll = exports.disable = exports.differ = exports.diff = exports.cooperativeYielding = exports.WindDown = exports.RuntimeMetrics = exports.OpSupervision = exports.None = exports.Interruption = exports.CooperativeYielding = void 0; +var circular = _interopRequireWildcard(require("./internal/layer/circular.js")); +var internal = _interopRequireWildcard(require("./internal/runtimeFlags.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * No runtime flags. + * + * @since 2.0.0 + * @category constructors + */ +const None = exports.None = internal.None; +/** + * The interruption flag determines whether or not the Effect runtime system will + * interrupt a fiber. + * + * @since 2.0.0 + * @category constructors + */ +const Interruption = exports.Interruption = internal.Interruption; +/** + * The op supervision flag determines whether or not the Effect runtime system + * will supervise all operations of the Effect runtime. Use of this flag will + * negatively impact performance, but is required for some operations, such as + * profiling. + * + * @since 2.0.0 + * @category constructors + */ +const OpSupervision = exports.OpSupervision = internal.OpSupervision; +/** + * The runtime metrics flag determines whether or not the Effect runtime system + * will collect metrics about the Effect runtime. Use of this flag will have a + * very small negative impact on performance, but generates very helpful + * operational insight into running Effect applications that can be exported to + * Prometheus or other tools via Effect Metrics. + * + * @since 2.0.0 + * @category constructors + */ +const RuntimeMetrics = exports.RuntimeMetrics = internal.RuntimeMetrics; +/** + * The wind down flag determines whether the Effect runtime system will execute + * effects in wind-down mode. In wind-down mode, even if interruption is + * enabled and a fiber has been interrupted, the fiber will continue its + * execution uninterrupted. + * + * @since 2.0.0 + * @category constructors + */ +const WindDown = exports.WindDown = internal.WindDown; +/** + * The cooperative yielding flag determines whether the Effect runtime will + * yield to another fiber. + * + * @since 2.0.0 + * @category constructors + */ +const CooperativeYielding = exports.CooperativeYielding = internal.CooperativeYielding; +/** + * Returns `true` if the `CooperativeYielding` `RuntimeFlag` is enabled, `false` + * otherwise. + * + * @since 2.0.0 + * @category getters + */ +const cooperativeYielding = exports.cooperativeYielding = internal.cooperativeYielding; +/** + * Creates a `RuntimeFlagsPatch` which describes the difference between `self` + * and `that`. + * + * @since 2.0.0 + * @category diffing + */ +const diff = exports.diff = internal.diff; +/** + * Constructs a differ that knows how to diff `RuntimeFlags` values. + * + * @since 2.0.0 + * @category utils + */ +const differ = exports.differ = internal.differ; +/** + * Disables the specified `RuntimeFlag`. + * + * @since 2.0.0 + * @category utils + */ +const disable = exports.disable = internal.disable; +/** + * Disables all of the `RuntimeFlag`s in the specified set of `RuntimeFlags`. + * + * @since 2.0.0 + * @category utils + */ +const disableAll = exports.disableAll = internal.disableAll; +/** + * @since 2.0.0 + * @category context + */ +const disableCooperativeYielding = exports.disableCooperativeYielding = circular.disableCooperativeYielding; +/** + * @since 2.0.0 + * @category context + */ +const disableInterruption = exports.disableInterruption = circular.disableInterruption; +/** + * @since 2.0.0 + * @category context + */ +const disableOpSupervision = exports.disableOpSupervision = circular.disableOpSupervision; +/** + * @since 2.0.0 + * @category context + */ +const disableRuntimeMetrics = exports.disableRuntimeMetrics = circular.disableRuntimeMetrics; +/** + * @since 2.0.0 + * @category context + */ +const disableWindDown = exports.disableWindDown = circular.disableWindDown; +/** + * Enables the specified `RuntimeFlag`. + * + * @since 2.0.0 + * @category utils + */ +const enable = exports.enable = internal.enable; +/** + * Enables all of the `RuntimeFlag`s in the specified set of `RuntimeFlags`. + * + * @since 2.0.0 + * @category utils + */ +const enableAll = exports.enableAll = internal.enableAll; +/** + * @since 2.0.0 + * @category context + */ +const enableCooperativeYielding = exports.enableCooperativeYielding = circular.enableCooperativeYielding; +/** + * @since 2.0.0 + * @category context + */ +const enableInterruption = exports.enableInterruption = circular.enableInterruption; +/** + * @since 2.0.0 + * @category context + */ +const enableOpSupervision = exports.enableOpSupervision = circular.enableOpSupervision; +/** + * @since 2.0.0 + * @category context + */ +const enableRuntimeMetrics = exports.enableRuntimeMetrics = circular.enableRuntimeMetrics; +/** + * @since 2.0.0 + * @category context + */ +const enableWindDown = exports.enableWindDown = circular.enableWindDown; +/** + * Returns true only if the `Interruption` flag is **enabled** and the + * `WindDown` flag is **disabled**. + * + * A fiber is said to be interruptible if interruption is enabled and the fiber + * is not in its wind-down phase, in which it takes care of cleanup activities + * related to fiber shutdown. + * + * @since 2.0.0 + * @category getters + */ +const interruptible = exports.interruptible = internal.interruptible; +/** + * Returns `true` if the `Interruption` `RuntimeFlag` is enabled, `false` + * otherwise. + * + * @since 2.0.0 + * @category getters + */ +const interruption = exports.interruption = internal.interruption; +/** + * Returns `true` if the specified `RuntimeFlag` is enabled, `false` otherwise. + * + * @since 2.0.0 + * @category elements + */ +const isEnabled = exports.isEnabled = internal.isEnabled; +/** + * Returns `true` if the specified `RuntimeFlag` is disabled, `false` otherwise. + * + * @since 2.0.0 + * @category elements + */ +const isDisabled = exports.isDisabled = internal.isDisabled; +/** + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * @since 2.0.0 + * @category constructors + */ +const none = exports.none = internal.none; +/** + * Returns `true` if the `OpSupervision` `RuntimeFlag` is enabled, `false` + * otherwise. + * + * @since 2.0.0 + * @category getters + */ +const opSupervision = exports.opSupervision = internal.opSupervision; +/** + * Patches a set of `RuntimeFlag`s with a `RuntimeFlagsPatch`, returning the + * patched set of `RuntimeFlag`s. + * + * @since 2.0.0 + * @category utils + */ +const patch = exports.patch = internal.patch; +/** + * Converts the provided `RuntimeFlags` into a `string`. + * + * @category conversions + * @since 2.0.0 + */ +const render = exports.render = internal.render; +/** + * Returns `true` if the `RuntimeMetrics` `RuntimeFlag` is enabled, `false` + * otherwise. + * + * @since 2.0.0 + * @category getters + */ +const runtimeMetrics = exports.runtimeMetrics = internal.runtimeMetrics; +/** + * Converts the provided `RuntimeFlags` into a `ReadonlySet`. + * + * @category conversions + * @since 2.0.0 + */ +const toSet = exports.toSet = internal.toSet; +/** + * Returns `true` if the `WindDown` `RuntimeFlag` is enabled, `false` + * otherwise. + * + * @since 2.0.0 + * @category getters + */ +const windDown = exports.windDown = internal.windDown; +//# sourceMappingURL=RuntimeFlags.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/RuntimeFlags.js.map b/backend/node_modules/effect/dist/cjs/RuntimeFlags.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d3ecc6f90da84cdf0a397e650ed2488a5def891b --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/RuntimeFlags.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RuntimeFlags.js","names":["circular","_interopRequireWildcard","require","internal","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","None","exports","Interruption","OpSupervision","RuntimeMetrics","WindDown","CooperativeYielding","cooperativeYielding","diff","differ","disable","disableAll","disableCooperativeYielding","disableInterruption","disableOpSupervision","disableRuntimeMetrics","disableWindDown","enable","enableAll","enableCooperativeYielding","enableInterruption","enableOpSupervision","enableRuntimeMetrics","enableWindDown","interruptible","interruption","isEnabled","isDisabled","make","none","opSupervision","patch","render","runtimeMetrics","toSet","windDown"],"sources":["../../src/RuntimeFlags.ts"],"sourcesContent":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AA,CAAA4B,IAAA,GAAiBjD,QAAQ,CAACiD,IAAI;AAE/C;;;;;;;AAOO,MAAMC,aAAa,GAAA7B,OAAA,CAAA6B,aAAA,GAAoClD,QAAQ,CAACkD,aAAa;AAEpF;;;;;;;AAOO,MAAMC,KAAK,GAAA9B,OAAA,CAAA8B,KAAA,GAiBdnD,QAAQ,CAACmD,KAAK;AAElB;;;;;;AAMO,MAAMC,MAAM,GAAA/B,OAAA,CAAA+B,MAAA,GAAmCpD,QAAQ,CAACoD,MAAM;AAErE;;;;;;;AAOO,MAAMC,cAAc,GAAAhC,OAAA,CAAAgC,cAAA,GAAoCrD,QAAQ,CAACqD,cAAc;AAEtF;;;;;;AAMO,MAAMC,KAAK,GAAAjC,OAAA,CAAAiC,KAAA,GAAqDtD,QAAQ,CAACsD,KAAK;AAErF;;;;;;;AAOO,MAAMC,QAAQ,GAAAlC,OAAA,CAAAkC,QAAA,GAAoCvD,QAAQ,CAACuD,QAAQ","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/RuntimeFlagsPatch.js b/backend/node_modules/effect/dist/cjs/RuntimeFlagsPatch.js new file mode 100644 index 0000000000000000000000000000000000000000..1d27600d56d0ff82d3aca7e989e6448ab3ddb98c --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/RuntimeFlagsPatch.js @@ -0,0 +1,142 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.render = exports.make = exports.isEnabled = exports.isEmpty = exports.isDisabled = exports.isActive = exports.inverse = exports.includes = exports.exclude = exports.enabledSet = exports.enable = exports.empty = exports.either = exports.disabledSet = exports.disable = exports.both = exports.andThen = void 0; +var runtimeFlags = _interopRequireWildcard(require("./internal/runtimeFlags.js")); +var internal = _interopRequireWildcard(require("./internal/runtimeFlagsPatch.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * The empty `RuntimeFlagsPatch`. + * + * @since 2.0.0 + * @category constructors + */ +const empty = exports.empty = internal.empty; +/** + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * Creates a `RuntimeFlagsPatch` describing enabling the provided `RuntimeFlag`. + * + * @since 2.0.0 + * @category constructors + */ +const enable = exports.enable = internal.enable; +/** + * Creates a `RuntimeFlagsPatch` describing disabling the provided `RuntimeFlag`. + * + * @since 2.0.0 + * @category constructors + */ +const disable = exports.disable = internal.disable; +/** + * Returns `true` if the specified `RuntimeFlagsPatch` is empty. + * + * @since 2.0.0 + * @category getters + */ +const isEmpty = exports.isEmpty = internal.isEmpty; +/** + * Returns `true` if the `RuntimeFlagsPatch` describes the specified + * `RuntimeFlag` as active. + * + * @since 2.0.0 + * @category elements + */ +const isActive = exports.isActive = internal.isActive; +/** + * Returns `true` if the `RuntimeFlagsPatch` describes the specified + * `RuntimeFlag` as enabled. + * + * @since 2.0.0 + * @category elements + */ +const isEnabled = exports.isEnabled = internal.isEnabled; +/** + * Returns `true` if the `RuntimeFlagsPatch` describes the specified + * `RuntimeFlag` as disabled. + * + * @since 2.0.0 + * @category elements + */ +const isDisabled = exports.isDisabled = internal.isDisabled; +/** + * Returns `true` if the `RuntimeFlagsPatch` includes the specified + * `RuntimeFlag`, `false` otherwise. + * + * @since 2.0.0 + * @category elements + */ +const includes = exports.includes = internal.isActive; +/** + * Creates a `RuntimeFlagsPatch` describing the application of the `self` patch, + * followed by `that` patch. + * + * @since 2.0.0 + * @category utils + */ +const andThen = exports.andThen = internal.andThen; +/** + * Creates a `RuntimeFlagsPatch` describing application of both the `self` patch + * and `that` patch. + * + * @since 2.0.0 + * @category utils + */ +const both = exports.both = internal.both; +/** + * Creates a `RuntimeFlagsPatch` describing application of either the `self` + * patch or `that` patch. + * + * @since 2.0.0 + * @category utils + */ +const either = exports.either = internal.either; +/** + * Creates a `RuntimeFlagsPatch` which describes exclusion of the specified + * `RuntimeFlag` from the set of `RuntimeFlags`. + * + * @category utils + * @since 2.0.0 + */ +const exclude = exports.exclude = internal.exclude; +/** + * Creates a `RuntimeFlagsPatch` which describes the inverse of the patch + * specified by the provided `RuntimeFlagsPatch`. + * + * @since 2.0.0 + * @category utils + */ +const inverse = exports.inverse = internal.inverse; +/** + * Returns a `ReadonlySet` containing the `RuntimeFlags` described as + * enabled by the specified `RuntimeFlagsPatch`. + * + * @since 2.0.0 + * @category destructors + */ +const enabledSet = exports.enabledSet = runtimeFlags.enabledSet; +/** + * Returns a `ReadonlySet` containing the `RuntimeFlags` described as + * disabled by the specified `RuntimeFlagsPatch`. + * + * @since 2.0.0 + * @category destructors + */ +const disabledSet = exports.disabledSet = runtimeFlags.disabledSet; +/** + * Renders the provided `RuntimeFlagsPatch` to a string. + * + * @since 2.0.0 + * @category destructors + */ +const render = exports.render = runtimeFlags.renderPatch; +//# sourceMappingURL=RuntimeFlagsPatch.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/RuntimeFlagsPatch.js.map b/backend/node_modules/effect/dist/cjs/RuntimeFlagsPatch.js.map new file mode 100644 index 0000000000000000000000000000000000000000..3332959d6ada33dd18494c1aa48c045982bc12fa --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/RuntimeFlagsPatch.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RuntimeFlagsPatch.js","names":["runtimeFlags","_interopRequireWildcard","require","internal","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","empty","exports","make","enable","disable","isEmpty","isActive","isEnabled","isDisabled","includes","andThen","both","either","exclude","inverse","enabledSet","disabledSet","render","renderPatch"],"sources":["../../src/RuntimeFlagsPatch.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,uBAAA,CAAAC,OAAA;AAA2D,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAJ3D;;;;AAeA;;;;;;AAMO,MAAMkB,KAAK,GAAAC,OAAA,CA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;;;;;;AAOO,MAAMC,UAAU,GAAAd,OAAA,CAAAc,UAAA,GAAuEtC,YAAY,CAACsC,UAAU;AAErH;;;;;;;AAOO,MAAMC,WAAW,GAAAf,OAAA,CAAAe,WAAA,GAAuEvC,YAAY,CAACuC,WAAW;AAEvH;;;;;;AAMO,MAAMC,MAAM,GAAAhB,OAAA,CAAAgB,MAAA,GAAwCxC,YAAY,CAACyC,WAAW","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/STM.js b/backend/node_modules/effect/dist/cjs/STM.js new file mode 100644 index 0000000000000000000000000000000000000000..18e3040bb824b1cc8a46f42e843e3f60d1224635 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/STM.js @@ -0,0 +1,981 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.retryUntil = exports.retry = exports.replicateSTMDiscard = exports.replicateSTM = exports.replicate = exports.repeatWhile = exports.repeatUntil = exports.rejectSTM = exports.reject = exports.refineOrDieWith = exports.refineOrDie = exports.reduceRight = exports.reduceAll = exports.reduce = exports.provideSomeContext = exports.provideServiceSTM = exports.provideService = exports.provideContext = exports.partition = exports.orTry = exports.orElseSucceed = exports.orElseOptional = exports.orElseFail = exports.orElseEither = exports.orElse = exports.orDieWith = exports.orDie = exports.option = exports.none = exports.negate = exports.mergeAll = exports.merge = exports.matchSTM = exports.match = exports.mapInputContext = exports.mapError = exports.mapBoth = exports.mapAttempt = exports.map = exports.loop = exports.let = exports.iterate = exports.isSuccess = exports.isSTM = exports.isFailure = exports.interruptAs = exports.interrupt = exports.ignore = exports.if = exports.head = exports.gen = exports.fromOption = exports.fromEither = exports.forEach = exports.flipWith = exports.flip = exports.flatten = exports.flatMap = exports.firstSuccessOf = exports.filterOrFail = exports.filterOrElse = exports.filterOrDieMessage = exports.filterOrDie = exports.filterNot = exports.filter = exports.fiberId = exports.failSync = exports.fail = exports.exists = exports.every = exports.eventually = exports.ensuring = exports.either = exports.dieSync = exports.dieMessage = exports.die = exports.contextWithSTM = exports.contextWith = exports.context = exports.cond = exports.commitEither = exports.commit = exports.collectSTM = exports.collect = exports.check = exports.catchTags = exports.catchTag = exports.catchSome = exports.catchAll = exports.bindTo = exports.bind = exports.attempt = exports.asVoid = exports.asSomeError = exports.asSome = exports.as = exports.all = exports.acquireUseRelease = exports.STMTypeId = exports.Do = void 0; +exports.zipWith = exports.zipRight = exports.zipLeft = exports.zip = exports.whenSTM = exports.when = exports.void = exports.validateFirst = exports.validateAll = exports.unsome = exports.unlessSTM = exports.unless = exports.try = exports.tapError = exports.tapBoth = exports.tap = exports.sync = exports.suspend = exports.summarized = exports.succeedSome = exports.succeedNone = exports.succeed = exports.some = exports.retryWhile = void 0; +var Cause = _interopRequireWildcard(require("./Cause.js")); +var Chunk = _interopRequireWildcard(require("./Chunk.js")); +var core = _interopRequireWildcard(require("./internal/stm/core.js")); +var stm = _interopRequireWildcard(require("./internal/stm/stm.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * @since 2.0.0 + * @category symbols + */ +const STMTypeId = exports.STMTypeId = core.STMTypeId; +/** + * Returns `true` if the provided value is an `STM`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isSTM = exports.isSTM = core.isSTM; +/** + * Treats the specified `acquire` transaction as the acquisition of a + * resource. The `acquire` transaction will be executed interruptibly. If it + * is a success and is committed the specified `release` workflow will be + * executed uninterruptibly as soon as the `use` workflow completes execution. + * + * @since 2.0.0 + * @category constructors + */ +const acquireUseRelease = exports.acquireUseRelease = stm.acquireUseRelease; +/** + * Runs all the provided transactional effects in sequence respecting the + * structure provided in input. + * + * Supports multiple arguments, a single argument tuple / array or record / + * struct. + * + * @since 2.0.0 + * @category constructors + */ +const all = exports.all = stm.all; +/** + * Maps the success value of this effect to the specified constant value. + * + * @since 2.0.0 + * @category mapping + */ +const as = exports.as = stm.as; +/** + * Maps the success value of this effect to an optional value. + * + * @since 2.0.0 + * @category mapping + */ +const asSome = exports.asSome = stm.asSome; +/** + * Maps the error value of this effect to an optional value. + * + * @since 2.0.0 + * @category mapping + */ +const asSomeError = exports.asSomeError = stm.asSomeError; +/** + * This function maps the success value of an `STM` to `void`. If the original + * `STM` succeeds, the returned `STM` will also succeed. If the original `STM` + * fails, the returned `STM` will fail with the same error. + * + * @since 2.0.0 + * @category mapping + */ +const asVoid = exports.asVoid = stm.asVoid; +/** + * Creates an `STM` value from a partial (but pure) function. + * + * @since 2.0.0 + * @category constructors + */ +const attempt = exports.attempt = stm.attempt; +/** + * Recovers from all errors. + * + * @since 2.0.0 + * @category error handling + */ +const catchAll = exports.catchAll = core.catchAll; +/** + * Recovers from some or all of the error cases. + * + * @since 2.0.0 + * @category error handling + */ +const catchSome = exports.catchSome = stm.catchSome; +/** + * Recovers from the specified tagged error. + * + * @since 2.0.0 + * @category error handling + */ +const catchTag = exports.catchTag = stm.catchTag; +/** + * Recovers from multiple tagged errors. + * + * @since 2.0.0 + * @category error handling + */ +const catchTags = exports.catchTags = stm.catchTags; +/** + * Checks the condition, and if it's true, returns unit, otherwise, retries. + * + * @since 2.0.0 + * @category constructors + */ +const check = exports.check = stm.check; +/** + * Simultaneously filters and maps the value produced by this effect. + * + * @since 2.0.0 + * @category mutations + */ +const collect = exports.collect = stm.collect; +/** + * Simultaneously filters and maps the value produced by this effect. + * + * @since 2.0.0 + * @category mutations + */ +const collectSTM = exports.collectSTM = stm.collectSTM; +/** + * Commits this transaction atomically. + * + * @since 2.0.0 + * @category destructors + */ +const commit = exports.commit = core.commit; +/** + * Commits this transaction atomically, regardless of whether the transaction + * is a success or a failure. + * + * @since 2.0.0 + * @category destructors + */ +const commitEither = exports.commitEither = stm.commitEither; +/** + * Similar to Either.cond, evaluate the predicate, return the given A as + * success if predicate returns true, and the given E as error otherwise + * + * @since 2.0.0 + * @category constructors + */ +const cond = exports.cond = stm.cond; +/** + * Retrieves the environment inside an stm. + * + * @since 2.0.0 + * @category constructors + */ +const context = exports.context = core.context; +/** + * Accesses the environment of the transaction to perform a transaction. + * + * @since 2.0.0 + * @category constructors + */ +const contextWith = exports.contextWith = core.contextWith; +/** + * Accesses the environment of the transaction to perform a transaction. + * + * @since 2.0.0 + * @category constructors + */ +const contextWithSTM = exports.contextWithSTM = core.contextWithSTM; +/** + * Transforms the environment being provided to this effect with the specified + * function. + * + * @since 2.0.0 + * @category context + */ +const mapInputContext = exports.mapInputContext = core.mapInputContext; +/** + * Fails the transactional effect with the specified defect. + * + * @since 2.0.0 + * @category constructors + */ +const die = exports.die = core.die; +/** + * Kills the fiber running the effect with a `Cause.RuntimeException` that + * contains the specified message. + * + * @since 2.0.0 + * @category constructors + */ +const dieMessage = exports.dieMessage = core.dieMessage; +/** + * Fails the transactional effect with the specified lazily evaluated defect. + * + * @since 2.0.0 + * @category constructors + */ +const dieSync = exports.dieSync = core.dieSync; +/** + * Converts the failure channel into an `Either`. + * + * @since 2.0.0 + * @category mutations + */ +const either = exports.either = stm.either; +/** + * Executes the specified finalization transaction whether or not this effect + * succeeds. Note that as with all STM transactions, if the full transaction + * fails, everything will be rolled back. + * + * @since 2.0.0 + * @category finalization + */ +const ensuring = exports.ensuring = core.ensuring; +/** + * Returns an effect that ignores errors and runs repeatedly until it + * eventually succeeds. + * + * @since 2.0.0 + * @category mutations + */ +const eventually = exports.eventually = stm.eventually; +/** + * Determines whether all elements of the `Iterable` satisfy the effectual + * predicate. + * + * @since 2.0.0 + * @category constructors + */ +const every = exports.every = stm.every; +/** + * Determines whether any element of the `Iterable[A]` satisfies the effectual + * predicate `f`. + * + * @since 2.0.0 + * @category constructors + */ +const exists = exports.exists = stm.exists; +/** + * Fails the transactional effect with the specified error. + * + * @since 2.0.0 + * @category constructors + */ +const fail = exports.fail = core.fail; +/** + * Fails the transactional effect with the specified lazily evaluated error. + * + * @since 2.0.0 + * @category constructors + */ +const failSync = exports.failSync = core.failSync; +/** + * Returns the fiber id of the fiber committing the transaction. + * + * @since 2.0.0 + * @category constructors + */ +const fiberId = exports.fiberId = stm.fiberId; +/** + * Filters the collection using the specified effectual predicate. + * + * @since 2.0.0 + * @category constructors + */ +const filter = exports.filter = stm.filter; +/** + * Filters the collection using the specified effectual predicate, removing + * all elements that satisfy the predicate. + * + * @since 2.0.0 + * @category constructors + */ +const filterNot = exports.filterNot = stm.filterNot; +/** + * Dies with specified defect if the predicate fails. + * + * @since 2.0.0 + * @category filtering + */ +const filterOrDie = exports.filterOrDie = stm.filterOrDie; +/** + * Dies with a `Cause.RuntimeException` having the specified message if the + * predicate fails. + * + * @since 2.0.0 + * @category filtering + */ +const filterOrDieMessage = exports.filterOrDieMessage = stm.filterOrDieMessage; +/** + * Supplies `orElse` if the predicate fails. + * + * @since 2.0.0 + * @category filtering + */ +const filterOrElse = exports.filterOrElse = stm.filterOrElse; +/** + * Fails with the specified error if the predicate fails. + * + * @since 2.0.0 + * @category filtering + */ +const filterOrFail = exports.filterOrFail = stm.filterOrFail; +/** + * Feeds the value produced by this effect to the specified function, and then + * runs the returned effect as well to produce its results. + * + * @since 2.0.0 + * @category sequencing + */ +const flatMap = exports.flatMap = core.flatMap; +/** + * Flattens out a nested `STM` effect. + * + * @since 2.0.0 + * @category sequencing + */ +const flatten = exports.flatten = stm.flatten; +/** + * Flips the success and failure channels of this transactional effect. This + * allows you to use all methods on the error channel, possibly before + * flipping back. + * + * @since 2.0.0 + * @category mutations + */ +const flip = exports.flip = stm.flip; +/** + * Swaps the error/value parameters, applies the function `f` and flips the + * parameters back + * + * @since 2.0.0 + * @category mutations + */ +const flipWith = exports.flipWith = stm.flipWith; +/** + * Folds over the `STM` effect, handling both failure and success, but not + * retry. + * + * @since 2.0.0 + * @category folding + */ +const match = exports.match = stm.match; +/** + * Effectfully folds over the `STM` effect, handling both failure and success. + * + * @since 2.0.0 + * @category folding + */ +const matchSTM = exports.matchSTM = core.matchSTM; +/** + * Applies the function `f` to each element of the `Iterable` and returns + * a transactional effect that produces a new `Chunk`. + * + * @since 2.0.0 + * @category traversing + */ +const forEach = exports.forEach = stm.forEach; +/** + * Lifts an `Either` into a `STM`. + * + * @since 2.0.0 + * @category constructors + */ +const fromEither = exports.fromEither = stm.fromEither; +/** + * Lifts an `Option` into a `STM`. + * + * @since 2.0.0 + * @category constructors + */ +const fromOption = exports.fromOption = stm.fromOption; +/** + * @since 2.0.0 + * @category constructors + */ +const gen = exports.gen = stm.gen; +/** + * Returns a successful effect with the head of the list if the list is + * non-empty or fails with the error `None` if the list is empty. + * + * @since 2.0.0 + * @category getters + */ +const head = exports.head = stm.head; +const if_ = exports.if = stm.if_; +/** + * Returns a new effect that ignores the success or failure of this effect. + * + * @since 2.0.0 + * @category mutations + */ +const ignore = exports.ignore = stm.ignore; +/** + * Interrupts the fiber running the effect. + * + * @since 2.0.0 + * @category constructors + */ +const interrupt = exports.interrupt = core.interrupt; +/** + * Interrupts the fiber running the effect with the specified `FiberId`. + * + * @since 2.0.0 + * @category constructors + */ +const interruptAs = exports.interruptAs = core.interruptAs; +/** + * Returns whether this transactional effect is a failure. + * + * @since 2.0.0 + * @category getters + */ +const isFailure = exports.isFailure = stm.isFailure; +/** + * Returns whether this transactional effect is a success. + * + * @since 2.0.0 + * @category getters + */ +const isSuccess = exports.isSuccess = stm.isSuccess; +/** + * Iterates with the specified transactional function. The moral equivalent + * of: + * + * ```ts skip-type-checking + * const s = initial + * + * while (cont(s)) { + * s = body(s) + * } + * + * return s + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const iterate = exports.iterate = stm.iterate; +/** + * Loops with the specified transactional function, collecting the results + * into a list. The moral equivalent of: + * + * ```ts skip-type-checking + * const as = [] + * let s = initial + * + * while (cont(s)) { + * as.push(body(s)) + * s = inc(s) + * } + * + * return as + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const loop = exports.loop = stm.loop; +/** + * Maps the value produced by the effect. + * + * @since 2.0.0 + * @category mapping + */ +const map = exports.map = core.map; +/** + * Maps the value produced by the effect with the specified function that may + * throw exceptions but is otherwise pure, translating any thrown exceptions + * into typed failed effects. + * + * @since 2.0.0 + * @category mapping + */ +const mapAttempt = exports.mapAttempt = stm.mapAttempt; +/** + * Returns an `STM` effect whose failure and success channels have been mapped + * by the specified pair of functions, `f` and `g`. + * + * @since 2.0.0 + * @category mapping + */ +const mapBoth = exports.mapBoth = stm.mapBoth; +/** + * Maps from one error type to another. + * + * @since 2.0.0 + * @category mapping + */ +const mapError = exports.mapError = stm.mapError; +/** + * Returns a new effect where the error channel has been merged into the + * success channel to their common combined type. + * + * @since 2.0.0 + * @category mutations + */ +const merge = exports.merge = stm.merge; +/** + * Merges an `Iterable` to a single `STM`, working sequentially. + * + * @since 2.0.0 + * @category constructors + */ +const mergeAll = exports.mergeAll = stm.mergeAll; +/** + * Returns a new effect where boolean value of this effect is negated. + * + * @since 2.0.0 + * @category mutations + */ +const negate = exports.negate = stm.negate; +/** + * Requires the option produced by this value to be `None`. + * + * @since 2.0.0 + * @category mutations + */ +const none = exports.none = stm.none; +/** + * Converts the failure channel into an `Option`. + * + * @since 2.0.0 + * @category mutations + */ +const option = exports.option = stm.option; +/** + * Translates `STM` effect failure into death of the fiber, making all + * failures unchecked and not a part of the type of the effect. + * + * @since 2.0.0 + * @category error handling + */ +const orDie = exports.orDie = stm.orDie; +/** + * Keeps none of the errors, and terminates the fiber running the `STM` effect + * with them, using the specified function to convert the `E` into a defect. + * + * @since 2.0.0 + * @category error handling + */ +const orDieWith = exports.orDieWith = stm.orDieWith; +/** + * Tries this effect first, and if it fails or retries, tries the other + * effect. + * + * @since 2.0.0 + * @category error handling + */ +const orElse = exports.orElse = stm.orElse; +/** + * Returns a transactional effect that will produce the value of this effect + * in left side, unless it fails or retries, in which case, it will produce + * the value of the specified effect in right side. + * + * @since 2.0.0 + * @category error handling + */ +const orElseEither = exports.orElseEither = stm.orElseEither; +/** + * Tries this effect first, and if it fails or retries, fails with the + * specified error. + * + * @since 2.0.0 + * @category error handling + */ +const orElseFail = exports.orElseFail = stm.orElseFail; +/** + * Returns an effect that will produce the value of this effect, unless it + * fails with the `None` value, in which case it will produce the value of the + * specified effect. + * + * @since 2.0.0 + * @category error handling + */ +const orElseOptional = exports.orElseOptional = stm.orElseOptional; +/** + * Tries this effect first, and if it fails or retries, succeeds with the + * specified value. + * + * @since 2.0.0 + * @category error handling + */ +const orElseSucceed = exports.orElseSucceed = stm.orElseSucceed; +/** + * Tries this effect first, and if it enters retry, then it tries the other + * effect. This is an equivalent of Haskell's orElse. + * + * @since 2.0.0 + * @category error handling + */ +const orTry = exports.orTry = core.orTry; +/** + * Feeds elements of type `A` to a function `f` that returns an effect. + * Collects all successes and failures in a tupled fashion. + * + * @since 2.0.0 + * @category traversing + */ +const partition = exports.partition = stm.partition; +/** + * Provides the transaction its required environment, which eliminates its + * dependency on `R`. + * + * @since 2.0.0 + * @category context + */ +const provideContext = exports.provideContext = stm.provideContext; +/** + * Splits the context into two parts, providing one part using the + * specified layer and leaving the remainder `R0`. + * + * @since 2.0.0 + * @category context + */ +const provideSomeContext = exports.provideSomeContext = stm.provideSomeContext; +/** + * Provides the effect with the single service it requires. If the transactional + * effect requires more than one service use `provideEnvironment` instead. + * + * @since 2.0.0 + * @category context + */ +const provideService = exports.provideService = stm.provideService; +/** + * Provides the effect with the single service it requires. If the transactional + * effect requires more than one service use `provideEnvironment` instead. + * + * @since 2.0.0 + * @category context + */ +const provideServiceSTM = exports.provideServiceSTM = stm.provideServiceSTM; +/** + * Folds an `Iterable` using an effectual function f, working sequentially + * from left to right. + * + * @since 2.0.0 + * @category constructors + */ +const reduce = exports.reduce = stm.reduce; +/** + * Reduces an `Iterable` to a single `STM`, working sequentially. + * + * @since 2.0.0 + * @category constructors + */ +const reduceAll = exports.reduceAll = stm.reduceAll; +/** + * Folds an `Iterable` using an effectual function f, working sequentially + * from right to left. + * + * @since 2.0.0 + * @category constructors + */ +const reduceRight = exports.reduceRight = stm.reduceRight; +/** + * Keeps some of the errors, and terminates the fiber with the rest. + * + * @since 2.0.0 + * @category mutations + */ +const refineOrDie = exports.refineOrDie = stm.refineOrDie; +/** + * Keeps some of the errors, and terminates the fiber with the rest, using the + * specified function to convert the `E` into a `Throwable`. + * + * @since 2.0.0 + * @category mutations + */ +const refineOrDieWith = exports.refineOrDieWith = stm.refineOrDieWith; +/** + * Fail with the returned value if the `PartialFunction` matches, otherwise + * continue with our held value. + * + * @since 2.0.0 + * @category mutations + */ +const reject = exports.reject = stm.reject; +/** + * Continue with the returned computation if the specified partial function + * matches, translating the successful match into a failure, otherwise continue + * with our held value. + * + * @since 2.0.0 + * @category mutations + */ +const rejectSTM = exports.rejectSTM = stm.rejectSTM; +/** + * Repeats this `STM` effect until its result satisfies the specified + * predicate. + * + * **WARNING**: `repeatUntil` uses a busy loop to repeat the effect and will + * consume a thread until it completes (it cannot yield). This is because STM + * describes a single atomic transaction which must either complete, retry or + * fail a transaction before yielding back to the Effect runtime. + * - Use `retryUntil` instead if you don't need to maintain transaction + * state for repeats. + * - Ensure repeating the STM effect will eventually satisfy the predicate. + * + * @since 2.0.0 + * @category mutations + */ +const repeatUntil = exports.repeatUntil = stm.repeatUntil; +/** + * Repeats this `STM` effect while its result satisfies the specified + * predicate. + * + * **WARNING**: `repeatWhile` uses a busy loop to repeat the effect and will + * consume a thread until it completes (it cannot yield). This is because STM + * describes a single atomic transaction which must either complete, retry or + * fail a transaction before yielding back to the Effect runtime. + * - Use `retryWhile` instead if you don't need to maintain transaction + * state for repeats. + * - Ensure repeating the STM effect will eventually not satisfy the + * predicate. + * + * @since 2.0.0 + * @category mutations + */ +const repeatWhile = exports.repeatWhile = stm.repeatWhile; +/** + * Replicates the given effect n times. If 0 or negative numbers are given, an + * empty `Chunk` will be returned. + * + * @since 2.0.0 + * @category constructors + */ +const replicate = exports.replicate = stm.replicate; +/** + * Performs this transaction the specified number of times and collects the + * results. + * + * @since 2.0.0 + * @category constructors + */ +const replicateSTM = exports.replicateSTM = stm.replicateSTM; +/** + * Performs this transaction the specified number of times, discarding the + * results. + * + * @since 2.0.0 + * @category constructors + */ +const replicateSTMDiscard = exports.replicateSTMDiscard = stm.replicateSTMDiscard; +/** + * Abort and retry the whole transaction when any of the underlying + * transactional variables have changed. + * + * @since 2.0.0 + * @category error handling + */ +const retry = exports.retry = core.retry; +/** + * Filters the value produced by this effect, retrying the transaction until + * the predicate returns `true` for the value. + * + * @since 2.0.0 + * @category mutations + */ +const retryUntil = exports.retryUntil = stm.retryUntil; +/** + * Filters the value produced by this effect, retrying the transaction while + * the predicate returns `true` for the value. + * + * @since 2.0.0 + * @category mutations + */ +const retryWhile = exports.retryWhile = stm.retryWhile; +/** + * Converts an option on values into an option on errors. + * + * @since 2.0.0 + * @category getters + */ +const some = exports.some = stm.some; +/** + * Returns an `STM` effect that succeeds with the specified value. + * + * @since 2.0.0 + * @category constructors + */ +const succeed = exports.succeed = core.succeed; +/** + * Returns an effect with the empty value. + * + * @since 2.0.0 + * @category constructors + */ +const succeedNone = exports.succeedNone = stm.succeedNone; +/** + * Returns an effect with the optional value. + * + * @since 2.0.0 + * @category constructors + */ +const succeedSome = exports.succeedSome = stm.succeedSome; +/** + * Summarizes a `STM` effect by computing a provided value before and after + * execution, and then combining the values to produce a summary, together + * with the result of execution. + * + * @since 2.0.0 + * @category mutations + */ +const summarized = exports.summarized = stm.summarized; +/** + * Suspends creation of the specified transaction lazily. + * + * @since 2.0.0 + * @category constructors + */ +const suspend = exports.suspend = stm.suspend; +/** + * Returns an `STM` effect that succeeds with the specified lazily evaluated + * value. + * + * @since 2.0.0 + * @category constructors + */ +const sync = exports.sync = core.sync; +/** + * "Peeks" at the success of transactional effect. + * + * @since 2.0.0 + * @category sequencing + */ +const tap = exports.tap = stm.tap; +/** + * "Peeks" at both sides of an transactional effect. + * + * @since 2.0.0 + * @category sequencing + */ +const tapBoth = exports.tapBoth = stm.tapBoth; +/** + * "Peeks" at the error of the transactional effect. + * + * @since 2.0.0 + * @category sequencing + */ +const tapError = exports.tapError = stm.tapError; +const try_ = exports.try = stm.try_; +/** + * The moral equivalent of `if (!p) exp` + * + * @since 2.0.0 + * @category mutations + */ +const unless = exports.unless = stm.unless; +/** + * The moral equivalent of `if (!p) exp` when `p` has side-effects + * + * @since 2.0.0 + * @category mutations + */ +const unlessSTM = exports.unlessSTM = stm.unlessSTM; +/** + * Converts an option on errors into an option on values. + * + * @since 2.0.0 + * @category getters + */ +const unsome = exports.unsome = stm.unsome; +const void_ = exports.void = stm.void; +/** + * Feeds elements of type `A` to `f` and accumulates all errors in error + * channel or successes in success channel. + * + * This combinator is lossy meaning that if there are errors all successes + * will be lost. To retain all information please use `STM.partition`. + * + * @since 2.0.0 + * @category mutations + */ +const validateAll = exports.validateAll = stm.validateAll; +/** + * Feeds elements of type `A` to `f` until it succeeds. Returns first success + * or the accumulation of all errors. + * + * @since 2.0.0 + * @category mutations + */ +const validateFirst = exports.validateFirst = stm.validateFirst; +/** + * The moral equivalent of `if (p) exp`. + * + * @since 2.0.0 + * @category mutations + */ +const when = exports.when = stm.when; +/** + * The moral equivalent of `if (p) exp` when `p` has side-effects. + * + * @since 2.0.0 + * @category mutations + */ +const whenSTM = exports.whenSTM = stm.whenSTM; +/** + * Sequentially zips this value with the specified one. + * + * @since 2.0.0 + * @category zipping + */ +const zip = exports.zip = core.zip; +/** + * Sequentially zips this value with the specified one, discarding the second + * element of the tuple. + * + * @since 2.0.0 + * @category zipping + */ +const zipLeft = exports.zipLeft = core.zipLeft; +/** + * Sequentially zips this value with the specified one, discarding the first + * element of the tuple. + * + * @since 2.0.0 + * @category zipping + */ +const zipRight = exports.zipRight = core.zipRight; +/** + * Sequentially zips this value with the specified one, combining the values + * using the specified combiner function. + * + * @since 2.0.0 + * @category zipping + */ +const zipWith = exports.zipWith = core.zipWith; +/** + * This function takes an iterable of `STM` values and returns a new + * `STM` value that represents the first `STM` value in the iterable + * that succeeds. If all of the `Effect` values in the iterable fail, then + * the resulting `STM` value will fail as well. + * + * This function is sequential, meaning that the `STM` values in the + * iterable will be executed in sequence, and the first one that succeeds + * will determine the outcome of the resulting `STM` value. + * + * Returns a new `STM` value that represents the first successful + * `STM` value in the iterable, or a failed `STM` value if all of the + * `STM` values in the iterable fail. + * + * @since 2.0.0 + * @category elements + */ +const firstSuccessOf = effects => suspend(() => { + const list = Chunk.fromIterable(effects); + if (!Chunk.isNonEmpty(list)) { + return dieSync(() => new Cause.IllegalArgumentException(`Received an empty collection of effects`)); + } + return Chunk.reduce(Chunk.tailNonEmpty(list), Chunk.headNonEmpty(list), (left, right) => orElse(left, () => right)); +}); +/** + * @category do notation + * @since 2.0.0 + */ +exports.firstSuccessOf = firstSuccessOf; +const Do = exports.Do = /*#__PURE__*/succeed({}); +/** + * @category do notation + * @since 2.0.0 + */ +const bind = exports.bind = stm.bind; +const let_ = exports.let = stm.let_; +/** + * @category do notation + * @since 2.0.0 + */ +const bindTo = exports.bindTo = stm.bindTo; +//# sourceMappingURL=STM.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/STM.js.map b/backend/node_modules/effect/dist/cjs/STM.js.map new file mode 100644 index 0000000000000000000000000000000000000000..59590d879cc79cc229d4338222969db44ad44b07 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/STM.js.map @@ -0,0 +1 @@ +{"version":3,"file":"STM.js","names":["Cause","_interopRequireWildcard","require","Chunk","core","stm","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","STMTypeId","exports","isSTM","acquireUseRelease","all","as","asSome","asSomeError","asVoid","attempt","catchAll","catchSome","catchTag","catchTags","check","collect","collectSTM","commit","commitEither","cond","context","contextWith","contextWithSTM","mapInputContext","die","dieMessage","dieSync","either","ensuring","eventually","every","exists","fail","failSync","fiberId","filter","filterNot","filterOrDie","filterOrDieMessage","filterOrElse","filterOrFail","flatMap","flatten","flip","flipWith","match","matchSTM","forEach","fromEither","fromOption","gen","head","if_","if","ignore","interrupt","interruptAs","isFailure","isSuccess","iterate","loop","map","mapAttempt","mapBoth","mapError","merge","mergeAll","negate","none","option","orDie","orDieWith","orElse","orElseEither","orElseFail","orElseOptional","orElseSucceed","orTry","partition","provideContext","provideSomeContext","provideService","provideServiceSTM","reduce","reduceAll","reduceRight","refineOrDie","refineOrDieWith","reject","rejectSTM","repeatUntil","repeatWhile","replicate","replicateSTM","replicateSTMDiscard","retry","retryUntil","retryWhile","some","succeed","succeedNone","succeedSome","summarized","suspend","sync","tap","tapBoth","tapError","try_","try","unless","unlessSTM","unsome","void_","void","validateAll","validateFirst","when","whenSTM","zip","zipLeft","zipRight","zipWith","firstSuccessOf","effects","list","fromIterable","isNonEmpty","IllegalArgumentException","tailNonEmpty","headNonEmpty","left","right","Do","bind","let_","let","bindTo"],"sources":["../../src/STM.ts"],"sourcesContent":[null],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAF,uBAAA,CAAAC,OAAA;AAOA,IAAAE,IAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,GAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAA4C,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,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,IAAI;AAEZ,MAAMC,IAAI,GAAAtI,OAAA,CAAAuI,GAAA,GAUN5J,GAAG,CAAC2J,IAAI;AAUZ;;;;AAIO,MAAME,MAAM,GAAAxI,OAAA,CAAAwI,MAAA,GAWf7J,GAAG,CAAC6J,MAAM","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Schedule.js b/backend/node_modules/effect/dist/cjs/Schedule.js new file mode 100644 index 0000000000000000000000000000000000000000..535a2148b1b5e87cd925c4196b529fd047ff006b --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Schedule.js @@ -0,0 +1,1603 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.zipRight = exports.zipLeft = exports.windowed = exports.whileOutputEffect = exports.whileOutput = exports.whileInputEffect = exports.whileInput = exports.upTo = exports.untilOutputEffect = exports.untilOutput = exports.untilInputEffect = exports.untilInput = exports.unionWith = exports.union = exports.unfold = exports.tapOutput = exports.tapInput = exports.sync = exports.succeed = exports.stop = exports.spaced = exports.secondOfMinute = exports.run = exports.resetWhen = exports.resetAfter = exports.repetitions = exports.repeatForever = exports.reduceEffect = exports.reduce = exports.recurs = exports.recurWhileEffect = exports.recurWhile = exports.recurUpTo = exports.recurUntilOption = exports.recurUntilEffect = exports.recurUntil = exports.provideService = exports.provideContext = exports.passthrough = exports.once = exports.onDecision = exports.modifyDelayEffect = exports.modifyDelay = exports.minuteOfHour = exports.mapInputEffect = exports.mapInputContext = exports.mapInput = exports.mapEffect = exports.mapBothEffect = exports.mapBoth = exports.map = exports.makeWithState = exports.linear = exports.jitteredWith = exports.jittered = exports.isSchedule = exports.intersectWith = exports.intersect = exports.identity = exports.hourOfDay = exports.fromFunction = exports.fromDelays = exports.fromDelay = exports.forever = exports.fixed = exports.fibonacci = exports.exponential = exports.ensuring = exports.elapsed = exports.eitherWith = exports.either = exports.duration = exports.driver = exports.delays = exports.delayedSchedule = exports.delayedEffect = exports.delayed = exports.dayOfWeek = exports.dayOfMonth = exports.cron = exports.count = exports.compose = exports.collectWhileEffect = exports.collectWhile = exports.collectUntilEffect = exports.collectUntil = exports.collectAllOutputs = exports.collectAllInputs = exports.checkEffect = exports.check = exports.bothInOut = exports.asVoid = exports.as = exports.andThenEither = exports.andThen = exports.addDelayEffect = exports.addDelay = exports.ScheduleTypeId = exports.ScheduleDriverTypeId = exports.CurrentIterationMetadata = void 0; +exports.zipWith = void 0; +var internal = _interopRequireWildcard(require("./internal/schedule.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category Symbols + */ +const ScheduleTypeId = exports.ScheduleTypeId = internal.ScheduleTypeId; +/** + * @since 2.0.0 + * @category Symbols + */ +const ScheduleDriverTypeId = exports.ScheduleDriverTypeId = internal.ScheduleDriverTypeId; +/** + * Creates a new schedule with a custom state and step function. + * + * **Details** + * + * This function constructs a `Schedule` by defining its initial state and a + * step function, which determines how the schedule progresses over time. The + * step function is called on each iteration with the current time, an input + * value, and the schedule's current state. It returns the next state, an output + * value, and a decision on whether the schedule should continue or stop. + * + * This function is useful for creating custom scheduling logic that goes beyond + * predefined schedules like fixed intervals or exponential backoff. It allows + * full control over how the schedule behaves at each step. + * + * @since 2.0.0 + * @category Constructors + */ +const makeWithState = exports.makeWithState = internal.makeWithState; +/** + * Checks whether a given value is a `Schedule`. + * + * @since 2.0.0 + * @category Guards + */ +const isSchedule = exports.isSchedule = internal.isSchedule; +/** + * Adds a delay to every interval in a schedule. + * + * **Details** + * + * This function modifies a given schedule by applying an additional delay to + * every interval it defines. The delay is determined by the provided function, + * which takes the schedule's output and returns a delay duration. + * + * @see {@link addDelayEffect} If you need to compute the delay using an effectful function. + * + * @since 2.0.0 + * @category Timing & Delay + */ +const addDelay = exports.addDelay = internal.addDelay; +/** + * Adds an effectfully computed delay to every interval in a schedule. + * + * **Details** + * + * This function modifies a given schedule by applying an additional delay to + * each interval, where the delay is determined by an effectful function. The + * function takes the schedule’s output and returns an effect that produces a + * delay duration. + * + * @see {@link addDelay} If you need to compute the delay using a pure function. + * + * @since 2.0.0 + * @category Timing & Delay + */ +const addDelayEffect = exports.addDelayEffect = internal.addDelayEffect; +/** + * Runs two schedules sequentially, merging their outputs. + * + * **Details** + * + * This function executes two schedules one after the other. The first schedule + * runs to completion, and then the second schedule begins execution. Unlike + * {@link andThenEither}, this function merges the outputs instead of wrapping + * them in `Either`, allowing both schedules to contribute their results + * directly. + * + * This is useful when a workflow consists of two phases where the second phase + * should start only after the first one has fully completed. + * + * @see {@link andThenEither} If you need to keep track of which schedule + * produced each result. + * + * @since 2.0.0 + * @category Sequential Composition + */ +const andThen = exports.andThen = internal.andThen; +/** + * Runs two schedules sequentially, collecting results in an `Either`. + * + * **Details** + * + * This function combines two schedules in sequence. The first schedule runs to + * completion, and then the second schedule starts and runs to completion as + * well. The outputs of both schedules are collected into an `Either` structure: + * - `Either.Left` contains the output of the second schedule. + * - `Either.Right` contains the output of the first schedule. + * + * This is useful when you need to switch from one schedule to another after the + * first one finishes, while still keeping track of which schedule produced each + * result. + * + * @see {@link andThen} If you need to merge the outputs of both schedules. + * + * @since 2.0.0 + * @category Sequential Composition + */ +const andThenEither = exports.andThenEither = internal.andThenEither; +/** + * Transforms a schedule to always produce a constant output. + * + * **Details** + * + * This function modifies a given schedule so that instead of returning its + * computed outputs, it always returns a constant value. + * + * This is useful when you need a schedule for timing but don’t care about its + * actual output, or when you want to standardize results across different + * scheduling strategies. + * + * @since 2.0.0 + * @category Mapping + */ +const as = exports.as = internal.as; +/** + * Transforms a schedule to always return `void` instead of its output. + * + * **Details** + * + * This function modifies a given schedule so that it no longer returns + * meaningful output—each execution produces `void`. This is useful when the + * schedule is used only for timing purposes and the actual output of the + * schedule is irrelevant. + * + * The schedule still determines when executions should occur, but the results + * are discarded. + * + * @since 2.0.0 + * @category Mapping + */ +const asVoid = exports.asVoid = internal.asVoid; +// TODO(4.0): rename to `zip`? +/** + * Combines two schedules, preserving both their inputs and outputs. + * + * **Details** + * + * This function merges two schedules so that both their input types and output + * types are retained. When executed, the resulting schedule will take inputs + * from both original schedules and produce a tuple containing both outputs. + * + * It recurs if either schedule wants to continue, using the shorter delay. + * + * This is useful when you want to track multiple schedules simultaneously, + * ensuring that both receive the same inputs and produce combined results. + * + * @since 2.0.0 + * @category Zipping + */ +const bothInOut = exports.bothInOut = internal.bothInOut; +/** + * Filters schedule executions based on a custom condition. + * + * **Details** + * + * This function modifies a schedule by applying a custom test function to each + * input-output pair. The test function determines whether the schedule should + * continue or stop. If the function returns `true`, the schedule proceeds as + * usual; if it returns `false`, the schedule terminates. + * + * This is useful for conditional retries, custom stop conditions, or + * dynamically controlling execution based on observed inputs and outputs. + * + * @see {@link checkEffect} If you need to use an effectful test function. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +const check = exports.check = internal.check; +/** + * Conditionally filters schedule executions using an effectful function. + * + * **Details** + * + * This function modifies a schedule by applying a custom effectful test + * function to each input-output pair. The test function determines whether the + * schedule should continue (`true`) or stop (`false`). + * + * This is useful when the decision to continue depends on external factors such + * as database lookups, API calls, or other asynchronous computations. + * + * @see {@link check} If you need to use a pure test function. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +const checkEffect = exports.checkEffect = internal.checkEffect; +/** + * A schedule that collects all inputs into a `Chunk`. + * + * **Details** + * + * This function creates a schedule that never terminates and continuously + * collects every input it receives into a `Chunk`. Each time the schedule runs, + * it appends the new input to the collected list. + * + * This is useful when you need to track all received inputs over time, such as + * logging user actions, recording retry attempts, or accumulating data for + * later processing. + * + * @see {@link collectAllOutputs} If you need to collect outputs instead of + * inputs. + * + * @since 2.0.0 + * @category Collecting + */ +const collectAllInputs = exports.collectAllInputs = internal.collectAllInputs; +/** + * Collects all outputs of a schedule into a `Chunk`. + * + * **Details** + * + * This function modifies a given schedule so that instead of returning + * individual outputs, it accumulates them into a `Chunk`. The schedule + * continues to run, appending each output to the collected list. + * + * This is useful when you need to track all results over time, such as logging + * outputs, aggregating data, or keeping a history of previous values. + * + * @see {@link collectAllInputs} If you need to collect inputs instead of + * outputs. + * + * @since 2.0.0 + * @category Collecting + */ +const collectAllOutputs = exports.collectAllOutputs = internal.collectAllOutputs; +/** + * Collects all inputs into a `Chunk` until a condition fails. + * + * **Details** + * + * This function creates a schedule that continuously collects inputs into a + * `Chunk` until the given predicate function `f` evaluates to `false`. Once the + * condition fails, the schedule stops. + * + * @since 2.0.0 + * @category Collecting + */ +const collectUntil = exports.collectUntil = internal.collectUntil; +/** + * Collects all inputs into a `Chunk` until an effectful condition fails. + * + * **Details** + * + * This function creates a schedule that continuously collects inputs into a + * `Chunk` until the given effectful predicate `f` returns `false`. The + * predicate runs as an effect, meaning it can involve asynchronous computations + * like API calls, database lookups, or randomness. + * + * @since 2.0.0 + * @category Collecting + */ +const collectUntilEffect = exports.collectUntilEffect = internal.collectUntilEffect; +/** + * Collects all inputs into a `Chunk` while a condition holds. + * + * **Details** + * + * This function creates a schedule that continuously collects inputs into a + * `Chunk` while the given predicate function `f` evaluates to `true`. As soon + * as the condition fails, the schedule stops. + * + * @since 2.0.0 + * @category Collecting + */ +const collectWhile = exports.collectWhile = internal.collectWhile; +/** + * Collects all inputs into a `Chunk` while an effectful condition holds. + * + * **Details** + * + * This function creates a schedule that continuously collects inputs into a + * `Chunk` while the given effectful predicate `f` returns `true`. The predicate + * returns an effect, meaning it can depend on external state, such as database + * queries, API responses, or real-time user conditions. + * + * As soon as the effectful condition returns `false`, the schedule stops. This + * is useful for dynamically controlled data collection, where stopping depends + * on an external or asynchronous factor. + * + * @since 2.0.0 + * @category Collecting + */ +const collectWhileEffect = exports.collectWhileEffect = internal.collectWhileEffect; +/** + * Chains two schedules, passing the output of the first as the input to the + * second, while selecting the shorter delay between them. + * + * **Details** + * + * This function composes two schedules so that the output of the first schedule + * becomes the input of the second schedule. The first schedule executes first, + * and once it produces a result, the second schedule receives that result and + * continues execution based on it. + * + * This is useful for building complex scheduling workflows where one schedule's + * behavior determines how the next schedule behaves. + * + * @since 2.0.0 + * @category Composition + */ +const compose = exports.compose = internal.compose; +/** + * Transforms the input type of a schedule. + * + * **Details** + * + * This function modifies a given schedule by applying a transformation function + * to its inputs. Instead of directly receiving values of type `In`, the + * schedule will now accept values of type `In2`, which are converted to `In` + * using the provided mapping function `f`. + * + * This is useful when you have a schedule that expects a specific input type + * but you need to adapt it to work with a different type. + * + * @see {@link mapInputEffect} If you need to use an effectful transformation function. + * + * @since 2.0.0 + * @category Mapping + */ +const mapInput = exports.mapInput = internal.mapInput; +/** + * Transforms the input type of a schedule using an effectful function. + * + * **Details** + * + * This function modifies a schedule by applying an effectful transformation to + * its inputs. Instead of directly receiving values of type `In`, the schedule + * will now accept values of type `In2`, which are converted to `In` via an + * effectful function `f`. + * + * This is useful when the input transformation involves external dependencies, + * such as API calls, database lookups, or other asynchronous computations. + * + * @see {@link mapInput} If you need to use a pure transformation function. + * + * @since 2.0.0 + * @category Mapping + */ +const mapInputEffect = exports.mapInputEffect = internal.mapInputEffect; +/** + * Transforms the required context of a schedule. + * + * **Details** + * + * This function modifies a schedule by mapping its required context (`R`) into + * a new context (`R0`) using the provided function `f`. + * + * This is useful when you need to adapt a schedule to work with a different + * dependency environment without changing its core logic. + * + * @since 2.0.0 + * @category Mapping + */ +const mapInputContext = exports.mapInputContext = internal.mapInputContext; +/** + * A schedule that recurs indefinitely, counting the number of recurrences. + * + * **Details** + * + * This schedule never stops and simply counts how many times it has executed. + * Each recurrence increases the count, starting from `0`. + * + * This is useful when tracking the number of attempts in retry policies, + * measuring execution loops, or implementing infinite polling scenarios. + * + * @since 2.0.0 + * @category Constructors + */ +const count = exports.count = internal.count; +/** + * Creates a schedule that recurs based on a cron expression. + * + * **Details** + * + * This schedule automatically executes at intervals defined by a cron + * expression. It triggers at the beginning of each matched interval and + * produces timestamps representing the start and end of the cron window. + * + * The cron `expression` is validated lazily, meaning errors may only be + * detected when the schedule is executed. + * + * @since 2.0.0 + * @category Cron + */ +const cron = exports.cron = internal.cron; +/** + * Cron-like schedule that recurs at a specific second of each minute. + * + * **Details** + * + * This schedule triggers at the specified `second` of each minute, + * starting at zero nanoseconds. It produces a count of executions + * (0, 1, 2, ...). The `second` parameter is validated lazily, meaning + * invalid values will only be caught at runtime. + * + * @since 2.0.0 + * @category Cron + */ +const secondOfMinute = exports.secondOfMinute = internal.secondOfMinute; +/** + * Creates a schedule that recurs every specified minute of each hour. + * + * **Details** + * + * This schedule triggers once per hour at the specified `minute`, starting + * exactly at `minute:00` (zero seconds). The schedule produces a count of + * executions (`0, 1, 2, ...`), representing how many times it has run. + * + * The `minute` parameter must be between `0` and `59`. It is validated lazily, + * meaning an invalid value will cause errors only when the schedule is + * executed. + * + * @since 2.0.0 + * @category Cron + */ +const minuteOfHour = exports.minuteOfHour = internal.minuteOfHour; +/** + * Creates a schedule that recurs at a specific hour of each day. + * + * **Details** + * + * This schedule triggers once per day at the specified `hour`, starting at zero + * minutes of that hour. The schedule produces a count of executions (`0, 1, 2, + * ...`), indicating how many times it has been triggered. + * + * The `hour` parameter must be between `0` (midnight) and `23` (11 PM). It is + * validated lazily, meaning an invalid value will cause errors only when the + * schedule is executed. + * + * This is useful for scheduling daily recurring tasks at a fixed time, such as + * running batch jobs or refreshing data. + * + * @since 2.0.0 + * @category Cron + */ +const hourOfDay = exports.hourOfDay = internal.hourOfDay; +/** + * Creates a schedule that recurs on a specific day of the month. + * + * **Details** + * + * This schedule triggers at midnight on the specified day of each month. It + * will not execute in months that have fewer days than the given day. For + * example, if the schedule is set to run on the 31st, it will not execute in + * months with only 30 days. + * + * The schedule produces a count of executions, starting at 0 and incrementing + * with each recurrence. + * + * The `day` parameter is validated lazily, meaning errors may only be detected + * when the schedule is executed. + * + * @since 2.0.0 + * @category Cron + */ +const dayOfMonth = exports.dayOfMonth = internal.dayOfMonth; +/** + * Creates a schedule that recurs on a specific day of the week. + * + * **Details** + * + * This schedule triggers at midnight on the specified day of the week. The + * `day` parameter follows the standard convention where `Monday = 1` and + * `Sunday = 7`. The schedule produces a count of executions, starting at 0 and + * incrementing with each recurrence. + * + * The `day` parameter is validated lazily, meaning errors may only be detected + * when the schedule is executed. + * + * @since 2.0.0 + * @category Cron + */ +const dayOfWeek = exports.dayOfWeek = internal.dayOfWeek; +/** + * Modifies a schedule by adding a computed delay before each execution. + * + * **Details** + * + * This function adjusts an existing schedule by applying a transformation to + * its delays. Instead of using the default interval, each delay is modified + * using the provided function `f`, which takes the current delay and returns a + * new delay. + * + * This is useful for dynamically adjusting wait times between executions, such + * as introducing jitter, exponential backoff, or custom delay logic. + * + * @see {@link delayedEffect} If you need to compute the delay using an effectful function. + * + * @since 2.0.0 + * @category Timing & Delay + */ +const delayed = exports.delayed = internal.delayed; +/** + * Modifies a schedule by adding an effectfully computed delay before each + * execution. + * + * **Details** + * + * This function adjusts an existing schedule by introducing a delay that is + * computed via an effect. Instead of using a fixed delay, each interval is + * dynamically adjusted based on an effectful function `f`, which takes the + * current delay and returns a new delay wrapped in an `Effect`. + * + * This is useful for adaptive scheduling where delays depend on external + * factors, such as API calls, database queries, or dynamic system conditions. + * + * @see {@link delayed} If you need to compute the delay using a pure function. + * + * @since 2.0.0 + * @category Timing & Delay + */ +const delayedEffect = exports.delayedEffect = internal.delayedEffect; +/** + * Uses the delays produced by a schedule to further delay its intervals. + * + * **Details** + * + * This function modifies a schedule by using its own output delays to control + * its execution timing. Instead of executing immediately at each interval, the + * schedule will be delayed by the duration it produces. + * + * @since 2.0.0 + * @category Timing & Delay + */ +const delayedSchedule = exports.delayedSchedule = internal.delayedSchedule; +/** + * Transforms a schedule to output the delay between each occurrence. + * + * **Details** + * + * This function modifies an existing schedule so that instead of producing its + * original output, it now returns the delay between each scheduled execution. + * + * @since 2.0.0 + * @category Monitoring + */ +const delays = exports.delays = internal.delays; +/** + * Transforms both the input and output of a schedule. + * + * **Details** + * + * This function modifies an existing schedule by applying a transformation to + * both its input values and its output values. The provided transformation + * functions `onInput` and `onOutput` allow you to map the schedule to work with + * a different input type while modifying its outputs as well. + * + * @see {@link mapBothEffect} If you need to use effectful transformation functions. + * + * @since 2.0.0 + * @category Mapping + */ +const mapBoth = exports.mapBoth = internal.mapBoth; +/** + * Transforms both the input and output of a schedule using effectful + * computations. + * + * **Details** + * + * This function modifies an existing schedule by applying effectful + * transformations to both its input values and its output values. The provided + * effectful functions `onInput` and `onOutput` allow you to transform inputs + * and outputs using computations that may involve additional logic, resource + * access, or side effects. + * + * @see {@link mapBoth} If you need to use pure transformation functions. + * + * @since 2.0.0 + * @category Mapping + */ +const mapBothEffect = exports.mapBothEffect = internal.mapBothEffect; +/** + * Creates a driver to manually control the execution of a schedule. + * + * **Details** + * + * This function returns a `ScheduleDriver`, which allows stepping through a + * schedule manually while handling delays and sleeping appropriately. A driver + * is useful when you need fine-grained control over how a schedule progresses, + * rather than relying on automatic execution. + * + * The returned driver exposes methods for retrieving the current state, + * executing the next step, and resetting the schedule when needed. + * + * @since 2.0.0 + * @category getter + */ +const driver = exports.driver = internal.driver; +// TODO(4.0): remove? +/** + * Alias of {@link fromDelay}. + * + * @since 2.0.0 + * @category Constructors + */ +const duration = exports.duration = internal.duration; +// TODO(4.0): remove? +/** + * Alias of {@link union}. + * + * @since 2.0.0 + * @category Alternatives + */ +const either = exports.either = internal.either; +// TODO(4.0): remove? +/** + * Alias of {@link unionWith}. + * + * @since 2.0.0 + * @category Alternatives + */ +const eitherWith = exports.eitherWith = internal.eitherWith; +/** + * Creates a schedule that tracks the total elapsed duration since it started. + * + * **Details** + * + * This schedule executes continuously and returns the total time that has + * passed since the first execution. The duration keeps increasing with each + * step, providing a way to measure elapsed time. + * + * This is useful for tracking execution time, monitoring delays, or + * implementing logic based on how long a process has been running. + * + * @since 2.0.0 + * @category Constructors + */ +const elapsed = exports.elapsed = internal.elapsed; +/** + * Attaches a finalizer to a schedule that runs when the schedule completes. + * + * **Details** + * + * This function returns a new schedule that executes a given finalizer when the + * schedule reaches completion. Unlike `Effect.ensuring`, this method does not + * guarantee the finalizer will run in all cases. If the schedule never + * initializes or is not driven to completion, the finalizer may not execute. + * However, if the schedule decides not to continue, the finalizer will be + * invoked. + * + * This is useful for cleaning up resources, logging, or executing other side + * effects when a schedule completes. + * + * @since 2.0.0 + * @category Finalization + */ +const ensuring = exports.ensuring = internal.ensuring; +/** + * Creates a schedule that recurs indefinitely with exponentially increasing + * delays. + * + * **Details** + * + * This schedule starts with an initial delay of `base` and increases the delay + * exponentially on each repetition using the formula `base * factor^n`, where + * `n` is the number of times the schedule has executed so far. If no `factor` + * is provided, it defaults to `2`, causing the delay to double after each + * execution. + * + * @since 2.0.0 + * @category Constructors + */ +const exponential = exports.exponential = internal.exponential; +/** + * Creates a schedule that recurs indefinitely with Fibonacci-based increasing + * delays. + * + * **Details** + * + * This schedule starts with an initial delay of `one` and increases subsequent + * delays by summing the two previous delays, following the Fibonacci sequence. + * The delay pattern follows: `one, one, one + one, (one + one) + one, ...`, + * resulting in `1s, 1s, 2s, 3s, 5s, 8s, 13s, ...` if `one = 1s`. + * + * This is useful for progressive backoff strategies, where delays grow + * naturally over time without increasing as aggressively as an exponential + * schedule. + * + * @since 2.0.0 + * @category Constructors + */ +const fibonacci = exports.fibonacci = internal.fibonacci; +/** + * Creates a schedule that recurs at a fixed interval. + * + * **Details** + * + * This schedule executes at regular, evenly spaced intervals, returning the + * number of times it has run so far. If the action being executed takes longer + * than the interval, the next execution will happen immediately to prevent + * "pile-ups," ensuring that the schedule remains consistent without overlapping + * executions. + * + * ```text + * |-----interval-----|-----interval-----|-----interval-----| + * |---------action--------||action|-----|action|-----------| + * ``` + * + * @see {@link spaced} If you need to run from the end of the last execution. + * + * @since 2.0.0 + * @category Constructors + */ +const fixed = exports.fixed = internal.fixed; +/** + * Creates a schedule that recurs indefinitely, producing a count of + * repetitions. + * + * **Details** + * + * This schedule runs indefinitely, returning an increasing count of executions + * (`0, 1, 2, 3, ...`). Each step increments the count by one, allowing tracking + * of how many times it has executed. + * + * @since 2.0.0 + * @category Constructors + */ +const forever = exports.forever = internal.forever; +/** + * Creates a schedule that recurs once after a specified duration. + * + * **Details** + * + * This schedule executes a single time after waiting for the given duration. + * Once it has executed, it does not repeat. + * + * @see {@link fromDelays} If you need to create a schedule with multiple delays. + * + * @since 2.0.0 + * @category Constructors + */ +const fromDelay = exports.fromDelay = internal.fromDelay; +/** + * Creates a schedule that recurs once for each specified duration, applying the + * given delays sequentially. + * + * **Details** + * + * This schedule executes multiple times, each time waiting for the + * corresponding duration from the provided list of delays. The first execution + * waits for `delay`, the next for the second value in `delays`, and so on. Once + * all delays have been used, the schedule stops executing. + * + * This is useful for defining a custom delay sequence that does not follow a + * fixed pattern like exponential or Fibonacci backoff. + * + * @since 2.0.0 + * @category Constructors + */ +const fromDelays = exports.fromDelays = internal.fromDelays; +/** + * Creates a schedule that always recurs, transforming input values using the + * specified function. + * + * **Details** + * + * This schedule continuously executes and applies the given function `f` to + * each input value, producing a transformed output. The schedule itself does + * not control delays or stopping conditions; it simply transforms the input + * values as they are processed. + * + * This is useful when defining schedules that map inputs to outputs, allowing + * dynamic transformations of incoming data. + * + * @since 2.0.0 + * @category Constructors + */ +const fromFunction = exports.fromFunction = internal.fromFunction; +/** + * Creates a schedule that always recurs, passing inputs directly as outputs. + * + * **Details** + * + * This schedule runs indefinitely, returning each input value as its output + * without modification. It effectively acts as a pass-through that simply + * echoes its input values at each step. + * + * @since 2.0.0 + * @category Constructors + */ +const identity = exports.identity = internal.identity; +/** + * Transforms a schedule to pass through its inputs as outputs. + * + * **Details** + * + * This function modifies an existing schedule so that it returns its input + * values instead of its original output values. The schedule's timing remains + * unchanged, but its outputs are replaced with whatever inputs it receives. + * + * @since 2.0.0 + */ +const passthrough = exports.passthrough = internal.passthrough; +/** + * Combines two schedules, continuing only if both schedules want to continue, + * using the longer delay. + * + * **Details** + * + * This function takes two schedules and creates a new schedule that only + * continues execution if both schedules allow it. The interval between + * recurrences is determined by the longer delay between the two schedules. + * + * The output of the resulting schedule is a tuple containing the outputs of + * both schedules. The input type is the intersection of both schedules' input + * types. + * + * This is useful when coordinating multiple scheduling conditions where + * execution should proceed only when both schedules permit it. + * + * @see {@link intersectWith} If you need to use a custom merge function. + * + * @since 2.0.0 + * @category Composition + */ +const intersect = exports.intersect = internal.intersect; +/** + * Combines two schedules, continuing only if both want to continue, merging + * intervals using a custom function. + * + * **Details** + * + * This function takes two schedules and creates a new schedule that only + * continues execution if both schedules allow it. Instead of automatically + * using the longer delay (like {@link intersect}), this function applies a + * user-provided merge function `f` to determine the next interval between + * executions. + * + * The output of the resulting schedule is a tuple containing the outputs of + * both schedules, and the input type is the intersection of both schedules' + * input types. + * + * @since 2.0.0 + * @category Composition + */ +const intersectWith = exports.intersectWith = internal.intersectWith; +/** + * Returns a new schedule that randomly adjusts the interval size within a + * range. + * + * **Details** + * + * This function modifies a schedule so that its delay between executions is + * randomly varied within a range. By default, the delay is adjusted between + * `80%` (`0.8 * interval`) and `120%` (`1.2 * interval`) of the original + * interval size. + * + * This is useful for adding randomness to repeated executions, reducing + * contention in distributed systems, and avoiding synchronized execution + * patterns that can cause bottlenecks. + * + * @see {@link jitteredWith} If you need to specify custom min/max values. + * + * @since 2.0.0 + * @category Timing & Delay + */ +const jittered = exports.jittered = internal.jittered; +/** + * Returns a new schedule that randomly adjusts the interval size within a + * user-defined range. + * + * **Details** + * + * This function modifies a schedule so that its delay between executions is + * randomly varied within a specified range. Instead of using the default `0.8 - + * 1.2` range like {@link jittered}, this function allows customizing the `min` + * and `max` multipliers. + * + * The delay for each step will be adjusted within `min * original_interval` and + * `max * original_interval`. If `min` and `max` are not provided, the defaults + * are `0.8` and `1.2`, respectively. + * + * This is useful for introducing randomness into scheduling behavior while + * having precise control over the jitter range. + * + * @since 2.0.0 + * @category Timing & Delay + */ +const jitteredWith = exports.jitteredWith = internal.jitteredWith; +/** + * Creates a schedule that recurs indefinitely, increasing the delay linearly. + * + * **Details** + * + * This schedule starts with an initial delay of `base` and increases the delay + * on each recurrence in a linear fashion, following the formula: + * + * `delay = base * n` + * + * where `n` is the number of times the schedule has executed so far. This + * results in increasing intervals between executions. + * + * This is useful for implementing linear backoff strategies where the wait time + * between retries increases at a steady rate. + * + * @since 2.0.0 + * @category Constructors + */ +const linear = exports.linear = internal.linear; +/** + * Returns a new schedule that transforms its output using the specified + * function. + * + * **Details** + * + * This function modifies an existing schedule so that its outputs are + * transformed by the provided function `f`. The timing and recurrence behavior + * of the schedule remain unchanged, but the values it produces are mapped to + * new values. + * + * This is useful when composing schedules where you need to adjust the output + * format or apply additional processing. + * + * @see {@link mapEffect} If you need to use an effectful transformation + * function. + * + * @since 2.0.0 + * @category Mapping + */ +const map = exports.map = internal.map; +/** + * Returns a new schedule that applies an effectful transformation to its + * output. + * + * **Details** + * + * This function modifies an existing schedule by applying an effectful function + * `f` to its output values. The timing and recurrence behavior of the schedule + * remain unchanged, but each output is mapped to a new value within an + * `Effect`. + * + * This is useful when you need to perform side effects or asynchronous + * transformations before passing the output forward. + * + * @see {@link map} If you need to use a pure transformation function. + * + * @since 2.0.0 + * @category Mapping + */ +const mapEffect = exports.mapEffect = internal.mapEffect; +/** + * Returns a new schedule that modifies the delay between executions using a + * custom function. + * + * **Details** + * + * This function transforms an existing schedule by applying `f` to modify the + * delay before each execution. The function receives both the schedule's output + * (`out`) and the originally computed delay (`duration`), and returns a new + * adjusted delay. + * + * @see {@link modifyDelayEffect} If you need to use an effectful function. + * + * @since 2.0.0 + * @category Timing & Delay + */ +const modifyDelay = exports.modifyDelay = internal.modifyDelay; +/** + * Returns a new schedule that modifies the delay before execution using an + * effectful function. + * + * **Details** + * + * This function takes an existing schedule and applies an effectful function + * `f` to dynamically adjust the delay before each execution. The function + * receives both the schedule's output (`out`) and the originally computed delay + * (`duration`), returning a new adjusted delay wrapped in an `Effect`. + * + * @see {@link modifyDelay} If you need to use a pure function. + * + * @since 2.0.0 + * @category Timing & Delay + */ +const modifyDelayEffect = exports.modifyDelayEffect = internal.modifyDelayEffect; +/** + * Returns a new schedule that executes an effect every time the schedule makes + * a decision. + * + * **Details** + * + * This function enhances an existing schedule by running an effectful function + * `f` whenever a scheduling decision is made. The function receives the current + * schedule output (`out`) and the decision (`ScheduleDecision`), allowing + * additional logic to be executed, such as logging, monitoring, or side + * effects. + * + * @since 2.0.0 + */ +const onDecision = exports.onDecision = internal.onDecision; +/** + * A schedule that executes only once and then stops. + * + * **Details** + * + * This schedule triggers a single execution and then terminates. It does not + * repeat or apply any additional logic. + * + * @since 2.0.0 + * @category Constructors + */ +const once = exports.once = internal.once; +/** + * Returns a new schedule with a provided context, eliminating the need for + * external dependencies. + * + * **Details** + * + * This function supplies a required `context` to a schedule, allowing it to run + * without requiring external dependencies. After calling this function, the + * schedule can be used freely without needing to pass a context at execution + * time. + * + * This is useful when working with schedules that rely on contextual + * information, such as logging services, database connections, or configuration + * settings. + * + * @since 2.0.0 + * @category Context + */ +const provideContext = exports.provideContext = internal.provideContext; +/** + * Returns a new schedule with a single required service provided, eliminating + * the need for external dependencies. + * + * **Details** + * + * This function supplies a single service dependency to a schedule, allowing it + * to run without requiring that service externally. If a schedule depends on + * multiple services, consider using `provideContext` instead. + * + * This is useful when working with schedules that require a specific service, + * such as logging, metrics, or configuration retrieval. + * + * @since 2.0.0 + * @category Context + */ +const provideService = exports.provideService = internal.provideService; +/** + * A schedule that recurs until the given predicate evaluates to true. + * + * **Details** + * + * This schedule will continue executing as long as the provided predicate `f` + * returns `false` for the input value. Once `f` evaluates to `true`, the + * schedule stops recurring. + * + * This is useful for defining schedules that should stop when a certain + * condition is met, such as detecting a success state, reaching a threshold, or + * avoiding unnecessary retries. + * + * @see {@link recurUntilEffect} If you need to use an effectful predicate. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +const recurUntil = exports.recurUntil = internal.recurUntil; +/** + * A schedule that recurs until the given effectful predicate evaluates to true. + * + * **Details** + * + * This schedule continues executing as long as the provided effectful predicate + * `f` returns `false`. Once `f` evaluates to `true`, the schedule stops + * recurring. Unlike {@link recurUntil}, this function allows the stopping + * condition to be computed asynchronously or based on external dependencies. + * + * This is useful when the stopping condition depends on an effectful + * computation, such as checking a database, making an API call, or retrieving + * system state dynamically. + * + * @see {@link recurUntil} If you need to use a pure predicate. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +const recurUntilEffect = exports.recurUntilEffect = internal.recurUntilEffect; +/** + * A schedule that recurs until the input value matches a partial function, then + * maps the value. + * + * **Details** + * + * This schedule continues executing until the provided partial function `pf` + * returns `Some(value)`. At that point, it stops and maps the resulting value + * to an `Option`. If `pf` returns `None`, the schedule continues. + * + * This is useful when defining schedules that should stop once a certain + * condition is met and transform the final value before completion. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +const recurUntilOption = exports.recurUntilOption = internal.recurUntilOption; +/** + * A schedule that recurs until the specified duration has elapsed. + * + * **Details** + * + * This schedule continues executing for the given `duration`, after which it + * stops. The schedule outputs the elapsed time on each recurrence. + * + * This is useful for limiting the duration of retries, enforcing time-based + * constraints, or ensuring that an operation does not run indefinitely. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +const recurUpTo = exports.recurUpTo = internal.recurUpTo; +/** + * A schedule that recurs as long as the given predicate evaluates to true. + * + * **Details* + * + * This schedule continues executing as long as the provided predicate `f` + * returns `true` for the input value. Once `f` evaluates to `false`, the + * schedule stops recurring. + * + * @see {@link recurWhileEffect} If you need to use an effectful predicate. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +const recurWhile = exports.recurWhile = internal.recurWhile; +/** + * A schedule that recurs as long as the given effectful predicate evaluates to + * true. + * + * **Details** + * + * This schedule continues executing as long as the provided effectful predicate + * `f` returns `true`. Once `f` evaluates to `false`, the schedule stops + * recurring. Unlike {@link recurWhile}, this function allows the condition to + * be computed dynamically using an effectful computation. + * + * @see {@link recurWhile} If you need to use a pure predicate. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +const recurWhileEffect = exports.recurWhileEffect = internal.recurWhileEffect; +/** + * A schedule that recurs a fixed number of times before terminating. + * + * **Details** + * + * This schedule will continue executing until it has been stepped `n` times, + * after which it will stop. The output of the schedule is the current count of + * recurrences. + * + * @category Constructors + * @since 2.0.0 + */ +const recurs = exports.recurs = internal.recurs; +/** + * Returns a new schedule that folds over the outputs of this one. + * + * **Details** + * + * This schedule transforms the output by accumulating values over time using a + * reducer function `f`. It starts with an initial value `zero` and updates it + * each time the schedule produces an output. + * + * This is useful for tracking statistics, aggregating results, or summarizing + * data across multiple executions. + * + * @see {@link reduceEffect} If you need to use an effectful reducer function. + * + * @since 2.0.0 + * @category Reducing + */ +const reduce = exports.reduce = internal.reduce; +/** + * Returns a new schedule that effectfully folds over the outputs of this one. + * + * **Details** + * + * This schedule accumulates outputs over time using an effectful reducer + * function `f`. It starts with an initial value `zero` and updates it + * asynchronously or based on external dependencies. + * + * This is useful for asynchronous state tracking, logging, external metrics + * aggregation, or any scenario where accumulation needs to involve an effectful + * computation. + * + * @see {@link reduce} If you need to use a pure reducer function. + * + * @since 2.0.0 + * @category Reducing + */ +const reduceEffect = exports.reduceEffect = internal.reduceEffect; +// TODO(4.0): remove? +/** + * Alias of {@link forever}. + * + * @since 2.0.0 + * @category Constructors + */ +const repeatForever = exports.repeatForever = internal.forever; +/** + * Returns a new schedule that outputs the number of repetitions of this one. + * + * **Details** + * + * This schedule tracks how many times the given schedule has executed and + * outputs the count instead of the original values. The first execution starts + * at `0`, and the count increases with each recurrence. + * + * @since 2.0.0 + * @category Monitoring + */ +const repetitions = exports.repetitions = internal.repetitions; +/** + * Returns a new schedule that automatically resets to its initial state after a + * period of inactivity defined by `duration`. + * + * **Details** + * + * This function modifies a schedule so that if no inputs are received for the + * specified `duration`, the schedule resets as if it were new. + * + * @see {@link resetWhen} If you need to reset based on output values. + * + * @since 2.0.0 + * @category State Management + */ +const resetAfter = exports.resetAfter = internal.resetAfter; +/** + * Resets the schedule when the specified predicate on the schedule output + * evaluates to `true`. + * + * **Details** + * + * This function modifies a schedule so that it resets to its initial state + * whenever the provided predicate `f` returns `true` for an output value. + * + * @see {@link resetAfter} If you need to reset based on inactivity. + * + * @since 2.0.0 + * @category State Management + */ +const resetWhen = exports.resetWhen = internal.resetWhen; +/** + * Runs a schedule using the provided inputs and collects all outputs. + * + * **Details** + * + * This function executes a given schedule with a sequence of input values and + * accumulates all outputs into a `Chunk`. The schedule starts execution at the + * specified `now` timestamp and proceeds according to its defined behavior. + * + * This is useful for batch processing, simulating execution, or testing + * schedules with predefined input sequences. + * + * @since 2.0.0 + * @category Execution + */ +const run = exports.run = internal.run; +/** + * Returns a schedule that recurs continuously, with each repetition + * spaced by the specified `duration` from the last run. + * + * **Details** + * + * This schedule ensures that executions occur at a fixed interval, + * maintaining a consistent delay between repetitions. The delay starts + * from the end of the last execution, not from the schedule start time. + * + * @see {@link fixed} If you need to run at a fixed interval from the start. + * + * @since 2.0.0 + * @category Constructors + */ +const spaced = exports.spaced = internal.spaced; +/** + * A schedule that does not recur and stops immediately. + * + * @since 2.0.0 + * @category Constructors + */ +const stop = exports.stop = internal.stop; +/** + * Returns a schedule that recurs indefinitely, always producing the specified + * constant value. + * + * @since 2.0.0 + * @category Constructors + */ +const succeed = exports.succeed = internal.succeed; +/** + * Returns a schedule that recurs indefinitely, evaluating the given function to + * produce a constant value. + * + * @category Constructors + * @since 2.0.0 + */ +const sync = exports.sync = internal.sync; +/** + * Returns a new schedule that runs the given effectful function for each input + * before continuing execution. + * + * **Details** + * + * This function allows side effects to be performed on each input processed by + * the schedule. It does not modify the schedule’s behavior but ensures that the + * provided function `f` runs before each step. + * + * @since 2.0.0 + * @category Tapping + */ +const tapInput = exports.tapInput = internal.tapInput; +/** + * Returns a new schedule that runs the given effectful function for each output + * before continuing execution. + * + * **Details** + * + * This function allows side effects to be performed on each output produced by + * the schedule. It does not modify the schedule’s behavior but ensures that the + * provided function `f` runs after each step. + * + * @since 2.0.0 + * @category Tapping + */ +const tapOutput = exports.tapOutput = internal.tapOutput; +/** + * Creates a schedule that repeatedly applies a function to transform a state + * value, producing a sequence of values. + * + * **Details** + * + * This function starts with an `initial` value and applies `f` recursively to + * generate the next state at each step. The schedule continues indefinitely, + * producing a stream of values by unfolding the state over time. + * + * @since 2.0.0 + * @category Constructors + */ +const unfold = exports.unfold = internal.unfold; +/** + * Combines two schedules, continuing execution as long as at least one of them + * allows it, using the shorter delay. + * + * **Details** + * + * This function combines two schedules into a single schedule that executes in + * parallel. If either schedule allows continuation, the merged schedule + * continues. When both schedules produce delays, the schedule selects the + * shorter delay to determine the next step. + * + * The output of the new schedule is a tuple containing the outputs of both + * schedules. The input type is the intersection of both schedules' input types. + * + * This is useful for scenarios where multiple scheduling conditions should be + * considered, ensuring execution proceeds if at least one schedule permits it. + * + * @see {@link unionWith} If you need to use a custom merge function. + * + * @since 2.0.0 + * @category Composition + */ +const union = exports.union = internal.union; +/** + * Combines two schedules, continuing execution as long as at least one of them + * wants to continue, merging their intervals using a custom merge function. + * + * **Details** + * + * This function allows you to combine two schedules while defining how their + * intervals should be merged. Unlike {@link union}, which simply selects the + * shorter delay, this function lets you specify a custom merging strategy for + * the schedules’ intervals. + * + * The merged schedule continues execution as long as at least one of the input + * schedules allows it. The next interval is determined by applying the provided + * merge function to the intervals of both schedules. + * + * The output of the resulting schedule is a tuple containing the outputs of + * both schedules. The input type is the intersection of both schedules' input + * types. + * + * @see {@link union} If you need to use the shorter delay. + * + * @since 2.0.0 + * @category Composition + */ +const unionWith = exports.unionWith = internal.unionWith; +/** + * Returns a new schedule that stops execution when the given predicate on the + * input evaluates to `true`. + * + * **Details** + * + * This function modifies an existing schedule so that it continues executing + * only while the provided predicate returns `false` for incoming inputs. Once + * an input satisfies the condition, the schedule terminates immediately. + * + * @see {@link untilInputEffect} If you need to use an effectful predicate. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +const untilInput = exports.untilInput = internal.untilInput; +/** + * Returns a new schedule that stops execution when the given effectful + * predicate on the input evaluates to `true`. + * + * **Details** + * + * This function modifies an existing schedule so that it continues executing + * only while the provided effectful predicate returns `false` for incoming + * inputs. The predicate is an `Effect`, meaning it can involve asynchronous + * computations or dependency-based logic. + * + * @see {@link untilInput} If you need to use a pure predicate. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +const untilInputEffect = exports.untilInputEffect = internal.untilInputEffect; +/** + * Returns a new schedule that stops execution when the given predicate on the + * output evaluates to `true`. + * + * **Details** + * + * This function modifies an existing schedule so that it only continues + * executing while the given predicate returns false for its output values. Once + * the predicate evaluates to `true`, execution stops. + * + * The output of the resulting schedule remains the same, but its duration is + * now constrained by a stopping condition based on its own output. + * + * @see {@link untilOutputEffect} If you need to use an effectful predicate. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +const untilOutput = exports.untilOutput = internal.untilOutput; +/** + * Returns a new schedule that stops execution when the given effectful + * predicate on the output evaluates to `true`. + * + * **Details** + * + * This function modifies an existing schedule so that it only continues + * executing while the provided effectful predicate returns `false` for its + * output values. Once the predicate returns `true`, execution stops. + * + * @see {@link untilOutput} If you need to use a pure predicate. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +const untilOutputEffect = exports.untilOutputEffect = internal.untilOutputEffect; +/** + * Returns a new schedule that limits execution to a fixed duration. + * + * **Details** + * + * This function modifies an existing schedule to stop execution after a + * specified duration has passed. The schedule continues as normal until the + * duration is reached, at which point it stops automatically. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +const upTo = exports.upTo = internal.upTo; +/** + * Returns a new schedule that continues execution as long as the given + * predicate on the input is true. + * + * **Details** + * + * This function modifies an existing schedule so that it only continues + * execution while a specified predicate holds true for its input. If the + * predicate evaluates to `false` at any step, the schedule stops. + * + * @see {@link whileInputEffect} If you need to use an effectful predicate. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +const whileInput = exports.whileInput = internal.whileInput; +/** + * Returns a new schedule that continues execution for as long as the given + * effectful predicate on the input evaluates to `true`. + * + * **Details** + * + * This function modifies an existing schedule so that it only continues + * execution while an effectful predicate holds true for its input. If the + * predicate evaluates to `false` at any step, the schedule stops. + * + * @see {@link whileInput} If you need to use a pure predicate. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +const whileInputEffect = exports.whileInputEffect = internal.whileInputEffect; +/** + * Returns a new schedule that continues execution for as long as the given + * predicate on the output evaluates to `true`. + * + * **Details** + * + * This function modifies an existing schedule so that it only continues + * execution while a provided condition holds true for its output. If the + * predicate returns `false`, the schedule stops. + * + * @see {@link whileOutputEffect} If you need to use an effectful predicate. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +const whileOutput = exports.whileOutput = internal.whileOutput; +/** + * Returns a new schedule that continues execution for as long as the given + * effectful predicate on the output evaluates to `true`. + * + * **Details** + * + * This function modifies an existing schedule so that it only continues + * execution while an effectful condition holds true for its output. If the + * effectful predicate returns `false`, the schedule stops. + * + * @see {@link whileOutput} If you need to use a pure predicate. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +const whileOutputEffect = exports.whileOutputEffect = internal.whileOutputEffect; +/** + * Creates a schedule that divides time into fixed `interval`-long windows, + * triggering execution at the start of each new window. + * + * **Details** + * + * This function produces a schedule that waits until the next time window + * boundary before executing. Each window spans a fixed duration specified by + * `interval`. If an action completes midway through a window, the schedule + * waits until the next full window starts before proceeding. + * + * For example, `windowed(Duration.seconds(10))` would produce a schedule as + * follows: + * + * ```text + * 10s 10s 10s 10s + * |----------|----------|----------|----------| + * |action------|sleep---|act|-sleep|action----| + * ``` + * + * @since 2.0.0 + * @category Constructors + */ +const windowed = exports.windowed = internal.windowed; +/** + * The same as {@link intersect} but ignores the right output. + * + * @since 2.0.0 + * @category Composition + */ +const zipLeft = exports.zipLeft = internal.zipLeft; +/** + * The same as {@link intersect} but ignores the left output. + * + * @since 2.0.0 + * @category Composition + */ +const zipRight = exports.zipRight = internal.zipRight; +/** + * Equivalent to {@link intersect} followed by {@link map}. + * + * @since 2.0.0 + * @category Composition + */ +const zipWith = exports.zipWith = internal.zipWith; +/** + * @since 3.15.0 + * @category models + */ +const CurrentIterationMetadata = exports.CurrentIterationMetadata = internal.CurrentIterationMetadata; +//# sourceMappingURL=Schedule.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Schedule.js.map b/backend/node_modules/effect/dist/cjs/Schedule.js.map new file mode 100644 index 0000000000000000000000000000000000000000..3ae3e1cc1dae3ac6f84c84042baaf9cc2fb51c04 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Schedule.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Schedule.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ScheduleTypeId","exports","ScheduleDriverTypeId","makeWithState","isSchedule","addDelay","addDelayEffect","andThen","andThenEither","as","asVoid","bothInOut","check","checkEffect","collectAllInputs","collectAllOutputs","collectUntil","collectUntilEffect","collectWhile","collectWhileEffect","compose","mapInput","mapInputEffect","mapInputContext","count","cron","secondOfMinute","minuteOfHour","hourOfDay","dayOfMonth","dayOfWeek","delayed","delayedEffect","delayedSchedule","delays","mapBoth","mapBothEffect","driver","duration","either","eitherWith","elapsed","ensuring","exponential","fibonacci","fixed","forever","fromDelay","fromDelays","fromFunction","identity","passthrough","intersect","intersectWith","jittered","jitteredWith","linear","map","mapEffect","modifyDelay","modifyDelayEffect","onDecision","once","provideContext","provideService","recurUntil","recurUntilEffect","recurUntilOption","recurUpTo","recurWhile","recurWhileEffect","recurs","reduce","reduceEffect","repeatForever","repetitions","resetAfter","resetWhen","run","spaced","stop","succeed","sync","tapInput","tapOutput","unfold","union","unionWith","untilInput","untilInputEffect","untilOutput","untilOutputEffect","upTo","whileInput","whileInputEffect","whileOutput","whileOutputEffect","windowed","zipLeft","zipRight","zipWith","CurrentIterationMetadata"],"sources":["../../src/Schedule.ts"],"sourcesContent":[null],"mappings":";;;;;;;AAYA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAkD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AASlD;;;;AAIO,MAAMkB,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAkBtB,QAAQ,CAACsB,cAAc;AAQ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AA,CAAA+F,iBAAA,GAoC1BtH,QAAQ,CAACsH,iBAAiB;AAE9B;;;;;;;;;;;;;;;;;;;;;;;AAuBO,MAAMC,QAAQ,GAAAhG,OAAA,CAAAgG,QAAA,GAA2DvH,QAAQ,CAACuH,QAAQ;AAEjG;;;;;;AAMO,MAAMC,OAAO,GAAAjG,OAAA,CAAAiG,OAAA,GAehBxH,QAAQ,CAACwH,OAAO;AAEpB;;;;;;AAMO,MAAMC,QAAQ,GAAAlG,OAAA,CAAAkG,QAAA,GAejBzH,QAAQ,CAACyH,QAAQ;AAErB;;;;;;AAMO,MAAMC,OAAO,GAAAnG,OAAA,CAAAmG,OAAA,GAmBhB1H,QAAQ,CAAC0H,OAAO;AAwBpB;;;;AAIO,MAAMC,wBAAwB,GAAApG,OAAA,CAAAoG,wBAAA,GAGjC3H,QAAQ,CAAC2H,wBAAwB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/ScheduleDecision.js b/backend/node_modules/effect/dist/cjs/ScheduleDecision.js new file mode 100644 index 0000000000000000000000000000000000000000..6ca00334ce9fe6d5b33a33769ff1778b0e1704fe --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/ScheduleDecision.js @@ -0,0 +1,34 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isDone = exports.isContinue = exports.done = exports.continueWith = exports.continue = void 0; +var internal = _interopRequireWildcard(require("./internal/schedule/decision.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +const _continue = exports.continue = internal._continue; +/** + * @since 2.0.0 + * @category constructors + */ +const continueWith = exports.continueWith = internal.continueWith; +/** + * @since 2.0.0 + * @category constructors + */ +const done = exports.done = internal.done; +/** + * @since 2.0.0 + * @category refinements + */ +const isContinue = exports.isContinue = internal.isContinue; +/** + * @since 2.0.0 + * @category refinements + */ +const isDone = exports.isDone = internal.isDone; +//# sourceMappingURL=ScheduleDecision.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/ScheduleDecision.js.map b/backend/node_modules/effect/dist/cjs/ScheduleDecision.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d03ac19a59aa90fa2b74d69d4536d907c95f6b46 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/ScheduleDecision.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ScheduleDecision.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_continue","exports","continue","continueWith","done","isContinue","isDone"],"sources":["../../src/ScheduleDecision.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA2D,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAH3D;;;;AA8BA,MAAMkB,SAAS,GAAAC,OAAA,CAAAC,QAAA,GAAGxB,QAAQ,CAACsB,SAAS;AASpC;;;;AAIO,MAAMG,YAAY,GAAAF,OAAA,CAAAE,YAAA,GAAsDzB,QAAQ,CAACyB,YAAY;AAEpG;;;;AAIO,MAAMC,IAAI,GAAAH,OAAA,CAAAG,IAAA,GAAqB1B,QAAQ,CAAC0B,IAAI;AAEnD;;;;AAIO,MAAMC,UAAU,GAAAJ,OAAA,CAAAI,UAAA,GAAiD3B,QAAQ,CAAC2B,UAAU;AAE3F;;;;AAIO,MAAMC,MAAM,GAAAL,OAAA,CAAAK,MAAA,GAA6C5B,QAAQ,CAAC4B,MAAM","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/ScheduleInterval.js b/backend/node_modules/effect/dist/cjs/ScheduleInterval.js new file mode 100644 index 0000000000000000000000000000000000000000..371ec7038c1709d4919926b9798b4dffb41d1eba --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/ScheduleInterval.js @@ -0,0 +1,107 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.union = exports.size = exports.min = exports.max = exports.make = exports.lessThan = exports.isNonEmpty = exports.isEmpty = exports.intersect = exports.empty = exports.before = exports.after = exports.IntervalTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/schedule/interval.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const IntervalTypeId = exports.IntervalTypeId = internal.IntervalTypeId; +/** + * Constructs a new interval from the two specified endpoints. If the start + * endpoint greater than the end endpoint, then a zero size interval will be + * returned. + * + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * An `Interval` of zero-width. + * + * @since 2.0.0 + * @category constructors + */ +const empty = exports.empty = internal.empty; +/** + * Returns `true` if this `Interval` is less than `that` interval, `false` + * otherwise. + * + * @since 2.0.0 + * @category ordering + */ +const lessThan = exports.lessThan = internal.lessThan; +/** + * Returns the minimum of two `Interval`s. + * + * @since 2.0.0 + * @category ordering + */ +const min = exports.min = internal.min; +/** + * Returns the maximum of two `Interval`s. + * + * @since 2.0.0 + * @category ordering + */ +const max = exports.max = internal.max; +/** + * Returns `true` if the specified `Interval` is empty, `false` otherwise. + * + * @since 2.0.0 + * @category ordering + */ +const isEmpty = exports.isEmpty = internal.isEmpty; +/** + * Returns `true` if the specified `Interval` is non-empty, `false` otherwise. + * + * @since 2.0.0 + * @category ordering + */ +const isNonEmpty = exports.isNonEmpty = internal.isNonEmpty; +/** + * Computes a new `Interval` which is the intersection of this `Interval` and + * that `Interval`. + * + * @since 2.0.0 + * @category ordering + */ +const intersect = exports.intersect = internal.intersect; +/** + * Calculates the size of the `Interval` as the `Duration` from the start of the + * interval to the end of the interval. + * + * @since 2.0.0 + * @category getters + */ +const size = exports.size = internal.size; +/** + * Computes a new `Interval` which is the union of this `Interval` and that + * `Interval` as a `Some`, otherwise returns `None` if the two intervals cannot + * form a union. + * + * @since 2.0.0 + * @category utils + */ +const union = exports.union = internal.union; +/** + * Construct an `Interval` that includes all time equal to and after the + * specified start time. + * + * @since 2.0.0 + * @category constructors + */ +const after = exports.after = internal.after; +/** + * Construct an `Interval` that includes all time equal to and before the + * specified end time. + * + * @category constructors + * @since 2.0.0 + */ +const before = exports.before = internal.before; +//# sourceMappingURL=ScheduleInterval.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/ScheduleInterval.js.map b/backend/node_modules/effect/dist/cjs/ScheduleInterval.js.map new file mode 100644 index 0000000000000000000000000000000000000000..6a7aaa20a8ac783e37b60794727f08f945f699b0 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/ScheduleInterval.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ScheduleInterval.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","IntervalTypeId","exports","make","empty","lessThan","min","max","isEmpty","isNonEmpty","intersect","size","union","after","before"],"sources":["../../src/ScheduleInterval.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA2D,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAA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AAG;AAEhB;;;;;;AAMO,MAAMC,OAAO,GAAAN,OAAA,CAAAM,OAAA,GAAgC7B,QAAQ,CAAC6B,OAAO;AAEpE;;;;;;AAMO,MAAMC,UAAU,GAAAP,OAAA,CAAAO,UAAA,GAAgC9B,QAAQ,CAAC8B,UAAU;AAE1E;;;;;;;AAOO,MAAMC,SAAS,GAAAR,OAAA,CAAAQ,SAAA,GAiBlB/B,QAAQ,CAAC+B,SAAS;AAEtB;;;;;;;AAOO,MAAMC,IAAI,GAAAT,OAAA,CAAAS,IAAA,GAA0ChC,QAAQ,CAACgC,IAAI;AAExE;;;;;;;;AAQO,MAAMC,KAAK,GAAAV,OAAA,CAAAU,KAAA,GAmBdjC,QAAQ,CAACiC,KAAK;AAElB;;;;;;;AAOO,MAAMC,KAAK,GAAAX,OAAA,CAAAW,KAAA,GAA4ClC,QAAQ,CAACkC,KAAK;AAE5E;;;;;;;AAOO,MAAMC,MAAM,GAAAZ,OAAA,CAAAY,MAAA,GAA0CnC,QAAQ,CAACmC,MAAM","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/ScheduleIntervals.js.map b/backend/node_modules/effect/dist/cjs/ScheduleIntervals.js.map new file mode 100644 index 0000000000000000000000000000000000000000..be89876f821e8c43e378f6366d06fa20ab128788 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/ScheduleIntervals.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ScheduleIntervals.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","IntervalsTypeId","exports","make","empty","fromIterable","union","intersect","start","end","lessThan","isNonEmpty","max"],"sources":["../../src/ScheduleIntervals.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA4D,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAA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AAC0B,YAAY;AAExG;;;;;;AAMO,MAAMC,KAAK,GAAAJ,OAAA,CAAAI,KAAA,GAed3B,QAAQ,CAAC2B,KAAK;AAElB;;;;;;AAMO,MAAMC,SAAS,GAAAL,OAAA,CAAAK,SAAA,GAelB5B,QAAQ,CAAC4B,SAAS;AAEtB;;;;;;AAMO,MAAMC,KAAK,GAAAN,OAAA,CAAAM,KAAA,GAAgC7B,QAAQ,CAAC6B,KAAK;AAEhE;;;;;;AAMO,MAAMC,GAAG,GAAAP,OAAA,CAAAO,GAAA,GAAgC9B,QAAQ,CAAC8B,GAAG;AAE5D;;;;;;;AAOO,MAAMC,QAAQ,GAAAR,OAAA,CAAAQ,QAAA,GAiBjB/B,QAAQ,CAAC+B,QAAQ;AAErB;;;;;;AAMO,MAAMC,UAAU,GAAAT,OAAA,CAAAS,UAAA,GAAiChC,QAAQ,CAACgC,UAAU;AAE3E;;;;;;AAMO,MAAMC,GAAG,GAAAV,OAAA,CAAAU,GAAA,GAeZjC,QAAQ,CAACiC,GAAG","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Scheduler.js b/backend/node_modules/effect/dist/cjs/Scheduler.js new file mode 100644 index 0000000000000000000000000000000000000000..db8d9d1631d880e191d5468e1ded9bb5ab1f4e79 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Scheduler.js @@ -0,0 +1,308 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.withScheduler = exports.timerBatched = exports.timer = exports.makeMatrix = exports.makeBatched = exports.make = exports.defaultShouldYield = exports.defaultScheduler = exports.currentScheduler = exports.SyncScheduler = exports.SchedulerRunner = exports.PriorityBuckets = exports.MixedScheduler = exports.ControlledScheduler = void 0; +var _Function = require("./Function.js"); +var _GlobalValue = require("./GlobalValue.js"); +var core = _interopRequireWildcard(require("./internal/core.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * @since 3.20.0 + * @category models + */ +class SchedulerRunner { + scheduleDrain; + running = false; + tasks = /*#__PURE__*/new PriorityBuckets(); + constructor(scheduleDrain) { + this.scheduleDrain = scheduleDrain; + } + starveInternal = depth => { + const tasks = this.tasks.buckets; + this.tasks.buckets = []; + for (const [_, toRun] of tasks) { + for (let i = 0; i < toRun.length; i++) { + toRun[i](); + } + } + if (this.tasks.buckets.length === 0) { + this.running = false; + } else { + this.starve(depth); + } + }; + starve(depth = 0) { + this.scheduleDrain(depth, this.starveInternal); + } + scheduleTask(task, priority) { + this.tasks.scheduleTask(task, priority); + if (!this.running) { + this.running = true; + this.starve(); + } + } + /** + * @since 3.20.0 + * @category constructors + */ + static cached(scheduleDrain) { + const fallback = new SchedulerRunner(scheduleDrain); + const runners = new WeakMap(); + return fiber => { + if (fiber === undefined) { + return fallback; + } + let runner = runners.get(fiber); + if (runner === undefined) { + runner = new SchedulerRunner(scheduleDrain); + runners.set(fiber, runner); + } + return runner; + }; + } +} +/** + * @since 2.0.0 + * @category utils + */ +exports.SchedulerRunner = SchedulerRunner; +class PriorityBuckets { + /** + * @since 2.0.0 + */ + buckets = []; + /** + * @since 2.0.0 + */ + scheduleTask(task, priority) { + const length = this.buckets.length; + let bucket = undefined; + let index = 0; + for (; index < length; index++) { + if (this.buckets[index][0] <= priority) { + bucket = this.buckets[index]; + } else { + break; + } + } + if (bucket && bucket[0] === priority) { + bucket[1].push(task); + } else if (index === length) { + this.buckets.push([priority, [task]]); + } else { + this.buckets.splice(index, 0, [priority, [task]]); + } + } +} +/** + * @since 2.0.0 + * @category constructors + */ +exports.PriorityBuckets = PriorityBuckets; +class MixedScheduler { + maxNextTickBeforeTimer; + getRunner = /*#__PURE__*/SchedulerRunner.cached((depth, drain) => { + if (depth >= this.maxNextTickBeforeTimer) { + setTimeout(() => drain(0), 0); + } else { + Promise.resolve(void 0).then(() => drain(depth + 1)); + } + }); + constructor( + /** + * @since 2.0.0 + */ + maxNextTickBeforeTimer) { + this.maxNextTickBeforeTimer = maxNextTickBeforeTimer; + } + /** + * @since 2.0.0 + */ + shouldYield(fiber) { + return fiber.currentOpCount > fiber.getFiberRef(core.currentMaxOpsBeforeYield) ? fiber.getFiberRef(core.currentSchedulingPriority) : false; + } + /** + * @since 2.0.0 + */ + scheduleTask(task, priority, fiber) { + this.getRunner(fiber).scheduleTask(task, priority); + } +} +/** + * @since 2.0.0 + * @category schedulers + */ +exports.MixedScheduler = MixedScheduler; +const defaultScheduler = exports.defaultScheduler = /*#__PURE__*/(0, _GlobalValue.globalValue)(/*#__PURE__*/Symbol.for("effect/Scheduler/defaultScheduler"), () => new MixedScheduler(2048)); +/** + * @since 2.0.0 + * @category constructors + */ +class SyncScheduler { + /** + * @since 2.0.0 + */ + tasks = /*#__PURE__*/new PriorityBuckets(); + /** + * @since 2.0.0 + */ + deferred = false; + /** + * @since 2.0.0 + */ + scheduleTask(task, priority, fiber) { + if (this.deferred) { + defaultScheduler.scheduleTask(task, priority, fiber); + } else { + this.tasks.scheduleTask(task, priority); + } + } + /** + * @since 2.0.0 + */ + shouldYield(fiber) { + return fiber.currentOpCount > fiber.getFiberRef(core.currentMaxOpsBeforeYield) ? fiber.getFiberRef(core.currentSchedulingPriority) : false; + } + /** + * @since 2.0.0 + */ + flush() { + while (this.tasks.buckets.length > 0) { + const tasks = this.tasks.buckets; + this.tasks.buckets = []; + for (const [_, toRun] of tasks) { + for (let i = 0; i < toRun.length; i++) { + toRun[i](); + } + } + } + this.deferred = true; + } +} +/** + * @since 2.0.0 + * @category constructors + */ +exports.SyncScheduler = SyncScheduler; +class ControlledScheduler { + /** + * @since 2.0.0 + */ + tasks = /*#__PURE__*/new PriorityBuckets(); + /** + * @since 2.0.0 + */ + deferred = false; + /** + * @since 2.0.0 + */ + scheduleTask(task, priority, fiber) { + if (this.deferred) { + defaultScheduler.scheduleTask(task, priority, fiber); + } else { + this.tasks.scheduleTask(task, priority); + } + } + /** + * @since 2.0.0 + */ + shouldYield(fiber) { + return fiber.currentOpCount > fiber.getFiberRef(core.currentMaxOpsBeforeYield) ? fiber.getFiberRef(core.currentSchedulingPriority) : false; + } + /** + * @since 2.0.0 + */ + step() { + const tasks = this.tasks.buckets; + this.tasks.buckets = []; + for (const [_, toRun] of tasks) { + for (let i = 0; i < toRun.length; i++) { + toRun[i](); + } + } + } +} +/** + * @since 2.0.0 + * @category constructors + */ +exports.ControlledScheduler = ControlledScheduler; +const makeMatrix = (...record) => { + const index = record.sort(([p0], [p1]) => p0 < p1 ? -1 : p0 > p1 ? 1 : 0); + return { + shouldYield(fiber) { + for (const scheduler of record) { + const priority = scheduler[1].shouldYield(fiber); + if (priority !== false) { + return priority; + } + } + return false; + }, + scheduleTask(task, priority, fiber) { + let scheduler = undefined; + for (const i of index) { + if (priority >= i[0]) { + scheduler = i[1]; + } else { + return (scheduler ?? defaultScheduler).scheduleTask(task, priority, fiber); + } + } + return (scheduler ?? defaultScheduler).scheduleTask(task, priority, fiber); + } + }; +}; +/** + * @since 2.0.0 + * @category utilities + */ +exports.makeMatrix = makeMatrix; +const defaultShouldYield = fiber => { + return fiber.currentOpCount > fiber.getFiberRef(core.currentMaxOpsBeforeYield) ? fiber.getFiberRef(core.currentSchedulingPriority) : false; +}; +/** + * @since 2.0.0 + * @category constructors + */ +exports.defaultShouldYield = defaultShouldYield; +const make = (scheduleTask, shouldYield = defaultShouldYield) => ({ + scheduleTask, + shouldYield +}); +/** + * @since 2.0.0 + * @category constructors + */ +exports.make = make; +const makeBatched = (callback, shouldYield = defaultShouldYield) => { + const getRunner = SchedulerRunner.cached((_, drain) => { + callback(() => drain(0)); + }); + return make((task, priority, fiber) => { + getRunner(fiber).scheduleTask(task, priority); + }, shouldYield); +}; +/** + * @since 2.0.0 + * @category constructors + */ +exports.makeBatched = makeBatched; +const timer = (ms, shouldYield = defaultShouldYield) => make(task => setTimeout(task, ms), shouldYield); +/** + * @since 2.0.0 + * @category constructors + */ +exports.timer = timer; +const timerBatched = (ms, shouldYield = defaultShouldYield) => makeBatched(task => setTimeout(task, ms), shouldYield); +/** @internal */ +exports.timerBatched = timerBatched; +const currentScheduler = exports.currentScheduler = /*#__PURE__*/(0, _GlobalValue.globalValue)(/*#__PURE__*/Symbol.for("effect/FiberRef/currentScheduler"), () => core.fiberRefUnsafeMake(defaultScheduler)); +/** @internal */ +const withScheduler = exports.withScheduler = /*#__PURE__*/(0, _Function.dual)(2, (self, scheduler) => core.fiberRefLocally(self, currentScheduler, scheduler)); +//# sourceMappingURL=Scheduler.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Scheduler.js.map b/backend/node_modules/effect/dist/cjs/Scheduler.js.map new file mode 100644 index 0000000000000000000000000000000000000000..87866cd15a91ebae98b0aeedf711f2a84d814622 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Scheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Scheduler.js","names":["_Function","require","_GlobalValue","core","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","SchedulerRunner","scheduleDrain","running","tasks","PriorityBuckets","constructor","starveInternal","depth","buckets","_","toRun","length","starve","scheduleTask","task","priority","cached","fallback","runners","fiber","undefined","runner","exports","bucket","index","push","splice","MixedScheduler","maxNextTickBeforeTimer","getRunner","drain","setTimeout","Promise","resolve","then","shouldYield","currentOpCount","getFiberRef","currentMaxOpsBeforeYield","currentSchedulingPriority","defaultScheduler","globalValue","Symbol","for","SyncScheduler","deferred","flush","ControlledScheduler","step","makeMatrix","record","sort","p0","p1","scheduler","defaultShouldYield","make","makeBatched","callback","timer","ms","timerBatched","currentScheduler","fiberRefUnsafeMake","withScheduler","dual","self","fiberRefLocally"],"sources":["../../src/Scheduler.ts"],"sourcesContent":[null],"mappings":";;;;;;AAOA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,IAAA,GAAAC,uBAAA,CAAAH,OAAA;AAA0C,SAAAG,wBAAAC,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAH,uBAAA,YAAAA,CAAAC,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA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AS,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Schema.js b/backend/node_modules/effect/dist/cjs/Schema.js new file mode 100644 index 0000000000000000000000000000000000000000..6ec1b449422ba87deed9899bd136c288bfef8d1a --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Schema.js @@ -0,0 +1,6254 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Array = exports.Any = void 0; +exports.ArrayEnsure = ArrayEnsure; +exports.Char = exports.CauseFromSelf = exports.Cause = exports.CapitalizedSchemaId = exports.Capitalized = exports.Capitalize = exports.BrandSchemaId = exports.BooleanFromUnknown = exports.BooleanFromString = exports.Boolean = exports.BigIntFromSelf = exports.BigIntFromNumber = exports.BigInt = exports.BigDecimalFromSelf = exports.BigDecimalFromNumber = exports.BigDecimal = exports.BetweenSchemaId = exports.BetweenDurationSchemaId = exports.BetweenDateSchemaId = exports.BetweenBigIntSchemaId = exports.BetweenBigDecimalSchemaId = exports.ArrayFormatterIssue = void 0; +exports.Chunk = Chunk; +exports.HashMapFromSelf = exports.HashMap = exports.GreaterThanSchemaId = exports.GreaterThanOrEqualToSchemaId = exports.GreaterThanOrEqualToDurationSchemaId = exports.GreaterThanOrEqualToDateSchemaId = exports.GreaterThanOrEqualToBigIntSchemaId = exports.GreaterThanOrEqualToBigDecimalSchemaId = exports.GreaterThanDurationSchemaId = exports.GreaterThanDateSchemaId = exports.GreaterThanBigIntSchemaId = exports.GreaterThanBigDecimalSchemaId = exports.FromPropertySignature = exports.FiniteSchemaId = exports.Finite = exports.FiberIdFromSelf = exports.FiberId = exports.ExitFromSelf = exports.Exit = exports.Enums = exports.EndsWithSchemaId = exports.EitherFromUnion = exports.EitherFromSelf = exports.Either = exports.DurationFromSelf = exports.DurationFromNanos = exports.DurationFromMillis = exports.Duration = exports.Defect = exports.DateTimeZonedFromSelf = exports.DateTimeZoned = exports.DateTimeUtcFromSelf = exports.DateTimeUtcFromNumber = exports.DateTimeUtcFromDate = exports.DateTimeUtc = exports.DateFromString = exports.DateFromSelfSchemaId = exports.DateFromSelf = exports.DateFromNumber = exports.Date = exports.DataFromSelf = exports.Data = exports.Config = exports.Class = exports.ChunkFromSelf = void 0; +exports.HashSet = HashSet; +exports.LessThanSchemaId = exports.LessThanOrEqualToSchemaId = exports.LessThanOrEqualToDurationSchemaId = exports.LessThanOrEqualToDateSchemaId = exports.LessThanOrEqualToBigIntSchemaId = exports.LessThanOrEqualToBigDecimalSchemaId = exports.LessThanDurationSchemaId = exports.LessThanDateSchemaId = exports.LessThanBigIntSchemaId = exports.LessThanBigDecimalSchemaId = exports.LengthSchemaId = exports.JsonNumberSchemaId = exports.JsonNumber = exports.ItemsCountSchemaId = exports.IntSchemaId = exports.Int = exports.InstanceOfSchemaId = exports.IncludesSchemaId = exports.HashSetFromSelf = void 0; +exports.List = List; +exports.ListFromSelf = void 0; +exports.Literal = Literal; +exports.LowercasedSchemaId = exports.Lowercased = exports.Lowercase = void 0; +exports.Map = map; +exports.MapFromSelf = exports.MapFromRecord = void 0; +exports.NonEmptyArray = exports.Never = exports.NegativeBigIntFromSelf = exports.NegativeBigInt = exports.NegativeBigDecimalSchemaId = exports.NegativeBigDecimalFromSelf = exports.Negative = exports.MultipleOfSchemaId = exports.MinLengthSchemaId = exports.MinItemsSchemaId = exports.MaxLengthSchemaId = exports.MaxItemsSchemaId = void 0; +exports.NonEmptyArrayEnsure = NonEmptyArrayEnsure; +exports.NonEmptyChunk = NonEmptyChunk; +exports.Object = exports.NumberFromString = exports.Number = exports.NullishOr = exports.NullOr = exports.Null = exports.Not = exports.NonPositiveBigIntFromSelf = exports.NonPositiveBigInt = exports.NonPositiveBigDecimalSchemaId = exports.NonPositiveBigDecimalFromSelf = exports.NonPositive = exports.NonNegativeInt = exports.NonNegativeBigIntFromSelf = exports.NonNegativeBigInt = exports.NonNegativeBigDecimalSchemaId = exports.NonNegativeBigDecimalFromSelf = exports.NonNegative = exports.NonNaNSchemaId = exports.NonNaN = exports.NonEmptyTrimmedString = exports.NonEmptyString = exports.NonEmptyChunkFromSelf = void 0; +exports.Option = Option; +exports.OptionFromNonEmptyTrimmedString = void 0; +exports.OptionFromNullOr = OptionFromNullOr; +exports.OptionFromNullishOr = OptionFromNullishOr; +exports.OptionFromSelf = void 0; +exports.OptionFromUndefinedOr = OptionFromUndefinedOr; +exports.PropertySignatureTypeId = exports.PropertySignatureTransformation = exports.PropertySignatureDeclaration = exports.PropertyKey = exports.PositiveBigIntFromSelf = exports.PositiveBigInt = exports.PositiveBigDecimalSchemaId = exports.PositiveBigDecimalFromSelf = exports.Positive = exports.PatternSchemaId = void 0; +exports.ReadonlyMap = ReadonlyMap; +exports.ReadonlyMapFromSelf = exports.ReadonlyMapFromRecord = void 0; +exports.ReadonlySet = ReadonlySet; +exports.Record = exports.ReadonlySetFromSelf = void 0; +exports.Redacted = Redacted; +exports.RefineSchemaId = exports.RedactedFromSelf = void 0; +exports.Set = set; +exports.SetFromSelf = void 0; +exports.SortedSet = SortedSet; +exports.StringFromUriComponent = exports.StringFromHex = exports.StringFromBase64Url = exports.StringFromBase64 = exports.String = exports.StartsWithSchemaId = exports.SortedSetFromSelf = void 0; +exports.Struct = Struct; +exports.TrimmedSchemaId = exports.Trimmed = exports.Trim = exports.ToPropertySignature = exports.TimeZoneOffsetFromSelf = exports.TimeZoneOffset = exports.TimeZoneNamedFromSelf = exports.TimeZoneNamed = exports.TimeZoneFromSelf = exports.TimeZone = exports.TemplateLiteralParser = exports.TemplateLiteral = exports.TaggedStruct = exports.TaggedRequest = exports.TaggedError = exports.TaggedClass = exports.SymbolFromSelf = exports.Symbol = void 0; +exports.Tuple = Tuple; +exports.Uint8 = exports.UUIDSchemaId = exports.UUID = exports.URLFromSelf = exports.URL = exports.ULIDSchemaId = exports.ULID = exports.TypeId = void 0; +exports.UndefinedOr = exports.Undefined = exports.UncapitalizedSchemaId = exports.Uncapitalized = exports.Uncapitalize = exports.Uint8ArrayFromSelf = exports.Uint8ArrayFromHex = exports.Uint8ArrayFromBase64Url = exports.Uint8ArrayFromBase64 = exports.Uint8Array = void 0; +exports.Union = Union; +exports.annotations = exports.Void = exports.ValidDateSchemaId = exports.ValidDateFromSelf = exports.UppercasedSchemaId = exports.Uppercased = exports.Uppercase = exports.Unknown = exports.UniqueSymbolFromSelf = void 0; +exports.asSchema = asSchema; +exports.asWithResult = exports.asSerializableWithResult = exports.asSerializable = void 0; +Object.defineProperty(exports, "asserts", { + enumerable: true, + get: function () { + return ParseResult.asserts; + } +}); +exports.decodeEither = exports.decode = exports.declare = exports.compose = exports.clampDuration = exports.clampBigInt = exports.clampBigDecimal = exports.clamp = exports.capitalized = exports.brand = exports.betweenDuration = exports.betweenDate = exports.betweenBigInt = exports.betweenBigDecimal = exports.between = exports.attachPropertySignature = void 0; +Object.defineProperty(exports, "decodeOption", { + enumerable: true, + get: function () { + return ParseResult.decodeOption; + } +}); +exports.decodePromise = void 0; +Object.defineProperty(exports, "decodeSync", { + enumerable: true, + get: function () { + return ParseResult.decodeSync; + } +}); +exports.decodeUnknownEither = exports.decodeUnknown = void 0; +Object.defineProperty(exports, "decodeUnknownOption", { + enumerable: true, + get: function () { + return ParseResult.decodeUnknownOption; + } +}); +exports.decodeUnknownPromise = void 0; +Object.defineProperty(exports, "decodeUnknownSync", { + enumerable: true, + get: function () { + return ParseResult.decodeUnknownSync; + } +}); +exports.encodeEither = exports.encode = exports.element = exports.deserializeSuccess = exports.deserializeFailure = exports.deserializeExit = exports.deserialize = void 0; +Object.defineProperty(exports, "encodeOption", { + enumerable: true, + get: function () { + return ParseResult.encodeOption; + } +}); +exports.encodePromise = void 0; +Object.defineProperty(exports, "encodeSync", { + enumerable: true, + get: function () { + return ParseResult.encodeSync; + } +}); +exports.encodeUnknownEither = exports.encodeUnknown = void 0; +Object.defineProperty(exports, "encodeUnknownOption", { + enumerable: true, + get: function () { + return ParseResult.encodeUnknownOption; + } +}); +exports.encodeUnknownPromise = void 0; +Object.defineProperty(exports, "encodeUnknownSync", { + enumerable: true, + get: function () { + return ParseResult.encodeUnknownSync; + } +}); +exports.failureSchema = exports.extend = exports.exitSchema = exports.equivalence = exports.endsWith = exports.encodedSchema = exports.encodedBoundSchema = void 0; +exports.filter = filter; +exports.greaterThanOrEqualToDuration = exports.greaterThanOrEqualToDate = exports.greaterThanOrEqualToBigInt = exports.greaterThanOrEqualToBigDecimal = exports.greaterThanOrEqualTo = exports.greaterThanDuration = exports.greaterThanDate = exports.greaterThanBigInt = exports.greaterThanBigDecimal = exports.greaterThan = exports.getNumberIndexedAccess = exports.getClassTag = exports.fromKey = exports.fromBrand = exports.format = exports.finite = exports.filterEffect = void 0; +exports.head = head; +exports.headNonEmpty = headNonEmpty; +exports.int = exports.instanceOf = exports.includes = exports.headOrElse = void 0; +Object.defineProperty(exports, "is", { + enumerable: true, + get: function () { + return ParseResult.is; + } +}); +exports.keyof = exports.itemsCount = exports.isSchema = exports.isPropertySignature = void 0; +exports.lowercased = exports.lessThanOrEqualToDuration = exports.lessThanOrEqualToDate = exports.lessThanOrEqualToBigInt = exports.lessThanOrEqualToBigDecimal = exports.lessThanOrEqualTo = exports.lessThanDuration = exports.lessThanDate = exports.lessThanBigInt = exports.lessThanBigDecimal = exports.lessThan = exports.length = void 0; +exports.make = make; +exports.parseJson = exports.optionalWith = exports.optionalToRequired = exports.optionalToOptional = exports.optionalElement = exports.optional = exports.omit = exports.nonPositiveBigInt = exports.nonPositiveBigDecimal = exports.nonPositive = exports.nonNegativeBigInt = exports.nonNegativeBigDecimal = exports.nonNegative = exports.nonNaN = exports.nonEmptyString = exports.negativeBigInt = exports.negativeBigDecimal = exports.negative = exports.mutable = exports.multipleOf = exports.minLength = exports.minItems = exports.maxLength = exports.maxItems = exports.makePropertySignature = void 0; +exports.parseNumber = parseNumber; +exports.transform = exports.tag = exports.symbolWithResult = exports.symbolSerializable = exports.suspend = exports.successSchema = exports.startsWith = exports.standardSchemaV1 = exports.split = exports.serializeSuccess = exports.serializeFailure = exports.serializeExit = exports.serialize = exports.serializableSchema = exports.requiredToOptional = exports.required = exports.rename = exports.propertySignature = exports.positiveBigInt = exports.positiveBigDecimal = exports.positive = exports.pluck = exports.pickLiteral = exports.pick = exports.pattern = exports.partialWith = exports.partial = void 0; +exports.transformLiteral = transformLiteral; +exports.transformLiterals = transformLiterals; +exports.validateEither = exports.validate = exports.validDate = exports.uppercased = exports.uncapitalized = exports.typeSchema = exports.trimmed = exports.transformOrFail = void 0; +Object.defineProperty(exports, "validateOption", { + enumerable: true, + get: function () { + return ParseResult.validateOption; + } +}); +exports.validatePromise = void 0; +Object.defineProperty(exports, "validateSync", { + enumerable: true, + get: function () { + return ParseResult.validateSync; + } +}); +exports.withDefaults = exports.withDecodingDefault = exports.withConstructorDefault = void 0; +var array_ = _interopRequireWildcard(require("./Array.js")); +var bigDecimal_ = _interopRequireWildcard(require("./BigDecimal.js")); +var bigInt_ = _interopRequireWildcard(require("./BigInt.js")); +var boolean_ = _interopRequireWildcard(require("./Boolean.js")); +var cause_ = _interopRequireWildcard(require("./Cause.js")); +var chunk_ = _interopRequireWildcard(require("./Chunk.js")); +var config_ = _interopRequireWildcard(require("./Config.js")); +var configError_ = _interopRequireWildcard(require("./ConfigError.js")); +var data_ = _interopRequireWildcard(require("./Data.js")); +var dateTime = _interopRequireWildcard(require("./DateTime.js")); +var duration_ = _interopRequireWildcard(require("./Duration.js")); +var Effect = _interopRequireWildcard(require("./Effect.js")); +var either_ = _interopRequireWildcard(require("./Either.js")); +var Encoding = _interopRequireWildcard(require("./Encoding.js")); +var Equal = _interopRequireWildcard(require("./Equal.js")); +var Equivalence = _interopRequireWildcard(require("./Equivalence.js")); +var exit_ = _interopRequireWildcard(require("./Exit.js")); +var fastCheck_ = _interopRequireWildcard(require("./FastCheck.js")); +var fiberId_ = _interopRequireWildcard(require("./FiberId.js")); +var _Function = require("./Function.js"); +var _GlobalValue = require("./GlobalValue.js"); +var hashMap_ = _interopRequireWildcard(require("./HashMap.js")); +var hashSet_ = _interopRequireWildcard(require("./HashSet.js")); +var Inspectable = _interopRequireWildcard(require("./Inspectable.js")); +var internalCause_ = _interopRequireWildcard(require("./internal/cause.js")); +var errors_ = _interopRequireWildcard(require("./internal/schema/errors.js")); +var schemaId_ = _interopRequireWildcard(require("./internal/schema/schemaId.js")); +var util_ = _interopRequireWildcard(require("./internal/schema/util.js")); +var list_ = _interopRequireWildcard(require("./List.js")); +var number_ = _interopRequireWildcard(require("./Number.js")); +var option_ = _interopRequireWildcard(require("./Option.js")); +var ParseResult = _interopRequireWildcard(require("./ParseResult.js")); +var _Pipeable = require("./Pipeable.js"); +var Predicate = _interopRequireWildcard(require("./Predicate.js")); +var redacted_ = _interopRequireWildcard(require("./Redacted.js")); +var Request = _interopRequireWildcard(require("./Request.js")); +var scheduler_ = _interopRequireWildcard(require("./Scheduler.js")); +var AST = _interopRequireWildcard(require("./SchemaAST.js")); +var sortedSet_ = _interopRequireWildcard(require("./SortedSet.js")); +var string_ = _interopRequireWildcard(require("./String.js")); +var struct_ = _interopRequireWildcard(require("./Struct.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 3.10.0 + */ + +/** + * @since 3.10.0 + * @category symbol + */ +const TypeId = exports.TypeId = /*#__PURE__*/Symbol.for("effect/Schema"); +/** + * @category constructors + * @since 3.10.0 + */ +function make(ast) { + return class SchemaClass { + [TypeId] = variance; + static ast = ast; + static annotations(annotations) { + return make(mergeSchemaAnnotations(this.ast, annotations)); + } + static pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + } + static toString() { + return String(ast); + } + static Type; + static Encoded; + static Context; + static [TypeId] = variance; + }; +} +const variance = { + /* c8 ignore next */ + _A: _ => _, + /* c8 ignore next */ + _I: _ => _, + /* c8 ignore next */ + _R: _ => _ +}; +const makeStandardResult = exit => exit_.isSuccess(exit) ? exit.value : makeStandardFailureResult(cause_.pretty(exit.cause)); +const makeStandardFailureResult = message => ({ + issues: [{ + message + }] +}); +const makeStandardFailureFromParseIssue = issue => Effect.map(ParseResult.ArrayFormatter.formatIssue(issue), issues => ({ + issues: issues.map(issue => ({ + path: issue.path, + message: issue.message + })) +})); +/** + * Returns a "Standard Schema" object conforming to the [Standard Schema + * v1](https://standardschema.dev/) specification. + * + * This function creates a schema whose `validate` method attempts to decode and + * validate the provided input synchronously. If the underlying `Schema` + * includes any asynchronous components (e.g., asynchronous message resolutions + * or checks), then validation will necessarily return a `Promise` instead. + * + * Any detected defects will be reported via a single issue containing no + * `path`. + * + * @example + * ```ts + * import { Schema } from "effect" + * + * const schema = Schema.Struct({ + * name: Schema.String + * }) + * + * // ┌─── StandardSchemaV1<{ readonly name: string; }> + * // ▼ + * const standardSchema = Schema.standardSchemaV1(schema) + * ``` + * + * @category Standard Schema + * @since 3.13.0 + */ +const standardSchemaV1 = (schema, overrideOptions) => { + const decodeUnknown = ParseResult.decodeUnknown(schema, { + errors: "all" + }); + return class StandardSchemaV1Class extends make(schema.ast) { + static "~standard" = { + version: 1, + vendor: "effect", + validate(value) { + const scheduler = new scheduler_.SyncScheduler(); + const fiber = Effect.runFork(Effect.matchEffect(decodeUnknown(value, overrideOptions), { + onFailure: makeStandardFailureFromParseIssue, + onSuccess: value => Effect.succeed({ + value + }) + }), { + scheduler + }); + scheduler.flush(); + const exit = fiber.unsafePoll(); + if (exit) { + return makeStandardResult(exit); + } + return new Promise(resolve => { + fiber.addObserver(exit => { + resolve(makeStandardResult(exit)); + }); + }); + } + }; + }; +}; +exports.standardSchemaV1 = standardSchemaV1; +const builtInAnnotations = { + typeConstructor: AST.TypeConstructorAnnotationId, + schemaId: AST.SchemaIdAnnotationId, + message: AST.MessageAnnotationId, + missingMessage: AST.MissingMessageAnnotationId, + identifier: AST.IdentifierAnnotationId, + title: AST.TitleAnnotationId, + description: AST.DescriptionAnnotationId, + examples: AST.ExamplesAnnotationId, + default: AST.DefaultAnnotationId, + documentation: AST.DocumentationAnnotationId, + jsonSchema: AST.JSONSchemaAnnotationId, + arbitrary: AST.ArbitraryAnnotationId, + pretty: AST.PrettyAnnotationId, + equivalence: AST.EquivalenceAnnotationId, + concurrency: AST.ConcurrencyAnnotationId, + batching: AST.BatchingAnnotationId, + parseIssueTitle: AST.ParseIssueTitleAnnotationId, + parseOptions: AST.ParseOptionsAnnotationId, + decodingFallback: AST.DecodingFallbackAnnotationId +}; +const toASTAnnotations = annotations => { + if (!annotations) { + return {}; + } + const out = { + ...annotations + }; + for (const key in builtInAnnotations) { + if (key in annotations) { + const id = builtInAnnotations[key]; + out[id] = annotations[key]; + delete out[key]; + } + } + return out; +}; +const mergeSchemaAnnotations = (ast, annotations) => AST.annotations(ast, toASTAnnotations(annotations)); +/** + * @since 3.10.0 + */ +function asSchema(schema) { + return schema; +} +/** + * @category formatting + * @since 3.10.0 + */ +const format = schema => String(schema.ast); +/** + * The `encodedSchema` function allows you to extract the `Encoded` portion of a + * schema, creating a new schema that conforms to the properties defined in the + * original schema without retaining any refinements or transformations that + * were applied previously. + * + * @since 3.10.0 + */ +exports.format = format; +const encodedSchema = schema => make(AST.encodedAST(schema.ast)); +/** + * The `encodedBoundSchema` function is similar to `encodedSchema` but preserves + * the refinements up to the first transformation point in the original schema. + * + * @since 3.10.0 + */ +exports.encodedSchema = encodedSchema; +const encodedBoundSchema = schema => make(AST.encodedBoundAST(schema.ast)); +/** + * The `typeSchema` function allows you to extract the `Type` portion of a + * schema, creating a new schema that conforms to the properties defined in the + * original schema without considering the initial encoding or transformation + * processes. + * + * @since 3.10.0 + */ +exports.encodedBoundSchema = encodedBoundSchema; +const typeSchema = schema => make(AST.typeAST(schema.ast)); +/* c8 ignore start */ +exports.typeSchema = typeSchema; +/* c8 ignore end */ +/** + * @category encoding + * @since 3.10.0 + */ +const encodeUnknown = (schema, options) => { + const encodeUnknown = ParseResult.encodeUnknown(schema, options); + return (u, overrideOptions) => ParseResult.mapError(encodeUnknown(u, overrideOptions), ParseResult.parseError); +}; +/** + * @category encoding + * @since 3.10.0 + */ +exports.encodeUnknown = encodeUnknown; +const encodeUnknownEither = (schema, options) => { + const encodeUnknownEither = ParseResult.encodeUnknownEither(schema, options); + return (u, overrideOptions) => either_.mapLeft(encodeUnknownEither(u, overrideOptions), ParseResult.parseError); +}; +/** + * @category encoding + * @since 3.10.0 + */ +exports.encodeUnknownEither = encodeUnknownEither; +const encodeUnknownPromise = (schema, options) => { + const parser = encodeUnknown(schema, options); + return (u, overrideOptions) => Effect.runPromise(parser(u, overrideOptions)); +}; +/** + * @category encoding + * @since 3.10.0 + */ +exports.encodeUnknownPromise = encodeUnknownPromise; +const encode = exports.encode = encodeUnknown; +/** + * @category encoding + * @since 3.10.0 + */ +const encodeEither = exports.encodeEither = encodeUnknownEither; +/** + * @category encoding + * @since 3.10.0 + */ +const encodePromise = exports.encodePromise = encodeUnknownPromise; +/** + * @category decoding + * @since 3.10.0 + */ +const decodeUnknown = (schema, options) => { + const decodeUnknown = ParseResult.decodeUnknown(schema, options); + return (u, overrideOptions) => ParseResult.mapError(decodeUnknown(u, overrideOptions), ParseResult.parseError); +}; +/** + * @category decoding + * @since 3.10.0 + */ +exports.decodeUnknown = decodeUnknown; +const decodeUnknownEither = (schema, options) => { + const decodeUnknownEither = ParseResult.decodeUnknownEither(schema, options); + return (u, overrideOptions) => either_.mapLeft(decodeUnknownEither(u, overrideOptions), ParseResult.parseError); +}; +/** + * @category decoding + * @since 3.10.0 + */ +exports.decodeUnknownEither = decodeUnknownEither; +const decodeUnknownPromise = (schema, options) => { + const parser = decodeUnknown(schema, options); + return (u, overrideOptions) => Effect.runPromise(parser(u, overrideOptions)); +}; +/** + * @category decoding + * @since 3.10.0 + */ +exports.decodeUnknownPromise = decodeUnknownPromise; +const decode = exports.decode = decodeUnknown; +/** + * @category decoding + * @since 3.10.0 + */ +const decodeEither = exports.decodeEither = decodeUnknownEither; +/** + * @category decoding + * @since 3.10.0 + */ +const decodePromise = exports.decodePromise = decodeUnknownPromise; +/** + * @category validation + * @since 3.10.0 + */ +const validate = (schema, options) => { + const validate = ParseResult.validate(schema, options); + return (u, overrideOptions) => ParseResult.mapError(validate(u, overrideOptions), ParseResult.parseError); +}; +/** + * @category validation + * @since 3.10.0 + */ +exports.validate = validate; +const validateEither = (schema, options) => { + const validateEither = ParseResult.validateEither(schema, options); + return (u, overrideOptions) => either_.mapLeft(validateEither(u, overrideOptions), ParseResult.parseError); +}; +/** + * @category validation + * @since 3.10.0 + */ +exports.validateEither = validateEither; +const validatePromise = (schema, options) => { + const parser = validate(schema, options); + return (u, overrideOptions) => Effect.runPromise(parser(u, overrideOptions)); +}; +/** + * Tests if a value is a `Schema`. + * + * @category guards + * @since 3.10.0 + */ +exports.validatePromise = validatePromise; +const isSchema = u => Predicate.hasProperty(u, TypeId) && Predicate.isObject(u[TypeId]); +exports.isSchema = isSchema; +function getDefaultLiteralAST(literals) { + return AST.isMembers(literals) ? AST.Union.make(AST.mapMembers(literals, literal => new AST.Literal(literal))) : new AST.Literal(literals[0]); +} +function makeLiteralClass(literals, ast = getDefaultLiteralAST(literals)) { + return class LiteralClass extends make(ast) { + static annotations(annotations) { + return makeLiteralClass(this.literals, mergeSchemaAnnotations(this.ast, annotations)); + } + static literals = [...literals]; + }; +} +function Literal(...literals) { + return array_.isNonEmptyReadonlyArray(literals) ? makeLiteralClass(literals) : Never; +} +/** + * Creates a new `Schema` from a literal schema. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either, Schema } from "effect" + * + * const schema = Schema.Literal("a", "b", "c").pipe(Schema.pickLiteral("a", "b")) + * + * assert.deepStrictEqual(Schema.decodeSync(schema)("a"), "a") + * assert.deepStrictEqual(Schema.decodeSync(schema)("b"), "b") + * assert.strictEqual(Either.isLeft(Schema.decodeUnknownEither(schema)("c")), true) + * ``` + * + * @category constructors + * @since 3.10.0 + */ +const pickLiteral = (...literals) => _schema => Literal(...literals); +/** + * @category constructors + * @since 3.10.0 + */ +exports.pickLiteral = pickLiteral; +const UniqueSymbolFromSelf = symbol => make(new AST.UniqueSymbol(symbol)); +exports.UniqueSymbolFromSelf = UniqueSymbolFromSelf; +const getDefaultEnumsAST = enums => new AST.Enums(Object.keys(enums).filter(key => typeof enums[enums[key]] !== "number").map(key => [key, enums[key]])); +const makeEnumsClass = (enums, ast = getDefaultEnumsAST(enums)) => class EnumsClass extends make(ast) { + static annotations(annotations) { + return makeEnumsClass(this.enums, mergeSchemaAnnotations(this.ast, annotations)); + } + static enums = { + ...enums + }; +}; +/** + * @category constructors + * @since 3.10.0 + */ +const Enums = enums => makeEnumsClass(enums); +/** + * @category template literal + * @since 3.10.0 + */ +exports.Enums = Enums; +const TemplateLiteral = (...[head, ...tail]) => { + const spans = []; + let h = ""; + let ts = tail; + if (isSchema(head)) { + if (AST.isLiteral(head.ast)) { + h = String(head.ast.literal); + } else { + ts = [head, ...ts]; + } + } else { + h = String(head); + } + for (let i = 0; i < ts.length; i++) { + const item = ts[i]; + if (isSchema(item)) { + if (i < ts.length - 1) { + const next = ts[i + 1]; + if (isSchema(next)) { + if (AST.isLiteral(next.ast)) { + spans.push(new AST.TemplateLiteralSpan(item.ast, String(next.ast.literal))); + i++; + continue; + } + } else { + spans.push(new AST.TemplateLiteralSpan(item.ast, String(next))); + i++; + continue; + } + } + spans.push(new AST.TemplateLiteralSpan(item.ast, "")); + } else { + spans.push(new AST.TemplateLiteralSpan(new AST.Literal(item), "")); + } + } + if (array_.isNonEmptyArray(spans)) { + return make(new AST.TemplateLiteral(h, spans)); + } else { + return make(new AST.TemplateLiteral("", [new AST.TemplateLiteralSpan(new AST.Literal(h), "")])); + } +}; +exports.TemplateLiteral = TemplateLiteral; +function getTemplateLiteralParserCoercedElement(encoded, schema) { + const ast = encoded.ast; + switch (ast._tag) { + case "Literal": + { + const literal = ast.literal; + if (!Predicate.isString(literal)) { + const s = String(literal); + return transform(Literal(s), schema, { + strict: true, + decode: () => literal, + encode: () => s + }); + } + break; + } + case "NumberKeyword": + return compose(NumberFromString, schema); + case "Union": + { + const members = []; + let hasCoercions = false; + for (const member of ast.types) { + const schema = make(member); + const encoded = encodedSchema(schema); + const coerced = getTemplateLiteralParserCoercedElement(encoded, schema); + if (coerced) { + hasCoercions = true; + } + members.push(coerced ?? schema); + } + return hasCoercions ? compose(Union(...members), schema) : schema; + } + } +} +/** + * @category template literal + * @since 3.10.0 + */ +const TemplateLiteralParser = (...params) => { + const encodedSchemas = []; + const elements = []; + const schemas = []; + let coerced = false; + for (let i = 0; i < params.length; i++) { + const param = params[i]; + const schema = isSchema(param) ? param : Literal(param); + schemas.push(schema); + const encoded = encodedSchema(schema); + encodedSchemas.push(encoded); + const element = getTemplateLiteralParserCoercedElement(encoded, schema); + if (element) { + elements.push(element); + coerced = true; + } else { + elements.push(schema); + } + } + const from = TemplateLiteral(...encodedSchemas); + const re = AST.getTemplateLiteralCapturingRegExp(from.ast); + let to = Tuple(...elements); + if (coerced) { + to = to.annotations({ + [AST.AutoTitleAnnotationId]: format(Tuple(...schemas)) + }); + } + return class TemplateLiteralParserClass extends transformOrFail(from, to, { + strict: false, + decode: (i, _, ast) => { + const match = re.exec(i); + return match ? ParseResult.succeed(match.slice(1, params.length + 1)) : ParseResult.fail(new ParseResult.Type(ast, i, `${re.source}: no match for ${JSON.stringify(i)}`)); + }, + encode: tuple => ParseResult.succeed(tuple.join("")) + }) { + static params = params.slice(); + }; +}; +exports.TemplateLiteralParser = TemplateLiteralParser; +const declareConstructor = (typeParameters, options, annotations) => makeDeclareClass(typeParameters, new AST.Declaration(typeParameters.map(tp => tp.ast), (...typeParameters) => options.decode(...typeParameters.map(make)), (...typeParameters) => options.encode(...typeParameters.map(make)), toASTAnnotations(annotations))); +const declarePrimitive = (is, annotations) => { + const decodeUnknown = () => (input, _, ast) => is(input) ? ParseResult.succeed(input) : ParseResult.fail(new ParseResult.Type(ast, input)); + const encodeUnknown = decodeUnknown; + return makeDeclareClass([], new AST.Declaration([], decodeUnknown, encodeUnknown, toASTAnnotations(annotations))); +}; +function makeDeclareClass(typeParameters, ast) { + return class DeclareClass extends make(ast) { + static annotations(annotations) { + return makeDeclareClass(this.typeParameters, mergeSchemaAnnotations(this.ast, annotations)); + } + static typeParameters = [...typeParameters]; + }; +} +/** + * The constraint `R extends Schema.Context` enforces dependencies solely from `typeParameters`. + * This ensures that when you call `Schema.to` or `Schema.from`, you receive a schema with a `never` context. + * + * @category constructors + * @since 3.10.0 + */ +const declare = function () { + if (Array.isArray(arguments[0])) { + const typeParameters = arguments[0]; + const options = arguments[1]; + const annotations = arguments[2]; + return declareConstructor(typeParameters, options, annotations); + } + const is = arguments[0]; + const annotations = arguments[1]; + return declarePrimitive(is, annotations); +}; +/** + * @category schema id + * @since 3.10.0 + */ +exports.declare = declare; +const BrandSchemaId = exports.BrandSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/Brand"); +/** + * @category constructors + * @since 3.10.0 + */ +const fromBrand = (constructor, annotations) => self => { + const out = makeBrandClass(self, new AST.Refinement(self.ast, function predicate(a, _, ast) { + const either = constructor.either(a); + return either_.isLeft(either) ? option_.some(new ParseResult.Type(ast, a, either.left.map(v => v.message).join(", "))) : option_.none(); + }, toASTAnnotations({ + schemaId: BrandSchemaId, + [BrandSchemaId]: { + constructor + }, + ...annotations + }))); + return out; +}; +/** + * @category schema id + * @since 3.10.0 + */ +exports.fromBrand = fromBrand; +const InstanceOfSchemaId = exports.InstanceOfSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/InstanceOf"); +/** + * @category constructors + * @since 3.10.0 + */ +const instanceOf = (constructor, annotations) => declare(u => u instanceof constructor, { + title: constructor.name, + description: `an instance of ${constructor.name}`, + pretty: () => String, + schemaId: InstanceOfSchemaId, + [InstanceOfSchemaId]: { + constructor + }, + ...annotations +}); +/** + * @category primitives + * @since 3.10.0 + */ +exports.instanceOf = instanceOf; +class Undefined extends /*#__PURE__*/make(AST.undefinedKeyword) {} +/** + * @category primitives + * @since 3.10.0 + */ +exports.Undefined = Undefined; +class Void extends /*#__PURE__*/make(AST.voidKeyword) {} +/** + * @category primitives + * @since 3.10.0 + */ +exports.Void = Void; +class Null extends /*#__PURE__*/make(AST.null) {} +/** + * @category primitives + * @since 3.10.0 + */ +exports.Null = Null; +class Never extends /*#__PURE__*/make(AST.neverKeyword) {} +/** + * @category primitives + * @since 3.10.0 + */ +exports.Never = Never; +class Unknown extends /*#__PURE__*/make(AST.unknownKeyword) {} +/** + * @category primitives + * @since 3.10.0 + */ +exports.Unknown = Unknown; +class Any extends /*#__PURE__*/make(AST.anyKeyword) {} +/** + * @category primitives + * @since 3.10.0 + */ +exports.Any = Any; +class BigIntFromSelf extends /*#__PURE__*/make(AST.bigIntKeyword) {} +/** + * @category primitives + * @since 3.10.0 + */ +exports.BigIntFromSelf = BigIntFromSelf; +class SymbolFromSelf extends /*#__PURE__*/make(AST.symbolKeyword) {} +/** @ignore */ +exports.SymbolFromSelf = SymbolFromSelf; +class String$ extends /*#__PURE__*/make(AST.stringKeyword) {} +/** @ignore */ +exports.String = String$; +class Number$ extends /*#__PURE__*/make(AST.numberKeyword) {} +/** @ignore */ +exports.Number = Number$; +class Boolean$ extends /*#__PURE__*/make(AST.booleanKeyword) {} +/** @ignore */ +exports.Boolean = Boolean$; +class Object$ extends /*#__PURE__*/make(AST.objectKeyword) {} +exports.Object = Object$; +const getDefaultUnionAST = members => AST.Union.make(members.map(m => m.ast)); +function makeUnionClass(members, ast = getDefaultUnionAST(members)) { + return class UnionClass extends make(ast) { + static annotations(annotations) { + return makeUnionClass(this.members, mergeSchemaAnnotations(this.ast, annotations)); + } + static members = [...members]; + }; +} +function Union(...members) { + return AST.isMembers(members) ? makeUnionClass(members) : array_.isNonEmptyReadonlyArray(members) ? members[0] : Never; +} +/** + * @category combinators + * @since 3.10.0 + */ +const NullOr = self => Union(self, Null); +/** + * @category combinators + * @since 3.10.0 + */ +exports.NullOr = NullOr; +const UndefinedOr = self => Union(self, Undefined); +/** + * @category combinators + * @since 3.10.0 + */ +exports.UndefinedOr = UndefinedOr; +const NullishOr = self => Union(self, Null, Undefined); +/** + * @category combinators + * @since 3.10.0 + */ +exports.NullishOr = NullishOr; +const keyof = self => make(AST.keyof(self.ast)); +/** + * @since 3.10.0 + */ +exports.keyof = keyof; +const element = self => new ElementImpl(new AST.OptionalType(self.ast, false), self); +/** + * @since 3.10.0 + */ +exports.element = element; +const optionalElement = self => new ElementImpl(new AST.OptionalType(self.ast, true), self); +exports.optionalElement = optionalElement; +class ElementImpl { + ast; + from; + [TypeId]; + _Token; + constructor(ast, from) { + this.ast = ast; + this.from = from; + } + annotations(annotations) { + return new ElementImpl(new AST.OptionalType(this.ast.type, this.ast.isOptional, { + ...this.ast.annotations, + ...toASTAnnotations(annotations) + }), this.from); + } + toString() { + return `${this.ast.type}${this.ast.isOptional ? "?" : ""}`; + } +} +const getDefaultTupleTypeAST = (elements, rest) => new AST.TupleType(elements.map(el => isSchema(el) ? new AST.OptionalType(el.ast, false) : el.ast), rest.map(el => isSchema(el) ? new AST.Type(el.ast) : el.ast), true); +function makeTupleTypeClass(elements, rest, ast = getDefaultTupleTypeAST(elements, rest)) { + return class TupleTypeClass extends make(ast) { + static annotations(annotations) { + return makeTupleTypeClass(this.elements, this.rest, mergeSchemaAnnotations(this.ast, annotations)); + } + static elements = [...elements]; + static rest = [...rest]; + }; +} +function Tuple(...args) { + return Array.isArray(args[0]) ? makeTupleTypeClass(args[0], args.slice(1)) : makeTupleTypeClass(args, []); +} +function makeArrayClass(value, ast) { + return class ArrayClass extends makeTupleTypeClass([], [value], ast) { + static annotations(annotations) { + return makeArrayClass(this.value, mergeSchemaAnnotations(this.ast, annotations)); + } + static value = value; + }; +} +const Array$ = value => makeArrayClass(value); +exports.Array = Array$; +function makeNonEmptyArrayClass(value, ast) { + return class NonEmptyArrayClass extends makeTupleTypeClass([value], [value], ast) { + static annotations(annotations) { + return makeNonEmptyArrayClass(this.value, mergeSchemaAnnotations(this.ast, annotations)); + } + static value = value; + }; +} +/** + * @category constructors + * @since 3.10.0 + */ +const NonEmptyArray = value => makeNonEmptyArrayClass(value); +/** + * @category constructors + * @since 3.10.0 + */ +exports.NonEmptyArray = NonEmptyArray; +function ArrayEnsure(value) { + return transform(Union(value, Array$(value)), Array$(typeSchema(asSchema(value))), { + strict: true, + decode: i => array_.ensure(i), + encode: a => a.length === 1 ? a[0] : a + }); +} +/** + * @category constructors + * @since 3.10.0 + */ +function NonEmptyArrayEnsure(value) { + return transform(Union(value, NonEmptyArray(value)), NonEmptyArray(typeSchema(asSchema(value))), { + strict: true, + decode: i => array_.isNonEmptyReadonlyArray(i) ? i : array_.of(i), + encode: a => a.length === 1 ? a[0] : a + }); +} +const formatPropertySignatureToken = isOptional => isOptional ? "\"?:\"" : "\":\""; +/** + * @category PropertySignature + * @since 3.10.0 + */ +class PropertySignatureDeclaration extends AST.OptionalType { + isReadonly; + defaultValue; + /** + * @since 3.10.0 + */ + _tag = "PropertySignatureDeclaration"; + constructor(type, isOptional, isReadonly, annotations, defaultValue) { + super(type, isOptional, annotations); + this.isReadonly = isReadonly; + this.defaultValue = defaultValue; + } + /** + * @since 3.10.0 + */ + toString() { + const token = formatPropertySignatureToken(this.isOptional); + const type = String(this.type); + return `PropertySignature<${token}, ${type}, never, ${token}, ${type}>`; + } +} +/** + * @category PropertySignature + * @since 3.10.0 + */ +exports.PropertySignatureDeclaration = PropertySignatureDeclaration; +class FromPropertySignature extends AST.OptionalType { + isReadonly; + fromKey; + constructor(type, isOptional, isReadonly, annotations, fromKey) { + super(type, isOptional, annotations); + this.isReadonly = isReadonly; + this.fromKey = fromKey; + } +} +/** + * @category PropertySignature + * @since 3.10.0 + */ +exports.FromPropertySignature = FromPropertySignature; +class ToPropertySignature extends AST.OptionalType { + isReadonly; + defaultValue; + constructor(type, isOptional, isReadonly, annotations, defaultValue) { + super(type, isOptional, annotations); + this.isReadonly = isReadonly; + this.defaultValue = defaultValue; + } +} +exports.ToPropertySignature = ToPropertySignature; +const formatPropertyKey = p => { + if (p === undefined) { + return "never"; + } + if (Predicate.isString(p)) { + return JSON.stringify(p); + } + return String(p); +}; +/** + * @category PropertySignature + * @since 3.10.0 + */ +class PropertySignatureTransformation { + from; + to; + decode; + encode; + /** + * @since 3.10.0 + */ + _tag = "PropertySignatureTransformation"; + constructor(from, to, decode, encode) { + this.from = from; + this.to = to; + this.decode = decode; + this.encode = encode; + } + /** + * @since 3.10.0 + */ + toString() { + return `PropertySignature<${formatPropertySignatureToken(this.to.isOptional)}, ${this.to.type}, ${formatPropertyKey(this.from.fromKey)}, ${formatPropertySignatureToken(this.from.isOptional)}, ${this.from.type}>`; + } +} +exports.PropertySignatureTransformation = PropertySignatureTransformation; +const mergeSignatureAnnotations = (ast, annotations) => { + switch (ast._tag) { + case "PropertySignatureDeclaration": + { + return new PropertySignatureDeclaration(ast.type, ast.isOptional, ast.isReadonly, { + ...ast.annotations, + ...annotations + }, ast.defaultValue); + } + case "PropertySignatureTransformation": + { + return new PropertySignatureTransformation(ast.from, new ToPropertySignature(ast.to.type, ast.to.isOptional, ast.to.isReadonly, { + ...ast.to.annotations, + ...annotations + }, ast.to.defaultValue), ast.decode, ast.encode); + } + } +}; +/** + * @since 3.10.0 + * @category symbol + */ +const PropertySignatureTypeId = exports.PropertySignatureTypeId = /*#__PURE__*/Symbol.for("effect/PropertySignature"); +/** + * @since 3.10.0 + * @category guards + */ +const isPropertySignature = u => Predicate.hasProperty(u, PropertySignatureTypeId); +exports.isPropertySignature = isPropertySignature; +class PropertySignatureImpl { + ast; + [TypeId]; + [PropertySignatureTypeId] = null; + _TypeToken; + _Key; + _EncodedToken; + _HasDefault; + constructor(ast) { + this.ast = ast; + } + pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + } + annotations(annotations) { + return new PropertySignatureImpl(mergeSignatureAnnotations(this.ast, toASTAnnotations(annotations))); + } + toString() { + return String(this.ast); + } +} +/** + * @category PropertySignature + * @since 3.10.0 + */ +const makePropertySignature = ast => new PropertySignatureImpl(ast); +exports.makePropertySignature = makePropertySignature; +class PropertySignatureWithFromImpl extends PropertySignatureImpl { + from; + constructor(ast, from) { + super(ast); + this.from = from; + } + annotations(annotations) { + return new PropertySignatureWithFromImpl(mergeSignatureAnnotations(this.ast, toASTAnnotations(annotations)), this.from); + } +} +/** + * Lifts a `Schema` into a `PropertySignature`. + * + * @category PropertySignature + * @since 3.10.0 + */ +const propertySignature = self => new PropertySignatureWithFromImpl(new PropertySignatureDeclaration(self.ast, false, true, {}, undefined), self); +/** + * Enhances a property signature with a default constructor value. + * + * @category PropertySignature + * @since 3.10.0 + */ +exports.propertySignature = propertySignature; +const withConstructorDefault = exports.withConstructorDefault = /*#__PURE__*/(0, _Function.dual)(2, (self, defaultValue) => { + const ast = self.ast; + switch (ast._tag) { + case "PropertySignatureDeclaration": + return makePropertySignature(new PropertySignatureDeclaration(ast.type, ast.isOptional, ast.isReadonly, ast.annotations, defaultValue)); + case "PropertySignatureTransformation": + return makePropertySignature(new PropertySignatureTransformation(ast.from, new ToPropertySignature(ast.to.type, ast.to.isOptional, ast.to.isReadonly, ast.to.annotations, defaultValue), ast.decode, ast.encode)); + } +}); +const applyDefaultValue = (o, defaultValue) => option_.match(o, { + onNone: () => option_.some(defaultValue()), + onSome: value => option_.some(value === undefined ? defaultValue() : value) +}); +const pruneUndefined = ast => AST.pruneUndefined(ast, pruneUndefined, ast => { + const pruned = pruneUndefined(ast.to); + if (pruned) { + return new AST.Transformation(ast.from, pruned, ast.transformation); + } +}); +/** + * Enhances a property signature with a default decoding value. + * + * @category PropertySignature + * @since 3.10.0 + */ +const withDecodingDefault = exports.withDecodingDefault = /*#__PURE__*/(0, _Function.dual)(2, (self, defaultValue) => { + const ast = self.ast; + switch (ast._tag) { + case "PropertySignatureDeclaration": + { + const to = AST.typeAST(ast.type); + return makePropertySignature(new PropertySignatureTransformation(new FromPropertySignature(ast.type, ast.isOptional, ast.isReadonly, ast.annotations), new ToPropertySignature(pruneUndefined(to) ?? to, false, true, {}, ast.defaultValue), o => applyDefaultValue(o, defaultValue), _Function.identity)); + } + case "PropertySignatureTransformation": + { + const to = ast.to.type; + return makePropertySignature(new PropertySignatureTransformation(ast.from, new ToPropertySignature(pruneUndefined(to) ?? to, false, ast.to.isReadonly, ast.to.annotations, ast.to.defaultValue), o => applyDefaultValue(ast.decode(o), defaultValue), ast.encode)); + } + } +}); +/** + * Enhances a property signature with a default decoding value and a default constructor value. + * + * @category PropertySignature + * @since 3.10.0 + */ +const withDefaults = exports.withDefaults = /*#__PURE__*/(0, _Function.dual)(2, (self, defaults) => self.pipe(withDecodingDefault(defaults.decoding), withConstructorDefault(defaults.constructor))); +/** + * Enhances a property signature by specifying a different key for it in the Encoded type. + * + * @category PropertySignature + * @since 3.10.0 + */ +const fromKey = exports.fromKey = /*#__PURE__*/(0, _Function.dual)(2, (self, key) => { + const ast = self.ast; + switch (ast._tag) { + case "PropertySignatureDeclaration": + { + return makePropertySignature(new PropertySignatureTransformation(new FromPropertySignature(ast.type, ast.isOptional, ast.isReadonly, ast.annotations, key), new ToPropertySignature(AST.typeAST(ast.type), ast.isOptional, ast.isReadonly, {}, ast.defaultValue), _Function.identity, _Function.identity)); + } + case "PropertySignatureTransformation": + return makePropertySignature(new PropertySignatureTransformation(new FromPropertySignature(ast.from.type, ast.from.isOptional, ast.from.isReadonly, ast.from.annotations, key), ast.to, ast.decode, ast.encode)); + } +}); +/** + * Converts an optional property to a required one through a transformation `Option -> Type`. + * + * - `decode`: `none` as argument means the value is missing in the input. + * - `encode`: `none` as return value means the value will be missing in the output. + * + * @category PropertySignature + * @since 3.10.0 + */ +const optionalToRequired = (from, to, options) => makePropertySignature(new PropertySignatureTransformation(new FromPropertySignature(from.ast, true, true, {}, undefined), new ToPropertySignature(to.ast, false, true, {}, undefined), o => option_.some(options.decode(o)), option_.flatMap(options.encode))); +/** + * Converts an optional property to a required one through a transformation `Type -> Option`. + * + * - `decode`: `none` as return value means the value will be missing in the output. + * - `encode`: `none` as argument means the value is missing in the input. + * + * @category PropertySignature + * @since 3.10.0 + */ +exports.optionalToRequired = optionalToRequired; +const requiredToOptional = (from, to, options) => makePropertySignature(new PropertySignatureTransformation(new FromPropertySignature(from.ast, false, true, {}, undefined), new ToPropertySignature(to.ast, true, true, {}, undefined), option_.flatMap(options.decode), o => option_.some(options.encode(o)))); +/** + * Converts an optional property to another optional property through a transformation `Option -> Option`. + * + * - `decode`: + * - `none` as argument means the value is missing in the input. + * - `none` as return value means the value will be missing in the output. + * - `encode`: + * - `none` as argument means the value is missing in the input. + * - `none` as return value means the value will be missing in the output. + * + * @category PropertySignature + * @since 3.10.0 + */ +exports.requiredToOptional = requiredToOptional; +const optionalToOptional = (from, to, options) => makePropertySignature(new PropertySignatureTransformation(new FromPropertySignature(from.ast, true, true, {}, undefined), new ToPropertySignature(to.ast, true, true, {}, undefined), options.decode, options.encode)); +exports.optionalToOptional = optionalToOptional; +const optionalPropertySignatureAST = (self, options) => { + const isExact = options?.exact; + const defaultValue = options?.default; + const isNullable = options?.nullable; + const asOption = options?.as == "Option"; + const asOptionEncode = options?.onNoneEncoding ? option_.orElse(options.onNoneEncoding) : _Function.identity; + if (isExact) { + if (defaultValue) { + if (isNullable) { + return withConstructorDefault(optionalToRequired(NullOr(self), typeSchema(self), { + decode: option_.match({ + onNone: defaultValue, + onSome: a => a === null ? defaultValue() : a + }), + encode: option_.some + }), defaultValue).ast; + } else { + return withConstructorDefault(optionalToRequired(self, typeSchema(self), { + decode: option_.match({ + onNone: defaultValue, + onSome: _Function.identity + }), + encode: option_.some + }), defaultValue).ast; + } + } else if (asOption) { + const to = OptionFromSelf_(typeSchema(self)); + if (isNullable) { + return optionalToRequired(NullOr(self), to, { + decode: option_.filter(Predicate.isNotNull), + encode: asOptionEncode + }).ast; + } else { + return optionalToRequired(self, to, { + decode: _Function.identity, + encode: _Function.identity + }).ast; + } + } else { + if (isNullable) { + return optionalToOptional(NullOr(self), typeSchema(self), { + decode: option_.filter(Predicate.isNotNull), + encode: _Function.identity + }).ast; + } else { + return new PropertySignatureDeclaration(self.ast, true, true, {}, undefined); + } + } + } else { + if (defaultValue) { + if (isNullable) { + return withConstructorDefault(optionalToRequired(NullishOr(self), typeSchema(self), { + decode: option_.match({ + onNone: defaultValue, + onSome: a => a == null ? defaultValue() : a + }), + encode: option_.some + }), defaultValue).ast; + } else { + return withConstructorDefault(optionalToRequired(UndefinedOr(self), typeSchema(self), { + decode: option_.match({ + onNone: defaultValue, + onSome: a => a === undefined ? defaultValue() : a + }), + encode: option_.some + }), defaultValue).ast; + } + } else if (asOption) { + const to = OptionFromSelf_(typeSchema(self)); + if (isNullable) { + return optionalToRequired(NullishOr(self), to, { + decode: option_.filter(a => a != null), + encode: asOptionEncode + }).ast; + } else { + return optionalToRequired(UndefinedOr(self), to, { + decode: option_.filter(Predicate.isNotUndefined), + encode: asOptionEncode + }).ast; + } + } else { + if (isNullable) { + return optionalToOptional(NullishOr(self), UndefinedOr(typeSchema(self)), { + decode: option_.filter(Predicate.isNotNull), + encode: _Function.identity + }).ast; + } else { + return new PropertySignatureDeclaration(UndefinedOr(self).ast, true, true, {}, undefined); + } + } + } +}; +/** + * @category PropertySignature + * @since 3.10.0 + */ +const optional = self => { + const ast = self.ast === AST.undefinedKeyword || self.ast === AST.neverKeyword ? AST.undefinedKeyword : UndefinedOr(self).ast; + return new PropertySignatureWithFromImpl(new PropertySignatureDeclaration(ast, true, true, {}, undefined), self); +}; +/** + * @category PropertySignature + * @since 3.10.0 + */ +exports.optional = optional; +const optionalWith = exports.optionalWith = /*#__PURE__*/(0, _Function.dual)(args => isSchema(args[0]), (self, options) => { + return new PropertySignatureWithFromImpl(optionalPropertySignatureAST(self, options), self); +}); +const preserveMissingMessageAnnotation = /*#__PURE__*/AST.pickAnnotations([AST.MissingMessageAnnotationId]); +const getDefaultTypeLiteralAST = (fields, records) => { + const ownKeys = Reflect.ownKeys(fields); + const pss = []; + if (ownKeys.length > 0) { + const from = []; + const to = []; + const transformations = []; + for (let i = 0; i < ownKeys.length; i++) { + const key = ownKeys[i]; + const field = fields[key]; + if (isPropertySignature(field)) { + const ast = field.ast; + switch (ast._tag) { + case "PropertySignatureDeclaration": + { + const type = ast.type; + const isOptional = ast.isOptional; + const toAnnotations = ast.annotations; + from.push(new AST.PropertySignature(key, type, isOptional, true, preserveMissingMessageAnnotation(ast))); + to.push(new AST.PropertySignature(key, AST.typeAST(type), isOptional, true, toAnnotations)); + pss.push(new AST.PropertySignature(key, type, isOptional, true, toAnnotations)); + break; + } + case "PropertySignatureTransformation": + { + const fromKey = ast.from.fromKey ?? key; + from.push(new AST.PropertySignature(fromKey, ast.from.type, ast.from.isOptional, true, ast.from.annotations)); + to.push(new AST.PropertySignature(key, ast.to.type, ast.to.isOptional, true, ast.to.annotations)); + transformations.push(new AST.PropertySignatureTransformation(fromKey, key, ast.decode, ast.encode)); + break; + } + } + } else { + from.push(new AST.PropertySignature(key, field.ast, false, true)); + to.push(new AST.PropertySignature(key, AST.typeAST(field.ast), false, true)); + pss.push(new AST.PropertySignature(key, field.ast, false, true)); + } + } + if (array_.isNonEmptyReadonlyArray(transformations)) { + const issFrom = []; + const issTo = []; + for (const r of records) { + const { + indexSignatures, + propertySignatures + } = AST.record(r.key.ast, r.value.ast); + propertySignatures.forEach(ps => { + from.push(ps); + to.push(new AST.PropertySignature(ps.name, AST.typeAST(ps.type), ps.isOptional, ps.isReadonly, ps.annotations)); + }); + indexSignatures.forEach(is => { + issFrom.push(is); + issTo.push(new AST.IndexSignature(is.parameter, AST.typeAST(is.type), is.isReadonly)); + }); + } + return new AST.Transformation(new AST.TypeLiteral(from, issFrom, { + [AST.AutoTitleAnnotationId]: "Struct (Encoded side)" + }), new AST.TypeLiteral(to, issTo, { + [AST.AutoTitleAnnotationId]: "Struct (Type side)" + }), new AST.TypeLiteralTransformation(transformations)); + } + } + const iss = []; + for (const r of records) { + const { + indexSignatures, + propertySignatures + } = AST.record(r.key.ast, r.value.ast); + propertySignatures.forEach(ps => pss.push(ps)); + indexSignatures.forEach(is => iss.push(is)); + } + return new AST.TypeLiteral(pss, iss); +}; +const lazilyMergeDefaults = (fields, out) => { + const ownKeys = Reflect.ownKeys(fields); + for (const key of ownKeys) { + const field = fields[key]; + if (out[key] === undefined && isPropertySignature(field)) { + const ast = field.ast; + const defaultValue = ast._tag === "PropertySignatureDeclaration" ? ast.defaultValue : ast.to.defaultValue; + if (defaultValue !== undefined) { + out[key] = defaultValue(); + } + } + } + return out; +}; +function makeTypeLiteralClass(fields, records, ast = getDefaultTypeLiteralAST(fields, records)) { + return class TypeLiteralClass extends make(ast) { + static annotations(annotations) { + return makeTypeLiteralClass(this.fields, this.records, mergeSchemaAnnotations(this.ast, annotations)); + } + static fields = { + ...fields + }; + static records = [...records]; + static make = (props, options) => { + const propsWithDefaults = lazilyMergeDefaults(fields, { + ...props + }); + return getDisableValidationMakeOption(options) ? propsWithDefaults : ParseResult.validateSync(this)(propsWithDefaults); + }; + static pick(...keys) { + return Struct(struct_.pick(fields, ...keys)); + } + static omit(...keys) { + return Struct(struct_.omit(fields, ...keys)); + } + }; +} +function Struct(fields, ...records) { + return makeTypeLiteralClass(fields, records); +} +/** + * Returns a property signature that represents a tag. + * A tag is a literal value that is used to distinguish between different types of objects. + * The tag is optional when using the `make` method. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Schema } from "effect" + * + * const User = Schema.Struct({ + * _tag: Schema.tag("User"), + * name: Schema.String, + * age: Schema.Number + * }) + * + * assert.deepStrictEqual(User.make({ name: "John", age: 44 }), { _tag: "User", name: "John", age: 44 }) + * ``` + * + * @see {@link TaggedStruct} + * + * @since 3.10.0 + */ +const tag = tag => Literal(tag).pipe(propertySignature, withConstructorDefault(() => tag)); +/** + * A tagged struct is a struct that has a tag property that is used to distinguish between different types of objects. + * + * The tag is optional when using the `make` method. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Schema } from "effect" + * + * const User = Schema.TaggedStruct("User", { + * name: Schema.String, + * age: Schema.Number + * }) + * + * assert.deepStrictEqual(User.make({ name: "John", age: 44 }), { _tag: "User", name: "John", age: 44 }) + * ``` + * + * @category constructors + * @since 3.10.0 + */ +exports.tag = tag; +const TaggedStruct = (value, fields) => Struct({ + _tag: tag(value), + ...fields +}); +exports.TaggedStruct = TaggedStruct; +function makeRecordClass(key, value, ast) { + return class RecordClass extends makeTypeLiteralClass({}, [{ + key, + value + }], ast) { + static annotations(annotations) { + return makeRecordClass(key, value, mergeSchemaAnnotations(this.ast, annotations)); + } + static key = key; + static value = value; + }; +} +/** + * @category constructors + * @since 3.10.0 + */ +const Record = options => makeRecordClass(options.key, options.value); +/** + * @category struct transformations + * @since 3.10.0 + */ +exports.Record = Record; +const pick = (...keys) => self => make(AST.pick(self.ast, keys)); +/** + * @category struct transformations + * @since 3.10.0 + */ +exports.pick = pick; +const omit = (...keys) => self => make(AST.omit(self.ast, keys)); +/** + * Given a schema `Schema` and a key `key: K`, this function extracts a specific field from the `A` type, + * producing a new schema that represents a transformation from the `{ readonly [key]: I[K] }` type to `A[K]`. + * + * @example + * ```ts + * import * as Schema from "effect/Schema" + * + * // --------------------------------------------- + * // use case: pull out a single field from a + * // struct through a transformation + * // --------------------------------------------- + * + * const mytable = Schema.Struct({ + * column1: Schema.NumberFromString, + * column2: Schema.Number + * }) + * + * // const pullOutColumn: S.Schema + * const pullOutColumn = mytable.pipe(Schema.pluck("column1")) + * + * console.log(Schema.decodeUnknownEither(Schema.Array(pullOutColumn))([{ column1: "1", column2: 100 }, { column1: "2", column2: 300 }])) + * // Output: { _id: 'Either', _tag: 'Right', right: [ 1, 2 ] } + * ``` + * + * @category struct transformations + * @since 3.10.0 + */ +exports.omit = omit; +const pluck = exports.pluck = /*#__PURE__*/(0, _Function.dual)(2, (schema, key) => { + const ps = AST.getPropertyKeyIndexedAccess(AST.typeAST(schema.ast), key); + const value = make(ps.isOptional ? AST.orUndefined(ps.type) : ps.type); + const out = transform(schema.pipe(pick(key)), value, { + strict: true, + decode: i => i[key], + encode: a => ps.isOptional && a === undefined ? {} : { + [key]: a + } + }); + return out; +}); +function makeBrandClass(from, ast) { + return class BrandClass extends make(ast) { + static annotations(annotations) { + return makeBrandClass(this.from, mergeSchemaAnnotations(this.ast, annotations)); + } + static make = (a, options) => { + return getDisableValidationMakeOption(options) ? a : ParseResult.validateSync(this)(a); + }; + static from = from; + }; +} +/** + * Returns a nominal branded schema by applying a brand to a given schema. + * + * ``` + * Schema + B -> Schema> + * ``` + * + * @example + * ```ts + * import * as Schema from "effect/Schema" + * + * const Int = Schema.Number.pipe(Schema.int(), Schema.brand("Int")) + * type Int = Schema.Schema.Type // number & Brand<"Int"> + * ``` + * + * @category branding + * @since 3.10.0 + */ +const brand = (brand, annotations) => self => { + const annotation = option_.match(AST.getBrandAnnotation(self.ast), { + onNone: () => [brand], + onSome: brands => [...brands, brand] + }); + const ast = AST.annotations(self.ast, toASTAnnotations({ + [AST.BrandAnnotationId]: annotation, + ...annotations + })); + return makeBrandClass(self, ast); +}; +/** + * @category combinators + * @since 3.10.0 + */ +exports.brand = brand; +const partial = self => make(AST.partial(self.ast)); +/** + * @category combinators + * @since 3.10.0 + */ +exports.partial = partial; +const partialWith = exports.partialWith = /*#__PURE__*/(0, _Function.dual)(args => isSchema(args[0]), (self, options) => make(AST.partial(self.ast, options))); +/** + * @category combinators + * @since 3.10.0 + */ +const required = self => make(AST.required(self.ast)); +/** + * Creates a new schema with shallow mutability applied to its properties. + * + * @category combinators + * @since 3.10.0 + */ +exports.required = required; +const mutable = schema => make(AST.mutable(schema.ast)); +exports.mutable = mutable; +const intersectTypeLiterals = (x, y, path) => { + if (AST.isTypeLiteral(x) && AST.isTypeLiteral(y)) { + const propertySignatures = [...x.propertySignatures]; + for (const ps of y.propertySignatures) { + const name = ps.name; + const i = propertySignatures.findIndex(ps => ps.name === name); + if (i === -1) { + propertySignatures.push(ps); + } else { + const { + isOptional, + type + } = propertySignatures[i]; + propertySignatures[i] = new AST.PropertySignature(name, extendAST(type, ps.type, path.concat(name)), isOptional, true); + } + } + return new AST.TypeLiteral(propertySignatures, x.indexSignatures.concat(y.indexSignatures)); + } + throw new Error(errors_.getSchemaExtendErrorMessage(x, y, path)); +}; +const preserveRefinementAnnotations = /*#__PURE__*/AST.omitAnnotations([AST.IdentifierAnnotationId]); +const addRefinementToMembers = (refinement, asts) => asts.map(ast => new AST.Refinement(ast, refinement.filter, preserveRefinementAnnotations(refinement))); +const extendAST = (x, y, path) => AST.Union.make(intersectUnionMembers([x], [y], path)); +const getTypes = ast => AST.isUnion(ast) ? ast.types : [ast]; +const intersectUnionMembers = (xs, ys, path) => array_.flatMap(xs, x => array_.flatMap(ys, y => { + switch (y._tag) { + case "Literal": + { + if (Predicate.isString(y.literal) && AST.isStringKeyword(x) || Predicate.isNumber(y.literal) && AST.isNumberKeyword(x) || Predicate.isBoolean(y.literal) && AST.isBooleanKeyword(x)) { + return [y]; + } + break; + } + case "StringKeyword": + { + if (y === AST.stringKeyword) { + if (AST.isStringKeyword(x) || AST.isLiteral(x) && Predicate.isString(x.literal)) { + return [x]; + } else if (AST.isRefinement(x)) { + return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path)); + } + } else if (x === AST.stringKeyword) { + return [y]; + } + break; + } + case "NumberKeyword": + { + if (y === AST.numberKeyword) { + if (AST.isNumberKeyword(x) || AST.isLiteral(x) && Predicate.isNumber(x.literal)) { + return [x]; + } else if (AST.isRefinement(x)) { + return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path)); + } + } else if (x === AST.numberKeyword) { + return [y]; + } + break; + } + case "BooleanKeyword": + { + if (y === AST.booleanKeyword) { + if (AST.isBooleanKeyword(x) || AST.isLiteral(x) && Predicate.isBoolean(x.literal)) { + return [x]; + } else if (AST.isRefinement(x)) { + return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path)); + } + } else if (x === AST.booleanKeyword) { + return [y]; + } + break; + } + case "Union": + return intersectUnionMembers(getTypes(x), y.types, path); + case "Suspend": + return [new AST.Suspend(() => extendAST(x, y.f(), path))]; + case "Refinement": + return addRefinementToMembers(y, intersectUnionMembers(getTypes(x), getTypes(y.from), path)); + case "TypeLiteral": + { + switch (x._tag) { + case "Union": + return intersectUnionMembers(x.types, [y], path); + case "Suspend": + return [new AST.Suspend(() => extendAST(x.f(), y, path))]; + case "Refinement": + return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path)); + case "TypeLiteral": + return [intersectTypeLiterals(x, y, path)]; + case "Transformation": + { + const transformation = x.transformation; + const from = intersectTypeLiterals(x.from, y, path); + const to = intersectTypeLiterals(x.to, AST.typeAST(y), path); + switch (transformation._tag) { + case "TypeLiteralTransformation": + return [new AST.Transformation(from, to, new AST.TypeLiteralTransformation(transformation.propertySignatureTransformations))]; + case "ComposeTransformation": + return [new AST.Transformation(from, to, AST.composeTransformation)]; + case "FinalTransformation": + return [new AST.Transformation(from, to, new AST.FinalTransformation((fromA, options, ast, fromI) => ParseResult.map(transformation.decode(fromA, options, ast, fromI), partial => ({ + ...fromA, + ...partial + })), (toI, options, ast, toA) => ParseResult.map(transformation.encode(toI, options, ast, toA), partial => ({ + ...toI, + ...partial + }))))]; + } + } + } + break; + } + case "Transformation": + { + if (AST.isTransformation(x)) { + if (AST.isTypeLiteralTransformation(y.transformation) && AST.isTypeLiteralTransformation(x.transformation)) { + return [new AST.Transformation(intersectTypeLiterals(x.from, y.from, path), intersectTypeLiterals(x.to, y.to, path), new AST.TypeLiteralTransformation(y.transformation.propertySignatureTransformations.concat(x.transformation.propertySignatureTransformations)))]; + } + } else { + return intersectUnionMembers([y], [x], path); + } + break; + } + } + throw new Error(errors_.getSchemaExtendErrorMessage(x, y, path)); +})); +/** + * Extends a schema with another schema. + * + * Not all extensions are supported, and their support depends on the nature of + * the involved schemas. + * + * Possible extensions include: + * - `Schema.String` with another `Schema.String` refinement or a string literal + * - `Schema.Number` with another `Schema.Number` refinement or a number literal + * - `Schema.Boolean` with another `Schema.Boolean` refinement or a boolean + * literal + * - A struct with another struct where overlapping fields support extension + * - A struct with in index signature + * - A struct with a union of supported schemas + * - A refinement of a struct with a supported schema + * - A suspend of a struct with a supported schema + * - A transformation between structs where the “from” and “to” sides have no + * overlapping fields with the target struct + * + * @example + * ```ts + * import * as Schema from "effect/Schema" + * + * const schema = Schema.Struct({ + * a: Schema.String, + * b: Schema.String + * }) + * + * // const extended: Schema< + * // { + * // readonly a: string + * // readonly b: string + * // } & { + * // readonly c: string + * // } & { + * // readonly [x: string]: string + * // } + * // > + * const extended = Schema.asSchema(schema.pipe( + * Schema.extend(Schema.Struct({ c: Schema.String })), // <= you can add more fields + * Schema.extend(Schema.Record({ key: Schema.String, value: Schema.String })) // <= you can add index signatures + * )) + * ``` + * + * @category combinators + * @since 3.10.0 + */ +const extend = exports.extend = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => make(extendAST(self.ast, that.ast, []))); +/** + * @category combinators + * @since 3.10.0 + */ +const compose = exports.compose = /*#__PURE__*/(0, _Function.dual)(args => isSchema(args[1]), (from, to) => makeTransformationClass(from, to, AST.compose(from.ast, to.ast))); +/** + * @category constructors + * @since 3.10.0 + */ +const suspend = f => make(new AST.Suspend(() => f().ast)); +/** + * @since 3.10.0 + * @category symbol + */ +exports.suspend = suspend; +const RefineSchemaId = exports.RefineSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/Refine"); +function makeRefineClass(from, filter, ast) { + return class RefineClass extends make(ast) { + static annotations(annotations) { + return makeRefineClass(this.from, this.filter, mergeSchemaAnnotations(this.ast, annotations)); + } + static [RefineSchemaId] = from; + static from = from; + static filter = filter; + static make = (a, options) => { + return getDisableValidationMakeOption(options) ? a : ParseResult.validateSync(this)(a); + }; + }; +} +const fromFilterPredicateReturnTypeItem = (item, ast, input) => { + if (Predicate.isBoolean(item)) { + return item ? option_.none() : option_.some(new ParseResult.Type(ast, input)); + } + if (Predicate.isString(item)) { + return option_.some(new ParseResult.Type(ast, input, item)); + } + if (item !== undefined) { + if ("_tag" in item) { + return option_.some(item); + } + const issue = new ParseResult.Type(ast, input, item.message); + return option_.some(array_.isNonEmptyReadonlyArray(item.path) ? new ParseResult.Pointer(item.path, input, issue) : issue); + } + return option_.none(); +}; +const toFilterParseIssue = (out, ast, input) => { + if (util_.isSingle(out)) { + return fromFilterPredicateReturnTypeItem(out, ast, input); + } + if (array_.isNonEmptyReadonlyArray(out)) { + const issues = array_.filterMap(out, issue => fromFilterPredicateReturnTypeItem(issue, ast, input)); + if (array_.isNonEmptyReadonlyArray(issues)) { + return option_.some(issues.length === 1 ? issues[0] : new ParseResult.Composite(ast, input, issues)); + } + } + return option_.none(); +}; +function filter(predicate, annotations) { + return self => { + function filter(input, options, ast) { + return toFilterParseIssue(predicate(input, options, ast), ast, input); + } + const ast = new AST.Refinement(self.ast, filter, toASTAnnotations(annotations)); + return makeRefineClass(self, filter, ast); + }; +} +/** + * @category transformations + * @since 3.10.0 + */ +const filterEffect = exports.filterEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => transformOrFail(self, typeSchema(self), { + strict: true, + decode: (i, options, ast) => ParseResult.flatMap(f(i, options, ast), filterReturnType => option_.match(toFilterParseIssue(filterReturnType, ast, i), { + onNone: () => ParseResult.succeed(i), + onSome: ParseResult.fail + })), + encode: a => ParseResult.succeed(a) +})); +function makeTransformationClass(from, to, ast) { + return class TransformationClass extends make(ast) { + static annotations(annotations) { + return makeTransformationClass(this.from, this.to, mergeSchemaAnnotations(this.ast, annotations)); + } + static from = from; + static to = to; + }; +} +/** + * Create a new `Schema` by transforming the input and output of an existing `Schema` + * using the provided decoding functions. + * + * @category transformations + * @since 3.10.0 + */ +const transformOrFail = exports.transformOrFail = /*#__PURE__*/(0, _Function.dual)(args => isSchema(args[0]) && isSchema(args[1]), (from, to, options) => makeTransformationClass(from, to, new AST.Transformation(from.ast, to.ast, new AST.FinalTransformation(options.decode, options.encode)))); +/** + * Create a new `Schema` by transforming the input and output of an existing `Schema` + * using the provided mapping functions. + * + * @category transformations + * @since 3.10.0 + */ +const transform = exports.transform = /*#__PURE__*/(0, _Function.dual)(args => isSchema(args[0]) && isSchema(args[1]), (from, to, options) => transformOrFail(from, to, { + strict: true, + decode: (fromA, _options, _ast, toA) => ParseResult.succeed(options.decode(fromA, toA)), + encode: (toI, _options, _ast, toA) => ParseResult.succeed(options.encode(toI, toA)) +})); +/** + * Creates a new `Schema` which transforms literal values. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import * as S from "effect/Schema" + * + * const schema = S.transformLiteral(0, "a") + * + * assert.deepStrictEqual(S.decodeSync(schema)(0), "a") + * ``` + * + * @category constructors + * @since 3.10.0 + */ +function transformLiteral(from, to) { + return transform(Literal(from), Literal(to), { + strict: true, + decode: () => to, + encode: () => from + }); +} +function transformLiterals(...pairs) { + return Union(...pairs.map(([from, to]) => transformLiteral(from, to))); +} +/** + * Attaches a property signature with the specified key and value to the schema. + * This API is useful when you want to add a property to your schema which doesn't describe the shape of the input, + * but rather maps to another schema, for example when you want to add a discriminant to a simple union. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import * as S from "effect/Schema" + * import { pipe } from "effect/Function" + * + * const Circle = S.Struct({ radius: S.Number }) + * const Square = S.Struct({ sideLength: S.Number }) + * const Shape = S.Union( + * Circle.pipe(S.attachPropertySignature("kind", "circle")), + * Square.pipe(S.attachPropertySignature("kind", "square")) + * ) + * + * assert.deepStrictEqual(S.decodeSync(Shape)({ radius: 10 }), { + * kind: "circle", + * radius: 10 + * }) + * ``` + * + * @category combinators + * @since 3.10.0 + */ +const attachPropertySignature = exports.attachPropertySignature = /*#__PURE__*/(0, _Function.dual)(args => isSchema(args[0]), (schema, key, value, annotations) => { + const ast = extend(typeSchema(schema), Struct({ + [key]: Predicate.isSymbol(value) ? UniqueSymbolFromSelf(value) : Literal(value) + })).ast; + return make(new AST.Transformation(schema.ast, annotations ? mergeSchemaAnnotations(ast, annotations) : ast, new AST.TypeLiteralTransformation([new AST.PropertySignatureTransformation(key, key, () => option_.some(value), () => option_.none())]))); +}); +/** + * Merges a set of new annotations with existing ones, potentially overwriting + * any duplicates. + * + * @category annotations + * @since 3.10.0 + */ +const annotations = exports.annotations = /*#__PURE__*/(0, _Function.dual)(2, (self, annotations) => self.annotations(annotations)); +/** + * @category renaming + * @since 3.10.0 + */ +const rename = exports.rename = /*#__PURE__*/(0, _Function.dual)(2, (self, mapping) => make(AST.rename(self.ast, mapping))); +/** + * @category schema id + * @since 3.10.0 + */ +const TrimmedSchemaId = exports.TrimmedSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/Trimmed"); +/** + * Verifies that a string contains no leading or trailing whitespaces. + * + * Note. This combinator does not make any transformations, it only validates. + * If what you were looking for was a combinator to trim strings, then check out the `trim` combinator. + * + * @category string filters + * @since 3.10.0 + */ +const trimmed = annotations => self => self.pipe(filter(a => a === a.trim(), { + schemaId: TrimmedSchemaId, + title: "trimmed", + description: "a string with no leading or trailing whitespace", + jsonSchema: { + pattern: "^\\S[\\s\\S]*\\S$|^\\S$|^$" + }, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +exports.trimmed = trimmed; +const MaxLengthSchemaId = exports.MaxLengthSchemaId = schemaId_.MaxLengthSchemaId; +/** + * @category string filters + * @since 3.10.0 + */ +const maxLength = (maxLength, annotations) => self => self.pipe(filter(a => a.length <= maxLength, { + schemaId: MaxLengthSchemaId, + title: `maxLength(${maxLength})`, + description: `a string at most ${maxLength} character(s) long`, + jsonSchema: { + maxLength + }, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +exports.maxLength = maxLength; +const MinLengthSchemaId = exports.MinLengthSchemaId = schemaId_.MinLengthSchemaId; +/** + * @category string filters + * @since 3.10.0 + */ +const minLength = (minLength, annotations) => self => self.pipe(filter(a => a.length >= minLength, { + schemaId: MinLengthSchemaId, + title: `minLength(${minLength})`, + description: `a string at least ${minLength} character(s) long`, + jsonSchema: { + minLength + }, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +exports.minLength = minLength; +const LengthSchemaId = exports.LengthSchemaId = schemaId_.LengthSchemaId; +/** + * @category string filters + * @since 3.10.0 + */ +const length = (length, annotations) => self => { + const minLength = Predicate.isObject(length) ? Math.max(0, Math.floor(length.min)) : Math.max(0, Math.floor(length)); + const maxLength = Predicate.isObject(length) ? Math.max(minLength, Math.floor(length.max)) : minLength; + if (minLength !== maxLength) { + return self.pipe(filter(a => a.length >= minLength && a.length <= maxLength, { + schemaId: LengthSchemaId, + title: `length({ min: ${minLength}, max: ${maxLength})`, + description: `a string at least ${minLength} character(s) and at most ${maxLength} character(s) long`, + jsonSchema: { + minLength, + maxLength + }, + ...annotations + })); + } + return self.pipe(filter(a => a.length === minLength, { + schemaId: LengthSchemaId, + title: `length(${minLength})`, + description: minLength === 1 ? `a single character` : `a string ${minLength} character(s) long`, + jsonSchema: { + minLength, + maxLength: minLength + }, + ...annotations + })); +}; +/** + * @category schema id + * @since 3.10.0 + */ +exports.length = length; +const PatternSchemaId = exports.PatternSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/Pattern"); +/** + * @category string filters + * @since 3.10.0 + */ +const pattern = (regex, annotations) => self => { + const source = regex.source; + return self.pipe(filter(a => { + // The following line ensures that `lastIndex` is reset to `0` in case the user has specified the `g` flag + regex.lastIndex = 0; + return regex.test(a); + }, { + schemaId: PatternSchemaId, + [PatternSchemaId]: { + regex + }, + // title: `pattern(/${source}/)`, // avoiding this because it can be very long + description: `a string matching the pattern ${source}`, + jsonSchema: { + pattern: source + }, + ...annotations + })); +}; +/** + * @category schema id + * @since 3.10.0 + */ +exports.pattern = pattern; +const StartsWithSchemaId = exports.StartsWithSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/StartsWith"); +/** + * @category string filters + * @since 3.10.0 + */ +const startsWith = (startsWith, annotations) => self => { + const formatted = JSON.stringify(startsWith); + return self.pipe(filter(a => a.startsWith(startsWith), { + schemaId: StartsWithSchemaId, + [StartsWithSchemaId]: { + startsWith + }, + title: `startsWith(${formatted})`, + description: `a string starting with ${formatted}`, + jsonSchema: { + pattern: `^${startsWith}` + }, + ...annotations + })); +}; +/** + * @category schema id + * @since 3.10.0 + */ +exports.startsWith = startsWith; +const EndsWithSchemaId = exports.EndsWithSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/EndsWith"); +/** + * @category string filters + * @since 3.10.0 + */ +const endsWith = (endsWith, annotations) => self => { + const formatted = JSON.stringify(endsWith); + return self.pipe(filter(a => a.endsWith(endsWith), { + schemaId: EndsWithSchemaId, + [EndsWithSchemaId]: { + endsWith + }, + title: `endsWith(${formatted})`, + description: `a string ending with ${formatted}`, + jsonSchema: { + pattern: `^.*${endsWith}$` + }, + ...annotations + })); +}; +/** + * @category schema id + * @since 3.10.0 + */ +exports.endsWith = endsWith; +const IncludesSchemaId = exports.IncludesSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/Includes"); +/** + * @category string filters + * @since 3.10.0 + */ +const includes = (searchString, annotations) => self => { + const formatted = JSON.stringify(searchString); + return self.pipe(filter(a => a.includes(searchString), { + schemaId: IncludesSchemaId, + [IncludesSchemaId]: { + includes: searchString + }, + title: `includes(${formatted})`, + description: `a string including ${formatted}`, + jsonSchema: { + pattern: `.*${searchString}.*` + }, + ...annotations + })); +}; +/** + * @category schema id + * @since 3.10.0 + */ +exports.includes = includes; +const LowercasedSchemaId = exports.LowercasedSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/Lowercased"); +/** + * Verifies that a string is lowercased. + * + * @category string filters + * @since 3.10.0 + */ +const lowercased = annotations => self => self.pipe(filter(a => a === a.toLowerCase(), { + schemaId: LowercasedSchemaId, + title: "lowercased", + description: "a lowercase string", + jsonSchema: { + pattern: "^[^A-Z]*$" + }, + ...annotations +})); +/** + * @category string constructors + * @since 3.10.0 + */ +exports.lowercased = lowercased; +class Lowercased extends /*#__PURE__*/String$.pipe(/*#__PURE__*/lowercased({ + identifier: "Lowercased" +})) {} +/** + * @category schema id + * @since 3.10.0 + */ +exports.Lowercased = Lowercased; +const UppercasedSchemaId = exports.UppercasedSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/Uppercased"); +/** + * Verifies that a string is uppercased. + * + * @category string filters + * @since 3.10.0 + */ +const uppercased = annotations => self => self.pipe(filter(a => a === a.toUpperCase(), { + schemaId: UppercasedSchemaId, + title: "uppercased", + description: "an uppercase string", + jsonSchema: { + pattern: "^[^a-z]*$" + }, + ...annotations +})); +/** + * @category string constructors + * @since 3.10.0 + */ +exports.uppercased = uppercased; +class Uppercased extends /*#__PURE__*/String$.pipe(/*#__PURE__*/uppercased({ + identifier: "Uppercased" +})) {} +/** + * @category schema id + * @since 3.10.0 + */ +exports.Uppercased = Uppercased; +const CapitalizedSchemaId = exports.CapitalizedSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/Capitalized"); +/** + * Verifies that a string is capitalized. + * + * @category string filters + * @since 3.10.0 + */ +const capitalized = annotations => self => self.pipe(filter(a => a[0]?.toUpperCase() === a[0], { + schemaId: CapitalizedSchemaId, + title: "capitalized", + description: "a capitalized string", + jsonSchema: { + pattern: "^[^a-z]?.*$" + }, + ...annotations +})); +/** + * @category string constructors + * @since 3.10.0 + */ +exports.capitalized = capitalized; +class Capitalized extends /*#__PURE__*/String$.pipe(/*#__PURE__*/capitalized({ + identifier: "Capitalized" +})) {} +/** + * @category schema id + * @since 3.10.0 + */ +exports.Capitalized = Capitalized; +const UncapitalizedSchemaId = exports.UncapitalizedSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/Uncapitalized"); +/** + * Verifies that a string is uncapitalized. + * + * @category string filters + * @since 3.10.0 + */ +const uncapitalized = annotations => self => self.pipe(filter(a => a[0]?.toLowerCase() === a[0], { + schemaId: UncapitalizedSchemaId, + title: "uncapitalized", + description: "a uncapitalized string", + jsonSchema: { + pattern: "^[^A-Z]?.*$" + }, + ...annotations +})); +/** + * @category string constructors + * @since 3.10.0 + */ +exports.uncapitalized = uncapitalized; +class Uncapitalized extends /*#__PURE__*/String$.pipe(/*#__PURE__*/uncapitalized({ + identifier: "Uncapitalized" +})) {} +/** + * A schema representing a single character. + * + * @category string constructors + * @since 3.10.0 + */ +exports.Uncapitalized = Uncapitalized; +class Char extends /*#__PURE__*/String$.pipe(/*#__PURE__*/length(1, { + identifier: "Char" +})) {} +/** + * @category string filters + * @since 3.10.0 + */ +exports.Char = Char; +const nonEmptyString = annotations => minLength(1, { + title: "nonEmptyString", + description: "a non empty string", + ...annotations +}); +/** + * This schema converts a string to lowercase. + * + * @category string transformations + * @since 3.10.0 + */ +exports.nonEmptyString = nonEmptyString; +class Lowercase extends /*#__PURE__*/transform(String$.annotations({ + description: "a string that will be converted to lowercase" +}), Lowercased, { + strict: true, + decode: i => i.toLowerCase(), + encode: _Function.identity +}).annotations({ + identifier: "Lowercase" +}) {} +/** + * This schema converts a string to uppercase. + * + * @category string transformations + * @since 3.10.0 + */ +exports.Lowercase = Lowercase; +class Uppercase extends /*#__PURE__*/transform(String$.annotations({ + description: "a string that will be converted to uppercase" +}), Uppercased, { + strict: true, + decode: i => i.toUpperCase(), + encode: _Function.identity +}).annotations({ + identifier: "Uppercase" +}) {} +/** + * This schema converts a string to capitalized one. + * + * @category string transformations + * @since 3.10.0 + */ +exports.Uppercase = Uppercase; +class Capitalize extends /*#__PURE__*/transform(String$.annotations({ + description: "a string that will be converted to a capitalized format" +}), Capitalized, { + strict: true, + decode: i => string_.capitalize(i), + encode: _Function.identity +}).annotations({ + identifier: "Capitalize" +}) {} +/** + * This schema converts a string to uncapitalized one. + * + * @category string transformations + * @since 3.10.0 + */ +exports.Capitalize = Capitalize; +class Uncapitalize extends /*#__PURE__*/transform(String$.annotations({ + description: "a string that will be converted to an uncapitalized format" +}), Uncapitalized, { + strict: true, + decode: i => string_.uncapitalize(i), + encode: _Function.identity +}).annotations({ + identifier: "Uncapitalize" +}) {} +/** + * @category string constructors + * @since 3.10.0 + */ +exports.Uncapitalize = Uncapitalize; +class Trimmed extends /*#__PURE__*/String$.pipe(/*#__PURE__*/trimmed({ + identifier: "Trimmed" +})) {} +/** + * Useful for validating strings that must contain meaningful characters without + * leading or trailing whitespace. + * + * @example + * ```ts + * import { Schema } from "effect" + * + * console.log(Schema.decodeOption(Schema.NonEmptyTrimmedString)("")) // Option.none() + * console.log(Schema.decodeOption(Schema.NonEmptyTrimmedString)(" a ")) // Option.none() + * console.log(Schema.decodeOption(Schema.NonEmptyTrimmedString)("a")) // Option.some("a") + * ``` + * + * @category string constructors + * @since 3.10.0 + */ +exports.Trimmed = Trimmed; +class NonEmptyTrimmedString extends /*#__PURE__*/Trimmed.pipe(/*#__PURE__*/nonEmptyString({ + identifier: "NonEmptyTrimmedString" +})) {} +/** + * This schema allows removing whitespaces from the beginning and end of a string. + * + * @category string transformations + * @since 3.10.0 + */ +exports.NonEmptyTrimmedString = NonEmptyTrimmedString; +class Trim extends /*#__PURE__*/transform(String$.annotations({ + description: "a string that will be trimmed" +}), Trimmed, { + strict: true, + decode: i => i.trim(), + encode: _Function.identity +}).annotations({ + identifier: "Trim" +}) {} +/** + * Returns a schema that allows splitting a string into an array of strings. + * + * @category string transformations + * @since 3.10.0 + */ +exports.Trim = Trim; +const split = separator => transform(String$.annotations({ + description: "a string that will be split" +}), Array$(String$), { + strict: true, + decode: i => i.split(separator), + encode: a => a.join(separator) +}); +exports.split = split; +const getErrorMessage = e => e instanceof Error ? e.message : String(e); +const getParseJsonTransformation = options => transformOrFail(String$.annotations({ + description: "a string to be decoded into JSON" +}), Unknown, { + strict: true, + decode: (i, _, ast) => ParseResult.try({ + try: () => JSON.parse(i, options?.reviver), + catch: e => new ParseResult.Type(ast, i, getErrorMessage(e)) + }), + encode: (a, _, ast) => ParseResult.try({ + try: () => JSON.stringify(a, options?.replacer, options?.space), + catch: e => new ParseResult.Type(ast, a, getErrorMessage(e)) + }) +}).annotations({ + title: "parseJson", + schemaId: AST.ParseJsonSchemaId +}); +/** + * The `ParseJson` combinator provides a method to convert JSON strings into the `unknown` type using the underlying + * functionality of `JSON.parse`. It also utilizes `JSON.stringify` for encoding. + * + * You can optionally provide a `ParseJsonOptions` to configure both `JSON.parse` and `JSON.stringify` executions. + * + * Optionally, you can pass a schema `Schema` to obtain an `A` type instead of `unknown`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import * as Schema from "effect/Schema" + * + * assert.deepStrictEqual(Schema.decodeUnknownSync(Schema.parseJson())(`{"a":"1"}`), { a: "1" }) + * assert.deepStrictEqual(Schema.decodeUnknownSync(Schema.parseJson(Schema.Struct({ a: Schema.NumberFromString })))(`{"a":"1"}`), { a: 1 }) + * ``` + * + * @category string transformations + * @since 3.10.0 + */ +const parseJson = (schemaOrOptions, o) => isSchema(schemaOrOptions) ? compose(parseJson(o), schemaOrOptions) : getParseJsonTransformation(schemaOrOptions); +/** + * @category string constructors + * @since 3.10.0 + */ +exports.parseJson = parseJson; +class NonEmptyString extends /*#__PURE__*/String$.pipe(/*#__PURE__*/nonEmptyString({ + identifier: "NonEmptyString" +})) {} +/** + * @category schema id + * @since 3.10.0 + */ +exports.NonEmptyString = NonEmptyString; +const UUIDSchemaId = exports.UUIDSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/UUID"); +const uuidRegexp = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i; +/** + * Represents a Universally Unique Identifier (UUID). + * + * This schema ensures that the provided string adheres to the standard UUID format. + * + * @category string constructors + * @since 3.10.0 + */ +class UUID extends /*#__PURE__*/String$.pipe(/*#__PURE__*/pattern(uuidRegexp, { + schemaId: UUIDSchemaId, + identifier: "UUID", + jsonSchema: { + format: "uuid", + pattern: uuidRegexp.source + }, + description: "a Universally Unique Identifier", + arbitrary: () => fc => fc.uuid() +})) {} +/** + * @category schema id + * @since 3.10.0 + */ +exports.UUID = UUID; +const ULIDSchemaId = exports.ULIDSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/ULID"); +const ulidRegexp = /^[0-7][0-9A-HJKMNP-TV-Z]{25}$/i; +/** + * Represents a Universally Unique Lexicographically Sortable Identifier (ULID). + * + * ULIDs are designed to be compact, URL-safe, and ordered, making them suitable for use as identifiers. + * This schema ensures that the provided string adheres to the standard ULID format. + * + * @category string constructors + * @since 3.10.0 + */ +class ULID extends /*#__PURE__*/String$.pipe(/*#__PURE__*/pattern(ulidRegexp, { + schemaId: ULIDSchemaId, + identifier: "ULID", + description: "a Universally Unique Lexicographically Sortable Identifier", + arbitrary: () => fc => fc.ulid() +})) {} +/** + * Defines a schema that represents a `URL` object. + * + * @category URL constructors + * @since 3.11.0 + */ +exports.ULID = ULID; +class URLFromSelf extends /*#__PURE__*/instanceOf(URL, { + typeConstructor: { + _tag: "URL" + }, + identifier: "URLFromSelf", + arbitrary: () => fc => fc.webUrl().map(s => new URL(s)), + pretty: () => url => url.toString() +}) {} +/** @ignore */ +exports.URLFromSelf = URLFromSelf; +class URL$ extends /*#__PURE__*/transformOrFail(String$.annotations({ + description: "a string to be decoded into a URL" +}), URLFromSelf, { + strict: true, + decode: (i, _, ast) => ParseResult.try({ + try: () => new URL(i), + catch: e => new ParseResult.Type(ast, i, `Unable to decode ${JSON.stringify(i)} into a URL. ${getErrorMessage(e)}`) + }), + encode: a => ParseResult.succeed(a.toString()) +}).annotations({ + identifier: "URL", + pretty: () => url => url.toString() +}) {} +exports.URL = URL$; +/** + * @category schema id + * @since 3.10.0 + */ +const FiniteSchemaId = exports.FiniteSchemaId = schemaId_.FiniteSchemaId; +/** + * Ensures that the provided value is a finite number (excluding NaN, +Infinity, and -Infinity). + * + * @category number filters + * @since 3.10.0 + */ +const finite = annotations => self => self.pipe(filter(Number.isFinite, { + schemaId: FiniteSchemaId, + title: "finite", + description: "a finite number", + jsonSchema: {}, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +exports.finite = finite; +const GreaterThanSchemaId = exports.GreaterThanSchemaId = schemaId_.GreaterThanSchemaId; +/** + * This filter checks whether the provided number is greater than the specified minimum. + * + * @category number filters + * @since 3.10.0 + */ +const greaterThan = (exclusiveMinimum, annotations) => self => self.pipe(filter(a => a > exclusiveMinimum, { + schemaId: GreaterThanSchemaId, + title: `greaterThan(${exclusiveMinimum})`, + description: exclusiveMinimum === 0 ? "a positive number" : `a number greater than ${exclusiveMinimum}`, + jsonSchema: { + exclusiveMinimum + }, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +exports.greaterThan = greaterThan; +const GreaterThanOrEqualToSchemaId = exports.GreaterThanOrEqualToSchemaId = schemaId_.GreaterThanOrEqualToSchemaId; +/** + * This filter checks whether the provided number is greater than or equal to the specified minimum. + * + * @category number filters + * @since 3.10.0 + */ +const greaterThanOrEqualTo = (minimum, annotations) => self => self.pipe(filter(a => a >= minimum, { + schemaId: GreaterThanOrEqualToSchemaId, + title: `greaterThanOrEqualTo(${minimum})`, + description: minimum === 0 ? "a non-negative number" : `a number greater than or equal to ${minimum}`, + jsonSchema: { + minimum + }, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +exports.greaterThanOrEqualTo = greaterThanOrEqualTo; +const MultipleOfSchemaId = exports.MultipleOfSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/MultipleOf"); +/** + * @category number filters + * @since 3.10.0 + */ +const multipleOf = (divisor, annotations) => self => { + const positiveDivisor = Math.abs(divisor); // spec requires positive divisor + return self.pipe(filter(a => number_.remainder(a, divisor) === 0, { + schemaId: MultipleOfSchemaId, + title: `multipleOf(${positiveDivisor})`, + description: `a number divisible by ${positiveDivisor}`, + jsonSchema: { + multipleOf: positiveDivisor + }, + ...annotations + })); +}; +/** + * @category schema id + * @since 3.10.0 + */ +exports.multipleOf = multipleOf; +const IntSchemaId = exports.IntSchemaId = schemaId_.IntSchemaId; +/** + * Ensures that the provided value is an integer number (excluding NaN, +Infinity, and -Infinity). + * + * @category number filters + * @since 3.10.0 + */ +const int = annotations => self => self.pipe(filter(a => Number.isSafeInteger(a), { + schemaId: IntSchemaId, + title: "int", + description: "an integer", + jsonSchema: { + type: "integer" + }, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +exports.int = int; +const LessThanSchemaId = exports.LessThanSchemaId = schemaId_.LessThanSchemaId; +/** + * This filter checks whether the provided number is less than the specified maximum. + * + * @category number filters + * @since 3.10.0 + */ +const lessThan = (exclusiveMaximum, annotations) => self => self.pipe(filter(a => a < exclusiveMaximum, { + schemaId: LessThanSchemaId, + title: `lessThan(${exclusiveMaximum})`, + description: exclusiveMaximum === 0 ? "a negative number" : `a number less than ${exclusiveMaximum}`, + jsonSchema: { + exclusiveMaximum + }, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +exports.lessThan = lessThan; +const LessThanOrEqualToSchemaId = exports.LessThanOrEqualToSchemaId = schemaId_.LessThanOrEqualToSchemaId; +/** + * This schema checks whether the provided number is less than or equal to the specified maximum. + * + * @category number filters + * @since 3.10.0 + */ +const lessThanOrEqualTo = (maximum, annotations) => self => self.pipe(filter(a => a <= maximum, { + schemaId: LessThanOrEqualToSchemaId, + title: `lessThanOrEqualTo(${maximum})`, + description: maximum === 0 ? "a non-positive number" : `a number less than or equal to ${maximum}`, + jsonSchema: { + maximum + }, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +exports.lessThanOrEqualTo = lessThanOrEqualTo; +const BetweenSchemaId = exports.BetweenSchemaId = schemaId_.BetweenSchemaId; +/** + * This filter checks whether the provided number falls within the specified minimum and maximum values. + * + * @category number filters + * @since 3.10.0 + */ +const between = (minimum, maximum, annotations) => self => self.pipe(filter(a => a >= minimum && a <= maximum, { + schemaId: BetweenSchemaId, + title: `between(${minimum}, ${maximum})`, + description: `a number between ${minimum} and ${maximum}`, + jsonSchema: { + minimum, + maximum + }, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +exports.between = between; +const NonNaNSchemaId = exports.NonNaNSchemaId = schemaId_.NonNaNSchemaId; +/** + * @category number filters + * @since 3.10.0 + */ +const nonNaN = annotations => self => self.pipe(filter(a => !Number.isNaN(a), { + schemaId: NonNaNSchemaId, + title: "nonNaN", + description: "a number excluding NaN", + ...annotations +})); +/** + * @category number filters + * @since 3.10.0 + */ +exports.nonNaN = nonNaN; +const positive = annotations => greaterThan(0, { + title: "positive", + ...annotations +}); +/** + * @category number filters + * @since 3.10.0 + */ +exports.positive = positive; +const negative = annotations => lessThan(0, { + title: "negative", + ...annotations +}); +/** + * @category number filters + * @since 3.10.0 + */ +exports.negative = negative; +const nonPositive = annotations => lessThanOrEqualTo(0, { + title: "nonPositive", + ...annotations +}); +/** + * @category number filters + * @since 3.10.0 + */ +exports.nonPositive = nonPositive; +const nonNegative = annotations => greaterThanOrEqualTo(0, { + title: "nonNegative", + ...annotations +}); +/** + * Clamps a number between a minimum and a maximum value. + * + * @category number transformations + * @since 3.10.0 + */ +exports.nonNegative = nonNegative; +const clamp = (minimum, maximum) => self => { + return transform(self, typeSchema(self).pipe(between(minimum, maximum)), { + strict: false, + decode: i => number_.clamp(i, { + minimum, + maximum + }), + encode: _Function.identity + }); +}; +/** + * Transforms a `string` into a `number` by parsing the string using the `parse` + * function of the `effect/Number` module. + * + * It returns an error if the value can't be converted (for example when + * non-numeric characters are provided). + * + * The following special string values are supported: "NaN", "Infinity", + * "-Infinity". + * + * @category number transformations + * @since 3.10.0 + */ +exports.clamp = clamp; +function parseNumber(self) { + return transformOrFail(self, Number$, { + strict: false, + decode: (i, _, ast) => ParseResult.fromOption(number_.parse(i), () => new ParseResult.Type(ast, i, `Unable to decode ${JSON.stringify(i)} into a number`)), + encode: a => ParseResult.succeed(String(a)) + }); +} +/** + * This schema transforms a `string` into a `number` by parsing the string using the `parse` function of the `effect/Number` module. + * + * It returns an error if the value can't be converted (for example when non-numeric characters are provided). + * + * The following special string values are supported: "NaN", "Infinity", "-Infinity". + * + * @category number transformations + * @since 3.10.0 + */ +class NumberFromString extends /*#__PURE__*/parseNumber(String$.annotations({ + description: "a string to be decoded into a number" +})).annotations({ + identifier: "NumberFromString" +}) {} +/** + * @category number constructors + * @since 3.10.0 + */ +exports.NumberFromString = NumberFromString; +class Finite extends /*#__PURE__*/Number$.pipe(/*#__PURE__*/finite({ + identifier: "Finite" +})) {} +/** + * @category number constructors + * @since 3.10.0 + */ +exports.Finite = Finite; +class Int extends /*#__PURE__*/Number$.pipe(/*#__PURE__*/int({ + identifier: "Int" +})) {} +/** + * @category number constructors + * @since 3.10.0 + */ +exports.Int = Int; +class NonNaN extends /*#__PURE__*/Number$.pipe(/*#__PURE__*/nonNaN({ + identifier: "NonNaN" +})) {} +/** + * @category number constructors + * @since 3.10.0 + */ +exports.NonNaN = NonNaN; +class Positive extends /*#__PURE__*/Number$.pipe(/*#__PURE__*/positive({ + identifier: "Positive" +})) {} +/** + * @category number constructors + * @since 3.10.0 + */ +exports.Positive = Positive; +class Negative extends /*#__PURE__*/Number$.pipe(/*#__PURE__*/negative({ + identifier: "Negative" +})) {} +/** + * @category number constructors + * @since 3.10.0 + */ +exports.Negative = Negative; +class NonPositive extends /*#__PURE__*/Number$.pipe(/*#__PURE__*/nonPositive({ + identifier: "NonPositive" +})) {} +/** + * @category number constructors + * @since 3.10.0 + */ +exports.NonPositive = NonPositive; +class NonNegative extends /*#__PURE__*/Number$.pipe(/*#__PURE__*/nonNegative({ + identifier: "NonNegative" +})) {} +/** + * @category schema id + * @since 3.10.0 + */ +exports.NonNegative = NonNegative; +const JsonNumberSchemaId = exports.JsonNumberSchemaId = schemaId_.JsonNumberSchemaId; +/** + * The `JsonNumber` is a schema for representing JSON numbers. It ensures that the provided value is a valid + * number by filtering out `NaN` and `(+/-) Infinity`. This is useful when you want to validate and represent numbers in JSON + * format. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import * as Schema from "effect/Schema" + * + * const is = Schema.is(Schema.JsonNumber) + * + * assert.deepStrictEqual(is(42), true) + * assert.deepStrictEqual(is(Number.NaN), false) + * assert.deepStrictEqual(is(Number.POSITIVE_INFINITY), false) + * assert.deepStrictEqual(is(Number.NEGATIVE_INFINITY), false) + * ``` + * + * @category number constructors + * @since 3.10.0 + */ +class JsonNumber extends /*#__PURE__*/Number$.pipe(/*#__PURE__*/finite({ + schemaId: JsonNumberSchemaId, + identifier: "JsonNumber" +})) {} +/** + * @category boolean transformations + * @since 3.10.0 + */ +exports.JsonNumber = JsonNumber; +class Not extends /*#__PURE__*/transform(/*#__PURE__*/Boolean$.annotations({ + description: "a boolean that will be negated" +}), Boolean$, { + strict: true, + decode: i => boolean_.not(i), + encode: a => boolean_.not(a) +}) {} +exports.Not = Not; +const encodeSymbol = (sym, ast) => { + const key = Symbol.keyFor(sym); + return key === undefined ? ParseResult.fail(new ParseResult.Type(ast, sym, `Unable to encode a unique symbol ${String(sym)} into a string`)) : ParseResult.succeed(key); +}; +const decodeSymbol = s => ParseResult.succeed(Symbol.for(s)); +/** @ignore */ +class Symbol$ extends /*#__PURE__*/transformOrFail(String$.annotations({ + description: "a string to be decoded into a globally shared symbol" +}), SymbolFromSelf, { + strict: false, + decode: i => decodeSymbol(i), + encode: (a, _, ast) => encodeSymbol(a, ast) +}).annotations({ + identifier: "Symbol" +}) {} +exports.Symbol = Symbol$; +/** + * @category schema id + * @since 3.10.0 + */ +const GreaterThanBigIntSchemaId = exports.GreaterThanBigIntSchemaId = schemaId_.GreaterThanBigintSchemaId; +/** + * @category bigint filters + * @since 3.10.0 + */ +const greaterThanBigInt = (min, annotations) => self => self.pipe(filter(a => a > min, { + schemaId: GreaterThanBigIntSchemaId, + [GreaterThanBigIntSchemaId]: { + min + }, + title: `greaterThanBigInt(${min})`, + description: min === 0n ? "a positive bigint" : `a bigint greater than ${min}n`, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +exports.greaterThanBigInt = greaterThanBigInt; +const GreaterThanOrEqualToBigIntSchemaId = exports.GreaterThanOrEqualToBigIntSchemaId = schemaId_.GreaterThanOrEqualToBigIntSchemaId; +/** + * @category bigint filters + * @since 3.10.0 + */ +const greaterThanOrEqualToBigInt = (min, annotations) => self => self.pipe(filter(a => a >= min, { + schemaId: GreaterThanOrEqualToBigIntSchemaId, + [GreaterThanOrEqualToBigIntSchemaId]: { + min + }, + title: `greaterThanOrEqualToBigInt(${min})`, + description: min === 0n ? "a non-negative bigint" : `a bigint greater than or equal to ${min}n`, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +exports.greaterThanOrEqualToBigInt = greaterThanOrEqualToBigInt; +const LessThanBigIntSchemaId = exports.LessThanBigIntSchemaId = schemaId_.LessThanBigIntSchemaId; +/** + * @category bigint filters + * @since 3.10.0 + */ +const lessThanBigInt = (max, annotations) => self => self.pipe(filter(a => a < max, { + schemaId: LessThanBigIntSchemaId, + [LessThanBigIntSchemaId]: { + max + }, + title: `lessThanBigInt(${max})`, + description: max === 0n ? "a negative bigint" : `a bigint less than ${max}n`, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +exports.lessThanBigInt = lessThanBigInt; +const LessThanOrEqualToBigIntSchemaId = exports.LessThanOrEqualToBigIntSchemaId = schemaId_.LessThanOrEqualToBigIntSchemaId; +/** + * @category bigint filters + * @since 3.10.0 + */ +const lessThanOrEqualToBigInt = (max, annotations) => self => self.pipe(filter(a => a <= max, { + schemaId: LessThanOrEqualToBigIntSchemaId, + [LessThanOrEqualToBigIntSchemaId]: { + max + }, + title: `lessThanOrEqualToBigInt(${max})`, + description: max === 0n ? "a non-positive bigint" : `a bigint less than or equal to ${max}n`, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +exports.lessThanOrEqualToBigInt = lessThanOrEqualToBigInt; +const BetweenBigIntSchemaId = exports.BetweenBigIntSchemaId = schemaId_.BetweenBigintSchemaId; +/** + * @category bigint filters + * @since 3.10.0 + */ +const betweenBigInt = (min, max, annotations) => self => self.pipe(filter(a => a >= min && a <= max, { + schemaId: BetweenBigIntSchemaId, + [BetweenBigIntSchemaId]: { + min, + max + }, + title: `betweenBigInt(${min}, ${max})`, + description: `a bigint between ${min}n and ${max}n`, + ...annotations +})); +/** + * @category bigint filters + * @since 3.10.0 + */ +exports.betweenBigInt = betweenBigInt; +const positiveBigInt = annotations => greaterThanBigInt(0n, { + title: "positiveBigInt", + ...annotations +}); +/** + * @category bigint filters + * @since 3.10.0 + */ +exports.positiveBigInt = positiveBigInt; +const negativeBigInt = annotations => lessThanBigInt(0n, { + title: "negativeBigInt", + ...annotations +}); +/** + * @category bigint filters + * @since 3.10.0 + */ +exports.negativeBigInt = negativeBigInt; +const nonNegativeBigInt = annotations => greaterThanOrEqualToBigInt(0n, { + title: "nonNegativeBigInt", + ...annotations +}); +/** + * @category bigint filters + * @since 3.10.0 + */ +exports.nonNegativeBigInt = nonNegativeBigInt; +const nonPositiveBigInt = annotations => lessThanOrEqualToBigInt(0n, { + title: "nonPositiveBigInt", + ...annotations +}); +/** + * Clamps a bigint between a minimum and a maximum value. + * + * @category bigint transformations + * @since 3.10.0 + */ +exports.nonPositiveBigInt = nonPositiveBigInt; +const clampBigInt = (minimum, maximum) => self => transform(self, self.pipe(typeSchema, betweenBigInt(minimum, maximum)), { + strict: false, + decode: i => bigInt_.clamp(i, { + minimum, + maximum + }), + encode: _Function.identity +}); +/** @ignore */ +exports.clampBigInt = clampBigInt; +class BigInt$ extends /*#__PURE__*/transformOrFail(String$.annotations({ + description: "a string to be decoded into a bigint" +}), BigIntFromSelf, { + strict: true, + decode: (i, _, ast) => ParseResult.fromOption(bigInt_.fromString(i), () => new ParseResult.Type(ast, i, `Unable to decode ${JSON.stringify(i)} into a bigint`)), + encode: a => ParseResult.succeed(String(a)) +}).annotations({ + identifier: "BigInt" +}) {} +exports.BigInt = BigInt$; +/** + * @category bigint constructors + * @since 3.10.0 + */ +const PositiveBigIntFromSelf = exports.PositiveBigIntFromSelf = /*#__PURE__*/BigIntFromSelf.pipe(/*#__PURE__*/positiveBigInt({ + identifier: "PositiveBigintFromSelf" +})); +/** + * @category bigint constructors + * @since 3.10.0 + */ +const PositiveBigInt = exports.PositiveBigInt = /*#__PURE__*/BigInt$.pipe(/*#__PURE__*/positiveBigInt({ + identifier: "PositiveBigint" +})); +/** + * @category bigint constructors + * @since 3.10.0 + */ +const NegativeBigIntFromSelf = exports.NegativeBigIntFromSelf = /*#__PURE__*/BigIntFromSelf.pipe(/*#__PURE__*/negativeBigInt({ + identifier: "NegativeBigintFromSelf" +})); +/** + * @category bigint constructors + * @since 3.10.0 + */ +const NegativeBigInt = exports.NegativeBigInt = /*#__PURE__*/BigInt$.pipe(/*#__PURE__*/negativeBigInt({ + identifier: "NegativeBigint" +})); +/** + * @category bigint constructors + * @since 3.10.0 + */ +const NonPositiveBigIntFromSelf = exports.NonPositiveBigIntFromSelf = /*#__PURE__*/BigIntFromSelf.pipe(/*#__PURE__*/nonPositiveBigInt({ + identifier: "NonPositiveBigintFromSelf" +})); +/** + * @category bigint constructors + * @since 3.10.0 + */ +const NonPositiveBigInt = exports.NonPositiveBigInt = /*#__PURE__*/BigInt$.pipe(/*#__PURE__*/nonPositiveBigInt({ + identifier: "NonPositiveBigint" +})); +/** + * @category bigint constructors + * @since 3.10.0 + */ +const NonNegativeBigIntFromSelf = exports.NonNegativeBigIntFromSelf = /*#__PURE__*/BigIntFromSelf.pipe(/*#__PURE__*/nonNegativeBigInt({ + identifier: "NonNegativeBigintFromSelf" +})); +/** + * @category bigint constructors + * @since 3.10.0 + */ +const NonNegativeBigInt = exports.NonNegativeBigInt = /*#__PURE__*/BigInt$.pipe(/*#__PURE__*/nonNegativeBigInt({ + identifier: "NonNegativeBigint" +})); +/** + * This schema transforms a `number` into a `bigint` by parsing the number using the `BigInt` function. + * + * It returns an error if the value can't be safely encoded as a `number` due to being out of range. + * + * @category bigint transformations + * @since 3.10.0 + */ +class BigIntFromNumber extends /*#__PURE__*/transformOrFail(Number$.annotations({ + description: "a number to be decoded into a bigint" +}), BigIntFromSelf.pipe(betweenBigInt(BigInt(Number.MIN_SAFE_INTEGER), BigInt(Number.MAX_SAFE_INTEGER))), { + strict: true, + decode: (i, _, ast) => ParseResult.fromOption(bigInt_.fromNumber(i), () => new ParseResult.Type(ast, i, `Unable to decode ${i} into a bigint`)), + encode: (a, _, ast) => ParseResult.fromOption(bigInt_.toNumber(a), () => new ParseResult.Type(ast, a, `Unable to encode ${a}n into a number`)) +}).annotations({ + identifier: "BigIntFromNumber" +}) {} +exports.BigIntFromNumber = BigIntFromNumber; +const redactedArbitrary = value => fc => value(fc).map(redacted_.make); +const toComposite = (eff, onSuccess, ast, actual) => ParseResult.mapBoth(eff, { + onFailure: e => new ParseResult.Composite(ast, actual, e), + onSuccess +}); +const redactedParse = decodeUnknown => (u, options, ast) => redacted_.isRedacted(u) ? toComposite(decodeUnknown(redacted_.value(u), options), redacted_.make, ast, u) : ParseResult.fail(new ParseResult.Type(ast, u)); +/** + * @category Redacted constructors + * @since 3.10.0 + */ +const RedactedFromSelf = value => declare([value], { + decode: value => redactedParse(ParseResult.decodeUnknown(value)), + encode: value => redactedParse(ParseResult.encodeUnknown(value)) +}, { + typeConstructor: { + _tag: "effect/Redacted" + }, + description: "Redacted()", + pretty: () => () => "Redacted()", + arbitrary: redactedArbitrary, + equivalence: redacted_.getEquivalence +}); +/** + * A transformation that transform a `Schema` into a + * `RedactedFromSelf`. + * + * @category Redacted transformations + * @since 3.10.0 + */ +exports.RedactedFromSelf = RedactedFromSelf; +function Redacted(value) { + return transform(value, RedactedFromSelf(typeSchema(asSchema(value))), { + strict: true, + decode: i => redacted_.make(i), + encode: a => redacted_.value(a) + }); +} +/** + * @category Duration constructors + * @since 3.10.0 + */ +class DurationFromSelf extends /*#__PURE__*/declare(duration_.isDuration, { + typeConstructor: { + _tag: "effect/Duration" + }, + identifier: "DurationFromSelf", + pretty: () => String, + arbitrary: () => fc => fc.oneof(fc.constant(duration_.infinity), fc.bigInt({ + min: 0n + }).map(_ => duration_.nanos(_)), fc.maxSafeNat().map(_ => duration_.millis(_))), + equivalence: () => duration_.Equivalence +}) {} +/** + * A schema that transforms a non negative `bigint` into a `Duration`. Treats + * the value as the number of nanoseconds. + * + * @category Duration transformations + * @since 3.10.0 + */ +exports.DurationFromSelf = DurationFromSelf; +class DurationFromNanos extends /*#__PURE__*/transformOrFail(NonNegativeBigIntFromSelf.annotations({ + description: "a bigint to be decoded into a Duration" +}), DurationFromSelf.pipe(filter(duration => duration_.isFinite(duration), { + description: "a finite duration" +})), { + strict: true, + decode: i => ParseResult.succeed(duration_.nanos(i)), + encode: (a, _, ast) => option_.match(duration_.toNanos(a), { + onNone: () => ParseResult.fail(new ParseResult.Type(ast, a, `Unable to encode ${a} into a bigint`)), + onSome: nanos => ParseResult.succeed(nanos) + }) +}).annotations({ + identifier: "DurationFromNanos" +}) {} +/** + * A non-negative integer. +Infinity is excluded. + * + * @category number constructors + * @since 3.11.10 + */ +exports.DurationFromNanos = DurationFromNanos; +const NonNegativeInt = exports.NonNegativeInt = /*#__PURE__*/NonNegative.pipe(int()).annotations({ + identifier: "NonNegativeInt" +}); +/** + * A schema that transforms a (possibly Infinite) non negative number into a + * `Duration`. Treats the value as the number of milliseconds. + * + * @category Duration transformations + * @since 3.10.0 + */ +class DurationFromMillis extends /*#__PURE__*/transform(NonNegative.annotations({ + description: "a non-negative number to be decoded into a Duration" +}), DurationFromSelf, { + strict: true, + decode: i => duration_.millis(i), + encode: a => duration_.toMillis(a) +}).annotations({ + identifier: "DurationFromMillis" +}) {} +exports.DurationFromMillis = DurationFromMillis; +const DurationValueMillis = /*#__PURE__*/TaggedStruct("Millis", { + millis: NonNegativeInt +}); +const DurationValueNanos = /*#__PURE__*/TaggedStruct("Nanos", { + nanos: BigInt$ +}); +const DurationValueInfinity = /*#__PURE__*/TaggedStruct("Infinity", {}); +const durationValueInfinity = /*#__PURE__*/DurationValueInfinity.make({}); +const DurationValue = /*#__PURE__*/Union(DurationValueMillis, DurationValueNanos, DurationValueInfinity).annotations({ + identifier: "DurationValue", + description: "an JSON-compatible tagged union to be decoded into a Duration" +}); +const FiniteHRTime = /*#__PURE__*/Tuple(element(NonNegativeInt).annotations({ + title: "seconds" +}), element(NonNegativeInt).annotations({ + title: "nanos" +})).annotations({ + identifier: "FiniteHRTime" +}); +const InfiniteHRTime = /*#__PURE__*/Tuple(Literal(-1), Literal(0)).annotations({ + identifier: "InfiniteHRTime" +}); +const HRTime = /*#__PURE__*/Union(FiniteHRTime, InfiniteHRTime).annotations({ + identifier: "HRTime", + description: "a tuple of seconds and nanos to be decoded into a Duration" +}); +const isDurationValue = u => typeof u === "object"; +// TODO(4.0): remove HRTime union member +/** + * A schema that converts a JSON-compatible tagged union into a `Duration`. + * + * @category Duration transformations + * @since 3.10.0 + */ +class Duration extends /*#__PURE__*/transform(Union(DurationValue, HRTime), DurationFromSelf, { + strict: true, + decode: i => { + if (isDurationValue(i)) { + switch (i._tag) { + case "Millis": + return duration_.millis(i.millis); + case "Nanos": + return duration_.nanos(i.nanos); + case "Infinity": + return duration_.infinity; + } + } + const [seconds, nanos] = i; + return seconds === -1 ? duration_.infinity : duration_.nanos(BigInt(seconds) * BigInt(1e9) + BigInt(nanos)); + }, + encode: a => { + switch (a.value._tag) { + case "Millis": + return DurationValueMillis.make({ + millis: a.value.millis + }); + case "Nanos": + return DurationValueNanos.make({ + nanos: a.value.nanos + }); + case "Infinity": + return durationValueInfinity; + } + } +}).annotations({ + identifier: "Duration" +}) {} +/** + * Clamps a `Duration` between a minimum and a maximum value. + * + * @category Duration transformations + * @since 3.10.0 + */ +exports.Duration = Duration; +const clampDuration = (minimum, maximum) => self => transform(self, self.pipe(typeSchema, betweenDuration(minimum, maximum)), { + strict: false, + decode: i => duration_.clamp(i, { + minimum, + maximum + }), + encode: _Function.identity +}); +/** + * @category schema id + * @since 3.10.0 + */ +exports.clampDuration = clampDuration; +const LessThanDurationSchemaId = exports.LessThanDurationSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/LessThanDuration"); +/** + * @category Duration filters + * @since 3.10.0 + */ +const lessThanDuration = (max, annotations) => self => self.pipe(filter(a => duration_.lessThan(a, max), { + schemaId: LessThanDurationSchemaId, + [LessThanDurationSchemaId]: { + max + }, + title: `lessThanDuration(${max})`, + description: `a Duration less than ${duration_.decode(max)}`, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +exports.lessThanDuration = lessThanDuration; +const LessThanOrEqualToDurationSchemaId = exports.LessThanOrEqualToDurationSchemaId = /*#__PURE__*/Symbol.for("effect/schema/LessThanOrEqualToDuration"); +/** + * @category Duration filters + * @since 3.10.0 + */ +const lessThanOrEqualToDuration = (max, annotations) => self => self.pipe(filter(a => duration_.lessThanOrEqualTo(a, max), { + schemaId: LessThanDurationSchemaId, + [LessThanDurationSchemaId]: { + max + }, + title: `lessThanOrEqualToDuration(${max})`, + description: `a Duration less than or equal to ${duration_.decode(max)}`, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +exports.lessThanOrEqualToDuration = lessThanOrEqualToDuration; +const GreaterThanDurationSchemaId = exports.GreaterThanDurationSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/GreaterThanDuration"); +/** + * @category Duration filters + * @since 3.10.0 + */ +const greaterThanDuration = (min, annotations) => self => self.pipe(filter(a => duration_.greaterThan(a, min), { + schemaId: GreaterThanDurationSchemaId, + [GreaterThanDurationSchemaId]: { + min + }, + title: `greaterThanDuration(${min})`, + description: `a Duration greater than ${duration_.decode(min)}`, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +exports.greaterThanDuration = greaterThanDuration; +const GreaterThanOrEqualToDurationSchemaId = exports.GreaterThanOrEqualToDurationSchemaId = /*#__PURE__*/Symbol.for("effect/schema/GreaterThanOrEqualToDuration"); +/** + * @category Duration filters + * @since 3.10.0 + */ +const greaterThanOrEqualToDuration = (min, annotations) => self => self.pipe(filter(a => duration_.greaterThanOrEqualTo(a, min), { + schemaId: GreaterThanOrEqualToDurationSchemaId, + [GreaterThanOrEqualToDurationSchemaId]: { + min + }, + title: `greaterThanOrEqualToDuration(${min})`, + description: `a Duration greater than or equal to ${duration_.decode(min)}`, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +exports.greaterThanOrEqualToDuration = greaterThanOrEqualToDuration; +const BetweenDurationSchemaId = exports.BetweenDurationSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/BetweenDuration"); +/** + * @category Duration filters + * @since 3.10.0 + */ +const betweenDuration = (minimum, maximum, annotations) => self => self.pipe(filter(a => duration_.between(a, { + minimum, + maximum +}), { + schemaId: BetweenDurationSchemaId, + [BetweenDurationSchemaId]: { + maximum, + minimum + }, + title: `betweenDuration(${minimum}, ${maximum})`, + description: `a Duration between ${duration_.decode(minimum)} and ${duration_.decode(maximum)}`, + ...annotations +})); +/** + * @category Uint8Array constructors + * @since 3.10.0 + */ +exports.betweenDuration = betweenDuration; +class Uint8ArrayFromSelf extends /*#__PURE__*/declare(Predicate.isUint8Array, { + typeConstructor: { + _tag: "Uint8Array" + }, + identifier: "Uint8ArrayFromSelf", + pretty: () => u8arr => `new Uint8Array(${JSON.stringify(Array.from(u8arr))})`, + arbitrary: () => fc => fc.uint8Array(), + equivalence: () => array_.getEquivalence(Equal.equals) +}) {} +/** + * @category number constructors + * @since 3.11.10 + */ +exports.Uint8ArrayFromSelf = Uint8ArrayFromSelf; +class Uint8 extends /*#__PURE__*/Number$.pipe(/*#__PURE__*/between(0, 255, { + identifier: "Uint8", + description: "a 8-bit unsigned integer" +})) {} +/** @ignore */ +exports.Uint8 = Uint8; +class Uint8Array$ extends /*#__PURE__*/transform(Array$(Uint8).annotations({ + description: "an array of 8-bit unsigned integers to be decoded into a Uint8Array" +}), Uint8ArrayFromSelf, { + strict: true, + decode: i => Uint8Array.from(i), + encode: a => Array.from(a) +}).annotations({ + identifier: "Uint8Array" +}) {} +exports.Uint8Array = Uint8Array$; +const makeUint8ArrayTransformation = (id, decode, encode) => transformOrFail(String$.annotations({ + description: "a string to be decoded into a Uint8Array" +}), Uint8ArrayFromSelf, { + strict: true, + decode: (i, _, ast) => either_.mapLeft(decode(i), decodeException => new ParseResult.Type(ast, i, decodeException.message)), + encode: a => ParseResult.succeed(encode(a)) +}).annotations({ + identifier: id +}); +/** + * Decodes a base64 (RFC4648) encoded string into a `Uint8Array`. + * + * @category Uint8Array transformations + * @since 3.10.0 + */ +const Uint8ArrayFromBase64 = exports.Uint8ArrayFromBase64 = /*#__PURE__*/makeUint8ArrayTransformation("Uint8ArrayFromBase64", Encoding.decodeBase64, Encoding.encodeBase64); +/** + * Decodes a base64 (URL) encoded string into a `Uint8Array`. + * + * @category Uint8Array transformations + * @since 3.10.0 + */ +const Uint8ArrayFromBase64Url = exports.Uint8ArrayFromBase64Url = /*#__PURE__*/makeUint8ArrayTransformation("Uint8ArrayFromBase64Url", Encoding.decodeBase64Url, Encoding.encodeBase64Url); +/** + * Decodes a hex encoded string into a `Uint8Array`. + * + * @category Uint8Array transformations + * @since 3.10.0 + */ +const Uint8ArrayFromHex = exports.Uint8ArrayFromHex = /*#__PURE__*/makeUint8ArrayTransformation("Uint8ArrayFromHex", Encoding.decodeHex, Encoding.encodeHex); +const makeEncodingTransformation = (id, decode, encode) => transformOrFail(String$.annotations({ + description: `A string that is interpreted as being ${id}-encoded and will be decoded into a UTF-8 string` +}), String$, { + strict: true, + decode: (i, _, ast) => either_.mapLeft(decode(i), decodeException => new ParseResult.Type(ast, i, decodeException.message)), + encode: a => ParseResult.succeed(encode(a)) +}).annotations({ + identifier: `StringFrom${id}` +}); +/** + * Decodes a base64 (RFC4648) encoded string into a UTF-8 string. + * + * @category string transformations + * @since 3.10.0 + */ +const StringFromBase64 = exports.StringFromBase64 = /*#__PURE__*/makeEncodingTransformation("Base64", Encoding.decodeBase64String, Encoding.encodeBase64); +/** + * Decodes a base64 (URL) encoded string into a UTF-8 string. + * + * @category string transformations + * @since 3.10.0 + */ +const StringFromBase64Url = exports.StringFromBase64Url = /*#__PURE__*/makeEncodingTransformation("Base64Url", Encoding.decodeBase64UrlString, Encoding.encodeBase64Url); +/** + * Decodes a hex encoded string into a UTF-8 string. + * + * @category string transformations + * @since 3.10.0 + */ +const StringFromHex = exports.StringFromHex = /*#__PURE__*/makeEncodingTransformation("Hex", Encoding.decodeHexString, Encoding.encodeHex); +/** + * Decodes a URI component encoded string into a UTF-8 string. + * Can be used to store data in a URL. + * + * @example + * ```ts + * import { Schema } from "effect" + * + * const PaginationSchema = Schema.Struct({ + * maxItemPerPage: Schema.Number, + * page: Schema.Number + * }) + * + * const UrlSchema = Schema.compose(Schema.StringFromUriComponent, Schema.parseJson(PaginationSchema)) + * + * console.log(Schema.encodeSync(UrlSchema)({ maxItemPerPage: 10, page: 1 })) + * // Output: %7B%22maxItemPerPage%22%3A10%2C%22page%22%3A1%7D + * ``` + * + * @category string transformations + * @since 3.12.0 + */ +const StringFromUriComponent = exports.StringFromUriComponent = /*#__PURE__*/transformOrFail(String$.annotations({ + description: `A string that is interpreted as being UriComponent-encoded and will be decoded into a UTF-8 string` +}), String$, { + strict: true, + decode: (i, _, ast) => either_.mapLeft(Encoding.decodeUriComponent(i), decodeException => new ParseResult.Type(ast, i, decodeException.message)), + encode: (a, _, ast) => either_.mapLeft(Encoding.encodeUriComponent(a), encodeException => new ParseResult.Type(ast, a, encodeException.message)) +}).annotations({ + identifier: `StringFromUriComponent` +}); +/** + * @category schema id + * @since 3.10.0 + */ +const MinItemsSchemaId = exports.MinItemsSchemaId = schemaId_.MinItemsSchemaId; +/** + * @category ReadonlyArray filters + * @since 3.10.0 + */ +const minItems = (n, annotations) => self => { + const minItems = Math.floor(n); + if (minItems < 1) { + throw new Error(errors_.getInvalidArgumentErrorMessage(`Expected an integer greater than or equal to 1, actual ${n}`)); + } + return self.pipe(filter(a => a.length >= minItems, { + schemaId: MinItemsSchemaId, + title: `minItems(${minItems})`, + description: `an array of at least ${minItems} item(s)`, + jsonSchema: { + minItems + }, + [AST.StableFilterAnnotationId]: true, + ...annotations + })); +}; +/** + * @category schema id + * @since 3.10.0 + */ +exports.minItems = minItems; +const MaxItemsSchemaId = exports.MaxItemsSchemaId = schemaId_.MaxItemsSchemaId; +/** + * @category ReadonlyArray filters + * @since 3.10.0 + */ +const maxItems = (n, annotations) => self => { + const maxItems = Math.floor(n); + if (maxItems < 1) { + throw new Error(errors_.getInvalidArgumentErrorMessage(`Expected an integer greater than or equal to 1, actual ${n}`)); + } + return self.pipe(filter(a => a.length <= maxItems, { + schemaId: MaxItemsSchemaId, + title: `maxItems(${maxItems})`, + description: `an array of at most ${maxItems} item(s)`, + jsonSchema: { + maxItems + }, + [AST.StableFilterAnnotationId]: true, + ...annotations + })); +}; +/** + * @category schema id + * @since 3.10.0 + */ +exports.maxItems = maxItems; +const ItemsCountSchemaId = exports.ItemsCountSchemaId = schemaId_.ItemsCountSchemaId; +/** + * @category ReadonlyArray filters + * @since 3.10.0 + */ +const itemsCount = (n, annotations) => self => { + const itemsCount = Math.floor(n); + if (itemsCount < 0) { + throw new Error(errors_.getInvalidArgumentErrorMessage(`Expected an integer greater than or equal to 0, actual ${n}`)); + } + return self.pipe(filter(a => a.length === itemsCount, { + schemaId: ItemsCountSchemaId, + title: `itemsCount(${itemsCount})`, + description: `an array of exactly ${itemsCount} item(s)`, + jsonSchema: { + minItems: itemsCount, + maxItems: itemsCount + }, + [AST.StableFilterAnnotationId]: true, + ...annotations + })); +}; +/** + * @category ReadonlyArray transformations + * @since 3.10.0 + */ +exports.itemsCount = itemsCount; +const getNumberIndexedAccess = self => make(AST.getNumberIndexedAccess(self.ast)); +/** + * Get the first element of a `ReadonlyArray`, or `None` if the array is empty. + * + * @category ReadonlyArray transformations + * @since 3.10.0 + */ +exports.getNumberIndexedAccess = getNumberIndexedAccess; +function head(self) { + return transform(self, OptionFromSelf(getNumberIndexedAccess(typeSchema(self))), { + strict: false, + decode: i => array_.head(i), + encode: a => option_.match(a, { + onNone: () => [], + onSome: array_.of + }) + }); +} +/** + * Get the first element of a `NonEmptyReadonlyArray`. + * + * @category NonEmptyReadonlyArray transformations + * @since 3.12.0 + */ +function headNonEmpty(self) { + return transform(self, getNumberIndexedAccess(typeSchema(self)), { + strict: false, + decode: i => array_.headNonEmpty(i), + encode: a => array_.of(a) + }); +} +/** + * Retrieves the first element of a `ReadonlyArray`. + * + * If the array is empty, it returns the `fallback` argument if provided; otherwise, it fails. + * + * @category ReadonlyArray transformations + * @since 3.10.0 + */ +const headOrElse = exports.headOrElse = /*#__PURE__*/(0, _Function.dual)(args => isSchema(args[0]), (self, fallback) => transformOrFail(self, getNumberIndexedAccess(typeSchema(self)), { + strict: true, + decode: (i, _, ast) => i.length > 0 ? ParseResult.succeed(i[0]) : fallback ? ParseResult.succeed(fallback()) : ParseResult.fail(new ParseResult.Type(ast, i, "Unable to retrieve the first element of an empty array")), + encode: a => ParseResult.succeed(array_.of(a)) +})); +/** + * @category schema id + * @since 3.10.0 + */ +const ValidDateSchemaId = exports.ValidDateSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/ValidDate"); +/** + * Defines a filter that specifically rejects invalid dates, such as `new + * Date("Invalid Date")`. This filter ensures that only properly formatted and + * valid date objects are accepted, enhancing data integrity by preventing + * erroneous date values from being processed. + * + * @category Date filters + * @since 3.10.0 + */ +const validDate = annotations => self => self.pipe(filter(a => !Number.isNaN(a.getTime()), { + schemaId: ValidDateSchemaId, + [ValidDateSchemaId]: { + noInvalidDate: true + }, + title: "validDate", + description: "a valid Date", + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +exports.validDate = validDate; +const LessThanDateSchemaId = exports.LessThanDateSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/LessThanDate"); +/** + * @category Date filters + * @since 3.10.0 + */ +const lessThanDate = (max, annotations) => self => self.pipe(filter(a => a < max, { + schemaId: LessThanDateSchemaId, + [LessThanDateSchemaId]: { + max + }, + title: `lessThanDate(${Inspectable.formatDate(max)})`, + description: `a date before ${Inspectable.formatDate(max)}`, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +exports.lessThanDate = lessThanDate; +const LessThanOrEqualToDateSchemaId = exports.LessThanOrEqualToDateSchemaId = /*#__PURE__*/Symbol.for("effect/schema/LessThanOrEqualToDate"); +/** + * @category Date filters + * @since 3.10.0 + */ +const lessThanOrEqualToDate = (max, annotations) => self => self.pipe(filter(a => a <= max, { + schemaId: LessThanOrEqualToDateSchemaId, + [LessThanOrEqualToDateSchemaId]: { + max + }, + title: `lessThanOrEqualToDate(${Inspectable.formatDate(max)})`, + description: `a date before or equal to ${Inspectable.formatDate(max)}`, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +exports.lessThanOrEqualToDate = lessThanOrEqualToDate; +const GreaterThanDateSchemaId = exports.GreaterThanDateSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/GreaterThanDate"); +/** + * @category Date filters + * @since 3.10.0 + */ +const greaterThanDate = (min, annotations) => self => self.pipe(filter(a => a > min, { + schemaId: GreaterThanDateSchemaId, + [GreaterThanDateSchemaId]: { + min + }, + title: `greaterThanDate(${Inspectable.formatDate(min)})`, + description: `a date after ${Inspectable.formatDate(min)}`, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +exports.greaterThanDate = greaterThanDate; +const GreaterThanOrEqualToDateSchemaId = exports.GreaterThanOrEqualToDateSchemaId = /*#__PURE__*/Symbol.for("effect/schema/GreaterThanOrEqualToDate"); +/** + * @category Date filters + * @since 3.10.0 + */ +const greaterThanOrEqualToDate = (min, annotations) => self => self.pipe(filter(a => a >= min, { + schemaId: GreaterThanOrEqualToDateSchemaId, + [GreaterThanOrEqualToDateSchemaId]: { + min + }, + title: `greaterThanOrEqualToDate(${Inspectable.formatDate(min)})`, + description: `a date after or equal to ${Inspectable.formatDate(min)}`, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +exports.greaterThanOrEqualToDate = greaterThanOrEqualToDate; +const BetweenDateSchemaId = exports.BetweenDateSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/BetweenDate"); +/** + * @category Date filters + * @since 3.10.0 + */ +const betweenDate = (min, max, annotations) => self => self.pipe(filter(a => a <= max && a >= min, { + schemaId: BetweenDateSchemaId, + [BetweenDateSchemaId]: { + max, + min + }, + title: `betweenDate(${Inspectable.formatDate(min)}, ${Inspectable.formatDate(max)})`, + description: `a date between ${Inspectable.formatDate(min)} and ${Inspectable.formatDate(max)}`, + ...annotations +})); +/** + * @category schema id + * @since 3.11.8 + */ +exports.betweenDate = betweenDate; +const DateFromSelfSchemaId = exports.DateFromSelfSchemaId = schemaId_.DateFromSelfSchemaId; +/** + * Describes a schema that accommodates potentially invalid `Date` instances, + * such as `new Date("Invalid Date")`, without rejection. + * + * @category Date constructors + * @since 3.10.0 + */ +class DateFromSelf extends /*#__PURE__*/declare(Predicate.isDate, { + typeConstructor: { + _tag: "Date" + }, + identifier: "DateFromSelf", + schemaId: DateFromSelfSchemaId, + [DateFromSelfSchemaId]: { + noInvalidDate: false + }, + description: "a potentially invalid Date instance", + pretty: () => date => `new Date(${JSON.stringify(date)})`, + arbitrary: () => fc => fc.date({ + noInvalidDate: false + }), + equivalence: () => Equivalence.Date +}) {} +/** + * Defines a schema that ensures only valid dates are accepted. This schema + * rejects values like `new Date("Invalid Date")`, which, despite being a `Date` + * instance, represents an invalid date. Such stringent validation ensures that + * all date objects processed through this schema are properly formed and + * represent real dates. + * + * @category Date constructors + * @since 3.10.0 + */ +exports.DateFromSelf = DateFromSelf; +class ValidDateFromSelf extends /*#__PURE__*/DateFromSelf.pipe(/*#__PURE__*/validDate({ + identifier: "ValidDateFromSelf", + description: "a valid Date instance" +})) {} +/** + * Defines a schema that attempts to convert a `string` to a `Date` object using + * the `new Date` constructor. This conversion is lenient, meaning it does not + * reject strings that do not form valid dates (e.g., using `new Date("Invalid + * Date")` results in a `Date` object, despite being invalid). + * + * @category Date transformations + * @since 3.10.0 + */ +exports.ValidDateFromSelf = ValidDateFromSelf; +class DateFromString extends /*#__PURE__*/transform(String$.annotations({ + description: "a string to be decoded into a Date" +}), DateFromSelf, { + strict: true, + decode: i => new Date(i), + encode: a => Inspectable.formatDate(a) +}).annotations({ + identifier: "DateFromString" +}) {} +/** @ignore */ +exports.DateFromString = DateFromString; +class Date$ extends /*#__PURE__*/DateFromString.pipe(/*#__PURE__*/validDate({ + identifier: "Date" +})) {} +exports.Date = Date$; +/** + * Defines a schema that converts a `number` into a `Date` object using the `new + * Date` constructor. This schema does not validate the numerical input, + * allowing potentially invalid values such as `NaN`, `Infinity`, and + * `-Infinity` to be converted into `Date` objects. During the encoding process, + * any invalid `Date` object will be encoded to `NaN`. + * + * @category Date transformations + * @since 3.10.0 + */ +class DateFromNumber extends /*#__PURE__*/transform(Number$.annotations({ + description: "a number to be decoded into a Date" +}), DateFromSelf, { + strict: true, + decode: i => new Date(i), + encode: a => a.getTime() +}).annotations({ + identifier: "DateFromNumber" +}) {} +/** + * Describes a schema that represents a `DateTime.Utc` instance. + * + * @category DateTime.Utc constructors + * @since 3.10.0 + */ +exports.DateFromNumber = DateFromNumber; +class DateTimeUtcFromSelf extends /*#__PURE__*/declare(u => dateTime.isDateTime(u) && dateTime.isUtc(u), { + typeConstructor: { + _tag: "effect/DateTime.Utc" + }, + identifier: "DateTimeUtcFromSelf", + description: "a DateTime.Utc instance", + pretty: () => dateTime => dateTime.toString(), + arbitrary: () => fc => fc.date({ + noInvalidDate: true + }).map(date => dateTime.unsafeFromDate(date)), + equivalence: () => dateTime.Equivalence +}) {} +exports.DateTimeUtcFromSelf = DateTimeUtcFromSelf; +const decodeDateTimeUtc = (input, ast) => ParseResult.try({ + try: () => dateTime.unsafeMake(input), + catch: () => new ParseResult.Type(ast, input, `Unable to decode ${Inspectable.formatUnknown(input)} into a DateTime.Utc`) +}); +/** + * Defines a schema that attempts to convert a `number` to a `DateTime.Utc` instance using the `DateTime.unsafeMake` constructor. + * + * @category DateTime.Utc transformations + * @since 3.10.0 + */ +class DateTimeUtcFromNumber extends /*#__PURE__*/transformOrFail(Number$.annotations({ + description: "a number to be decoded into a DateTime.Utc" +}), DateTimeUtcFromSelf, { + strict: true, + decode: (i, _, ast) => decodeDateTimeUtc(i, ast), + encode: a => ParseResult.succeed(dateTime.toEpochMillis(a)) +}).annotations({ + identifier: "DateTimeUtcFromNumber" +}) {} +/** + * Defines a schema that attempts to convert a `Date` to a `DateTime.Utc` instance using the `DateTime.unsafeMake` constructor. + * + * @category DateTime.Utc transformations + * @since 3.12.0 + */ +exports.DateTimeUtcFromNumber = DateTimeUtcFromNumber; +class DateTimeUtcFromDate extends /*#__PURE__*/transformOrFail(DateFromSelf.annotations({ + description: "a Date to be decoded into a DateTime.Utc" +}), DateTimeUtcFromSelf, { + strict: true, + decode: (i, _, ast) => decodeDateTimeUtc(i, ast), + encode: a => ParseResult.succeed(dateTime.toDateUtc(a)) +}).annotations({ + identifier: "DateTimeUtcFromDate" +}) {} +/** + * Defines a schema that attempts to convert a `string` to a `DateTime.Utc` instance using the `DateTime.unsafeMake` constructor. + * + * @category DateTime.Utc transformations + * @since 3.10.0 + */ +exports.DateTimeUtcFromDate = DateTimeUtcFromDate; +class DateTimeUtc extends /*#__PURE__*/transformOrFail(String$.annotations({ + description: "a string to be decoded into a DateTime.Utc" +}), DateTimeUtcFromSelf, { + strict: true, + decode: (i, _, ast) => decodeDateTimeUtc(i, ast), + encode: a => ParseResult.succeed(dateTime.formatIso(a)) +}).annotations({ + identifier: "DateTimeUtc" +}) {} +exports.DateTimeUtc = DateTimeUtc; +const timeZoneOffsetArbitrary = () => fc => fc.integer({ + min: -12 * 60 * 60 * 1000, + max: 14 * 60 * 60 * 1000 +}).map(dateTime.zoneMakeOffset); +/** + * Describes a schema that represents a `TimeZone.Offset` instance. + * + * @category TimeZone constructors + * @since 3.10.0 + */ +class TimeZoneOffsetFromSelf extends /*#__PURE__*/declare(dateTime.isTimeZoneOffset, { + typeConstructor: { + _tag: "effect/DateTime.TimeZone.Offset" + }, + identifier: "TimeZoneOffsetFromSelf", + description: "a TimeZone.Offset instance", + pretty: () => zone => zone.toString(), + arbitrary: timeZoneOffsetArbitrary +}) {} +/** + * Defines a schema that converts a `number` to a `TimeZone.Offset` instance using the `DateTime.zoneMakeOffset` constructor. + * + * @category TimeZone transformations + * @since 3.10.0 + */ +exports.TimeZoneOffsetFromSelf = TimeZoneOffsetFromSelf; +class TimeZoneOffset extends /*#__PURE__*/transform(Number$.annotations({ + description: "a number to be decoded into a TimeZone.Offset" +}), TimeZoneOffsetFromSelf, { + strict: true, + decode: i => dateTime.zoneMakeOffset(i), + encode: a => a.offset +}).annotations({ + identifier: "TimeZoneOffset" +}) {} +exports.TimeZoneOffset = TimeZoneOffset; +const timeZoneNamedArbitrary = () => fc => fc.constantFrom(...Intl.supportedValuesOf("timeZone")).map(dateTime.zoneUnsafeMakeNamed); +/** + * Describes a schema that represents a `TimeZone.Named` instance. + * + * @category TimeZone constructors + * @since 3.10.0 + */ +class TimeZoneNamedFromSelf extends /*#__PURE__*/declare(dateTime.isTimeZoneNamed, { + typeConstructor: { + _tag: "effect/DateTime.TimeZone.Named" + }, + identifier: "TimeZoneNamedFromSelf", + description: "a TimeZone.Named instance", + pretty: () => zone => zone.toString(), + arbitrary: timeZoneNamedArbitrary +}) {} +/** + * Defines a schema that attempts to convert a `string` to a `TimeZone.Named` instance using the `DateTime.zoneUnsafeMakeNamed` constructor. + * + * @category TimeZone transformations + * @since 3.10.0 + */ +exports.TimeZoneNamedFromSelf = TimeZoneNamedFromSelf; +class TimeZoneNamed extends /*#__PURE__*/transformOrFail(String$.annotations({ + description: "a string to be decoded into a TimeZone.Named" +}), TimeZoneNamedFromSelf, { + strict: true, + decode: (i, _, ast) => ParseResult.try({ + try: () => dateTime.zoneUnsafeMakeNamed(i), + catch: () => new ParseResult.Type(ast, i, `Unable to decode ${JSON.stringify(i)} into a TimeZone.Named`) + }), + encode: a => ParseResult.succeed(a.id) +}).annotations({ + identifier: "TimeZoneNamed" +}) {} +/** + * @category TimeZone constructors + * @since 3.10.0 + */ +exports.TimeZoneNamed = TimeZoneNamed; +class TimeZoneFromSelf extends /*#__PURE__*/Union(TimeZoneOffsetFromSelf, TimeZoneNamedFromSelf) {} +/** + * Defines a schema that attempts to convert a `string` to a `TimeZone` using the `DateTime.zoneFromString` constructor. + * + * @category TimeZone transformations + * @since 3.10.0 + */ +exports.TimeZoneFromSelf = TimeZoneFromSelf; +class TimeZone extends /*#__PURE__*/transformOrFail(String$.annotations({ + description: "a string to be decoded into a TimeZone" +}), TimeZoneFromSelf, { + strict: true, + decode: (i, _, ast) => option_.match(dateTime.zoneFromString(i), { + onNone: () => ParseResult.fail(new ParseResult.Type(ast, i, `Unable to decode ${JSON.stringify(i)} into a TimeZone`)), + onSome: ParseResult.succeed + }), + encode: a => ParseResult.succeed(dateTime.zoneToString(a)) +}).annotations({ + identifier: "TimeZone" +}) {} +exports.TimeZone = TimeZone; +const timeZoneArbitrary = fc => fc.oneof(timeZoneOffsetArbitrary()(fc), timeZoneNamedArbitrary()(fc)); +/** + * Describes a schema that represents a `DateTime.Zoned` instance. + * + * @category DateTime.Zoned constructors + * @since 3.10.0 + */ +class DateTimeZonedFromSelf extends /*#__PURE__*/declare(u => dateTime.isDateTime(u) && dateTime.isZoned(u), { + typeConstructor: { + _tag: "effect/DateTime.Zoned" + }, + identifier: "DateTimeZonedFromSelf", + description: "a DateTime.Zoned instance", + pretty: () => dateTime => dateTime.toString(), + arbitrary: () => fc => fc.tuple(fc.integer({ + // time zone db supports +/- 1000 years or so + min: -31536000000000, + max: 31536000000000 + }), timeZoneArbitrary(fc)).map(([millis, timeZone]) => dateTime.unsafeMakeZoned(millis, { + timeZone + })), + equivalence: () => dateTime.Equivalence +}) {} +/** + * Defines a schema that attempts to convert a `string` to a `DateTime.Zoned` instance. + * + * @category DateTime.Zoned transformations + * @since 3.10.0 + */ +exports.DateTimeZonedFromSelf = DateTimeZonedFromSelf; +class DateTimeZoned extends /*#__PURE__*/transformOrFail(String$.annotations({ + description: "a string to be decoded into a DateTime.Zoned" +}), DateTimeZonedFromSelf, { + strict: true, + decode: (i, _, ast) => option_.match(dateTime.makeZonedFromString(i), { + onNone: () => ParseResult.fail(new ParseResult.Type(ast, i, `Unable to decode ${JSON.stringify(i)} into a DateTime.Zoned`)), + onSome: ParseResult.succeed + }), + encode: a => ParseResult.succeed(dateTime.formatIsoZoned(a)) +}).annotations({ + identifier: "DateTimeZoned" +}) {} +exports.DateTimeZoned = DateTimeZoned; +const OptionNoneEncoded = /*#__PURE__*/Struct({ + _tag: Literal("None") +}).annotations({ + description: "NoneEncoded" +}); +const optionSomeEncoded = value => Struct({ + _tag: Literal("Some"), + value +}).annotations({ + description: `SomeEncoded<${format(value)}>` +}); +const optionEncoded = value => Union(OptionNoneEncoded, optionSomeEncoded(value)).annotations({ + description: `OptionEncoded<${format(value)}>` +}); +const optionDecode = input => input._tag === "None" ? option_.none() : option_.some(input.value); +const optionArbitrary = (value, ctx) => fc => fc.oneof(ctx, fc.record({ + _tag: fc.constant("None") +}), fc.record({ + _tag: fc.constant("Some"), + value: value(fc) +})).map(optionDecode); +const optionPretty = value => option_.match({ + onNone: () => "none()", + onSome: a => `some(${value(a)})` +}); +const optionParse = decodeUnknown => (u, options, ast) => option_.isOption(u) ? option_.isNone(u) ? ParseResult.succeed(option_.none()) : toComposite(decodeUnknown(u.value, options), option_.some, ast, u) : ParseResult.fail(new ParseResult.Type(ast, u)); +const OptionFromSelf_ = value => { + return declare([value], { + decode: value => optionParse(ParseResult.decodeUnknown(value)), + encode: value => optionParse(ParseResult.encodeUnknown(value)) + }, { + typeConstructor: { + _tag: "effect/Option" + }, + pretty: optionPretty, + arbitrary: optionArbitrary, + equivalence: option_.getEquivalence + }); +}; +/** + * @category Option transformations + * @since 3.10.0 + */ +const OptionFromSelf = value => { + return OptionFromSelf_(value).annotations({ + description: `Option<${format(value)}>` + }); +}; +exports.OptionFromSelf = OptionFromSelf; +const makeNoneEncoded = { + _tag: "None" +}; +const makeSomeEncoded = value => ({ + _tag: "Some", + value +}); +/** + * @category Option transformations + * @since 3.10.0 + */ +function Option(value) { + const value_ = asSchema(value); + const out = transform(optionEncoded(value_), OptionFromSelf(typeSchema(value_)), { + strict: true, + decode: i => optionDecode(i), + encode: a => option_.match(a, { + onNone: () => makeNoneEncoded, + onSome: makeSomeEncoded + }) + }); + return out; +} +/** + * @category Option transformations + * @since 3.10.0 + */ +function OptionFromNullOr(value) { + return transform(NullOr(value), OptionFromSelf(typeSchema(asSchema(value))), { + strict: true, + decode: i => option_.fromNullable(i), + encode: a => option_.getOrNull(a) + }); +} +/** + * @category Option transformations + * @since 3.10.0 + */ +function OptionFromNullishOr(value, onNoneEncoding) { + return transform(NullishOr(value), OptionFromSelf(typeSchema(asSchema(value))), { + strict: true, + decode: i => option_.fromNullable(i), + encode: onNoneEncoding === null ? a => option_.getOrNull(a) : a => option_.getOrUndefined(a) + }); +} +/** + * @category Option transformations + * @since 3.10.0 + */ +function OptionFromUndefinedOr(value) { + return transform(UndefinedOr(value), OptionFromSelf(typeSchema(asSchema(value))), { + strict: true, + decode: i => option_.fromNullable(i), + encode: a => option_.getOrUndefined(a) + }); +} +/** + * Transforms strings into an Option type, effectively filtering out empty or + * whitespace-only strings by trimming them and checking their length. Returns + * `none` for invalid inputs and `some` for valid non-empty strings. + * + * @example + * ```ts + * import { Schema } from "effect" + * + * console.log(Schema.decodeSync(Schema.OptionFromNonEmptyTrimmedString)("")) // Option.none() + * console.log(Schema.decodeSync(Schema.OptionFromNonEmptyTrimmedString)(" a ")) // Option.some("a") + * console.log(Schema.decodeSync(Schema.OptionFromNonEmptyTrimmedString)("a")) // Option.some("a") + * ``` + * + * @category Option transformations + * @since 3.10.0 + */ +class OptionFromNonEmptyTrimmedString extends /*#__PURE__*/transform(String$, /*#__PURE__*/OptionFromSelf(NonEmptyTrimmedString), { + strict: true, + decode: i => option_.filter(option_.some(i.trim()), string_.isNonEmpty), + encode: a => option_.getOrElse(a, () => "") +}) {} +exports.OptionFromNonEmptyTrimmedString = OptionFromNonEmptyTrimmedString; +const rightEncoded = right => Struct({ + _tag: Literal("Right"), + right +}).annotations({ + description: `RightEncoded<${format(right)}>` +}); +const leftEncoded = left => Struct({ + _tag: Literal("Left"), + left +}).annotations({ + description: `LeftEncoded<${format(left)}>` +}); +const eitherEncoded = (right, left) => Union(rightEncoded(right), leftEncoded(left)).annotations({ + description: `EitherEncoded<${format(left)}, ${format(right)}>` +}); +const eitherDecode = input => input._tag === "Left" ? either_.left(input.left) : either_.right(input.right); +const eitherArbitrary = (right, left) => fc => fc.oneof(fc.record({ + _tag: fc.constant("Left"), + left: left(fc) +}), fc.record({ + _tag: fc.constant("Right"), + right: right(fc) +})).map(eitherDecode); +const eitherPretty = (right, left) => either_.match({ + onLeft: e => `left(${left(e)})`, + onRight: a => `right(${right(a)})` +}); +const eitherParse = (parseRight, decodeUnknownLeft) => (u, options, ast) => either_.isEither(u) ? either_.match(u, { + onLeft: left => toComposite(decodeUnknownLeft(left, options), either_.left, ast, u), + onRight: right => toComposite(parseRight(right, options), either_.right, ast, u) +}) : ParseResult.fail(new ParseResult.Type(ast, u)); +/** + * @category Either transformations + * @since 3.10.0 + */ +const EitherFromSelf = ({ + left, + right +}) => { + return declare([right, left], { + decode: (right, left) => eitherParse(ParseResult.decodeUnknown(right), ParseResult.decodeUnknown(left)), + encode: (right, left) => eitherParse(ParseResult.encodeUnknown(right), ParseResult.encodeUnknown(left)) + }, { + typeConstructor: { + _tag: "effect/Either" + }, + description: `Either<${format(right)}, ${format(left)}>`, + pretty: eitherPretty, + arbitrary: eitherArbitrary, + equivalence: (right, left) => either_.getEquivalence({ + left, + right + }) + }); +}; +exports.EitherFromSelf = EitherFromSelf; +const makeLeftEncoded = left => ({ + _tag: "Left", + left +}); +const makeRightEncoded = right => ({ + _tag: "Right", + right +}); +/** + * @category Either transformations + * @since 3.10.0 + */ +const Either = ({ + left, + right +}) => { + const right_ = asSchema(right); + const left_ = asSchema(left); + const out = transform(eitherEncoded(right_, left_), EitherFromSelf({ + left: typeSchema(left_), + right: typeSchema(right_) + }), { + strict: true, + decode: i => eitherDecode(i), + encode: a => either_.match(a, { + onLeft: makeLeftEncoded, + onRight: makeRightEncoded + }) + }); + return out; +}; +/** + * @example + * ```ts + * import * as Schema from "effect/Schema" + * + * // Schema> + * Schema.EitherFromUnion({ left: Schema.String, right: Schema.Number }) + * ``` + * + * @category Either transformations + * @since 3.10.0 + */ +exports.Either = Either; +const EitherFromUnion = ({ + left, + right +}) => { + const right_ = asSchema(right); + const left_ = asSchema(left); + const toright = typeSchema(right_); + const toleft = typeSchema(left_); + const fromRight = transform(right_, rightEncoded(toright), { + strict: true, + decode: i => makeRightEncoded(i), + encode: a => a.right + }); + const fromLeft = transform(left_, leftEncoded(toleft), { + strict: true, + decode: i => makeLeftEncoded(i), + encode: a => a.left + }); + const out = transform(Union(fromRight, fromLeft), EitherFromSelf({ + left: toleft, + right: toright + }), { + strict: true, + decode: i => i._tag === "Left" ? either_.left(i.left) : either_.right(i.right), + encode: a => either_.match(a, { + onLeft: makeLeftEncoded, + onRight: makeRightEncoded + }) + }); + return out; +}; +exports.EitherFromUnion = EitherFromUnion; +const mapArbitrary = (key, value, ctx) => { + return fc => { + const items = fc.array(fc.tuple(key(fc), value(fc))); + return (ctx.depthIdentifier !== undefined ? fc.oneof(ctx, fc.constant([]), items) : items).map(as => new Map(as)); + }; +}; +const readonlyMapPretty = (key, value) => map => `new Map([${Array.from(map.entries()).map(([k, v]) => `[${key(k)}, ${value(v)}]`).join(", ")}])`; +const readonlyMapEquivalence = (key, value) => { + const arrayEquivalence = array_.getEquivalence(Equivalence.make(([ka, va], [kb, vb]) => key(ka, kb) && value(va, vb))); + return Equivalence.make((a, b) => arrayEquivalence(Array.from(a.entries()), Array.from(b.entries()))); +}; +const readonlyMapParse = decodeUnknown => (u, options, ast) => Predicate.isMap(u) ? toComposite(decodeUnknown(Array.from(u.entries()), options), as => new Map(as), ast, u) : ParseResult.fail(new ParseResult.Type(ast, u)); +const mapFromSelf_ = (key, value, description) => declare([key, value], { + decode: (Key, Value) => readonlyMapParse(ParseResult.decodeUnknown(Array$(Tuple(Key, Value)))), + encode: (Key, Value) => readonlyMapParse(ParseResult.encodeUnknown(Array$(Tuple(Key, Value)))) +}, { + typeConstructor: { + _tag: "ReadonlyMap" + }, + description, + pretty: readonlyMapPretty, + arbitrary: mapArbitrary, + equivalence: readonlyMapEquivalence +}); +/** + * @category ReadonlyMap + * @since 3.10.0 + */ +const ReadonlyMapFromSelf = ({ + key, + value +}) => mapFromSelf_(key, value, `ReadonlyMap<${format(key)}, ${format(value)}>`); +/** + * @category Map + * @since 3.10.0 + */ +exports.ReadonlyMapFromSelf = ReadonlyMapFromSelf; +const MapFromSelf = ({ + key, + value +}) => mapFromSelf_(key, value, `Map<${format(key)}, ${format(value)}>`); +/** + * @category ReadonlyMap transformations + * @since 3.10.0 + */ +exports.MapFromSelf = MapFromSelf; +function ReadonlyMap({ + key, + value +}) { + return transform(Array$(Tuple(key, value)), ReadonlyMapFromSelf({ + key: typeSchema(asSchema(key)), + value: typeSchema(asSchema(value)) + }), { + strict: true, + decode: i => new Map(i), + encode: a => Array.from(a.entries()) + }); +} +/** @ignore */ +function map({ + key, + value +}) { + return transform(Array$(Tuple(key, value)), MapFromSelf({ + key: typeSchema(asSchema(key)), + value: typeSchema(asSchema(value)) + }), { + strict: true, + decode: i => new Map(i), + encode: a => Array.from(a.entries()) + }); +} +/** + * @category ReadonlyMap transformations + * @since 3.10.0 + */ +const ReadonlyMapFromRecord = ({ + key, + value +}) => transform(Record({ + key: encodedBoundSchema(key), + value +}).annotations({ + description: "a record to be decoded into a ReadonlyMap" +}), ReadonlyMapFromSelf({ + key, + value: typeSchema(value) +}), { + strict: true, + decode: i => new Map(Object.entries(i)), + encode: a => Object.fromEntries(a) +}); +/** + * @category Map transformations + * @since 3.10.0 + */ +exports.ReadonlyMapFromRecord = ReadonlyMapFromRecord; +const MapFromRecord = ({ + key, + value +}) => transform(Record({ + key: encodedBoundSchema(key), + value +}).annotations({ + description: "a record to be decoded into a Map" +}), MapFromSelf({ + key, + value: typeSchema(value) +}), { + strict: true, + decode: i => new Map(Object.entries(i)), + encode: a => Object.fromEntries(a) +}); +exports.MapFromRecord = MapFromRecord; +const setArbitrary = (item, ctx) => fc => { + const items = fc.array(item(fc)); + return (ctx.depthIdentifier !== undefined ? fc.oneof(ctx, fc.constant([]), items) : items).map(as => new Set(as)); +}; +const readonlySetPretty = item => set => `new Set([${Array.from(set.values()).map(a => item(a)).join(", ")}])`; +const readonlySetEquivalence = item => { + const arrayEquivalence = array_.getEquivalence(item); + return Equivalence.make((a, b) => arrayEquivalence(Array.from(a.values()), Array.from(b.values()))); +}; +const readonlySetParse = decodeUnknown => (u, options, ast) => Predicate.isSet(u) ? toComposite(decodeUnknown(Array.from(u.values()), options), as => new Set(as), ast, u) : ParseResult.fail(new ParseResult.Type(ast, u)); +const setFromSelf_ = (value, description) => declare([value], { + decode: item => readonlySetParse(ParseResult.decodeUnknown(Array$(item))), + encode: item => readonlySetParse(ParseResult.encodeUnknown(Array$(item))) +}, { + typeConstructor: { + _tag: "ReadonlySet" + }, + description, + pretty: readonlySetPretty, + arbitrary: setArbitrary, + equivalence: readonlySetEquivalence +}); +/** + * @category ReadonlySet + * @since 3.10.0 + */ +const ReadonlySetFromSelf = value => setFromSelf_(value, `ReadonlySet<${format(value)}>`); +/** + * @category Set + * @since 3.10.0 + */ +exports.ReadonlySetFromSelf = ReadonlySetFromSelf; +const SetFromSelf = value => setFromSelf_(value, `Set<${format(value)}>`); +/** + * @category ReadonlySet transformations + * @since 3.10.0 + */ +exports.SetFromSelf = SetFromSelf; +function ReadonlySet(value) { + return transform(Array$(value), ReadonlySetFromSelf(typeSchema(asSchema(value))), { + strict: true, + decode: i => new Set(i), + encode: a => Array.from(a) + }); +} +/** @ignore */ +function set(value) { + return transform(Array$(value), SetFromSelf(typeSchema(asSchema(value))), { + strict: true, + decode: i => new Set(i), + encode: a => Array.from(a) + }); +} +const bigDecimalPretty = () => val => `BigDecimal(${bigDecimal_.format(bigDecimal_.normalize(val))})`; +const bigDecimalArbitrary = () => fc => fc.tuple(fc.bigInt(), fc.integer({ + min: -18, + max: 18 +})).map(([value, scale]) => bigDecimal_.make(value, scale)); +/** + * @category BigDecimal constructors + * @since 3.10.0 + */ +class BigDecimalFromSelf extends /*#__PURE__*/declare(bigDecimal_.isBigDecimal, { + typeConstructor: { + _tag: "effect/BigDecimal" + }, + identifier: "BigDecimalFromSelf", + pretty: bigDecimalPretty, + arbitrary: bigDecimalArbitrary, + equivalence: () => bigDecimal_.Equivalence +}) {} +/** + * @category BigDecimal transformations + * @since 3.10.0 + */ +exports.BigDecimalFromSelf = BigDecimalFromSelf; +class BigDecimal extends /*#__PURE__*/transformOrFail(String$.annotations({ + description: "a string to be decoded into a BigDecimal" +}), BigDecimalFromSelf, { + strict: true, + decode: (i, _, ast) => bigDecimal_.fromString(i).pipe(option_.match({ + onNone: () => ParseResult.fail(new ParseResult.Type(ast, i, `Unable to decode ${JSON.stringify(i)} into a BigDecimal`)), + onSome: val => ParseResult.succeed(bigDecimal_.normalize(val)) + })), + encode: a => ParseResult.succeed(bigDecimal_.format(bigDecimal_.normalize(a))) +}).annotations({ + identifier: "BigDecimal" +}) {} +/** + * A schema that transforms a `number` into a `BigDecimal`. + * When encoding, this Schema will produce incorrect results if the BigDecimal exceeds the 64-bit range of a number. + * + * @category BigDecimal transformations + * @since 3.10.0 + */ +exports.BigDecimal = BigDecimal; +class BigDecimalFromNumber extends /*#__PURE__*/transform(Number$.annotations({ + description: "a number to be decoded into a BigDecimal" +}), BigDecimalFromSelf, { + strict: true, + decode: i => bigDecimal_.unsafeFromNumber(i), + encode: a => bigDecimal_.unsafeToNumber(a) +}).annotations({ + identifier: "BigDecimalFromNumber" +}) {} +/** + * @category schema id + * @since 3.10.0 + */ +exports.BigDecimalFromNumber = BigDecimalFromNumber; +const GreaterThanBigDecimalSchemaId = exports.GreaterThanBigDecimalSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/GreaterThanBigDecimal"); +/** + * @category BigDecimal filters + * @since 3.10.0 + */ +const greaterThanBigDecimal = (min, annotations) => self => { + const formatted = bigDecimal_.format(min); + return self.pipe(filter(a => bigDecimal_.greaterThan(a, min), { + schemaId: GreaterThanBigDecimalSchemaId, + [GreaterThanBigDecimalSchemaId]: { + min + }, + title: `greaterThanBigDecimal(${formatted})`, + description: `a BigDecimal greater than ${formatted}`, + ...annotations + })); +}; +/** + * @category schema id + * @since 3.10.0 + */ +exports.greaterThanBigDecimal = greaterThanBigDecimal; +const GreaterThanOrEqualToBigDecimalSchemaId = exports.GreaterThanOrEqualToBigDecimalSchemaId = /*#__PURE__*/Symbol.for("effect/schema/GreaterThanOrEqualToBigDecimal"); +/** + * @category BigDecimal filters + * @since 3.10.0 + */ +const greaterThanOrEqualToBigDecimal = (min, annotations) => self => { + const formatted = bigDecimal_.format(min); + return self.pipe(filter(a => bigDecimal_.greaterThanOrEqualTo(a, min), { + schemaId: GreaterThanOrEqualToBigDecimalSchemaId, + [GreaterThanOrEqualToBigDecimalSchemaId]: { + min + }, + title: `greaterThanOrEqualToBigDecimal(${formatted})`, + description: `a BigDecimal greater than or equal to ${formatted}`, + ...annotations + })); +}; +/** + * @category schema id + * @since 3.10.0 + */ +exports.greaterThanOrEqualToBigDecimal = greaterThanOrEqualToBigDecimal; +const LessThanBigDecimalSchemaId = exports.LessThanBigDecimalSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/LessThanBigDecimal"); +/** + * @category BigDecimal filters + * @since 3.10.0 + */ +const lessThanBigDecimal = (max, annotations) => self => { + const formatted = bigDecimal_.format(max); + return self.pipe(filter(a => bigDecimal_.lessThan(a, max), { + schemaId: LessThanBigDecimalSchemaId, + [LessThanBigDecimalSchemaId]: { + max + }, + title: `lessThanBigDecimal(${formatted})`, + description: `a BigDecimal less than ${formatted}`, + ...annotations + })); +}; +/** + * @category schema id + * @since 3.10.0 + */ +exports.lessThanBigDecimal = lessThanBigDecimal; +const LessThanOrEqualToBigDecimalSchemaId = exports.LessThanOrEqualToBigDecimalSchemaId = /*#__PURE__*/Symbol.for("effect/schema/LessThanOrEqualToBigDecimal"); +/** + * @category BigDecimal filters + * @since 3.10.0 + */ +const lessThanOrEqualToBigDecimal = (max, annotations) => self => { + const formatted = bigDecimal_.format(max); + return self.pipe(filter(a => bigDecimal_.lessThanOrEqualTo(a, max), { + schemaId: LessThanOrEqualToBigDecimalSchemaId, + [LessThanOrEqualToBigDecimalSchemaId]: { + max + }, + title: `lessThanOrEqualToBigDecimal(${formatted})`, + description: `a BigDecimal less than or equal to ${formatted}`, + ...annotations + })); +}; +/** + * @category schema id + * @since 3.10.0 + */ +exports.lessThanOrEqualToBigDecimal = lessThanOrEqualToBigDecimal; +const PositiveBigDecimalSchemaId = exports.PositiveBigDecimalSchemaId = /*#__PURE__*/Symbol.for("effect/schema/PositiveBigDecimal"); +/** + * @category BigDecimal filters + * @since 3.10.0 + */ +const positiveBigDecimal = annotations => self => self.pipe(filter(a => bigDecimal_.isPositive(a), { + schemaId: PositiveBigDecimalSchemaId, + title: "positiveBigDecimal", + description: `a positive BigDecimal`, + ...annotations +})); +/** + * @category BigDecimal constructors + * @since 3.10.0 + */ +exports.positiveBigDecimal = positiveBigDecimal; +const PositiveBigDecimalFromSelf = exports.PositiveBigDecimalFromSelf = /*#__PURE__*/BigDecimalFromSelf.pipe(/*#__PURE__*/positiveBigDecimal({ + identifier: "PositiveBigDecimalFromSelf" +})); +/** + * @category schema id + * @since 3.10.0 + */ +const NonNegativeBigDecimalSchemaId = exports.NonNegativeBigDecimalSchemaId = /*#__PURE__*/Symbol.for("effect/schema/NonNegativeBigDecimal"); +/** + * @category BigDecimal filters + * @since 3.10.0 + */ +const nonNegativeBigDecimal = annotations => self => self.pipe(filter(a => a.value >= 0n, { + schemaId: NonNegativeBigDecimalSchemaId, + title: "nonNegativeBigDecimal", + description: `a non-negative BigDecimal`, + ...annotations +})); +/** + * @category BigDecimal constructors + * @since 3.10.0 + */ +exports.nonNegativeBigDecimal = nonNegativeBigDecimal; +const NonNegativeBigDecimalFromSelf = exports.NonNegativeBigDecimalFromSelf = /*#__PURE__*/BigDecimalFromSelf.pipe(/*#__PURE__*/nonNegativeBigDecimal({ + identifier: "NonNegativeBigDecimalFromSelf" +})); +/** + * @category schema id + * @since 3.10.0 + */ +const NegativeBigDecimalSchemaId = exports.NegativeBigDecimalSchemaId = /*#__PURE__*/Symbol.for("effect/schema/NegativeBigDecimal"); +/** + * @category BigDecimal filters + * @since 3.10.0 + */ +const negativeBigDecimal = annotations => self => self.pipe(filter(a => bigDecimal_.isNegative(a), { + schemaId: NegativeBigDecimalSchemaId, + title: "negativeBigDecimal", + description: `a negative BigDecimal`, + ...annotations +})); +/** + * @category BigDecimal constructors + * @since 3.10.0 + */ +exports.negativeBigDecimal = negativeBigDecimal; +const NegativeBigDecimalFromSelf = exports.NegativeBigDecimalFromSelf = /*#__PURE__*/BigDecimalFromSelf.pipe(/*#__PURE__*/negativeBigDecimal({ + identifier: "NegativeBigDecimalFromSelf" +})); +/** + * @category schema id + * @since 3.10.0 + */ +const NonPositiveBigDecimalSchemaId = exports.NonPositiveBigDecimalSchemaId = /*#__PURE__*/Symbol.for("effect/schema/NonPositiveBigDecimal"); +/** + * @category BigDecimal filters + * @since 3.10.0 + */ +const nonPositiveBigDecimal = annotations => self => self.pipe(filter(a => a.value <= 0n, { + schemaId: NonPositiveBigDecimalSchemaId, + title: "nonPositiveBigDecimal", + description: `a non-positive BigDecimal`, + ...annotations +})); +/** + * @category BigDecimal constructors + * @since 3.10.0 + */ +exports.nonPositiveBigDecimal = nonPositiveBigDecimal; +const NonPositiveBigDecimalFromSelf = exports.NonPositiveBigDecimalFromSelf = /*#__PURE__*/BigDecimalFromSelf.pipe(/*#__PURE__*/nonPositiveBigDecimal({ + identifier: "NonPositiveBigDecimalFromSelf" +})); +/** + * @category schema id + * @since 3.10.0 + */ +const BetweenBigDecimalSchemaId = exports.BetweenBigDecimalSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/BetweenBigDecimal"); +/** + * @category BigDecimal filters + * @since 3.10.0 + */ +const betweenBigDecimal = (minimum, maximum, annotations) => self => { + const formattedMinimum = bigDecimal_.format(minimum); + const formattedMaximum = bigDecimal_.format(maximum); + return self.pipe(filter(a => bigDecimal_.between(a, { + minimum, + maximum + }), { + schemaId: BetweenBigDecimalSchemaId, + [BetweenBigDecimalSchemaId]: { + maximum, + minimum + }, + title: `betweenBigDecimal(${formattedMinimum}, ${formattedMaximum})`, + description: `a BigDecimal between ${formattedMinimum} and ${formattedMaximum}`, + ...annotations + })); +}; +/** + * Clamps a `BigDecimal` between a minimum and a maximum value. + * + * @category BigDecimal transformations + * @since 3.10.0 + */ +exports.betweenBigDecimal = betweenBigDecimal; +const clampBigDecimal = (minimum, maximum) => self => transform(self, self.pipe(typeSchema, betweenBigDecimal(minimum, maximum)), { + strict: false, + decode: i => bigDecimal_.clamp(i, { + minimum, + maximum + }), + encode: _Function.identity +}); +exports.clampBigDecimal = clampBigDecimal; +const chunkArbitrary = (item, ctx) => fc => { + const items = fc.array(item(fc)); + return (ctx.depthIdentifier !== undefined ? fc.oneof(ctx, fc.constant([]), items) : items).map(chunk_.fromIterable); +}; +const chunkPretty = item => c => `Chunk(${chunk_.toReadonlyArray(c).map(item).join(", ")})`; +const chunkParse = decodeUnknown => (u, options, ast) => chunk_.isChunk(u) ? chunk_.isEmpty(u) ? ParseResult.succeed(chunk_.empty()) : toComposite(decodeUnknown(chunk_.toReadonlyArray(u), options), chunk_.fromIterable, ast, u) : ParseResult.fail(new ParseResult.Type(ast, u)); +/** + * @category Chunk + * @since 3.10.0 + */ +const ChunkFromSelf = value => { + return declare([value], { + decode: item => chunkParse(ParseResult.decodeUnknown(Array$(item))), + encode: item => chunkParse(ParseResult.encodeUnknown(Array$(item))) + }, { + typeConstructor: { + _tag: "effect/Chunk" + }, + description: `Chunk<${format(value)}>`, + pretty: chunkPretty, + arbitrary: chunkArbitrary, + equivalence: chunk_.getEquivalence + }); +}; +/** + * @category Chunk transformations + * @since 3.10.0 + */ +exports.ChunkFromSelf = ChunkFromSelf; +function Chunk(value) { + return transform(Array$(value), ChunkFromSelf(typeSchema(asSchema(value))), { + strict: true, + decode: i => i.length === 0 ? chunk_.empty() : chunk_.fromIterable(i), + encode: a => chunk_.toReadonlyArray(a) + }); +} +const nonEmptyChunkArbitrary = item => fc => fastCheck_.array(item(fc), { + minLength: 1 +}).map(as => chunk_.unsafeFromNonEmptyArray(as)); +const nonEmptyChunkPretty = item => c => `NonEmptyChunk(${chunk_.toReadonlyArray(c).map(item).join(", ")})`; +const nonEmptyChunkParse = decodeUnknown => (u, options, ast) => chunk_.isChunk(u) && chunk_.isNonEmpty(u) ? toComposite(decodeUnknown(chunk_.toReadonlyArray(u), options), chunk_.unsafeFromNonEmptyArray, ast, u) : ParseResult.fail(new ParseResult.Type(ast, u)); +/** + * @category Chunk + * @since 3.10.0 + */ +const NonEmptyChunkFromSelf = value => { + return declare([value], { + decode: item => nonEmptyChunkParse(ParseResult.decodeUnknown(NonEmptyArray(item))), + encode: item => nonEmptyChunkParse(ParseResult.encodeUnknown(NonEmptyArray(item))) + }, { + typeConstructor: { + _tag: "effect/Chunk.NonEmptyChunk" + }, + description: `NonEmptyChunk<${format(value)}>`, + pretty: nonEmptyChunkPretty, + arbitrary: nonEmptyChunkArbitrary, + equivalence: chunk_.getEquivalence + }); +}; +/** + * @category Chunk transformations + * @since 3.10.0 + */ +exports.NonEmptyChunkFromSelf = NonEmptyChunkFromSelf; +function NonEmptyChunk(value) { + return transform(NonEmptyArray(value), NonEmptyChunkFromSelf(typeSchema(asSchema(value))), { + strict: true, + decode: i => chunk_.unsafeFromNonEmptyArray(i), + encode: a => chunk_.toReadonlyArray(a) + }); +} +const decodeData = a => Array.isArray(a) ? data_.array(a) : data_.struct(a); +const dataArbitrary = item => fc => item(fc).map(decodeData); +const dataPretty = item => d => `Data(${item(d)})`; +const dataParse = decodeUnknown => (u, options, ast) => Equal.isEqual(u) ? toComposite(decodeUnknown(u, options), decodeData, ast, u) : ParseResult.fail(new ParseResult.Type(ast, u)); +/** + * Type and Encoded must extend `Readonly> | + * ReadonlyArray` to be compatible with this API. + * + * @category Data transformations + * @since 3.10.0 + */ +const DataFromSelf = value => { + return declare([value], { + decode: item => dataParse(ParseResult.decodeUnknown(item)), + encode: item => dataParse(ParseResult.encodeUnknown(item)) + }, { + description: `Data<${format(value)}>`, + pretty: dataPretty, + arbitrary: dataArbitrary + }); +}; +/** + * Type and Encoded must extend `Readonly> | + * ReadonlyArray` to be compatible with this API. + * + * @category Data transformations + * @since 3.10.0 + */ +exports.DataFromSelf = DataFromSelf; +const Data = value => { + return transform(value, DataFromSelf(typeSchema(value)), { + strict: false, + decode: i => decodeData(i), + encode: a => Array.isArray(a) ? Array.from(a) : Object.assign({}, a) + }); +}; +exports.Data = Data; +const isField = u => isSchema(u) || isPropertySignature(u); +const isFields = fields => Reflect.ownKeys(fields).every(key => isField(fields[key])); +const getFields = hasFields => "fields" in hasFields ? hasFields.fields : getFields(hasFields[RefineSchemaId]); +const getSchemaFromFieldsOr = fieldsOr => isFields(fieldsOr) ? Struct(fieldsOr) : isSchema(fieldsOr) ? fieldsOr : Struct(getFields(fieldsOr)); +const getFieldsFromFieldsOr = fieldsOr => isFields(fieldsOr) ? fieldsOr : getFields(fieldsOr); +/** + * @example + * ```ts + * import { Schema } from "effect" + * + * class MyClass extends Schema.Class("MyClass")({ + * someField: Schema.String + * }) { + * someMethod() { + * return this.someField + "bar" + * } + * } + * ``` + * + * @category classes + * @since 3.10.0 + */ +const Class = identifier => (fieldsOr, annotations) => makeClass({ + kind: "Class", + identifier, + schema: getSchemaFromFieldsOr(fieldsOr), + fields: getFieldsFromFieldsOr(fieldsOr), + Base: data_.Class, + annotations +}); +/** @internal */ +exports.Class = Class; +const getClassTag = tag => withConstructorDefault(propertySignature(Literal(tag)), () => tag); +/** + * @example + * ```ts + * import { Schema } from "effect" + * + * class MyClass extends Schema.TaggedClass("MyClass")("MyClass", { + * a: Schema.String + * }) {} + * ``` + * + * @category classes + * @since 3.10.0 + */ +exports.getClassTag = getClassTag; +const TaggedClass = identifier => (tag, fieldsOr, annotations) => { + const fields = getFieldsFromFieldsOr(fieldsOr); + const schema = getSchemaFromFieldsOr(fieldsOr); + const newFields = { + _tag: getClassTag(tag) + }; + const taggedFields = extendFields(newFields, fields); + return class TaggedClass extends makeClass({ + kind: "TaggedClass", + identifier: identifier ?? tag, + schema: extend(schema, Struct(newFields)), + fields: taggedFields, + Base: data_.Class, + annotations + }) { + static _tag = tag; + }; +}; +/** + * @example + * ```ts + * import { Schema } from "effect" + * + * class MyError extends Schema.TaggedError("MyError")( + * "MyError", + * { + * module: Schema.String, + * method: Schema.String, + * description: Schema.String + * } + * ) { + * get message(): string { + * return `${this.module}.${this.method}: ${this.description}` + * } + * } + * ``` + * @category classes + * @since 3.10.0 + */ +exports.TaggedClass = TaggedClass; +const TaggedError = identifier => (tag, fieldsOr, annotations) => { + class Base extends data_.Error {} + ; + Base.prototype.name = tag; + const fields = getFieldsFromFieldsOr(fieldsOr); + const schema = getSchemaFromFieldsOr(fieldsOr); + const newFields = { + _tag: getClassTag(tag) + }; + const taggedFields = extendFields(newFields, fields); + const hasMessageField = "message" in taggedFields; + class TaggedErrorClass extends makeClass({ + kind: "TaggedError", + identifier: identifier ?? tag, + schema: extend(schema, Struct(newFields)), + fields: taggedFields, + Base, + annotations, + disableToString: true + }) { + static _tag = tag; + } + if (!hasMessageField) { + Object.defineProperty(TaggedErrorClass.prototype, "message", { + get() { + return `{ ${Reflect.ownKeys(fields).map(p => `${Inspectable.formatPropertyKey(p)}: ${Inspectable.formatUnknown(this[p])}`).join(", ")} }`; + }, + enumerable: false, + // mirrors the built-in Error.prototype.message, whose descriptor is also non-enumerable + configurable: true + }); + } + return TaggedErrorClass; +}; +exports.TaggedError = TaggedError; +const extendFields = (a, b) => { + const out = { + ...a + }; + for (const key of Reflect.ownKeys(b)) { + if (key in a) { + throw new Error(errors_.getASTDuplicatePropertySignatureErrorMessage(key)); + } + out[key] = b[key]; + } + return out; +}; +function getDisableValidationMakeOption(options) { + return Predicate.isBoolean(options) ? options : options?.disableValidation ?? false; +} +const astCache = /*#__PURE__*/(0, _GlobalValue.globalValue)("effect/Schema/astCache", () => new WeakMap()); +const getClassAnnotations = annotations => { + if (annotations === undefined) { + return []; + } else if (Array.isArray(annotations)) { + return annotations; + } else { + return [annotations]; + } +}; +const makeClass = ({ + Base, + annotations, + disableToString, + fields, + identifier, + kind, + schema +}) => { + const classSymbol = Symbol.for(`effect/Schema/${kind}/${identifier}`); + const [typeAnnotations, transformationAnnotations, encodedAnnotations] = getClassAnnotations(annotations); + const typeSchema_ = typeSchema(schema); + const declarationSurrogate = typeSchema_.annotations({ + identifier, + ...typeAnnotations + }); + const typeSide = typeSchema_.annotations({ + [AST.AutoTitleAnnotationId]: `${identifier} (Type side)`, + ...typeAnnotations + }); + const constructorSchema = schema.annotations({ + [AST.AutoTitleAnnotationId]: `${identifier} (Constructor)`, + ...typeAnnotations + }); + const encodedSide = schema.annotations({ + [AST.AutoTitleAnnotationId]: `${identifier} (Encoded side)`, + ...encodedAnnotations + }); + const transformationSurrogate = schema.annotations({ + ...encodedAnnotations, + ...typeAnnotations, + ...transformationAnnotations + }); + const fallbackInstanceOf = u => Predicate.hasProperty(u, classSymbol) && ParseResult.is(typeSide)(u); + const klass = class extends Base { + constructor(props = {}, options = false) { + props = { + ...props + }; + if (kind !== "Class") { + delete props["_tag"]; + } + props = lazilyMergeDefaults(fields, props); + if (!getDisableValidationMakeOption(options)) { + props = ParseResult.validateSync(constructorSchema)(props); + } + super(props, true); + } + // ---------------- + // Schema interface + // ---------------- + static [TypeId] = variance; + static get ast() { + let out = astCache.get(this); + if (out) { + return out; + } + const declaration = declare([schema], { + decode: () => (input, _, ast) => input instanceof this || fallbackInstanceOf(input) ? ParseResult.succeed(input) : ParseResult.fail(new ParseResult.Type(ast, input)), + encode: () => (input, options) => input instanceof this ? ParseResult.succeed(input) : ParseResult.map(ParseResult.encodeUnknown(typeSide)(input, options), props => new this(props, true)) + }, { + identifier, + pretty: pretty => self => `${identifier}(${pretty(self)})`, + // @ts-expect-error + arbitrary: arb => fc => arb(fc).map(props => new this(props)), + equivalence: _Function.identity, + [AST.SurrogateAnnotationId]: declarationSurrogate.ast, + ...typeAnnotations + }); + out = transform(encodedSide, declaration, { + strict: true, + decode: i => new this(i, true), + encode: _Function.identity + }).annotations({ + [AST.SurrogateAnnotationId]: transformationSurrogate.ast, + ...transformationAnnotations + }).ast; + astCache.set(this, out); + return out; + } + static pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + } + static annotations(annotations) { + return make(this.ast).annotations(annotations); + } + static toString() { + return `(${String(encodedSide)} <-> ${identifier})`; + } + // ---------------- + // Class interface + // ---------------- + static make(...args) { + return new this(...args); + } + static fields = { + ...fields + }; + static identifier = identifier; + static extend(identifier) { + return (newFieldsOr, annotations) => { + const newFields = getFieldsFromFieldsOr(newFieldsOr); + const newSchema = getSchemaFromFieldsOr(newFieldsOr); + const extendedFields = extendFields(fields, newFields); + return makeClass({ + kind, + identifier, + schema: extend(schema, newSchema), + fields: extendedFields, + Base: this, + annotations + }); + }; + } + static transformOrFail(identifier) { + return (newFieldsOr, options, annotations) => { + const transformedFields = extendFields(fields, newFieldsOr); + return makeClass({ + kind, + identifier, + schema: transformOrFail(schema, typeSchema(Struct(transformedFields)), options), + fields: transformedFields, + Base: this, + annotations + }); + }; + } + static transformOrFailFrom(identifier) { + return (newFields, options, annotations) => { + const transformedFields = extendFields(fields, newFields); + return makeClass({ + kind, + identifier, + schema: transformOrFail(encodedSchema(schema), Struct(transformedFields), options), + fields: transformedFields, + Base: this, + annotations + }); + }; + } + // ---------------- + // other + // ---------------- + get [classSymbol]() { + return classSymbol; + } + }; + if (disableToString !== true) { + Object.defineProperty(klass.prototype, "toString", { + value() { + return `${identifier}({ ${Reflect.ownKeys(fields).map(p => `${Inspectable.formatPropertyKey(p)}: ${Inspectable.formatUnknown(this[p])}`).join(", ")} })`; + }, + configurable: true, + writable: true + }); + } + return klass; +}; +const FiberIdNoneEncoded = /*#__PURE__*/Struct({ + _tag: Literal("None") +}).annotations({ + identifier: "FiberIdNoneEncoded" +}); +const FiberIdRuntimeEncoded = /*#__PURE__*/Struct({ + _tag: Literal("Runtime"), + id: Int, + startTimeMillis: Int +}).annotations({ + identifier: "FiberIdRuntimeEncoded" +}); +const FiberIdCompositeEncoded = /*#__PURE__*/Struct({ + _tag: Literal("Composite"), + left: suspend(() => FiberIdEncoded), + right: suspend(() => FiberIdEncoded) +}).annotations({ + identifier: "FiberIdCompositeEncoded" +}); +const FiberIdEncoded = /*#__PURE__*/Union(FiberIdNoneEncoded, FiberIdRuntimeEncoded, FiberIdCompositeEncoded).annotations({ + identifier: "FiberIdEncoded" +}); +const fiberIdArbitrary = fc => fc.letrec(tie => ({ + None: fc.record({ + _tag: fc.constant("None") + }), + Runtime: fc.record({ + _tag: fc.constant("Runtime"), + id: fc.integer(), + startTimeMillis: fc.integer() + }), + Composite: fc.record({ + _tag: fc.constant("Composite"), + left: tie("FiberId"), + right: tie("FiberId") + }), + FiberId: fc.oneof(tie("None"), tie("Runtime"), tie("Composite")) +})).FiberId.map(fiberIdDecode); +const fiberIdPretty = fiberId => { + switch (fiberId._tag) { + case "None": + return "FiberId.none"; + case "Runtime": + return `FiberId.runtime(${fiberId.id}, ${fiberId.startTimeMillis})`; + case "Composite": + return `FiberId.composite(${fiberIdPretty(fiberId.right)}, ${fiberIdPretty(fiberId.left)})`; + } +}; +/** + * @category FiberId constructors + * @since 3.10.0 + */ +class FiberIdFromSelf extends /*#__PURE__*/declare(fiberId_.isFiberId, { + typeConstructor: { + _tag: "effect/FiberId" + }, + identifier: "FiberIdFromSelf", + pretty: () => fiberIdPretty, + arbitrary: () => fiberIdArbitrary +}) {} +exports.FiberIdFromSelf = FiberIdFromSelf; +const fiberIdDecode = input => { + switch (input._tag) { + case "None": + return fiberId_.none; + case "Runtime": + return fiberId_.runtime(input.id, input.startTimeMillis); + case "Composite": + return fiberId_.composite(fiberIdDecode(input.left), fiberIdDecode(input.right)); + } +}; +const fiberIdEncode = input => { + switch (input._tag) { + case "None": + return { + _tag: "None" + }; + case "Runtime": + return { + _tag: "Runtime", + id: input.id, + startTimeMillis: input.startTimeMillis + }; + case "Composite": + return { + _tag: "Composite", + left: fiberIdEncode(input.left), + right: fiberIdEncode(input.right) + }; + } +}; +/** + * @category FiberId transformations + * @since 3.10.0 + */ +class FiberId extends /*#__PURE__*/transform(FiberIdEncoded, FiberIdFromSelf, { + strict: true, + decode: i => fiberIdDecode(i), + encode: a => fiberIdEncode(a) +}).annotations({ + identifier: "FiberId" +}) {} +exports.FiberId = FiberId; +const causeDieEncoded = defect => Struct({ + _tag: Literal("Die"), + defect +}); +const CauseEmptyEncoded = /*#__PURE__*/Struct({ + _tag: /*#__PURE__*/Literal("Empty") +}); +const causeFailEncoded = error => Struct({ + _tag: Literal("Fail"), + error +}); +const CauseInterruptEncoded = /*#__PURE__*/Struct({ + _tag: /*#__PURE__*/Literal("Interrupt"), + fiberId: FiberIdEncoded +}); +let causeEncodedId = 0; +const causeEncoded = (error, defect) => { + const error_ = asSchema(error); + const defect_ = asSchema(defect); + const suspended = suspend(() => out); + const out = Union(CauseEmptyEncoded, causeFailEncoded(error_), causeDieEncoded(defect_), CauseInterruptEncoded, Struct({ + _tag: Literal("Sequential"), + left: suspended, + right: suspended + }), Struct({ + _tag: Literal("Parallel"), + left: suspended, + right: suspended + })).annotations({ + title: `CauseEncoded<${format(error)}>`, + [AST.JSONIdentifierAnnotationId]: `CauseEncoded${causeEncodedId++}` + }); + return out; +}; +const causeArbitrary = (error, defect) => fc => fc.letrec(tie => ({ + Empty: fc.record({ + _tag: fc.constant("Empty") + }), + Fail: fc.record({ + _tag: fc.constant("Fail"), + error: error(fc) + }), + Die: fc.record({ + _tag: fc.constant("Die"), + defect: defect(fc) + }), + Interrupt: fc.record({ + _tag: fc.constant("Interrupt"), + fiberId: fiberIdArbitrary(fc) + }), + Sequential: fc.record({ + _tag: fc.constant("Sequential"), + left: tie("Cause"), + right: tie("Cause") + }), + Parallel: fc.record({ + _tag: fc.constant("Parallel"), + left: tie("Cause"), + right: tie("Cause") + }), + Cause: fc.oneof(tie("Empty"), tie("Fail"), tie("Die"), tie("Interrupt"), tie("Sequential"), tie("Parallel")) +})).Cause.map(causeDecode); +const causePretty = error => cause => { + const f = cause => { + switch (cause._tag) { + case "Empty": + return "Cause.empty"; + case "Fail": + return `Cause.fail(${error(cause.error)})`; + case "Die": + return `Cause.die(${cause_.pretty(cause)})`; + case "Interrupt": + return `Cause.interrupt(${fiberIdPretty(cause.fiberId)})`; + case "Sequential": + return `Cause.sequential(${f(cause.left)}, ${f(cause.right)})`; + case "Parallel": + return `Cause.parallel(${f(cause.left)}, ${f(cause.right)})`; + } + }; + return f(cause); +}; +const causeParse = decodeUnknown => (u, options, ast) => cause_.isCause(u) ? toComposite(decodeUnknown(causeEncode(u), options), causeDecode, ast, u) : ParseResult.fail(new ParseResult.Type(ast, u)); +/** + * @category Cause transformations + * @since 3.10.0 + */ +const CauseFromSelf = ({ + defect, + error +}) => { + return declare([error, defect], { + decode: (error, defect) => causeParse(ParseResult.decodeUnknown(causeEncoded(error, defect))), + encode: (error, defect) => causeParse(ParseResult.encodeUnknown(causeEncoded(error, defect))) + }, { + typeConstructor: { + _tag: "effect/Cause" + }, + title: `Cause<${error.ast}>`, + pretty: causePretty, + arbitrary: causeArbitrary + }); +}; +exports.CauseFromSelf = CauseFromSelf; +function causeDecode(cause) { + switch (cause._tag) { + case "Empty": + return cause_.empty; + case "Fail": + return cause_.fail(cause.error); + case "Die": + return cause_.die(cause.defect); + case "Interrupt": + return cause_.interrupt(fiberIdDecode(cause.fiberId)); + case "Sequential": + return cause_.sequential(causeDecode(cause.left), causeDecode(cause.right)); + case "Parallel": + return cause_.parallel(causeDecode(cause.left), causeDecode(cause.right)); + } +} +function causeEncode(cause) { + switch (cause._tag) { + case "Empty": + return { + _tag: "Empty" + }; + case "Fail": + return { + _tag: "Fail", + error: cause.error + }; + case "Die": + return { + _tag: "Die", + defect: cause.defect + }; + case "Interrupt": + return { + _tag: "Interrupt", + fiberId: cause.fiberId + }; + case "Sequential": + return { + _tag: "Sequential", + left: causeEncode(cause.left), + right: causeEncode(cause.right) + }; + case "Parallel": + return { + _tag: "Parallel", + left: causeEncode(cause.left), + right: causeEncode(cause.right) + }; + } +} +/** + * @category Cause transformations + * @since 3.10.0 + */ +const Cause = ({ + defect, + error +}) => { + const error_ = asSchema(error); + const defect_ = asSchema(defect); + const out = transform(causeEncoded(error_, defect_), CauseFromSelf({ + error: typeSchema(error_), + defect: typeSchema(defect_) + }), { + strict: false, + decode: i => causeDecode(i), + encode: a => causeEncode(a) + }); + return out; +}; +/** + * Defines a schema for handling JavaScript errors (`Error` instances) and other types of defects. + * It decodes objects into Error instances if they match the expected structure (i.e., have a `message` and optionally a `name` and `stack`), + * or converts other values to their string representations. + * + * When encoding, it converts `Error` instances back into plain objects containing only the error's name and message, + * or other values into their string forms. + * + * This is useful for serializing and deserializing errors across network boundaries where error objects do not natively serialize. + * + * @category defect + * @since 3.10.0 + */ +exports.Cause = Cause; +class Defect extends /*#__PURE__*/transform(Unknown, Unknown, { + strict: true, + decode: i => { + if (Predicate.isObject(i) && "message" in i && typeof i.message === "string") { + const err = new Error(i.message, { + cause: i + }); + if ("name" in i && typeof i.name === "string") { + err.name = i.name; + } + err.stack = "stack" in i && typeof i.stack === "string" ? i.stack : ""; + return err; + } + return internalCause_.prettyErrorMessage(i); + }, + encode: a => { + if (a instanceof Error) { + return { + name: a.name, + message: a.message + // no stack because of security reasons + }; + } + return internalCause_.prettyErrorMessage(a); + } +}).annotations({ + identifier: "Defect" +}) {} +exports.Defect = Defect; +const exitFailureEncoded = (error, defect) => Struct({ + _tag: Literal("Failure"), + cause: causeEncoded(error, defect) +}); +const exitSuccessEncoded = value => Struct({ + _tag: Literal("Success"), + value +}); +const exitEncoded = (value, error, defect) => { + return Union(exitFailureEncoded(error, defect), exitSuccessEncoded(value)).annotations({ + title: `ExitEncoded<${format(value)}, ${format(error)}, ${format(defect)}>` + }); +}; +const exitDecode = input => { + switch (input._tag) { + case "Failure": + return exit_.failCause(causeDecode(input.cause)); + case "Success": + return exit_.succeed(input.value); + } +}; +const exitArbitrary = (value, error, defect) => fc => fc.oneof(fc.record({ + _tag: fc.constant("Failure"), + cause: causeArbitrary(error, defect)(fc) +}), fc.record({ + _tag: fc.constant("Success"), + value: value(fc) +})).map(exitDecode); +const exitPretty = (value, error) => exit => exit._tag === "Failure" ? `Exit.failCause(${causePretty(error)(exit.cause)})` : `Exit.succeed(${value(exit.value)})`; +const exitParse = (decodeUnknownValue, decodeUnknownCause) => (u, options, ast) => exit_.isExit(u) ? exit_.match(u, { + onFailure: cause => toComposite(decodeUnknownCause(cause, options), exit_.failCause, ast, u), + onSuccess: value => toComposite(decodeUnknownValue(value, options), exit_.succeed, ast, u) +}) : ParseResult.fail(new ParseResult.Type(ast, u)); +/** + * @category Exit transformations + * @since 3.10.0 + */ +const ExitFromSelf = ({ + defect, + failure, + success +}) => declare([success, failure, defect], { + decode: (success, failure, defect) => exitParse(ParseResult.decodeUnknown(success), ParseResult.decodeUnknown(CauseFromSelf({ + error: failure, + defect + }))), + encode: (success, failure, defect) => exitParse(ParseResult.encodeUnknown(success), ParseResult.encodeUnknown(CauseFromSelf({ + error: failure, + defect + }))) +}, { + typeConstructor: { + _tag: "effect/Exit" + }, + title: `Exit<${success.ast}, ${failure.ast}>`, + pretty: exitPretty, + arbitrary: exitArbitrary +}); +/** + * @category Exit transformations + * @since 3.10.0 + */ +exports.ExitFromSelf = ExitFromSelf; +const Exit = ({ + defect, + failure, + success +}) => { + const success_ = asSchema(success); + const failure_ = asSchema(failure); + const defect_ = asSchema(defect); + const out = transform(exitEncoded(success_, failure_, defect_), ExitFromSelf({ + failure: typeSchema(failure_), + success: typeSchema(success_), + defect: typeSchema(defect_) + }), { + strict: false, + decode: i => exitDecode(i), + encode: a => a._tag === "Failure" ? { + _tag: "Failure", + cause: a.cause + } : { + _tag: "Success", + value: a.value + } + }); + return out; +}; +exports.Exit = Exit; +const hashSetArbitrary = (item, ctx) => fc => { + const items = fc.array(item(fc)); + return (ctx.depthIdentifier !== undefined ? fc.oneof(ctx, fc.constant([]), items) : items).map(hashSet_.fromIterable); +}; +const hashSetPretty = item => set => `HashSet(${Array.from(set).map(a => item(a)).join(", ")})`; +const hashSetEquivalence = item => { + const arrayEquivalence = array_.getEquivalence(item); + return Equivalence.make((a, b) => arrayEquivalence(Array.from(a), Array.from(b))); +}; +const hashSetParse = decodeUnknown => (u, options, ast) => hashSet_.isHashSet(u) ? toComposite(decodeUnknown(Array.from(u), options), hashSet_.fromIterable, ast, u) : ParseResult.fail(new ParseResult.Type(ast, u)); +/** + * @category HashSet transformations + * @since 3.10.0 + */ +const HashSetFromSelf = value => { + return declare([value], { + decode: item => hashSetParse(ParseResult.decodeUnknown(Array$(item))), + encode: item => hashSetParse(ParseResult.encodeUnknown(Array$(item))) + }, { + typeConstructor: { + _tag: "effect/HashSet" + }, + description: `HashSet<${format(value)}>`, + pretty: hashSetPretty, + arbitrary: hashSetArbitrary, + equivalence: hashSetEquivalence + }); +}; +/** + * @category HashSet transformations + * @since 3.10.0 + */ +exports.HashSetFromSelf = HashSetFromSelf; +function HashSet(value) { + return transform(Array$(value), HashSetFromSelf(typeSchema(asSchema(value))), { + strict: true, + decode: i => hashSet_.fromIterable(i), + encode: a => Array.from(a) + }); +} +const hashMapArbitrary = (key, value, ctx) => fc => { + const items = fc.array(fc.tuple(key(fc), value(fc))); + return (ctx.depthIdentifier !== undefined ? fc.oneof(ctx, fc.constant([]), items) : items).map(hashMap_.fromIterable); +}; +const hashMapPretty = (key, value) => map => `HashMap([${Array.from(map).map(([k, v]) => `[${key(k)}, ${value(v)}]`).join(", ")}])`; +const hashMapEquivalence = (key, value) => { + const arrayEquivalence = array_.getEquivalence(Equivalence.make(([ka, va], [kb, vb]) => key(ka, kb) && value(va, vb))); + return Equivalence.make((a, b) => arrayEquivalence(Array.from(a), Array.from(b))); +}; +const hashMapParse = decodeUnknown => (u, options, ast) => hashMap_.isHashMap(u) ? toComposite(decodeUnknown(Array.from(u), options), hashMap_.fromIterable, ast, u) : ParseResult.fail(new ParseResult.Type(ast, u)); +/** + * @category HashMap transformations + * @since 3.10.0 + */ +const HashMapFromSelf = ({ + key, + value +}) => { + return declare([key, value], { + decode: (key, value) => hashMapParse(ParseResult.decodeUnknown(Array$(Tuple(key, value)))), + encode: (key, value) => hashMapParse(ParseResult.encodeUnknown(Array$(Tuple(key, value)))) + }, { + typeConstructor: { + _tag: "effect/HashMap" + }, + description: `HashMap<${format(key)}, ${format(value)}>`, + pretty: hashMapPretty, + arbitrary: hashMapArbitrary, + equivalence: hashMapEquivalence + }); +}; +/** + * @category HashMap transformations + * @since 3.10.0 + */ +exports.HashMapFromSelf = HashMapFromSelf; +const HashMap = ({ + key, + value +}) => { + return transform(Array$(Tuple(key, value)), HashMapFromSelf({ + key: typeSchema(asSchema(key)), + value: typeSchema(asSchema(value)) + }), { + strict: true, + decode: i => hashMap_.fromIterable(i), + encode: a => Array.from(a) + }); +}; +exports.HashMap = HashMap; +const listArbitrary = (item, ctx) => fc => { + const items = fc.array(item(fc)); + return (ctx.depthIdentifier !== undefined ? fc.oneof(ctx, fc.constant([]), items) : items).map(list_.fromIterable); +}; +const listPretty = item => set => `List(${Array.from(set).map(a => item(a)).join(", ")})`; +const listEquivalence = item => { + const arrayEquivalence = array_.getEquivalence(item); + return Equivalence.make((a, b) => arrayEquivalence(Array.from(a), Array.from(b))); +}; +const listParse = decodeUnknown => (u, options, ast) => list_.isList(u) ? toComposite(decodeUnknown(Array.from(u), options), list_.fromIterable, ast, u) : ParseResult.fail(new ParseResult.Type(ast, u)); +/** + * @category List transformations + * @since 3.10.0 + */ +const ListFromSelf = value => { + return declare([value], { + decode: item => listParse(ParseResult.decodeUnknown(Array$(item))), + encode: item => listParse(ParseResult.encodeUnknown(Array$(item))) + }, { + typeConstructor: { + _tag: "effect/List" + }, + description: `List<${format(value)}>`, + pretty: listPretty, + arbitrary: listArbitrary, + equivalence: listEquivalence + }); +}; +/** + * @category List transformations + * @since 3.10.0 + */ +exports.ListFromSelf = ListFromSelf; +function List(value) { + return transform(Array$(value), ListFromSelf(typeSchema(asSchema(value))), { + strict: true, + decode: i => list_.fromIterable(i), + encode: a => Array.from(a) + }); +} +const sortedSetArbitrary = (item, ord, ctx) => fc => { + const items = fc.array(item(fc)); + return (ctx.depthIdentifier !== undefined ? fc.oneof(ctx, fc.constant([]), items) : items).map(as => sortedSet_.fromIterable(as, ord)); +}; +const sortedSetPretty = item => set => `new SortedSet([${Array.from(sortedSet_.values(set)).map(a => item(a)).join(", ")}])`; +const sortedSetParse = (decodeUnknown, ord) => (u, options, ast) => sortedSet_.isSortedSet(u) ? toComposite(decodeUnknown(Array.from(sortedSet_.values(u)), options), as => sortedSet_.fromIterable(as, ord), ast, u) : ParseResult.fail(new ParseResult.Type(ast, u)); +/** + * @category SortedSet transformations + * @since 3.10.0 + */ +const SortedSetFromSelf = (value, ordA, ordI) => { + return declare([value], { + decode: item => sortedSetParse(ParseResult.decodeUnknown(Array$(item)), ordA), + encode: item => sortedSetParse(ParseResult.encodeUnknown(Array$(item)), ordI) + }, { + typeConstructor: { + _tag: "effect/SortedSet" + }, + description: `SortedSet<${format(value)}>`, + pretty: sortedSetPretty, + arbitrary: (arb, ctx) => sortedSetArbitrary(arb, ordA, ctx), + equivalence: () => sortedSet_.getEquivalence() + }); +}; +/** + * @category SortedSet transformations + * @since 3.10.0 + */ +exports.SortedSetFromSelf = SortedSetFromSelf; +function SortedSet(value, ordA) { + const to = typeSchema(asSchema(value)); + return transform(Array$(value), SortedSetFromSelf(to, ordA, ordA), { + strict: true, + decode: i => sortedSet_.fromIterable(i, ordA), + encode: a => Array.from(sortedSet_.values(a)) + }); +} +/** + * Converts an arbitrary value to a `boolean` by testing whether it is truthy. + * Uses `!!val` to coerce the value to a `boolean`. + * + * @see https://developer.mozilla.org/docs/Glossary/Truthy + * + * @category boolean constructors + * @since 3.10.0 + */ +class BooleanFromUnknown extends /*#__PURE__*/transform(Unknown, Boolean$, { + strict: true, + decode: i => Predicate.isTruthy(i), + encode: _Function.identity +}).annotations({ + identifier: "BooleanFromUnknown" +}) {} +/** + * Converts an `string` value into its corresponding `boolean` + * ("true" as `true` and "false" as `false`). + * + * @category boolean transformations + * @since 3.11.0 + */ +exports.BooleanFromUnknown = BooleanFromUnknown; +class BooleanFromString extends /*#__PURE__*/transform(Literal("true", "false").annotations({ + description: "a string to be decoded into a boolean" +}), Boolean$, { + strict: true, + decode: i => i === "true", + encode: a => a ? "true" : "false" +}).annotations({ + identifier: "BooleanFromString" +}) {} +/** + * @category Config validations + * @since 3.10.0 + */ +exports.BooleanFromString = BooleanFromString; +const Config = (name, schema) => { + const decodeUnknownEither = ParseResult.decodeUnknownEither(schema); + return config_.string(name).pipe(config_.mapOrFail(s => decodeUnknownEither(s).pipe(either_.mapLeft(error => configError_.InvalidData([], ParseResult.TreeFormatter.formatIssueSync(error)))))); +}; +// --------------------------------------------- +// Serializable +// --------------------------------------------- +/** + * @since 3.10.0 + * @category symbol + */ +exports.Config = Config; +const symbolSerializable = exports.symbolSerializable = /*#__PURE__*/Symbol.for("effect/Schema/Serializable/symbol"); +/** + * @since 3.10.0 + */ +const asSerializable = serializable => serializable; +/** + * @since 3.10.0 + * @category accessor + */ +exports.asSerializable = asSerializable; +const serializableSchema = self => self[symbolSerializable]; +/** + * @since 3.10.0 + * @category encoding + */ +exports.serializableSchema = serializableSchema; +const serialize = self => encodeUnknown(self[symbolSerializable])(self); +/** + * @since 3.10.0 + * @category decoding + */ +exports.serialize = serialize; +const deserialize = exports.deserialize = /*#__PURE__*/(0, _Function.dual)(2, (self, value) => decodeUnknown(self[symbolSerializable])(value)); +/** + * @since 3.10.0 + * @category symbol + */ +const symbolWithResult = exports.symbolWithResult = /*#__PURE__*/Symbol.for("effect/Schema/Serializable/symbolResult"); +/** + * @since 3.10.0 + */ +const asWithResult = withExit => withExit; +/** + * @since 3.10.0 + * @category accessor + */ +exports.asWithResult = asWithResult; +const failureSchema = self => self[symbolWithResult].failure; +/** + * @since 3.10.0 + * @category accessor + */ +exports.failureSchema = failureSchema; +const successSchema = self => self[symbolWithResult].success; +exports.successSchema = successSchema; +const exitSchemaCache = /*#__PURE__*/(0, _GlobalValue.globalValue)("effect/Schema/Serializable/exitSchemaCache", () => new WeakMap()); +/** + * @since 3.10.0 + * @category accessor + */ +const exitSchema = self => { + const proto = Object.getPrototypeOf(self); + if (!(symbolWithResult in proto)) { + return Exit({ + failure: failureSchema(self), + success: successSchema(self), + defect: Defect + }); + } + let schema = exitSchemaCache.get(proto); + if (schema === undefined) { + schema = Exit({ + failure: failureSchema(self), + success: successSchema(self), + defect: Defect + }); + exitSchemaCache.set(proto, schema); + } + return schema; +}; +/** + * @since 3.10.0 + * @category encoding + */ +exports.exitSchema = exitSchema; +const serializeFailure = exports.serializeFailure = /*#__PURE__*/(0, _Function.dual)(2, (self, value) => encode(self[symbolWithResult].failure)(value)); +/** + * @since 3.10.0 + * @category decoding + */ +const deserializeFailure = exports.deserializeFailure = /*#__PURE__*/(0, _Function.dual)(2, (self, value) => decodeUnknown(self[symbolWithResult].failure)(value)); +/** + * @since 3.10.0 + * @category encoding + */ +const serializeSuccess = exports.serializeSuccess = /*#__PURE__*/(0, _Function.dual)(2, (self, value) => encode(self[symbolWithResult].success)(value)); +/** + * @since 3.10.0 + * @category decoding + */ +const deserializeSuccess = exports.deserializeSuccess = /*#__PURE__*/(0, _Function.dual)(2, (self, value) => decodeUnknown(self[symbolWithResult].success)(value)); +/** + * @since 3.10.0 + * @category encoding + */ +const serializeExit = exports.serializeExit = /*#__PURE__*/(0, _Function.dual)(2, (self, value) => encode(exitSchema(self))(value)); +/** + * @since 3.10.0 + * @category decoding + */ +const deserializeExit = exports.deserializeExit = /*#__PURE__*/(0, _Function.dual)(2, (self, value) => decodeUnknown(exitSchema(self))(value)); +/** + * @since 3.10.0 + */ +const asSerializableWithResult = procedure => procedure; +/** + * @example + * ```ts + * import { Schema } from "effect" + * + * class MyRequest extends Schema.TaggedRequest("MyRequest")("MyRequest", { + * failure: Schema.String, + * success: Schema.Number, + * payload: { id: Schema.String } + * }) {} + * ``` + * + * @category classes + * @since 3.10.0 + */ +exports.asSerializableWithResult = asSerializableWithResult; +const TaggedRequest = identifier => (tag, options, annotations) => { + const taggedFields = extendFields({ + _tag: getClassTag(tag) + }, options.payload); + return class TaggedRequestClass extends makeClass({ + kind: "TaggedRequest", + identifier: identifier ?? tag, + schema: Struct(taggedFields), + fields: taggedFields, + Base: Request.Class, + annotations + }) { + static _tag = tag; + static success = options.success; + static failure = options.failure; + get [symbolSerializable]() { + return this.constructor; + } + get [symbolWithResult]() { + return { + failure: options.failure, + success: options.success + }; + } + }; +}; +// ------------------------------------------------------------------------------------------------- +// Equivalence compiler +// ------------------------------------------------------------------------------------------------- +/** + * Given a schema `Schema`, returns an `Equivalence` instance for `A`. + * + * @category Equivalence + * @since 3.10.0 + */ +exports.TaggedRequest = TaggedRequest; +const equivalence = schema => go(schema.ast, []); +exports.equivalence = equivalence; +const getEquivalenceAnnotation = /*#__PURE__*/AST.getAnnotation(AST.EquivalenceAnnotationId); +const go = (ast, path) => { + const hook = getEquivalenceAnnotation(ast); + if (option_.isSome(hook)) { + switch (ast._tag) { + case "Declaration": + return hook.value(...ast.typeParameters.map(tp => go(tp, path))); + case "Refinement": + return hook.value(go(ast.from, path)); + default: + return hook.value(); + } + } + switch (ast._tag) { + case "NeverKeyword": + throw new Error(errors_.getEquivalenceUnsupportedErrorMessage(ast, path)); + case "Transformation": + return go(ast.to, path); + case "Declaration": + case "Literal": + case "StringKeyword": + case "TemplateLiteral": + case "UniqueSymbol": + case "SymbolKeyword": + case "UnknownKeyword": + case "AnyKeyword": + case "NumberKeyword": + case "BooleanKeyword": + case "BigIntKeyword": + case "UndefinedKeyword": + case "VoidKeyword": + case "Enums": + case "ObjectKeyword": + return Equal.equals; + case "Refinement": + return go(ast.from, path); + case "Suspend": + { + const get = util_.memoizeThunk(() => go(ast.f(), path)); + return (a, b) => get()(a, b); + } + case "TupleType": + { + const elements = ast.elements.map((element, i) => go(element.type, path.concat(i))); + const rest = ast.rest.map(annotatedAST => go(annotatedAST.type, path)); + return Equivalence.make((a, b) => { + if (!Array.isArray(a) || !Array.isArray(b)) { + return false; + } + const len = a.length; + if (len !== b.length) { + return false; + } + // --------------------------------------------- + // handle elements + // --------------------------------------------- + let i = 0; + for (; i < Math.min(len, ast.elements.length); i++) { + if (!elements[i](a[i], b[i])) { + return false; + } + } + // --------------------------------------------- + // handle rest element + // --------------------------------------------- + if (array_.isNonEmptyReadonlyArray(rest)) { + const [head, ...tail] = rest; + for (; i < len - tail.length; i++) { + if (!head(a[i], b[i])) { + return false; + } + } + // --------------------------------------------- + // handle post rest elements + // --------------------------------------------- + for (let j = 0; j < tail.length; j++) { + i += j; + if (!tail[j](a[i], b[i])) { + return false; + } + } + } + return true; + }); + } + case "TypeLiteral": + { + if (ast.propertySignatures.length === 0 && ast.indexSignatures.length === 0) { + return Equal.equals; + } + const propertySignatures = ast.propertySignatures.map(ps => go(ps.type, path.concat(ps.name))); + const indexSignatures = ast.indexSignatures.map(is => go(is.type, path)); + return Equivalence.make((a, b) => { + if (!Predicate.isRecord(a) || !Predicate.isRecord(b)) { + return false; + } + const aStringKeys = Object.keys(a); + const aSymbolKeys = Object.getOwnPropertySymbols(a); + // --------------------------------------------- + // handle property signatures + // --------------------------------------------- + for (let i = 0; i < propertySignatures.length; i++) { + const ps = ast.propertySignatures[i]; + const name = ps.name; + const aHas = Object.prototype.hasOwnProperty.call(a, name); + const bHas = Object.prototype.hasOwnProperty.call(b, name); + if (ps.isOptional) { + if (aHas !== bHas) { + return false; + } + } + if (aHas && bHas && !propertySignatures[i](a[name], b[name])) { + return false; + } + } + // --------------------------------------------- + // handle index signatures + // --------------------------------------------- + let bSymbolKeys; + let bStringKeys; + for (let i = 0; i < indexSignatures.length; i++) { + const is = ast.indexSignatures[i]; + const encodedParameter = AST.getEncodedParameter(is.parameter); + const isSymbol = AST.isSymbolKeyword(encodedParameter); + if (isSymbol) { + bSymbolKeys = bSymbolKeys || Object.getOwnPropertySymbols(b); + if (aSymbolKeys.length !== bSymbolKeys.length) { + return false; + } + } else { + bStringKeys = bStringKeys || Object.keys(b); + if (aStringKeys.length !== bStringKeys.length) { + return false; + } + } + const aKeys = isSymbol ? aSymbolKeys : aStringKeys; + for (let j = 0; j < aKeys.length; j++) { + const key = aKeys[j]; + if (!Object.prototype.hasOwnProperty.call(b, key) || !indexSignatures[i](a[key], b[key])) { + return false; + } + } + } + return true; + }); + } + case "Union": + { + const searchTree = ParseResult.getSearchTree(ast.types, true); + const ownKeys = Reflect.ownKeys(searchTree.keys); + const len = ownKeys.length; + return Equivalence.make((a, b) => { + let candidates = []; + if (len > 0 && Predicate.isRecordOrArray(a)) { + for (let i = 0; i < len; i++) { + const name = ownKeys[i]; + const buckets = searchTree.keys[name].buckets; + if (Object.prototype.hasOwnProperty.call(a, name)) { + const literal = String(a[name]); + if (Object.prototype.hasOwnProperty.call(buckets, literal)) { + candidates = candidates.concat(buckets[literal]); + } + } + } + } + if (searchTree.otherwise.length > 0) { + candidates = candidates.concat(searchTree.otherwise); + } + const tuples = candidates.map(ast => [go(ast, path), ParseResult.is({ + ast + })]); + for (let i = 0; i < tuples.length; i++) { + const [equivalence, is] = tuples[i]; + if (is(a) && is(b)) { + if (equivalence(a, b)) { + return true; + } + } + } + return false; + }); + } + } +}; +const SymbolStruct = /*#__PURE__*/TaggedStruct("symbol", { + key: String$ +}).annotations({ + description: "an object to be decoded into a globally shared symbol" +}); +const SymbolFromStruct = /*#__PURE__*/transformOrFail(SymbolStruct, SymbolFromSelf, { + strict: true, + decode: i => decodeSymbol(i.key), + encode: (a, _, ast) => ParseResult.map(encodeSymbol(a, ast), key => SymbolStruct.make({ + key + })) +}); +/** @ignore */ +class PropertyKey$ extends /*#__PURE__*/Union(String$, Number$, SymbolFromStruct).annotations({ + identifier: "PropertyKey" +}) {} +exports.PropertyKey = PropertyKey$; +/** + * @category ArrayFormatter + * @since 3.12.5 + */ +class ArrayFormatterIssue extends /*#__PURE__*/Struct({ + _tag: propertySignature(Literal("Pointer", "Unexpected", "Missing", "Composite", "Refinement", "Transformation", "Type", "Forbidden")).annotations({ + description: "The tag identifying the type of parse issue" + }), + path: propertySignature(Array$(PropertyKey$)).annotations({ + description: "The path to the property where the issue occurred" + }), + message: propertySignature(String$).annotations({ + description: "A descriptive message explaining the issue" + }) +}).annotations({ + identifier: "ArrayFormatterIssue", + description: "Represents an issue returned by the ArrayFormatter formatter" +}) {} +exports.ArrayFormatterIssue = ArrayFormatterIssue; +//# sourceMappingURL=Schema.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Schema.js.map b/backend/node_modules/effect/dist/cjs/Schema.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e3e7de7554f531142d6acb56d8a2d13d096fc996 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Schema.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Schema.js","names":["array_","_interopRequireWildcard","require","bigDecimal_","bigInt_","boolean_","cause_","chunk_","config_","configError_","data_","dateTime","duration_","Effect","either_","Encoding","Equal","Equivalence","exit_","fastCheck_","fiberId_","_Function","_GlobalValue","hashMap_","hashSet_","Inspectable","internalCause_","errors_","schemaId_","util_","list_","number_","option_","ParseResult","_Pipeable","Predicate","redacted_","Request","scheduler_","AST","sortedSet_","string_","struct_","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","exports","Symbol","for","make","ast","SchemaClass","variance","annotations","mergeSchemaAnnotations","pipe","pipeArguments","arguments","toString","String","Type","Encoded","Context","_A","_","_I","_R","makeStandardResult","exit","isSuccess","value","makeStandardFailureResult","pretty","cause","message","issues","makeStandardFailureFromParseIssue","issue","map","ArrayFormatter","formatIssue","path","standardSchemaV1","schema","overrideOptions","decodeUnknown","errors","StandardSchemaV1Class","version","vendor","validate","scheduler","SyncScheduler","fiber","runFork","matchEffect","onFailure","onSuccess","succeed","flush","unsafePoll","Promise","resolve","addObserver","builtInAnnotations","typeConstructor","TypeConstructorAnnotationId","schemaId","SchemaIdAnnotationId","MessageAnnotationId","missingMessage","MissingMessageAnnotationId","identifier","IdentifierAnnotationId","title","TitleAnnotationId","description","DescriptionAnnotationId","examples","ExamplesAnnotationId","DefaultAnnotationId","documentation","DocumentationAnnotationId","jsonSchema","JSONSchemaAnnotationId","arbitrary","ArbitraryAnnotationId","PrettyAnnotationId","equivalence","EquivalenceAnnotationId","concurrency","ConcurrencyAnnotationId","batching","BatchingAnnotationId","parseIssueTitle","ParseIssueTitleAnnotationId","parseOptions","ParseOptionsAnnotationId","decodingFallback","DecodingFallbackAnnotationId","toASTAnnotations","out","key","id","asSchema","format","encodedSchema","encodedAST","encodedBoundSchema","encodedBoundAST","typeSchema","typeAST","encodeUnknown","options","u","mapError","parseError","encodeUnknownEither","mapLeft","encodeUnknownPromise","parser","runPromise","encode","encodeEither","encodePromise","decodeUnknownEither","decodeUnknownPromise","decode","decodeEither","decodePromise","validateEither","validatePromise","isSchema","hasProperty","isObject","getDefaultLiteralAST","literals","isMembers","Union","mapMembers","literal","Literal","makeLiteralClass","LiteralClass","isNonEmptyReadonlyArray","Never","pickLiteral","_schema","UniqueSymbolFromSelf","symbol","UniqueSymbol","getDefaultEnumsAST","enums","Enums","keys","filter","makeEnumsClass","EnumsClass","TemplateLiteral","head","tail","spans","h","ts","isLiteral","length","item","next","push","TemplateLiteralSpan","isNonEmptyArray","getTemplateLiteralParserCoercedElement","encoded","_tag","isString","s","transform","strict","compose","NumberFromString","members","hasCoercions","member","types","coerced","TemplateLiteralParser","params","encodedSchemas","elements","schemas","param","element","from","re","getTemplateLiteralCapturingRegExp","to","Tuple","AutoTitleAnnotationId","TemplateLiteralParserClass","transformOrFail","match","exec","slice","fail","source","JSON","stringify","tuple","join","declareConstructor","typeParameters","makeDeclareClass","Declaration","tp","declarePrimitive","is","input","DeclareClass","declare","Array","isArray","BrandSchemaId","fromBrand","constructor","self","makeBrandClass","Refinement","predicate","a","either","isLeft","some","left","v","none","InstanceOfSchemaId","instanceOf","name","Undefined","undefinedKeyword","Void","voidKeyword","Null","null","neverKeyword","Unknown","unknownKeyword","Any","anyKeyword","BigIntFromSelf","bigIntKeyword","SymbolFromSelf","symbolKeyword","String$","stringKeyword","Number$","numberKeyword","Number","Boolean$","booleanKeyword","Boolean","Object$","objectKeyword","getDefaultUnionAST","m","makeUnionClass","UnionClass","NullOr","UndefinedOr","NullishOr","keyof","ElementImpl","OptionalType","optionalElement","_Token","type","isOptional","getDefaultTupleTypeAST","rest","TupleType","el","makeTupleTypeClass","TupleTypeClass","args","makeArrayClass","ArrayClass","Array$","makeNonEmptyArrayClass","NonEmptyArrayClass","NonEmptyArray","ArrayEnsure","ensure","NonEmptyArrayEnsure","of","formatPropertySignatureToken","PropertySignatureDeclaration","isReadonly","defaultValue","token","FromPropertySignature","fromKey","ToPropertySignature","formatPropertyKey","p","undefined","PropertySignatureTransformation","mergeSignatureAnnotations","PropertySignatureTypeId","isPropertySignature","PropertySignatureImpl","_TypeToken","_Key","_EncodedToken","_HasDefault","makePropertySignature","PropertySignatureWithFromImpl","propertySignature","withConstructorDefault","dual","applyDefaultValue","onNone","onSome","pruneUndefined","pruned","Transformation","transformation","withDecodingDefault","identity","withDefaults","defaults","decoding","optionalToRequired","flatMap","requiredToOptional","optionalToOptional","optionalPropertySignatureAST","isExact","exact","isNullable","nullable","asOption","as","asOptionEncode","onNoneEncoding","orElse","OptionFromSelf_","isNotNull","isNotUndefined","optional","optionalWith","preserveMissingMessageAnnotation","pickAnnotations","getDefaultTypeLiteralAST","fields","records","ownKeys","Reflect","pss","transformations","field","toAnnotations","PropertySignature","issFrom","issTo","indexSignatures","propertySignatures","record","forEach","ps","IndexSignature","parameter","TypeLiteral","TypeLiteralTransformation","iss","lazilyMergeDefaults","makeTypeLiteralClass","TypeLiteralClass","props","propsWithDefaults","getDisableValidationMakeOption","validateSync","pick","Struct","omit","tag","TaggedStruct","makeRecordClass","RecordClass","Record","pluck","getPropertyKeyIndexedAccess","orUndefined","BrandClass","brand","annotation","getBrandAnnotation","brands","BrandAnnotationId","partial","partialWith","required","mutable","intersectTypeLiterals","x","y","isTypeLiteral","findIndex","extendAST","concat","Error","getSchemaExtendErrorMessage","preserveRefinementAnnotations","omitAnnotations","addRefinementToMembers","refinement","asts","intersectUnionMembers","getTypes","isUnion","xs","ys","isStringKeyword","isNumber","isNumberKeyword","isBoolean","isBooleanKeyword","isRefinement","Suspend","propertySignatureTransformations","composeTransformation","FinalTransformation","fromA","fromI","toI","toA","isTransformation","isTypeLiteralTransformation","extend","that","makeTransformationClass","suspend","RefineSchemaId","makeRefineClass","RefineClass","fromFilterPredicateReturnTypeItem","Pointer","toFilterParseIssue","isSingle","filterMap","Composite","filterEffect","filterReturnType","TransformationClass","_options","_ast","transformLiteral","transformLiterals","pairs","attachPropertySignature","isSymbol","rename","mapping","TrimmedSchemaId","trimmed","trim","pattern","MaxLengthSchemaId","maxLength","MinLengthSchemaId","minLength","LengthSchemaId","Math","max","floor","min","PatternSchemaId","regex","lastIndex","test","StartsWithSchemaId","startsWith","formatted","EndsWithSchemaId","endsWith","IncludesSchemaId","includes","searchString","LowercasedSchemaId","lowercased","toLowerCase","Lowercased","UppercasedSchemaId","uppercased","toUpperCase","Uppercased","CapitalizedSchemaId","capitalized","Capitalized","UncapitalizedSchemaId","uncapitalized","Uncapitalized","Char","nonEmptyString","Lowercase","Uppercase","Capitalize","capitalize","Uncapitalize","uncapitalize","Trimmed","NonEmptyTrimmedString","Trim","split","separator","getErrorMessage","getParseJsonTransformation","try","parse","reviver","catch","replacer","space","ParseJsonSchemaId","parseJson","schemaOrOptions","NonEmptyString","UUIDSchemaId","uuidRegexp","UUID","fc","uuid","ULIDSchemaId","ulidRegexp","ULID","ulid","URLFromSelf","URL","webUrl","url","URL$","FiniteSchemaId","finite","isFinite","GreaterThanSchemaId","greaterThan","exclusiveMinimum","GreaterThanOrEqualToSchemaId","greaterThanOrEqualTo","minimum","MultipleOfSchemaId","multipleOf","divisor","positiveDivisor","abs","remainder","IntSchemaId","int","isSafeInteger","LessThanSchemaId","lessThan","exclusiveMaximum","LessThanOrEqualToSchemaId","lessThanOrEqualTo","maximum","BetweenSchemaId","between","NonNaNSchemaId","nonNaN","isNaN","positive","negative","nonPositive","nonNegative","clamp","parseNumber","fromOption","Finite","Int","NonNaN","Positive","Negative","NonPositive","NonNegative","JsonNumberSchemaId","JsonNumber","Not","not","encodeSymbol","sym","keyFor","decodeSymbol","Symbol$","GreaterThanBigIntSchemaId","GreaterThanBigintSchemaId","greaterThanBigInt","GreaterThanOrEqualToBigIntSchemaId","greaterThanOrEqualToBigInt","LessThanBigIntSchemaId","lessThanBigInt","LessThanOrEqualToBigIntSchemaId","lessThanOrEqualToBigInt","BetweenBigIntSchemaId","BetweenBigintSchemaId","betweenBigInt","positiveBigInt","negativeBigInt","nonNegativeBigInt","nonPositiveBigInt","clampBigInt","BigInt$","fromString","BigInt","PositiveBigIntFromSelf","PositiveBigInt","NegativeBigIntFromSelf","NegativeBigInt","NonPositiveBigIntFromSelf","NonPositiveBigInt","NonNegativeBigIntFromSelf","NonNegativeBigInt","BigIntFromNumber","MIN_SAFE_INTEGER","MAX_SAFE_INTEGER","fromNumber","toNumber","redactedArbitrary","toComposite","eff","actual","mapBoth","redactedParse","isRedacted","RedactedFromSelf","getEquivalence","Redacted","DurationFromSelf","isDuration","oneof","constant","infinity","bigInt","nanos","maxSafeNat","millis","DurationFromNanos","duration","toNanos","NonNegativeInt","DurationFromMillis","toMillis","DurationValueMillis","DurationValueNanos","DurationValueInfinity","durationValueInfinity","DurationValue","FiniteHRTime","InfiniteHRTime","HRTime","isDurationValue","Duration","seconds","clampDuration","betweenDuration","LessThanDurationSchemaId","lessThanDuration","LessThanOrEqualToDurationSchemaId","lessThanOrEqualToDuration","GreaterThanDurationSchemaId","greaterThanDuration","GreaterThanOrEqualToDurationSchemaId","greaterThanOrEqualToDuration","BetweenDurationSchemaId","Uint8ArrayFromSelf","isUint8Array","u8arr","uint8Array","equals","Uint8","Uint8Array$","Uint8Array","makeUint8ArrayTransformation","decodeException","Uint8ArrayFromBase64","decodeBase64","encodeBase64","Uint8ArrayFromBase64Url","decodeBase64Url","encodeBase64Url","Uint8ArrayFromHex","decodeHex","encodeHex","makeEncodingTransformation","StringFromBase64","decodeBase64String","StringFromBase64Url","decodeBase64UrlString","StringFromHex","decodeHexString","StringFromUriComponent","decodeUriComponent","encodeUriComponent","encodeException","MinItemsSchemaId","minItems","getInvalidArgumentErrorMessage","StableFilterAnnotationId","MaxItemsSchemaId","maxItems","ItemsCountSchemaId","itemsCount","getNumberIndexedAccess","OptionFromSelf","headNonEmpty","headOrElse","fallback","ValidDateSchemaId","validDate","getTime","noInvalidDate","LessThanDateSchemaId","lessThanDate","formatDate","LessThanOrEqualToDateSchemaId","lessThanOrEqualToDate","GreaterThanDateSchemaId","greaterThanDate","GreaterThanOrEqualToDateSchemaId","greaterThanOrEqualToDate","BetweenDateSchemaId","betweenDate","DateFromSelfSchemaId","DateFromSelf","isDate","date","Date","ValidDateFromSelf","DateFromString","Date$","DateFromNumber","DateTimeUtcFromSelf","isDateTime","isUtc","unsafeFromDate","decodeDateTimeUtc","unsafeMake","formatUnknown","DateTimeUtcFromNumber","toEpochMillis","DateTimeUtcFromDate","toDateUtc","DateTimeUtc","formatIso","timeZoneOffsetArbitrary","integer","zoneMakeOffset","TimeZoneOffsetFromSelf","isTimeZoneOffset","zone","TimeZoneOffset","offset","timeZoneNamedArbitrary","constantFrom","Intl","supportedValuesOf","zoneUnsafeMakeNamed","TimeZoneNamedFromSelf","isTimeZoneNamed","TimeZoneNamed","TimeZoneFromSelf","TimeZone","zoneFromString","zoneToString","timeZoneArbitrary","DateTimeZonedFromSelf","isZoned","timeZone","unsafeMakeZoned","DateTimeZoned","makeZonedFromString","formatIsoZoned","OptionNoneEncoded","optionSomeEncoded","optionEncoded","optionDecode","optionArbitrary","ctx","optionPretty","optionParse","isOption","isNone","makeNoneEncoded","makeSomeEncoded","Option","value_","OptionFromNullOr","fromNullable","getOrNull","OptionFromNullishOr","getOrUndefined","OptionFromUndefinedOr","OptionFromNonEmptyTrimmedString","isNonEmpty","getOrElse","rightEncoded","right","leftEncoded","eitherEncoded","eitherDecode","eitherArbitrary","eitherPretty","onLeft","onRight","eitherParse","parseRight","decodeUnknownLeft","isEither","EitherFromSelf","makeLeftEncoded","makeRightEncoded","Either","right_","left_","EitherFromUnion","toright","toleft","fromRight","fromLeft","mapArbitrary","items","array","depthIdentifier","Map","readonlyMapPretty","entries","k","readonlyMapEquivalence","arrayEquivalence","ka","va","kb","vb","b","readonlyMapParse","isMap","mapFromSelf_","Key","Value","ReadonlyMapFromSelf","MapFromSelf","ReadonlyMap","ReadonlyMapFromRecord","fromEntries","MapFromRecord","setArbitrary","Set","readonlySetPretty","values","readonlySetEquivalence","readonlySetParse","isSet","setFromSelf_","ReadonlySetFromSelf","SetFromSelf","ReadonlySet","bigDecimalPretty","val","normalize","bigDecimalArbitrary","scale","BigDecimalFromSelf","isBigDecimal","BigDecimal","BigDecimalFromNumber","unsafeFromNumber","unsafeToNumber","GreaterThanBigDecimalSchemaId","greaterThanBigDecimal","GreaterThanOrEqualToBigDecimalSchemaId","greaterThanOrEqualToBigDecimal","LessThanBigDecimalSchemaId","lessThanBigDecimal","LessThanOrEqualToBigDecimalSchemaId","lessThanOrEqualToBigDecimal","PositiveBigDecimalSchemaId","positiveBigDecimal","isPositive","PositiveBigDecimalFromSelf","NonNegativeBigDecimalSchemaId","nonNegativeBigDecimal","NonNegativeBigDecimalFromSelf","NegativeBigDecimalSchemaId","negativeBigDecimal","isNegative","NegativeBigDecimalFromSelf","NonPositiveBigDecimalSchemaId","nonPositiveBigDecimal","NonPositiveBigDecimalFromSelf","BetweenBigDecimalSchemaId","betweenBigDecimal","formattedMinimum","formattedMaximum","clampBigDecimal","chunkArbitrary","fromIterable","chunkPretty","c","toReadonlyArray","chunkParse","isChunk","isEmpty","empty","ChunkFromSelf","Chunk","nonEmptyChunkArbitrary","unsafeFromNonEmptyArray","nonEmptyChunkPretty","nonEmptyChunkParse","NonEmptyChunkFromSelf","NonEmptyChunk","decodeData","struct","dataArbitrary","dataPretty","d","dataParse","isEqual","DataFromSelf","Data","assign","isField","isFields","every","getFields","hasFields","getSchemaFromFieldsOr","fieldsOr","getFieldsFromFieldsOr","Class","makeClass","kind","Base","getClassTag","TaggedClass","newFields","taggedFields","extendFields","TaggedError","prototype","hasMessageField","TaggedErrorClass","disableToString","enumerable","configurable","getASTDuplicatePropertySignatureErrorMessage","disableValidation","astCache","globalValue","getClassAnnotations","classSymbol","typeAnnotations","transformationAnnotations","encodedAnnotations","typeSchema_","declarationSurrogate","typeSide","constructorSchema","encodedSide","transformationSurrogate","fallbackInstanceOf","klass","declaration","arb","SurrogateAnnotationId","newFieldsOr","newSchema","extendedFields","transformedFields","transformOrFailFrom","writable","FiberIdNoneEncoded","FiberIdRuntimeEncoded","startTimeMillis","FiberIdCompositeEncoded","FiberIdEncoded","fiberIdArbitrary","letrec","tie","None","Runtime","FiberId","fiberIdDecode","fiberIdPretty","fiberId","FiberIdFromSelf","isFiberId","runtime","composite","fiberIdEncode","causeDieEncoded","defect","CauseEmptyEncoded","causeFailEncoded","error","CauseInterruptEncoded","causeEncodedId","causeEncoded","error_","defect_","suspended","JSONIdentifierAnnotationId","causeArbitrary","Empty","Fail","Die","Interrupt","Sequential","Parallel","Cause","causeDecode","causePretty","causeParse","isCause","causeEncode","CauseFromSelf","die","interrupt","sequential","parallel","Defect","err","stack","prettyErrorMessage","exitFailureEncoded","exitSuccessEncoded","exitEncoded","exitDecode","failCause","exitArbitrary","exitPretty","exitParse","decodeUnknownValue","decodeUnknownCause","isExit","ExitFromSelf","failure","success","Exit","success_","failure_","hashSetArbitrary","hashSetPretty","hashSetEquivalence","hashSetParse","isHashSet","HashSetFromSelf","HashSet","hashMapArbitrary","hashMapPretty","hashMapEquivalence","hashMapParse","isHashMap","HashMapFromSelf","HashMap","listArbitrary","listPretty","listEquivalence","listParse","isList","ListFromSelf","List","sortedSetArbitrary","ord","sortedSetPretty","sortedSetParse","isSortedSet","SortedSetFromSelf","ordA","ordI","SortedSet","BooleanFromUnknown","isTruthy","BooleanFromString","Config","string","mapOrFail","InvalidData","TreeFormatter","formatIssueSync","symbolSerializable","asSerializable","serializable","serializableSchema","serialize","deserialize","symbolWithResult","asWithResult","withExit","failureSchema","successSchema","exitSchemaCache","exitSchema","proto","getPrototypeOf","serializeFailure","deserializeFailure","serializeSuccess","deserializeSuccess","serializeExit","deserializeExit","asSerializableWithResult","procedure","TaggedRequest","payload","TaggedRequestClass","go","getEquivalenceAnnotation","getAnnotation","hook","isSome","getEquivalenceUnsupportedErrorMessage","memoizeThunk","annotatedAST","len","j","isRecord","aStringKeys","aSymbolKeys","getOwnPropertySymbols","aHas","bHas","bSymbolKeys","bStringKeys","encodedParameter","getEncodedParameter","isSymbolKeyword","aKeys","searchTree","getSearchTree","candidates","isRecordOrArray","buckets","otherwise","tuples","SymbolStruct","SymbolFromStruct","PropertyKey$","PropertyKey","ArrayFormatterIssue"],"sources":["../../src/Schema.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,OA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AC;IAAE6F;EAAG,CAAE,CAAC;CACjG,CACF;AAED;AACA,MAAMmhC,YAAa,sBAAQ/+B,KAAK,CAACmH,OAAO,EAAEE,OAAO,EAAEy3B,gBAAgB,CAAC,CAAC3mC,WAAW,CAAC;EAAE2D,UAAU,EAAE;AAAa,CAAE,CAAC;AAAAlE,OAAA,CAAAonC,WAAA,GAAAD,YAAA;AAS/G;;;;AAIM,MAAOE,mBAAoB,sBAAQ7vB,MAAM,CAAC;EAC9CjN,IAAI,EAAE+I,iBAAiB,CAAC/K,OAAO,CAC7B,SAAS,EACT,YAAY,EACZ,SAAS,EACT,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,MAAM,EACN,WAAW,CACZ,CAAC,CAAChI,WAAW,CAAC;IAAE+D,WAAW,EAAE;EAA6C,CAAE,CAAC;EAC9EnC,IAAI,EAAEmR,iBAAiB,CAAC9B,MAAM,CAAC21B,YAAY,CAAC,CAAC,CAAC5mC,WAAW,CAAC;IACxD+D,WAAW,EAAE;GACd,CAAC;EACF1C,OAAO,EAAE0R,iBAAiB,CAAC/D,OAAO,CAAC,CAAChP,WAAW,CAAC;IAAE+D,WAAW,EAAE;EAA4C,CAAE;CAC9G,CAAC,CAAC/D,WAAW,CAAC;EACb2D,UAAU,EAAE,qBAAqB;EACjCI,WAAW,EAAE;CACd,CAAC;AAAAtE,OAAA,CAAAqnC,mBAAA,GAAAA,mBAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/SchemaAST.js b/backend/node_modules/effect/dist/cjs/SchemaAST.js new file mode 100644 index 0000000000000000000000000000000000000000..4a32255d06f6deeb3dc0057be27c875ea53acc73 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/SchemaAST.js @@ -0,0 +1,2552 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isBigIntKeyword = exports.isAnyKeyword = exports.hasStableFilter = exports.getTypeConstructorAnnotation = exports.getTransformationFrom = exports.getTitleAnnotation = exports.getTemplateLiteralRegExp = exports.getTemplateLiteralCapturingRegExp = exports.getSurrogateAnnotation = exports.getSchemaIdAnnotation = exports.getPropertySignatures = exports.getPropertyKeyIndexedAccess = exports.getParseOptionsAnnotation = exports.getParseIssueTitleAnnotation = exports.getNumberIndexedAccess = exports.getMissingMessageAnnotation = exports.getMessageAnnotation = exports.getJSONSchemaAnnotation = exports.getJSONIdentifierAnnotation = exports.getJSONIdentifier = exports.getIdentifierAnnotation = exports.getExamplesAnnotation = exports.getEncodedParameter = exports.getDocumentationAnnotation = exports.getDescriptionAnnotation = exports.getDefaultAnnotation = exports.getDecodingFallbackAnnotation = exports.getConcurrencyAnnotation = exports.getCompiler = exports.getBrandAnnotation = exports.getBatchingAnnotation = exports.getAutoTitleAnnotation = exports.getAnnotation = exports.flatten = exports.equals = exports.encodedBoundAST = exports.encodedAST = exports.defaultParseOption = exports.composeTransformation = exports.compose = exports.booleanKeyword = exports.bigIntKeyword = exports.anyKeyword = exports.annotations = exports.VoidKeyword = exports.UnknownKeyword = exports.UniqueSymbol = exports.Union = exports.UndefinedKeyword = exports.TypeLiteralTransformation = exports.TypeLiteral = exports.TypeConstructorAnnotationId = exports.Type = exports.TupleType = exports.Transformation = exports.TitleAnnotationId = exports.TemplateLiteralSpan = exports.TemplateLiteral = exports.SymbolKeyword = exports.Suspend = exports.SurrogateAnnotationId = exports.StringKeyword = exports.StableFilterAnnotationId = exports.SchemaIdAnnotationId = exports.Refinement = exports.PropertySignatureTransformation = exports.PropertySignature = exports.PrettyAnnotationId = exports.ParseOptionsAnnotationId = exports.ParseJsonSchemaId = exports.ParseIssueTitleAnnotationId = exports.OptionalType = exports.ObjectKeyword = exports.NumberKeyword = exports.NeverKeyword = exports.MissingMessageAnnotationId = exports.MessageAnnotationId = exports.Literal = exports.JSONSchemaAnnotationId = exports.JSONIdentifierAnnotationId = exports.IndexSignature = exports.IdentifierAnnotationId = exports.FinalTransformation = exports.ExamplesAnnotationId = exports.EquivalenceAnnotationId = exports.Enums = exports.DocumentationAnnotationId = exports.DescriptionAnnotationId = exports.DefaultAnnotationId = exports.DecodingFallbackAnnotationId = exports.Declaration = exports.ConcurrencyAnnotationId = exports.ComposeTransformation = exports.BrandAnnotationId = exports.BooleanKeyword = exports.BigIntKeyword = exports.BatchingAnnotationId = exports.AutoTitleAnnotationId = exports.ArbitraryAnnotationId = exports.AnyKeyword = void 0; +exports.voidKeyword = exports.unknownKeyword = exports.unify = exports.undefinedKeyword = exports.typeAST = exports.symbolKeyword = exports.stringKeyword = exports.required = exports.rename = exports.record = exports.pruneUndefined = exports.pickAnnotations = exports.pick = exports.partial = exports.orUndefined = exports.omitAnnotations = exports.omit = exports.objectKeyword = exports.numberKeyword = exports.null = exports.neverKeyword = exports.mutable = exports.mapMembers = exports.keyof = exports.isVoidKeyword = exports.isUnknownKeyword = exports.isUniqueSymbol = exports.isUnion = exports.isUndefinedKeyword = exports.isTypeLiteralTransformation = exports.isTypeLiteral = exports.isTupleType = exports.isTransformation = exports.isTemplateLiteral = exports.isSymbolKeyword = exports.isSuspend = exports.isStringKeyword = exports.isRefinement = exports.isParameter = exports.isObjectKeyword = exports.isNumberKeyword = exports.isNeverKeyword = exports.isMembers = exports.isLiteral = exports.isFinalTransformation = exports.isEnums = exports.isDeclaration = exports.isComposeTransformation = exports.isBooleanKeyword = void 0; +var Arr = _interopRequireWildcard(require("./Array.js")); +var _Function = require("./Function.js"); +var _GlobalValue = require("./GlobalValue.js"); +var Inspectable = _interopRequireWildcard(require("./Inspectable.js")); +var errors_ = _interopRequireWildcard(require("./internal/schema/errors.js")); +var util_ = _interopRequireWildcard(require("./internal/schema/util.js")); +var Number = _interopRequireWildcard(require("./Number.js")); +var Option = _interopRequireWildcard(require("./Option.js")); +var Order = _interopRequireWildcard(require("./Order.js")); +var Predicate = _interopRequireWildcard(require("./Predicate.js")); +var regexp = _interopRequireWildcard(require("./RegExp.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 3.10.0 + */ + +/** + * @category annotations + * @since 3.19.0 + * @experimental + */ +const TypeConstructorAnnotationId = exports.TypeConstructorAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/TypeConstructor"); +/** + * @category annotations + * @since 3.10.0 + */ +const BrandAnnotationId = exports.BrandAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Brand"); +/** + * @category annotations + * @since 3.10.0 + */ +const SchemaIdAnnotationId = exports.SchemaIdAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/SchemaId"); +/** + * @category annotations + * @since 3.10.0 + */ +const MessageAnnotationId = exports.MessageAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Message"); +/** + * @category annotations + * @since 3.10.0 + */ +const MissingMessageAnnotationId = exports.MissingMessageAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/MissingMessage"); +/** + * @category annotations + * @since 3.10.0 + */ +const IdentifierAnnotationId = exports.IdentifierAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Identifier"); +/** + * @category annotations + * @since 3.10.0 + */ +const TitleAnnotationId = exports.TitleAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Title"); +/** @internal */ +const AutoTitleAnnotationId = exports.AutoTitleAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/AutoTitle"); +/** + * @category annotations + * @since 3.10.0 + */ +const DescriptionAnnotationId = exports.DescriptionAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Description"); +/** + * @category annotations + * @since 3.10.0 + */ +const ExamplesAnnotationId = exports.ExamplesAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Examples"); +/** + * @category annotations + * @since 3.10.0 + */ +const DefaultAnnotationId = exports.DefaultAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Default"); +/** + * @category annotations + * @since 3.10.0 + */ +const JSONSchemaAnnotationId = exports.JSONSchemaAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/JSONSchema"); +/** + * @category annotations + * @since 3.10.0 + */ +const ArbitraryAnnotationId = exports.ArbitraryAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Arbitrary"); +/** + * @category annotations + * @since 3.10.0 + */ +const PrettyAnnotationId = exports.PrettyAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Pretty"); +/** + * @category annotations + * @since 3.10.0 + */ +const EquivalenceAnnotationId = exports.EquivalenceAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Equivalence"); +/** + * @category annotations + * @since 3.10.0 + */ +const DocumentationAnnotationId = exports.DocumentationAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Documentation"); +/** + * @category annotations + * @since 3.10.0 + */ +const ConcurrencyAnnotationId = exports.ConcurrencyAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Concurrency"); +/** + * @category annotations + * @since 3.10.0 + */ +const BatchingAnnotationId = exports.BatchingAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Batching"); +/** + * @category annotations + * @since 3.10.0 + */ +const ParseIssueTitleAnnotationId = exports.ParseIssueTitleAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/ParseIssueTitle"); +/** + * @category annotations + * @since 3.10.0 + */ +const ParseOptionsAnnotationId = exports.ParseOptionsAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/ParseOptions"); +/** + * @category annotations + * @since 3.10.0 + */ +const DecodingFallbackAnnotationId = exports.DecodingFallbackAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/DecodingFallback"); +/** + * @category annotations + * @since 3.10.0 + */ +const SurrogateAnnotationId = exports.SurrogateAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Surrogate"); +/** @internal */ +const StableFilterAnnotationId = exports.StableFilterAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/StableFilter"); +/** + * @category annotations + * @since 3.10.0 + */ +const getAnnotation = exports.getAnnotation = /*#__PURE__*/(0, _Function.dual)(2, (annotated, key) => Object.prototype.hasOwnProperty.call(annotated.annotations, key) ? Option.some(annotated.annotations[key]) : Option.none()); +/** + * @category annotations + * @since 3.19.0 + * @experimental + */ +const getTypeConstructorAnnotation = exports.getTypeConstructorAnnotation = /*#__PURE__*/getAnnotation(TypeConstructorAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +const getBrandAnnotation = exports.getBrandAnnotation = /*#__PURE__*/getAnnotation(BrandAnnotationId); +/** + * @category annotations + * @since 3.14.2 + */ +const getSchemaIdAnnotation = exports.getSchemaIdAnnotation = /*#__PURE__*/getAnnotation(SchemaIdAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +const getMessageAnnotation = exports.getMessageAnnotation = /*#__PURE__*/getAnnotation(MessageAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +const getMissingMessageAnnotation = exports.getMissingMessageAnnotation = /*#__PURE__*/getAnnotation(MissingMessageAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +const getTitleAnnotation = exports.getTitleAnnotation = /*#__PURE__*/getAnnotation(TitleAnnotationId); +/** @internal */ +const getAutoTitleAnnotation = exports.getAutoTitleAnnotation = /*#__PURE__*/getAnnotation(AutoTitleAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +const getIdentifierAnnotation = exports.getIdentifierAnnotation = /*#__PURE__*/getAnnotation(IdentifierAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +const getDescriptionAnnotation = exports.getDescriptionAnnotation = /*#__PURE__*/getAnnotation(DescriptionAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +const getExamplesAnnotation = exports.getExamplesAnnotation = /*#__PURE__*/getAnnotation(ExamplesAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +const getDefaultAnnotation = exports.getDefaultAnnotation = /*#__PURE__*/getAnnotation(DefaultAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +const getJSONSchemaAnnotation = exports.getJSONSchemaAnnotation = /*#__PURE__*/getAnnotation(JSONSchemaAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +const getDocumentationAnnotation = exports.getDocumentationAnnotation = /*#__PURE__*/getAnnotation(DocumentationAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +const getConcurrencyAnnotation = exports.getConcurrencyAnnotation = /*#__PURE__*/getAnnotation(ConcurrencyAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +const getBatchingAnnotation = exports.getBatchingAnnotation = /*#__PURE__*/getAnnotation(BatchingAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +const getParseIssueTitleAnnotation = exports.getParseIssueTitleAnnotation = /*#__PURE__*/getAnnotation(ParseIssueTitleAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +const getParseOptionsAnnotation = exports.getParseOptionsAnnotation = /*#__PURE__*/getAnnotation(ParseOptionsAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +const getDecodingFallbackAnnotation = exports.getDecodingFallbackAnnotation = /*#__PURE__*/getAnnotation(DecodingFallbackAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +const getSurrogateAnnotation = exports.getSurrogateAnnotation = /*#__PURE__*/getAnnotation(SurrogateAnnotationId); +const getStableFilterAnnotation = /*#__PURE__*/getAnnotation(StableFilterAnnotationId); +/** @internal */ +const hasStableFilter = annotated => Option.exists(getStableFilterAnnotation(annotated), b => b === true); +/** + * @category annotations + * @since 3.10.0 + */ +exports.hasStableFilter = hasStableFilter; +const JSONIdentifierAnnotationId = exports.JSONIdentifierAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/JSONIdentifier"); +/** + * @category annotations + * @since 3.10.0 + */ +const getJSONIdentifierAnnotation = exports.getJSONIdentifierAnnotation = /*#__PURE__*/getAnnotation(JSONIdentifierAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +const getJSONIdentifier = annotated => Option.orElse(getJSONIdentifierAnnotation(annotated), () => getIdentifierAnnotation(annotated)); +// ------------------------------------------------------------------------------------- +// schema ids +// ------------------------------------------------------------------------------------- +/** + * @category schema id + * @since 3.10.0 + */ +exports.getJSONIdentifier = getJSONIdentifier; +const ParseJsonSchemaId = exports.ParseJsonSchemaId = /*#__PURE__*/Symbol.for("effect/schema/ParseJson"); +/** + * @category model + * @since 3.10.0 + */ +class Declaration { + typeParameters; + decodeUnknown; + encodeUnknown; + annotations; + /** + * @since 3.10.0 + */ + _tag = "Declaration"; + constructor(typeParameters, decodeUnknown, encodeUnknown, annotations = {}) { + this.typeParameters = typeParameters; + this.decodeUnknown = decodeUnknown; + this.encodeUnknown = encodeUnknown; + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return Option.getOrElse(getExpected(this), () => ""); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + typeParameters: this.typeParameters.map(ast => ast.toJSON()), + annotations: toJSONAnnotations(this.annotations) + }; + } +} +exports.Declaration = Declaration; +const createASTGuard = tag => ast => ast._tag === tag; +/** + * @category guards + * @since 3.10.0 + */ +const isDeclaration = exports.isDeclaration = /*#__PURE__*/createASTGuard("Declaration"); +/** + * @category model + * @since 3.10.0 + */ +class Literal { + literal; + annotations; + /** + * @since 3.10.0 + */ + _tag = "Literal"; + constructor(literal, annotations = {}) { + this.literal = literal; + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return Option.getOrElse(getExpected(this), () => Inspectable.formatUnknown(this.literal)); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + literal: Predicate.isBigInt(this.literal) ? String(this.literal) : this.literal, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category guards + * @since 3.10.0 + */ +exports.Literal = Literal; +const isLiteral = exports.isLiteral = /*#__PURE__*/createASTGuard("Literal"); +const $null = exports.null = /*#__PURE__*/new Literal(null); +/** + * @category model + * @since 3.10.0 + */ +class UniqueSymbol { + symbol; + annotations; + /** + * @since 3.10.0 + */ + _tag = "UniqueSymbol"; + constructor(symbol, annotations = {}) { + this.symbol = symbol; + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return Option.getOrElse(getExpected(this), () => Inspectable.formatUnknown(this.symbol)); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + symbol: String(this.symbol), + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category guards + * @since 3.10.0 + */ +exports.UniqueSymbol = UniqueSymbol; +const isUniqueSymbol = exports.isUniqueSymbol = /*#__PURE__*/createASTGuard("UniqueSymbol"); +/** + * @category model + * @since 3.10.0 + */ +class UndefinedKeyword { + annotations; + /** + * @since 3.10.0 + */ + _tag = "UndefinedKeyword"; + constructor(annotations = {}) { + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return formatKeyword(this); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category constructors + * @since 3.10.0 + */ +exports.UndefinedKeyword = UndefinedKeyword; +const undefinedKeyword = exports.undefinedKeyword = /*#__PURE__*/new UndefinedKeyword({ + [TitleAnnotationId]: "undefined" +}); +/** + * @category guards + * @since 3.10.0 + */ +const isUndefinedKeyword = exports.isUndefinedKeyword = /*#__PURE__*/createASTGuard("UndefinedKeyword"); +/** + * @category model + * @since 3.10.0 + */ +class VoidKeyword { + annotations; + /** + * @since 3.10.0 + */ + _tag = "VoidKeyword"; + constructor(annotations = {}) { + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return formatKeyword(this); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category constructors + * @since 3.10.0 + */ +exports.VoidKeyword = VoidKeyword; +const voidKeyword = exports.voidKeyword = /*#__PURE__*/new VoidKeyword({ + [TitleAnnotationId]: "void" +}); +/** + * @category guards + * @since 3.10.0 + */ +const isVoidKeyword = exports.isVoidKeyword = /*#__PURE__*/createASTGuard("VoidKeyword"); +/** + * @category model + * @since 3.10.0 + */ +class NeverKeyword { + annotations; + /** + * @since 3.10.0 + */ + _tag = "NeverKeyword"; + constructor(annotations = {}) { + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return formatKeyword(this); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category constructors + * @since 3.10.0 + */ +exports.NeverKeyword = NeverKeyword; +const neverKeyword = exports.neverKeyword = /*#__PURE__*/new NeverKeyword({ + [TitleAnnotationId]: "never" +}); +/** + * @category guards + * @since 3.10.0 + */ +const isNeverKeyword = exports.isNeverKeyword = /*#__PURE__*/createASTGuard("NeverKeyword"); +/** + * @category model + * @since 3.10.0 + */ +class UnknownKeyword { + annotations; + /** + * @since 3.10.0 + */ + _tag = "UnknownKeyword"; + constructor(annotations = {}) { + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return formatKeyword(this); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category constructors + * @since 3.10.0 + */ +exports.UnknownKeyword = UnknownKeyword; +const unknownKeyword = exports.unknownKeyword = /*#__PURE__*/new UnknownKeyword({ + [TitleAnnotationId]: "unknown" +}); +/** + * @category guards + * @since 3.10.0 + */ +const isUnknownKeyword = exports.isUnknownKeyword = /*#__PURE__*/createASTGuard("UnknownKeyword"); +/** + * @category model + * @since 3.10.0 + */ +class AnyKeyword { + annotations; + /** + * @since 3.10.0 + */ + _tag = "AnyKeyword"; + constructor(annotations = {}) { + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return formatKeyword(this); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category constructors + * @since 3.10.0 + */ +exports.AnyKeyword = AnyKeyword; +const anyKeyword = exports.anyKeyword = /*#__PURE__*/new AnyKeyword({ + [TitleAnnotationId]: "any" +}); +/** + * @category guards + * @since 3.10.0 + */ +const isAnyKeyword = exports.isAnyKeyword = /*#__PURE__*/createASTGuard("AnyKeyword"); +/** + * @category model + * @since 3.10.0 + */ +class StringKeyword { + annotations; + /** + * @since 3.10.0 + */ + _tag = "StringKeyword"; + constructor(annotations = {}) { + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return formatKeyword(this); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category constructors + * @since 3.10.0 + */ +exports.StringKeyword = StringKeyword; +const stringKeyword = exports.stringKeyword = /*#__PURE__*/new StringKeyword({ + [TitleAnnotationId]: "string", + [DescriptionAnnotationId]: "a string" +}); +/** + * @category guards + * @since 3.10.0 + */ +const isStringKeyword = exports.isStringKeyword = /*#__PURE__*/createASTGuard("StringKeyword"); +/** + * @category model + * @since 3.10.0 + */ +class NumberKeyword { + annotations; + /** + * @since 3.10.0 + */ + _tag = "NumberKeyword"; + constructor(annotations = {}) { + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return formatKeyword(this); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category constructors + * @since 3.10.0 + */ +exports.NumberKeyword = NumberKeyword; +const numberKeyword = exports.numberKeyword = /*#__PURE__*/new NumberKeyword({ + [TitleAnnotationId]: "number", + [DescriptionAnnotationId]: "a number" +}); +/** + * @category guards + * @since 3.10.0 + */ +const isNumberKeyword = exports.isNumberKeyword = /*#__PURE__*/createASTGuard("NumberKeyword"); +/** + * @category model + * @since 3.10.0 + */ +class BooleanKeyword { + annotations; + /** + * @since 3.10.0 + */ + _tag = "BooleanKeyword"; + constructor(annotations = {}) { + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return formatKeyword(this); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category constructors + * @since 3.10.0 + */ +exports.BooleanKeyword = BooleanKeyword; +const booleanKeyword = exports.booleanKeyword = /*#__PURE__*/new BooleanKeyword({ + [TitleAnnotationId]: "boolean", + [DescriptionAnnotationId]: "a boolean" +}); +/** + * @category guards + * @since 3.10.0 + */ +const isBooleanKeyword = exports.isBooleanKeyword = /*#__PURE__*/createASTGuard("BooleanKeyword"); +/** + * @category model + * @since 3.10.0 + */ +class BigIntKeyword { + annotations; + /** + * @since 3.10.0 + */ + _tag = "BigIntKeyword"; + constructor(annotations = {}) { + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return formatKeyword(this); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category constructors + * @since 3.10.0 + */ +exports.BigIntKeyword = BigIntKeyword; +const bigIntKeyword = exports.bigIntKeyword = /*#__PURE__*/new BigIntKeyword({ + [TitleAnnotationId]: "bigint", + [DescriptionAnnotationId]: "a bigint" +}); +/** + * @category guards + * @since 3.10.0 + */ +const isBigIntKeyword = exports.isBigIntKeyword = /*#__PURE__*/createASTGuard("BigIntKeyword"); +/** + * @category model + * @since 3.10.0 + */ +class SymbolKeyword { + annotations; + /** + * @since 3.10.0 + */ + _tag = "SymbolKeyword"; + constructor(annotations = {}) { + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return formatKeyword(this); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category constructors + * @since 3.10.0 + */ +exports.SymbolKeyword = SymbolKeyword; +const symbolKeyword = exports.symbolKeyword = /*#__PURE__*/new SymbolKeyword({ + [TitleAnnotationId]: "symbol", + [DescriptionAnnotationId]: "a symbol" +}); +/** + * @category guards + * @since 3.10.0 + */ +const isSymbolKeyword = exports.isSymbolKeyword = /*#__PURE__*/createASTGuard("SymbolKeyword"); +/** + * @category model + * @since 3.10.0 + */ +class ObjectKeyword { + annotations; + /** + * @since 3.10.0 + */ + _tag = "ObjectKeyword"; + constructor(annotations = {}) { + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return formatKeyword(this); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category constructors + * @since 3.10.0 + */ +exports.ObjectKeyword = ObjectKeyword; +const objectKeyword = exports.objectKeyword = /*#__PURE__*/new ObjectKeyword({ + [TitleAnnotationId]: "object", + [DescriptionAnnotationId]: "an object in the TypeScript meaning, i.e. the `object` type" +}); +/** + * @category guards + * @since 3.10.0 + */ +const isObjectKeyword = exports.isObjectKeyword = /*#__PURE__*/createASTGuard("ObjectKeyword"); +/** + * @category model + * @since 3.10.0 + */ +class Enums { + enums; + annotations; + /** + * @since 3.10.0 + */ + _tag = "Enums"; + constructor(enums, annotations = {}) { + this.enums = enums; + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return Option.getOrElse(getExpected(this), () => ` JSON.stringify(value)).join(" | ")}>`); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + enums: this.enums, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category guards + * @since 3.10.0 + */ +exports.Enums = Enums; +const isEnums = exports.isEnums = /*#__PURE__*/createASTGuard("Enums"); +const isTemplateLiteralSpanType = ast => { + switch (ast._tag) { + case "Literal": + case "NumberKeyword": + case "StringKeyword": + case "TemplateLiteral": + return true; + case "Union": + return ast.types.every(isTemplateLiteralSpanType); + } + return false; +}; +const templateLiteralSpanUnionTypeToString = type => { + switch (type._tag) { + case "Literal": + return JSON.stringify(String(type.literal)); + case "StringKeyword": + return "string"; + case "NumberKeyword": + return "number"; + case "TemplateLiteral": + return String(type); + case "Union": + return type.types.map(templateLiteralSpanUnionTypeToString).join(" | "); + } +}; +const templateLiteralSpanTypeToString = type => { + switch (type._tag) { + case "Literal": + return String(type.literal); + case "StringKeyword": + return "${string}"; + case "NumberKeyword": + return "${number}"; + case "TemplateLiteral": + return "${" + String(type) + "}"; + case "Union": + return "${" + type.types.map(templateLiteralSpanUnionTypeToString).join(" | ") + "}"; + } +}; +/** + * @category model + * @since 3.10.0 + */ +class TemplateLiteralSpan { + literal; + /** + * @since 3.10.0 + */ + type; + constructor(type, literal) { + this.literal = literal; + if (isTemplateLiteralSpanType(type)) { + this.type = type; + } else { + throw new Error(errors_.getSchemaUnsupportedLiteralSpanErrorMessage(type)); + } + } + /** + * @since 3.10.0 + */ + toString() { + return templateLiteralSpanTypeToString(this.type) + this.literal; + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + type: this.type.toJSON(), + literal: this.literal + }; + } +} +/** + * @category model + * @since 3.10.0 + */ +exports.TemplateLiteralSpan = TemplateLiteralSpan; +class TemplateLiteral { + head; + spans; + annotations; + /** + * @since 3.10.0 + */ + _tag = "TemplateLiteral"; + constructor(head, spans, annotations = {}) { + this.head = head; + this.spans = spans; + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return Option.getOrElse(getExpected(this), () => formatTemplateLiteral(this)); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + head: this.head, + spans: this.spans.map(span => span.toJSON()), + annotations: toJSONAnnotations(this.annotations) + }; + } +} +exports.TemplateLiteral = TemplateLiteral; +const formatTemplateLiteral = ast => "`" + ast.head + ast.spans.map(String).join("") + "`"; +/** + * @category guards + * @since 3.10.0 + */ +const isTemplateLiteral = exports.isTemplateLiteral = /*#__PURE__*/createASTGuard("TemplateLiteral"); +/** + * @category model + * @since 3.10.0 + */ +class Type { + type; + annotations; + constructor(type, annotations = {}) { + this.type = type; + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + type: this.type.toJSON(), + annotations: toJSONAnnotations(this.annotations) + }; + } + /** + * @since 3.10.0 + */ + toString() { + return String(this.type); + } +} +/** + * @category model + * @since 3.10.0 + */ +exports.Type = Type; +class OptionalType extends Type { + isOptional; + constructor(type, isOptional, annotations = {}) { + super(type, annotations); + this.isOptional = isOptional; + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + type: this.type.toJSON(), + isOptional: this.isOptional, + annotations: toJSONAnnotations(this.annotations) + }; + } + /** + * @since 3.10.0 + */ + toString() { + return String(this.type) + (this.isOptional ? "?" : ""); + } +} +exports.OptionalType = OptionalType; +const getRestASTs = rest => rest.map(annotatedAST => annotatedAST.type); +/** + * @category model + * @since 3.10.0 + */ +class TupleType { + elements; + rest; + isReadonly; + annotations; + /** + * @since 3.10.0 + */ + _tag = "TupleType"; + constructor(elements, rest, isReadonly, annotations = {}) { + this.elements = elements; + this.rest = rest; + this.isReadonly = isReadonly; + this.annotations = annotations; + let hasOptionalElement = false; + let hasIllegalRequiredElement = false; + for (const e of elements) { + if (e.isOptional) { + hasOptionalElement = true; + } else if (hasOptionalElement) { + hasIllegalRequiredElement = true; + break; + } + } + if (hasIllegalRequiredElement || hasOptionalElement && rest.length > 1) { + throw new Error(errors_.getASTRequiredElementFollowinAnOptionalElementErrorMessage); + } + } + /** + * @since 3.10.0 + */ + toString() { + return Option.getOrElse(getExpected(this), () => formatTuple(this)); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + elements: this.elements.map(e => e.toJSON()), + rest: this.rest.map(ast => ast.toJSON()), + isReadonly: this.isReadonly, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +exports.TupleType = TupleType; +const formatTuple = ast => { + const formattedElements = ast.elements.map(String).join(", "); + return Arr.matchLeft(ast.rest, { + onEmpty: () => `readonly [${formattedElements}]`, + onNonEmpty: (head, tail) => { + const formattedHead = String(head); + const wrappedHead = formattedHead.includes(" | ") ? `(${formattedHead})` : formattedHead; + if (tail.length > 0) { + const formattedTail = tail.map(String).join(", "); + if (ast.elements.length > 0) { + return `readonly [${formattedElements}, ...${wrappedHead}[], ${formattedTail}]`; + } else { + return `readonly [...${wrappedHead}[], ${formattedTail}]`; + } + } else { + if (ast.elements.length > 0) { + return `readonly [${formattedElements}, ...${wrappedHead}[]]`; + } else { + return `ReadonlyArray<${formattedHead}>`; + } + } + } + }); +}; +/** + * @category guards + * @since 3.10.0 + */ +const isTupleType = exports.isTupleType = /*#__PURE__*/createASTGuard("TupleType"); +/** + * @category model + * @since 3.10.0 + */ +class PropertySignature extends OptionalType { + name; + isReadonly; + constructor(name, type, isOptional, isReadonly, annotations) { + super(type, isOptional, annotations); + this.name = name; + this.isReadonly = isReadonly; + } + /** + * @since 3.10.0 + */ + toString() { + return (this.isReadonly ? "readonly " : "") + String(this.name) + (this.isOptional ? "?" : "") + ": " + this.type; + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + name: String(this.name), + type: this.type.toJSON(), + isOptional: this.isOptional, + isReadonly: this.isReadonly, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @since 3.10.0 + */ +exports.PropertySignature = PropertySignature; +const isParameter = ast => { + switch (ast._tag) { + case "StringKeyword": + case "SymbolKeyword": + case "TemplateLiteral": + return true; + case "Refinement": + return isParameter(ast.from); + } + return false; +}; +/** + * @category model + * @since 3.10.0 + */ +exports.isParameter = isParameter; +class IndexSignature { + type; + isReadonly; + /** + * @since 3.10.0 + */ + parameter; + constructor(parameter, type, isReadonly) { + this.type = type; + this.isReadonly = isReadonly; + if (isParameter(parameter)) { + this.parameter = parameter; + } else { + throw new Error(errors_.getASTIndexSignatureParameterErrorMessage); + } + } + /** + * @since 3.10.0 + */ + toString() { + return (this.isReadonly ? "readonly " : "") + `[x: ${this.parameter}]: ${this.type}`; + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + parameter: this.parameter.toJSON(), + type: this.type.toJSON(), + isReadonly: this.isReadonly + }; + } +} +/** + * @category model + * @since 3.10.0 + */ +exports.IndexSignature = IndexSignature; +class TypeLiteral { + annotations; + /** + * @since 3.10.0 + */ + _tag = "TypeLiteral"; + /** + * @since 3.10.0 + */ + propertySignatures; + /** + * @since 3.10.0 + */ + indexSignatures; + constructor(propertySignatures, indexSignatures, annotations = {}) { + this.annotations = annotations; + // check for duplicate property signatures + const keys = {}; + for (let i = 0; i < propertySignatures.length; i++) { + const name = propertySignatures[i].name; + if (Object.prototype.hasOwnProperty.call(keys, name)) { + throw new Error(errors_.getASTDuplicatePropertySignatureErrorMessage(name)); + } + keys[name] = null; + } + // check for duplicate index signatures + const parameters = { + string: false, + symbol: false + }; + for (let i = 0; i < indexSignatures.length; i++) { + const encodedParameter = getEncodedParameter(indexSignatures[i].parameter); + if (isStringKeyword(encodedParameter)) { + if (parameters.string) { + throw new Error(errors_.getASTDuplicateIndexSignatureErrorMessage("string")); + } + parameters.string = true; + } else if (isSymbolKeyword(encodedParameter)) { + if (parameters.symbol) { + throw new Error(errors_.getASTDuplicateIndexSignatureErrorMessage("symbol")); + } + parameters.symbol = true; + } + } + this.propertySignatures = propertySignatures; + this.indexSignatures = indexSignatures; + } + /** + * @since 3.10.0 + */ + toString() { + return Option.getOrElse(getExpected(this), () => formatTypeLiteral(this)); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + propertySignatures: this.propertySignatures.map(ps => ps.toJSON()), + indexSignatures: this.indexSignatures.map(ps => ps.toJSON()), + annotations: toJSONAnnotations(this.annotations) + }; + } +} +exports.TypeLiteral = TypeLiteral; +const formatIndexSignatures = iss => iss.map(String).join("; "); +const formatTypeLiteral = ast => { + if (ast.propertySignatures.length > 0) { + const pss = ast.propertySignatures.map(String).join("; "); + if (ast.indexSignatures.length > 0) { + return `{ ${pss}; ${formatIndexSignatures(ast.indexSignatures)} }`; + } else { + return `{ ${pss} }`; + } + } else { + if (ast.indexSignatures.length > 0) { + return `{ ${formatIndexSignatures(ast.indexSignatures)} }`; + } else { + return "{}"; + } + } +}; +/** + * @category guards + * @since 3.10.0 + */ +const isTypeLiteral = exports.isTypeLiteral = /*#__PURE__*/createASTGuard("TypeLiteral"); +const sortCandidates = /*#__PURE__*/Arr.sort(/*#__PURE__*/Order.mapInput(Number.Order, ast => { + switch (ast._tag) { + case "AnyKeyword": + return 0; + case "UnknownKeyword": + return 1; + case "ObjectKeyword": + return 2; + case "StringKeyword": + case "NumberKeyword": + case "BooleanKeyword": + case "BigIntKeyword": + case "SymbolKeyword": + return 3; + } + return 4; +})); +const literalMap = { + string: "StringKeyword", + number: "NumberKeyword", + boolean: "BooleanKeyword", + bigint: "BigIntKeyword" +}; +/** @internal */ +const flatten = candidates => Arr.flatMap(candidates, ast => isUnion(ast) ? flatten(ast.types) : [ast]); +/** @internal */ +exports.flatten = flatten; +const unify = candidates => { + const cs = sortCandidates(candidates); + const out = []; + const uniques = {}; + const literals = []; + for (const ast of cs) { + switch (ast._tag) { + case "NeverKeyword": + break; + case "AnyKeyword": + return [anyKeyword]; + case "UnknownKeyword": + return [unknownKeyword]; + // uniques + case "ObjectKeyword": + case "UndefinedKeyword": + case "VoidKeyword": + case "StringKeyword": + case "NumberKeyword": + case "BooleanKeyword": + case "BigIntKeyword": + case "SymbolKeyword": + { + if (!uniques[ast._tag]) { + uniques[ast._tag] = ast; + out.push(ast); + } + break; + } + case "Literal": + { + const type = typeof ast.literal; + switch (type) { + case "string": + case "number": + case "bigint": + case "boolean": + { + const _tag = literalMap[type]; + if (!uniques[_tag] && !literals.includes(ast.literal)) { + literals.push(ast.literal); + out.push(ast); + } + break; + } + // null + case "object": + { + if (!literals.includes(ast.literal)) { + literals.push(ast.literal); + out.push(ast); + } + break; + } + } + break; + } + case "UniqueSymbol": + { + if (!uniques["SymbolKeyword"] && !literals.includes(ast.symbol)) { + literals.push(ast.symbol); + out.push(ast); + } + break; + } + case "TupleType": + { + if (!uniques["ObjectKeyword"]) { + out.push(ast); + } + break; + } + case "TypeLiteral": + { + if (ast.propertySignatures.length === 0 && ast.indexSignatures.length === 0) { + if (!uniques["{}"]) { + uniques["{}"] = ast; + out.push(ast); + } + } else if (!uniques["ObjectKeyword"]) { + out.push(ast); + } + break; + } + default: + out.push(ast); + } + } + return out; +}; +/** + * @category model + * @since 3.10.0 + */ +exports.unify = unify; +class Union { + types; + annotations; + static make = (types, annotations) => { + return isMembers(types) ? new Union(types, annotations) : types.length === 1 ? types[0] : neverKeyword; + }; + /** @internal */ + static unify = (candidates, annotations) => { + return Union.make(unify(flatten(candidates)), annotations); + }; + /** + * @since 3.10.0 + */ + _tag = "Union"; + constructor(types, annotations = {}) { + this.types = types; + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return Option.getOrElse(getExpected(this), () => this.types.map(String).join(" | ")); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + types: this.types.map(ast => ast.toJSON()), + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** @internal */ +exports.Union = Union; +const mapMembers = (members, f) => members.map(f); +/** @internal */ +exports.mapMembers = mapMembers; +const isMembers = as => as.length > 1; +/** + * @category guards + * @since 3.10.0 + */ +exports.isMembers = isMembers; +const isUnion = exports.isUnion = /*#__PURE__*/createASTGuard("Union"); +const toJSONMemoMap = /*#__PURE__*/(0, _GlobalValue.globalValue)(/*#__PURE__*/Symbol.for("effect/Schema/AST/toJSONMemoMap"), () => new WeakMap()); +/** + * @category model + * @since 3.10.0 + */ +class Suspend { + f; + annotations; + /** + * @since 3.10.0 + */ + _tag = "Suspend"; + constructor(f, annotations = {}) { + this.f = f; + this.annotations = annotations; + this.f = util_.memoizeThunk(f); + } + /** + * @since 3.10.0 + */ + toString() { + return getExpected(this).pipe(Option.orElse(() => Option.flatMap(Option.liftThrowable(this.f)(), ast => getExpected(ast))), Option.getOrElse(() => "")); + } + /** + * @since 3.10.0 + */ + toJSON() { + const ast = this.f(); + let out = toJSONMemoMap.get(ast); + if (out) { + return out; + } + toJSONMemoMap.set(ast, { + _tag: this._tag + }); + out = { + _tag: this._tag, + ast: ast.toJSON(), + annotations: toJSONAnnotations(this.annotations) + }; + toJSONMemoMap.set(ast, out); + return out; + } +} +/** + * @category guards + * @since 3.10.0 + */ +exports.Suspend = Suspend; +const isSuspend = exports.isSuspend = /*#__PURE__*/createASTGuard("Suspend"); +/** + * @category model + * @since 3.10.0 + */ +class Refinement { + from; + filter; + annotations; + /** + * @since 3.10.0 + */ + _tag = "Refinement"; + constructor(from, filter, annotations = {}) { + this.from = from; + this.filter = filter; + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return getIdentifierAnnotation(this).pipe(Option.getOrElse(() => Option.match(getOrElseExpected(this), { + onNone: () => `{ ${this.from} | filter }`, + onSome: expected => isRefinement(this.from) ? String(this.from) + " & " + expected : expected + }))); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + from: this.from.toJSON(), + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category guards + * @since 3.10.0 + */ +exports.Refinement = Refinement; +const isRefinement = exports.isRefinement = /*#__PURE__*/createASTGuard("Refinement"); +/** + * @since 3.10.0 + */ +const defaultParseOption = exports.defaultParseOption = {}; +/** + * @category model + * @since 3.10.0 + */ +class Transformation { + from; + to; + transformation; + annotations; + /** + * @since 3.10.0 + */ + _tag = "Transformation"; + constructor(from, to, transformation, annotations = {}) { + this.from = from; + this.to = to; + this.transformation = transformation; + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return Option.getOrElse(getExpected(this), () => `(${String(this.from)} <-> ${String(this.to)})`); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + from: this.from.toJSON(), + to: this.to.toJSON(), + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category guards + * @since 3.10.0 + */ +exports.Transformation = Transformation; +const isTransformation = exports.isTransformation = /*#__PURE__*/createASTGuard("Transformation"); +/** + * @category model + * @since 3.10.0 + */ +class FinalTransformation { + decode; + encode; + /** + * @since 3.10.0 + */ + _tag = "FinalTransformation"; + constructor(decode, encode) { + this.decode = decode; + this.encode = encode; + } +} +exports.FinalTransformation = FinalTransformation; +const createTransformationGuard = tag => ast => ast._tag === tag; +/** + * @category guards + * @since 3.10.0 + */ +const isFinalTransformation = exports.isFinalTransformation = /*#__PURE__*/createTransformationGuard("FinalTransformation"); +/** + * @category model + * @since 3.10.0 + */ +class ComposeTransformation { + /** + * @since 3.10.0 + */ + _tag = "ComposeTransformation"; +} +/** + * @category constructors + * @since 3.10.0 + */ +exports.ComposeTransformation = ComposeTransformation; +const composeTransformation = exports.composeTransformation = /*#__PURE__*/new ComposeTransformation(); +/** + * @category guards + * @since 3.10.0 + */ +const isComposeTransformation = exports.isComposeTransformation = /*#__PURE__*/createTransformationGuard("ComposeTransformation"); +/** + * Represents a `PropertySignature -> PropertySignature` transformation + * + * The semantic of `decode` is: + * - `none()` represents the absence of the key/value pair + * - `some(value)` represents the presence of the key/value pair + * + * The semantic of `encode` is: + * - `none()` you don't want to output the key/value pair + * - `some(value)` you want to output the key/value pair + * + * @category model + * @since 3.10.0 + */ +class PropertySignatureTransformation { + from; + to; + decode; + encode; + constructor(from, to, decode, encode) { + this.from = from; + this.to = to; + this.decode = decode; + this.encode = encode; + } +} +exports.PropertySignatureTransformation = PropertySignatureTransformation; +const isRenamingPropertySignatureTransformation = t => t.decode === _Function.identity && t.encode === _Function.identity; +/** + * @category model + * @since 3.10.0 + */ +class TypeLiteralTransformation { + propertySignatureTransformations; + /** + * @since 3.10.0 + */ + _tag = "TypeLiteralTransformation"; + constructor(propertySignatureTransformations) { + this.propertySignatureTransformations = propertySignatureTransformations; + // check for duplicate property signature transformations + const fromKeys = {}; + const toKeys = {}; + for (const pst of propertySignatureTransformations) { + const from = pst.from; + if (fromKeys[from]) { + throw new Error(errors_.getASTDuplicatePropertySignatureTransformationErrorMessage(from)); + } + fromKeys[from] = true; + const to = pst.to; + if (toKeys[to]) { + throw new Error(errors_.getASTDuplicatePropertySignatureTransformationErrorMessage(to)); + } + toKeys[to] = true; + } + } +} +/** + * @category guards + * @since 3.10.0 + */ +exports.TypeLiteralTransformation = TypeLiteralTransformation; +const isTypeLiteralTransformation = exports.isTypeLiteralTransformation = /*#__PURE__*/createTransformationGuard("TypeLiteralTransformation"); +// ------------------------------------------------------------------------------------- +// API +// ------------------------------------------------------------------------------------- +/** + * Merges a set of new annotations with existing ones, potentially overwriting + * any duplicates. + * + * Any previously existing identifier annotations are deleted. + * + * @since 3.10.0 + */ +const annotations = (ast, overrides) => { + const d = Object.getOwnPropertyDescriptors(ast); + const base = { + ...ast.annotations + }; + delete base[IdentifierAnnotationId]; + const value = { + ...base, + ...overrides + }; + const surrogate = getSurrogateAnnotation(ast); + if (Option.isSome(surrogate)) { + value[SurrogateAnnotationId] = annotations(surrogate.value, overrides); + } + d.annotations.value = value; + return Object.create(Object.getPrototypeOf(ast), d); +}; +/** + * Equivalent at runtime to the TypeScript type-level `keyof` operator. + * + * @since 3.10.0 + */ +exports.annotations = annotations; +const keyof = ast => Union.unify(_keyof(ast)); +exports.keyof = keyof; +const STRING_KEYWORD_PATTERN = "[\\s\\S]*?"; // any string, including newlines +const NUMBER_KEYWORD_PATTERN = "[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?"; +const getTemplateLiteralSpanTypePattern = (type, capture) => { + switch (type._tag) { + case "Literal": + return regexp.escape(String(type.literal)); + case "StringKeyword": + return STRING_KEYWORD_PATTERN; + case "NumberKeyword": + return NUMBER_KEYWORD_PATTERN; + case "TemplateLiteral": + return getTemplateLiteralPattern(type, capture, false); + case "Union": + return type.types.map(type => getTemplateLiteralSpanTypePattern(type, capture)).join("|"); + } +}; +const handleTemplateLiteralSpanTypeParens = (type, s, capture, top) => { + if (isUnion(type)) { + if (capture && !top) { + return `(?:${s})`; + } + } else if (!capture || !top) { + return s; + } + return `(${s})`; +}; +const getTemplateLiteralPattern = (ast, capture, top) => { + let pattern = ``; + if (ast.head !== "") { + const head = regexp.escape(ast.head); + pattern += capture && top ? `(${head})` : head; + } + for (const span of ast.spans) { + const spanPattern = getTemplateLiteralSpanTypePattern(span.type, capture); + pattern += handleTemplateLiteralSpanTypeParens(span.type, spanPattern, capture, top); + if (span.literal !== "") { + const literal = regexp.escape(span.literal); + pattern += capture && top ? `(${literal})` : literal; + } + } + return pattern; +}; +/** + * Generates a regular expression from a `TemplateLiteral` AST node. + * + * @see {@link getTemplateLiteralCapturingRegExp} for a variant that captures the pattern. + * + * @since 3.10.0 + */ +const getTemplateLiteralRegExp = ast => new RegExp(`^${getTemplateLiteralPattern(ast, false, true)}$`); +/** + * Generates a regular expression that captures the pattern defined by the given `TemplateLiteral` AST. + * + * @see {@link getTemplateLiteralRegExp} for a variant that does not capture the pattern. + * + * @since 3.10.0 + */ +exports.getTemplateLiteralRegExp = getTemplateLiteralRegExp; +const getTemplateLiteralCapturingRegExp = ast => new RegExp(`^${getTemplateLiteralPattern(ast, true, true)}$`); +/** + * @since 3.10.0 + */ +exports.getTemplateLiteralCapturingRegExp = getTemplateLiteralCapturingRegExp; +const getPropertySignatures = ast => { + const annotation = getSurrogateAnnotation(ast); + if (Option.isSome(annotation)) { + return getPropertySignatures(annotation.value); + } + switch (ast._tag) { + case "TypeLiteral": + return ast.propertySignatures.slice(); + case "Suspend": + return getPropertySignatures(ast.f()); + case "Refinement": + return getPropertySignatures(ast.from); + } + return getPropertyKeys(ast).map(name => getPropertyKeyIndexedAccess(ast, name)); +}; +exports.getPropertySignatures = getPropertySignatures; +const getIndexSignatures = ast => { + const annotation = getSurrogateAnnotation(ast); + if (Option.isSome(annotation)) { + return getIndexSignatures(annotation.value); + } + switch (ast._tag) { + case "TypeLiteral": + return ast.indexSignatures.slice(); + case "Suspend": + return getIndexSignatures(ast.f()); + case "Refinement": + return getIndexSignatures(ast.from); + case "Transformation": + return getIndexSignatures(ast.to); + } + return []; +}; +/** @internal */ +const getNumberIndexedAccess = ast => { + switch (ast._tag) { + case "TupleType": + { + let hasOptional = false; + let out = []; + for (const e of ast.elements) { + if (e.isOptional) { + hasOptional = true; + } + out.push(e.type); + } + if (hasOptional) { + out.push(undefinedKeyword); + } + out = out.concat(getRestASTs(ast.rest)); + return Union.make(out); + } + case "Refinement": + return getNumberIndexedAccess(ast.from); + case "Union": + return Union.make(ast.types.map(getNumberIndexedAccess)); + case "Suspend": + return getNumberIndexedAccess(ast.f()); + } + throw new Error(errors_.getASTUnsupportedSchemaErrorMessage(ast)); +}; +exports.getNumberIndexedAccess = getNumberIndexedAccess; +const getTypeLiteralPropertySignature = (ast, name) => { + // from property signatures... + const ops = Arr.findFirst(ast.propertySignatures, ps => ps.name === name); + if (Option.isSome(ops)) { + return ops.value; + } + // from index signatures... + if (Predicate.isString(name)) { + let out = undefined; + for (const is of ast.indexSignatures) { + const encodedParameter = getEncodedParameter(is.parameter); + switch (encodedParameter._tag) { + case "TemplateLiteral": + { + const regex = getTemplateLiteralRegExp(encodedParameter); + if (regex.test(name)) { + return new PropertySignature(name, is.type, false, true); + } + break; + } + case "StringKeyword": + { + if (out === undefined) { + out = new PropertySignature(name, is.type, false, true); + } + } + } + } + if (out) { + return out; + } + } else if (Predicate.isSymbol(name)) { + for (const is of ast.indexSignatures) { + const encodedParameter = getEncodedParameter(is.parameter); + if (isSymbolKeyword(encodedParameter)) { + return new PropertySignature(name, is.type, false, true); + } + } + } +}; +/** @internal */ +const getPropertyKeyIndexedAccess = (ast, name) => { + const annotation = getSurrogateAnnotation(ast); + if (Option.isSome(annotation)) { + return getPropertyKeyIndexedAccess(annotation.value, name); + } + switch (ast._tag) { + case "TypeLiteral": + { + const ps = getTypeLiteralPropertySignature(ast, name); + if (ps) { + return ps; + } + break; + } + case "Union": + return new PropertySignature(name, Union.make(ast.types.map(ast => getPropertyKeyIndexedAccess(ast, name).type)), false, true); + case "Suspend": + return getPropertyKeyIndexedAccess(ast.f(), name); + case "Refinement": + return getPropertyKeyIndexedAccess(ast.from, name); + case "Transformation": + return getPropertyKeyIndexedAccess(ast.to, name); + } + throw new Error(errors_.getASTUnsupportedSchemaErrorMessage(ast)); +}; +exports.getPropertyKeyIndexedAccess = getPropertyKeyIndexedAccess; +const getPropertyKeys = ast => { + const annotation = getSurrogateAnnotation(ast); + if (Option.isSome(annotation)) { + return getPropertyKeys(annotation.value); + } + switch (ast._tag) { + case "TypeLiteral": + return ast.propertySignatures.map(ps => ps.name); + case "Union": + return ast.types.slice(1).reduce((out, ast) => Arr.intersection(out, getPropertyKeys(ast)), getPropertyKeys(ast.types[0])); + case "Suspend": + return getPropertyKeys(ast.f()); + case "Refinement": + return getPropertyKeys(ast.from); + case "Transformation": + return getPropertyKeys(ast.to); + } + return []; +}; +/** @internal */ +const record = (key, value) => { + const propertySignatures = []; + const indexSignatures = []; + const go = key => { + switch (key._tag) { + case "NeverKeyword": + break; + case "StringKeyword": + case "SymbolKeyword": + case "TemplateLiteral": + case "Refinement": + indexSignatures.push(new IndexSignature(key, value, true)); + break; + case "Literal": + if (Predicate.isString(key.literal) || Predicate.isNumber(key.literal)) { + propertySignatures.push(new PropertySignature(key.literal, value, false, true)); + } else { + throw new Error(errors_.getASTUnsupportedLiteralErrorMessage(key.literal)); + } + break; + case "Enums": + { + for (const [_, name] of key.enums) { + propertySignatures.push(new PropertySignature(name, value, false, true)); + } + break; + } + case "UniqueSymbol": + propertySignatures.push(new PropertySignature(key.symbol, value, false, true)); + break; + case "Union": + key.types.forEach(go); + break; + default: + throw new Error(errors_.getASTUnsupportedKeySchemaErrorMessage(key)); + } + }; + go(key); + return { + propertySignatures, + indexSignatures + }; +}; +/** + * Equivalent at runtime to the built-in TypeScript utility type `Pick`. + * + * @since 3.10.0 + */ +exports.record = record; +const pick = (ast, keys) => { + const annotation = getSurrogateAnnotation(ast); + if (Option.isSome(annotation)) { + return pick(annotation.value, keys); + } + switch (ast._tag) { + case "TypeLiteral": + { + const pss = []; + const names = {}; + for (const ps of ast.propertySignatures) { + names[ps.name] = null; + if (keys.includes(ps.name)) { + pss.push(ps); + } + } + for (const key of keys) { + if (!(key in names)) { + const ps = getTypeLiteralPropertySignature(ast, key); + if (ps) { + pss.push(ps); + } + } + } + return new TypeLiteral(pss, []); + } + case "Union": + return new TypeLiteral(keys.map(name => getPropertyKeyIndexedAccess(ast, name)), []); + case "Suspend": + return pick(ast.f(), keys); + case "Refinement": + return pick(ast.from, keys); + case "Transformation": + { + switch (ast.transformation._tag) { + case "ComposeTransformation": + return new Transformation(pick(ast.from, keys), pick(ast.to, keys), composeTransformation); + case "TypeLiteralTransformation": + { + const ts = []; + const fromKeys = []; + for (const k of keys) { + const t = ast.transformation.propertySignatureTransformations.find(t => t.to === k); + if (t) { + ts.push(t); + fromKeys.push(t.from); + } else { + fromKeys.push(k); + } + } + return Arr.isNonEmptyReadonlyArray(ts) ? new Transformation(pick(ast.from, fromKeys), pick(ast.to, keys), new TypeLiteralTransformation(ts)) : pick(ast.from, fromKeys); + } + } + } + } + throw new Error(errors_.getASTUnsupportedSchemaErrorMessage(ast)); +}; +/** + * Equivalent at runtime to the built-in TypeScript utility type `Omit`. + * + * @since 3.10.0 + */ +exports.pick = pick; +const omit = (ast, keys) => { + let indexSignatures = getIndexSignatures(ast); + if (indexSignatures.length > 0) { + if (indexSignatures.some(is => isStringKeyword(getEncodedParameter(is.parameter)))) { + indexSignatures = indexSignatures.filter(is => !isTemplateLiteral(getEncodedParameter(is.parameter))); + } + return new TypeLiteral([], indexSignatures); + } + return pick(ast, getPropertyKeys(ast).filter(name => !keys.includes(name))); +}; +/** @internal */ +exports.omit = omit; +const orUndefined = ast => Union.make([ast, undefinedKeyword]); +/** + * Equivalent at runtime to the built-in TypeScript utility type `Partial`. + * + * @since 3.10.0 + */ +exports.orUndefined = orUndefined; +const partial = (ast, options) => { + const exact = options?.exact === true; + switch (ast._tag) { + case "TupleType": + return new TupleType(ast.elements.map(e => new OptionalType(exact ? e.type : orUndefined(e.type), true)), Arr.match(ast.rest, { + onEmpty: () => ast.rest, + onNonEmpty: rest => [new Type(Union.make([...getRestASTs(rest), undefinedKeyword]))] + }), ast.isReadonly); + case "TypeLiteral": + return new TypeLiteral(ast.propertySignatures.map(ps => new PropertySignature(ps.name, exact ? ps.type : orUndefined(ps.type), true, ps.isReadonly, ps.annotations)), ast.indexSignatures.map(is => new IndexSignature(is.parameter, orUndefined(is.type), is.isReadonly))); + case "Union": + return Union.make(ast.types.map(member => partial(member, options))); + case "Suspend": + return new Suspend(() => partial(ast.f(), options)); + case "Declaration": + case "Refinement": + throw new Error(errors_.getASTUnsupportedSchemaErrorMessage(ast)); + case "Transformation": + { + if (isTypeLiteralTransformation(ast.transformation) && ast.transformation.propertySignatureTransformations.every(isRenamingPropertySignatureTransformation)) { + return new Transformation(partial(ast.from, options), partial(ast.to, options), ast.transformation); + } + throw new Error(errors_.getASTUnsupportedSchemaErrorMessage(ast)); + } + } + return ast; +}; +/** + * Equivalent at runtime to the built-in TypeScript utility type `Required`. + * + * @since 3.10.0 + */ +exports.partial = partial; +const required = ast => { + switch (ast._tag) { + case "TupleType": + return new TupleType(ast.elements.map(e => new OptionalType(e.type, false)), ast.rest, ast.isReadonly); + case "TypeLiteral": + return new TypeLiteral(ast.propertySignatures.map(f => new PropertySignature(f.name, f.type, false, f.isReadonly, f.annotations)), ast.indexSignatures); + case "Union": + return Union.make(ast.types.map(member => required(member))); + case "Suspend": + return new Suspend(() => required(ast.f())); + case "Declaration": + case "Refinement": + throw new Error(errors_.getASTUnsupportedSchemaErrorMessage(ast)); + case "Transformation": + { + if (isTypeLiteralTransformation(ast.transformation) && ast.transformation.propertySignatureTransformations.every(isRenamingPropertySignatureTransformation)) { + return new Transformation(required(ast.from), required(ast.to), ast.transformation); + } + throw new Error(errors_.getASTUnsupportedSchemaErrorMessage(ast)); + } + } + return ast; +}; +/** + * Creates a new AST with shallow mutability applied to its properties. + * + * @since 3.10.0 + */ +exports.required = required; +const mutable = ast => { + switch (ast._tag) { + case "TupleType": + return ast.isReadonly === false ? ast : new TupleType(ast.elements, ast.rest, false, ast.annotations); + case "TypeLiteral": + { + const propertySignatures = changeMap(ast.propertySignatures, ps => ps.isReadonly === false ? ps : new PropertySignature(ps.name, ps.type, ps.isOptional, false, ps.annotations)); + const indexSignatures = changeMap(ast.indexSignatures, is => is.isReadonly === false ? is : new IndexSignature(is.parameter, is.type, false)); + return propertySignatures === ast.propertySignatures && indexSignatures === ast.indexSignatures ? ast : new TypeLiteral(propertySignatures, indexSignatures, ast.annotations); + } + case "Union": + { + const types = changeMap(ast.types, mutable); + return types === ast.types ? ast : Union.make(types, ast.annotations); + } + case "Suspend": + return new Suspend(() => mutable(ast.f()), ast.annotations); + case "Refinement": + { + const from = mutable(ast.from); + return from === ast.from ? ast : new Refinement(from, ast.filter, ast.annotations); + } + case "Transformation": + { + const from = mutable(ast.from); + const to = mutable(ast.to); + return from === ast.from && to === ast.to ? ast : new Transformation(from, to, ast.transformation, ast.annotations); + } + } + return ast; +}; +/** + * @since 3.10.0 + */ +exports.mutable = mutable; +const getCompiler = match => { + const compile = (ast, path) => match[ast._tag](ast, compile, path); + return compile; +}; +/** @internal */ +exports.getCompiler = getCompiler; +const pickAnnotations = annotationIds => annotated => { + let out = undefined; + for (const id of annotationIds) { + if (Object.prototype.hasOwnProperty.call(annotated.annotations, id)) { + if (out === undefined) { + out = {}; + } + out[id] = annotated.annotations[id]; + } + } + return out; +}; +/** @internal */ +exports.pickAnnotations = pickAnnotations; +const omitAnnotations = annotationIds => annotated => { + const out = { + ...annotated.annotations + }; + for (const id of annotationIds) { + delete out[id]; + } + return out; +}; +exports.omitAnnotations = omitAnnotations; +const preserveTransformationAnnotations = /*#__PURE__*/pickAnnotations([ExamplesAnnotationId, DefaultAnnotationId, JSONSchemaAnnotationId, ArbitraryAnnotationId, PrettyAnnotationId, EquivalenceAnnotationId]); +/** + * @since 3.10.0 + */ +const typeAST = ast => { + switch (ast._tag) { + case "Declaration": + { + const typeParameters = changeMap(ast.typeParameters, typeAST); + return typeParameters === ast.typeParameters ? ast : new Declaration(typeParameters, ast.decodeUnknown, ast.encodeUnknown, ast.annotations); + } + case "TupleType": + { + const elements = changeMap(ast.elements, e => { + const type = typeAST(e.type); + return type === e.type ? e : new OptionalType(type, e.isOptional); + }); + const restASTs = getRestASTs(ast.rest); + const rest = changeMap(restASTs, typeAST); + return elements === ast.elements && rest === restASTs ? ast : new TupleType(elements, rest.map(type => new Type(type)), ast.isReadonly, ast.annotations); + } + case "TypeLiteral": + { + const propertySignatures = changeMap(ast.propertySignatures, p => { + const type = typeAST(p.type); + return type === p.type ? p : new PropertySignature(p.name, type, p.isOptional, p.isReadonly); + }); + const indexSignatures = changeMap(ast.indexSignatures, is => { + const type = typeAST(is.type); + return type === is.type ? is : new IndexSignature(is.parameter, type, is.isReadonly); + }); + return propertySignatures === ast.propertySignatures && indexSignatures === ast.indexSignatures ? ast : new TypeLiteral(propertySignatures, indexSignatures, ast.annotations); + } + case "Union": + { + const types = changeMap(ast.types, typeAST); + return types === ast.types ? ast : Union.make(types, ast.annotations); + } + case "Suspend": + return new Suspend(() => typeAST(ast.f()), ast.annotations); + case "Refinement": + { + const from = typeAST(ast.from); + return from === ast.from ? ast : new Refinement(from, ast.filter, ast.annotations); + } + case "Transformation": + { + const preserve = preserveTransformationAnnotations(ast); + return typeAST(preserve !== undefined ? annotations(ast.to, preserve) : ast.to); + } + } + return ast; +}; +exports.typeAST = typeAST; +function changeMap(as, f) { + let changed = false; + const out = Arr.allocate(as.length); + for (let i = 0; i < as.length; i++) { + const a = as[i]; + const fa = f(a); + if (fa !== a) { + changed = true; + } + out[i] = fa; + } + return changed ? out : as; +} +/** + * Returns the from part of a transformation if it exists + * + * @internal + */ +const getTransformationFrom = ast => { + switch (ast._tag) { + case "Transformation": + return ast.from; + case "Refinement": + return getTransformationFrom(ast.from); + case "Suspend": + return getTransformationFrom(ast.f()); + } +}; +exports.getTransformationFrom = getTransformationFrom; +const encodedAST_ = (ast, isBound) => { + switch (ast._tag) { + case "Declaration": + { + const typeParameters = changeMap(ast.typeParameters, ast => encodedAST_(ast, isBound)); + return typeParameters === ast.typeParameters ? ast : new Declaration(typeParameters, ast.decodeUnknown, ast.encodeUnknown); + } + case "TupleType": + { + const elements = changeMap(ast.elements, e => { + const type = encodedAST_(e.type, isBound); + return type === e.type ? e : new OptionalType(type, e.isOptional); + }); + const restASTs = getRestASTs(ast.rest); + const rest = changeMap(restASTs, ast => encodedAST_(ast, isBound)); + return elements === ast.elements && rest === restASTs ? ast : new TupleType(elements, rest.map(ast => new Type(ast)), ast.isReadonly); + } + case "TypeLiteral": + { + const propertySignatures = changeMap(ast.propertySignatures, ps => { + const type = encodedAST_(ps.type, isBound); + return type === ps.type ? ps : new PropertySignature(ps.name, type, ps.isOptional, ps.isReadonly); + }); + const indexSignatures = changeMap(ast.indexSignatures, is => { + const type = encodedAST_(is.type, isBound); + return type === is.type ? is : new IndexSignature(is.parameter, type, is.isReadonly); + }); + return propertySignatures === ast.propertySignatures && indexSignatures === ast.indexSignatures ? ast : new TypeLiteral(propertySignatures, indexSignatures); + } + case "Union": + { + const types = changeMap(ast.types, ast => encodedAST_(ast, isBound)); + return types === ast.types ? ast : Union.make(types); + } + case "Suspend": + { + let borrowedAnnotations = undefined; + const identifier = getJSONIdentifier(ast); + if (Option.isSome(identifier)) { + const suffix = isBound ? "Bound" : ""; + borrowedAnnotations = { + [JSONIdentifierAnnotationId]: `${identifier.value}Encoded${suffix}` + }; + } + return new Suspend(() => encodedAST_(ast.f(), isBound), borrowedAnnotations); + } + case "Refinement": + { + const from = encodedAST_(ast.from, isBound); + if (isBound) { + if (from === ast.from) return ast; + if (getTransformationFrom(ast.from) === undefined && hasStableFilter(ast)) { + return new Refinement(from, ast.filter, ast.annotations); + } + return from; + } else { + return from; + } + } + case "Transformation": + return encodedAST_(ast.from, isBound); + } + return ast; +}; +/** + * @since 3.10.0 + */ +const encodedAST = ast => encodedAST_(ast, false); +/** + * @since 3.10.0 + */ +exports.encodedAST = encodedAST; +const encodedBoundAST = ast => encodedAST_(ast, true); +exports.encodedBoundAST = encodedBoundAST; +const toJSONAnnotations = annotations => { + const out = {}; + for (const k of Object.getOwnPropertySymbols(annotations)) { + out[String(k)] = annotations[k]; + } + return out; +}; +/** @internal */ +const getEncodedParameter = ast => { + switch (ast._tag) { + case "StringKeyword": + case "SymbolKeyword": + case "TemplateLiteral": + return ast; + case "Refinement": + return getEncodedParameter(ast.from); + } +}; +/** @internal */ +exports.getEncodedParameter = getEncodedParameter; +const equals = (self, that) => { + switch (self._tag) { + case "Literal": + return isLiteral(that) && that.literal === self.literal; + case "UniqueSymbol": + return isUniqueSymbol(that) && that.symbol === self.symbol; + case "UndefinedKeyword": + case "VoidKeyword": + case "NeverKeyword": + case "UnknownKeyword": + case "AnyKeyword": + case "StringKeyword": + case "NumberKeyword": + case "BooleanKeyword": + case "BigIntKeyword": + case "SymbolKeyword": + case "ObjectKeyword": + return that._tag === self._tag; + case "TemplateLiteral": + return isTemplateLiteral(that) && that.head === self.head && equalsTemplateLiteralSpan(that.spans, self.spans); + case "Enums": + return isEnums(that) && equalsEnums(that.enums, self.enums); + case "Union": + return isUnion(that) && equalsUnion(self.types, that.types); + case "Refinement": + case "TupleType": + case "TypeLiteral": + case "Suspend": + case "Transformation": + case "Declaration": + return self === that; + } +}; +exports.equals = equals; +const equalsTemplateLiteralSpan = /*#__PURE__*/Arr.getEquivalence((self, that) => { + return self.literal === that.literal && equals(self.type, that.type); +}); +const equalsEnums = /*#__PURE__*/Arr.getEquivalence((self, that) => that[0] === self[0] && that[1] === self[1]); +const equalsUnion = /*#__PURE__*/Arr.getEquivalence(equals); +const intersection = /*#__PURE__*/Arr.intersectionWith(equals); +const _keyof = ast => { + switch (ast._tag) { + case "Declaration": + { + const annotation = getSurrogateAnnotation(ast); + if (Option.isSome(annotation)) { + return _keyof(annotation.value); + } + break; + } + case "TypeLiteral": + return ast.propertySignatures.map(p => Predicate.isSymbol(p.name) ? new UniqueSymbol(p.name) : new Literal(p.name)).concat(ast.indexSignatures.map(is => getEncodedParameter(is.parameter))); + case "Suspend": + return _keyof(ast.f()); + case "Union": + return ast.types.slice(1).reduce((out, ast) => intersection(out, _keyof(ast)), _keyof(ast.types[0])); + case "Transformation": + return _keyof(ast.to); + } + throw new Error(errors_.getASTUnsupportedSchemaErrorMessage(ast)); +}; +/** @internal */ +const compose = (ab, cd) => new Transformation(ab, cd, composeTransformation); +/** @internal */ +exports.compose = compose; +const rename = (ast, mapping) => { + switch (ast._tag) { + case "TypeLiteral": + { + const propertySignatureTransformations = []; + for (const key of Reflect.ownKeys(mapping)) { + const name = mapping[key]; + if (name !== undefined) { + propertySignatureTransformations.push(new PropertySignatureTransformation(key, name, _Function.identity, _Function.identity)); + } + } + if (propertySignatureTransformations.length === 0) { + return ast; + } + return new Transformation(ast, new TypeLiteral(ast.propertySignatures.map(ps => { + const name = mapping[ps.name]; + return new PropertySignature(name === undefined ? ps.name : name, typeAST(ps.type), ps.isOptional, ps.isReadonly, ps.annotations); + }), ast.indexSignatures), new TypeLiteralTransformation(propertySignatureTransformations)); + } + case "Union": + return Union.make(ast.types.map(ast => rename(ast, mapping))); + case "Suspend": + return new Suspend(() => rename(ast.f(), mapping)); + case "Transformation": + return compose(ast, rename(typeAST(ast), mapping)); + } + throw new Error(errors_.getASTUnsupportedRenameSchemaErrorMessage(ast)); +}; +exports.rename = rename; +const formatKeyword = ast => Option.getOrElse(getExpected(ast), () => ast._tag); +function getBrands(ast) { + return Option.match(getBrandAnnotation(ast), { + onNone: () => "", + onSome: brands => brands.map(brand => ` & Brand<${Inspectable.formatUnknown(brand)}>`).join("") + }); +} +const getOrElseExpected = ast => getTitleAnnotation(ast).pipe(Option.orElse(() => getDescriptionAnnotation(ast)), Option.orElse(() => getAutoTitleAnnotation(ast)), Option.map(s => s + getBrands(ast))); +const getExpected = ast => Option.orElse(getIdentifierAnnotation(ast), () => getOrElseExpected(ast)); +/** @internal */ +const pruneUndefined = (ast, self, onTransformation) => { + switch (ast._tag) { + case "UndefinedKeyword": + return neverKeyword; + case "Union": + { + const types = []; + let hasUndefined = false; + for (const type of ast.types) { + const pruned = self(type); + if (pruned) { + hasUndefined = true; + if (!isNeverKeyword(pruned)) { + types.push(pruned); + } + } else { + types.push(type); + } + } + if (hasUndefined) { + return Union.make(types); + } + break; + } + case "Suspend": + return self(ast.f()); + case "Transformation": + return onTransformation(ast); + } +}; +exports.pruneUndefined = pruneUndefined; +//# sourceMappingURL=SchemaAST.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/SchemaAST.js.map b/backend/node_modules/effect/dist/cjs/SchemaAST.js.map new file mode 100644 index 0000000000000000000000000000000000000000..1fa20b3085be2ae6e834d366f21f9ca86e396fe5 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/SchemaAST.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SchemaAST.js","names":["Arr","_interopRequireWildcard","require","_Function","_GlobalValue","Inspectable","errors_","util_","Number","Option","Order","Predicate","regexp","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeConstructorAnnotationId","exports","Symbol","for","BrandAnnotationId","SchemaIdAnnotationId","MessageAnnotationId","MissingMessageAnnotationId","IdentifierAnnotationId","TitleAnnotationId","AutoTitleAnnotationId","DescriptionAnnotationId","ExamplesAnnotationId","DefaultAnnotationId","JSONSchemaAnnotationId","ArbitraryAnnotationId","PrettyAnnotationId","EquivalenceAnnotationId","DocumentationAnnotationId","ConcurrencyAnnotationId","BatchingAnnotationId","ParseIssueTitleAnnotationId","ParseOptionsAnnotationId","DecodingFallbackAnnotationId","SurrogateAnnotationId","StableFilterAnnotationId","getAnnotation","dual","annotated","key","prototype","annotations","some","none","getTypeConstructorAnnotation","getBrandAnnotation","getSchemaIdAnnotation","getMessageAnnotation","getMissingMessageAnnotation","getTitleAnnotation","getAutoTitleAnnotation","getIdentifierAnnotation","getDescriptionAnnotation","getExamplesAnnotation","getDefaultAnnotation","getJSONSchemaAnnotation","getDocumentationAnnotation","getConcurrencyAnnotation","getBatchingAnnotation","getParseIssueTitleAnnotation","getParseOptionsAnnotation","getDecodingFallbackAnnotation","getSurrogateAnnotation","getStableFilterAnnotation","hasStableFilter","exists","b","JSONIdentifierAnnotationId","getJSONIdentifierAnnotation","getJSONIdentifier","orElse","ParseJsonSchemaId","Declaration","typeParameters","decodeUnknown","encodeUnknown","_tag","constructor","toString","getOrElse","getExpected","toJSON","map","ast","toJSONAnnotations","createASTGuard","tag","isDeclaration","Literal","literal","formatUnknown","isBigInt","String","isLiteral","$null","null","UniqueSymbol","symbol","isUniqueSymbol","UndefinedKeyword","formatKeyword","undefinedKeyword","isUndefinedKeyword","VoidKeyword","voidKeyword","isVoidKeyword","NeverKeyword","neverKeyword","isNeverKeyword","UnknownKeyword","unknownKeyword","isUnknownKeyword","AnyKeyword","anyKeyword","isAnyKeyword","StringKeyword","stringKeyword","isStringKeyword","NumberKeyword","numberKeyword","isNumberKeyword","BooleanKeyword","booleanKeyword","isBooleanKeyword","BigIntKeyword","bigIntKeyword","isBigIntKeyword","SymbolKeyword","symbolKeyword","isSymbolKeyword","ObjectKeyword","objectKeyword","isObjectKeyword","Enums","enums","length","_","value","JSON","stringify","join","isEnums","isTemplateLiteralSpanType","types","every","templateLiteralSpanUnionTypeToString","type","templateLiteralSpanTypeToString","TemplateLiteralSpan","Error","getSchemaUnsupportedLiteralSpanErrorMessage","TemplateLiteral","head","spans","formatTemplateLiteral","span","isTemplateLiteral","Type","OptionalType","isOptional","getRestASTs","rest","annotatedAST","TupleType","elements","isReadonly","hasOptionalElement","hasIllegalRequiredElement","getASTRequiredElementFollowinAnOptionalElementErrorMessage","formatTuple","formattedElements","matchLeft","onEmpty","onNonEmpty","tail","formattedHead","wrappedHead","includes","formattedTail","isTupleType","PropertySignature","name","isParameter","from","IndexSignature","parameter","getASTIndexSignatureParameterErrorMessage","TypeLiteral","propertySignatures","indexSignatures","keys","getASTDuplicatePropertySignatureErrorMessage","parameters","string","encodedParameter","getEncodedParameter","getASTDuplicateIndexSignatureErrorMessage","formatTypeLiteral","ps","formatIndexSignatures","iss","pss","isTypeLiteral","sortCandidates","sort","mapInput","literalMap","number","boolean","bigint","flatten","candidates","flatMap","isUnion","unify","cs","out","uniques","literals","push","Union","make","isMembers","mapMembers","members","as","toJSONMemoMap","globalValue","Suspend","memoizeThunk","pipe","liftThrowable","isSuspend","Refinement","filter","match","getOrElseExpected","onNone","onSome","expected","isRefinement","defaultParseOption","Transformation","to","transformation","isTransformation","FinalTransformation","decode","encode","createTransformationGuard","isFinalTransformation","ComposeTransformation","composeTransformation","isComposeTransformation","PropertySignatureTransformation","isRenamingPropertySignatureTransformation","identity","TypeLiteralTransformation","propertySignatureTransformations","fromKeys","toKeys","pst","getASTDuplicatePropertySignatureTransformationErrorMessage","isTypeLiteralTransformation","overrides","d","getOwnPropertyDescriptors","base","surrogate","isSome","create","getPrototypeOf","keyof","_keyof","STRING_KEYWORD_PATTERN","NUMBER_KEYWORD_PATTERN","getTemplateLiteralSpanTypePattern","capture","escape","getTemplateLiteralPattern","handleTemplateLiteralSpanTypeParens","s","top","pattern","spanPattern","getTemplateLiteralRegExp","RegExp","getTemplateLiteralCapturingRegExp","getPropertySignatures","annotation","slice","getPropertyKeys","getPropertyKeyIndexedAccess","getIndexSignatures","getNumberIndexedAccess","hasOptional","concat","getASTUnsupportedSchemaErrorMessage","getTypeLiteralPropertySignature","ops","findFirst","isString","undefined","is","regex","test","isSymbol","reduce","intersection","record","go","isNumber","getASTUnsupportedLiteralErrorMessage","forEach","getASTUnsupportedKeySchemaErrorMessage","pick","names","ts","k","find","isNonEmptyReadonlyArray","omit","orUndefined","partial","options","exact","member","required","mutable","changeMap","getCompiler","compile","path","pickAnnotations","annotationIds","id","omitAnnotations","preserveTransformationAnnotations","typeAST","restASTs","p","preserve","changed","allocate","a","fa","getTransformationFrom","encodedAST_","isBound","borrowedAnnotations","identifier","suffix","encodedAST","encodedBoundAST","getOwnPropertySymbols","equals","self","that","equalsTemplateLiteralSpan","equalsEnums","equalsUnion","getEquivalence","intersectionWith","compose","ab","cd","rename","mapping","Reflect","ownKeys","getASTUnsupportedRenameSchemaErrorMessage","getBrands","brands","brand","pruneUndefined","onTransformation","hasUndefined","pruned"],"sources":["../../src/SchemaAST.ts"],"sourcesContent":[null],"mappings":";;;;;;;AAIA,IAAAA,GAAA,GAAAC,uBAAA,CAAAC,OAAA;AAGA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAJ,uBAAA,CAAAC,OAAA;AACA,IAAAI,OAAA,GAAAL,uBAAA,CAAAC,OAAA;AACA,IAAAK,KAAA,GAAAN,uBAAA,CAAAC,OAAA;AACA,IAAAM,MAAA,GAAAP,uBAAA,CAAAC,OAAA;AACA,IAAAO,MAAA,GAAAR,uBAAA,CAAAC,OAAA;AACA,IAAAQ,KAAA,GAAAT,uBAAA,CAAAC,OAAA;AAEA,IAAAS,SAAA,GAAAV,uBAAA,CAAAC,OAAA;AACA,IAAAU,MAAA,GAAAX,uBAAA,CAAAC,OAAA;AAAqC,SAAAD,wBAAAY,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAd,uBAAA,YAAAA,CAAAY,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CA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AAA,GAAAA,cAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/ScopedCache.js b/backend/node_modules/effect/dist/cjs/ScopedCache.js new file mode 100644 index 0000000000000000000000000000000000000000..bb1b5901198935777d11e2e61791150a0fdbf296 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/ScopedCache.js @@ -0,0 +1,31 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.makeWith = exports.make = exports.ScopedCacheTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/scopedCache.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const ScopedCacheTypeId = exports.ScopedCacheTypeId = internal.ScopedCacheTypeId; +/** + * Constructs a new cache with the specified capacity, time to live, and + * lookup function. + * + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * Constructs a new cache with the specified capacity, time to live, and + * lookup function, where the time to live can depend on the `Exit` value + * returned by the lookup function. + * + * @since 2.0.0 + * @category constructors + */ +const makeWith = exports.makeWith = internal.makeWith; +//# sourceMappingURL=ScopedCache.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/ScopedRef.js b/backend/node_modules/effect/dist/cjs/ScopedRef.js new file mode 100644 index 0000000000000000000000000000000000000000..8517b8edc2125b1ea2fb3785216693e04b79debb --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/ScopedRef.js @@ -0,0 +1,49 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.set = exports.make = exports.get = exports.fromAcquire = exports.ScopedRefTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/scopedRef.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const ScopedRefTypeId = exports.ScopedRefTypeId = internal.ScopedRefTypeId; +/** + * Creates a new `ScopedRef` from an effect that resourcefully produces a + * value. + * + * @since 2.0.0 + * @category constructors + */ +const fromAcquire = exports.fromAcquire = internal.fromAcquire; +/** + * Retrieves the current value of the scoped reference. + * + * @since 2.0.0 + * @category getters + */ +const get = exports.get = internal.get; +/** + * Creates a new `ScopedRef` from the specified value. This method should + * not be used for values whose creation require the acquisition of resources. + * + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * Sets the value of this reference to the specified resourcefully-created + * value. Any resources associated with the old value will be released. + * + * This method will not return until either the reference is successfully + * changed to the new value, with old resources released, or until the attempt + * to acquire a new value fails. + * + * @since 2.0.0 + * @category getters + */ +const set = exports.set = internal.set; +//# sourceMappingURL=ScopedRef.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/ScopedRef.js.map b/backend/node_modules/effect/dist/cjs/ScopedRef.js.map new file mode 100644 index 0000000000000000000000000000000000000000..7a146d9ac39431867113a1fee0c6b102b58b1ccb --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/ScopedRef.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ScopedRef.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ScopedRefTypeId","exports","fromAcquire","make"],"sources":["../../src/ScopedRef.ts"],"sourcesContent":[null],"mappings":";;;;;;AAKA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAmD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAOnD;;;;AAIO,MAAMkB,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAkBtB,QAAQ,CAACsB,eAAe;AA0DtE;;;;;;;AAOO,MAAME,WAAW,GAAAD,OAAA,CAAAC,WAAA,GAE+BxB,QAAQ,CAACwB,WAAW;AAE3E;;;;;;AAMO,MAAMT,GAAG,GAAAQ,OAAA,CAAAR,GAAA,GAAgDf,QAAQ,CAACe,GAAG;AAE5E;;;;;;;AAOO,MAAMU,IAAI,GAAAF,OAAA,CAAAE,IAAA,GAAiFzB,QAAQ,CAACyB,IAAI;AAE/G;;;;;;;;;;;AAWO,MAAMT,GAAG,GAAAO,OAAA,CAAAP,GAAA,GAyBZhB,QAAQ,CAACgB,GAAG","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Secret.js.map b/backend/node_modules/effect/dist/cjs/Secret.js.map new file mode 100644 index 0000000000000000000000000000000000000000..82b6a774e2a1a1771ed7862406c35e8a4606d767 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Secret.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Secret.js","names":["InternalSecret","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","SecretTypeId","exports","isSecret","make","fromIterable","fromString","value","unsafeWipe"],"sources":["../../src/Secret.ts"],"sourcesContent":[null],"mappings":";;;;;;AAKA,IAAAA,cAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAsD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,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B,cAAc,CAAC6B,UAAU","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/SingleProducerAsyncInput.js b/backend/node_modules/effect/dist/cjs/SingleProducerAsyncInput.js new file mode 100644 index 0000000000000000000000000000000000000000..bc9855964dcb6d72beeddea5f62e3ff5526df17a --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/SingleProducerAsyncInput.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.make = void 0; +var internal = _interopRequireWildcard(require("./internal/channel/singleProducerAsyncInput.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +//# sourceMappingURL=SingleProducerAsyncInput.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/SingleProducerAsyncInput.js.map b/backend/node_modules/effect/dist/cjs/SingleProducerAsyncInput.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c0fc0b734447ae535a893a69301dd57dd4c30f07 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/SingleProducerAsyncInput.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SingleProducerAsyncInput.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","make","exports"],"sources":["../../src/SingleProducerAsyncInput.ts"],"sourcesContent":[null],"mappings":";;;;;;AAOA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA0E,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAuD1E;;;;AAIO,MAAMkB,IAAI,GAAAC,OAAA,CAAAD,IAAA,GAAoFtB,QAAQ,CAACsB,IAAI","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Sink.js b/backend/node_modules/effect/dist/cjs/Sink.js new file mode 100644 index 0000000000000000000000000000000000000000..358f1d9c34816065284a6117a56c2a0bd477bb24 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Sink.js @@ -0,0 +1,872 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.unwrap = exports.toChannel = exports.timed = exports.take = exports.sync = exports.suspend = exports.summarized = exports.sum = exports.succeed = exports.splitWhere = exports.some = exports.refineOrDieWith = exports.refineOrDie = exports.raceWith = exports.raceBoth = exports.race = exports.provideContext = exports.orElse = exports.never = exports.mkString = exports.mapLeftover = exports.mapInputEffect = exports.mapInputChunksEffect = exports.mapInputChunks = exports.mapInput = exports.mapError = exports.mapEffect = exports.map = exports.leftover = exports.last = exports.ignoreLeftover = exports.head = exports.fromQueue = exports.fromPush = exports.fromPubSub = exports.fromEffect = exports.fromChannel = exports.forEachWhile = exports.forEachChunkWhile = exports.forEachChunk = exports.forEach = exports.foldWeightedEffect = exports.foldWeightedDecomposeEffect = exports.foldWeightedDecompose = exports.foldWeighted = exports.foldUntilEffect = exports.foldUntil = exports.foldSink = exports.foldLeftEffect = exports.foldLeftChunksEffect = exports.foldLeftChunks = exports.foldLeft = exports.foldEffect = exports.foldChunksEffect = exports.foldChunks = exports.fold = exports.flatMap = exports.findEffect = exports.filterInputEffect = exports.filterInput = exports.failSync = exports.failCauseSync = exports.failCause = exports.fail = exports.every = exports.ensuringWith = exports.ensuring = exports.dropWhileEffect = exports.dropWhile = exports.dropUntilEffect = exports.dropUntil = exports.drop = exports.drain = exports.dimapEffect = exports.dimapChunksEffect = exports.dimapChunks = exports.dimap = exports.dieSync = exports.dieMessage = exports.die = exports.count = exports.contextWithSink = exports.contextWithEffect = exports.contextWith = exports.context = exports.collectLeftover = exports.collectAllWhileWith = exports.collectAllWhileEffect = exports.collectAllWhile = exports.collectAllUntilEffect = exports.collectAllUntil = exports.collectAllToSetN = exports.collectAllToSet = exports.collectAllToMapN = exports.collectAllToMap = exports.collectAllN = exports.collectAllFrom = exports.collectAll = exports.as = exports.SinkTypeId = void 0; +exports.zipWith = exports.zipRight = exports.zipLeft = exports.zip = exports.withDuration = exports.unwrapScopedWith = exports.unwrapScoped = void 0; +var internal = _interopRequireWildcard(require("./internal/sink.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const SinkTypeId = exports.SinkTypeId = internal.SinkTypeId; +/** + * Replaces this sink's result with the provided value. + * + * @since 2.0.0 + * @category mapping + */ +const as = exports.as = internal.as; +/** + * A sink that collects all elements into a `Chunk`. + * + * @since 2.0.0 + * @category constructors + */ +const collectAll = exports.collectAll = internal.collectAll; +/** + * A sink that collects first `n` elements into a chunk. + * + * @since 2.0.0 + * @category constructors + */ +const collectAllN = exports.collectAllN = internal.collectAllN; +/** + * Repeatedly runs the sink and accumulates its results into a `Chunk`. + * + * @since 2.0.0 + * @category utils + */ +const collectAllFrom = exports.collectAllFrom = internal.collectAllFrom; +/** + * A sink that collects all of its inputs into a map. The keys are extracted + * from inputs using the keying function `key`; if multiple inputs use the + * same key, they are merged using the `merge` function. + * + * @since 2.0.0 + * @category constructors + */ +const collectAllToMap = exports.collectAllToMap = internal.collectAllToMap; +/** + * A sink that collects first `n` keys into a map. The keys are calculated + * from inputs using the keying function `key`; if multiple inputs use the the + * same key, they are merged using the `merge` function. + * + * @since 2.0.0 + * @category constructors + */ +const collectAllToMapN = exports.collectAllToMapN = internal.collectAllToMapN; +/** + * A sink that collects all of its inputs into a set. + * + * @since 2.0.0 + * @category constructors + */ +const collectAllToSet = exports.collectAllToSet = internal.collectAllToSet; +/** + * A sink that collects first `n` distinct inputs into a set. + * + * @since 2.0.0 + * @category constructors + */ +const collectAllToSetN = exports.collectAllToSetN = internal.collectAllToSetN; +/** + * Accumulates incoming elements into a chunk until predicate `p` is + * satisfied. + * + * @since 2.0.0 + * @category constructors + */ +const collectAllUntil = exports.collectAllUntil = internal.collectAllUntil; +/** + * Accumulates incoming elements into a chunk until effectful predicate `p` is + * satisfied. + * + * @since 2.0.0 + * @category constructors + */ +const collectAllUntilEffect = exports.collectAllUntilEffect = internal.collectAllUntilEffect; +/** + * Accumulates incoming elements into a chunk as long as they verify predicate + * `p`. + * + * @since 2.0.0 + * @category constructors + */ +const collectAllWhile = exports.collectAllWhile = internal.collectAllWhile; +/** + * Accumulates incoming elements into a chunk as long as they verify effectful + * predicate `p`. + * + * @since 2.0.0 + * @category constructors + */ +const collectAllWhileEffect = exports.collectAllWhileEffect = internal.collectAllWhileEffect; +/** + * Repeatedly runs the sink for as long as its results satisfy the predicate + * `p`. The sink's results will be accumulated using the stepping function `f`. + * + * @since 2.0.0 + * @category utils + */ +const collectAllWhileWith = exports.collectAllWhileWith = internal.collectAllWhileWith; +/** + * Collects the leftovers from the stream when the sink succeeds and returns + * them as part of the sink's result. + * + * @since 2.0.0 + * @category utils + */ +const collectLeftover = exports.collectLeftover = internal.collectLeftover; +/** + * Transforms this sink's input elements. + * + * @since 2.0.0 + * @category mapping + */ +const mapInput = exports.mapInput = internal.mapInput; +/** + * Effectfully transforms this sink's input elements. + * + * @since 2.0.0 + * @category mapping + */ +const mapInputEffect = exports.mapInputEffect = internal.mapInputEffect; +/** + * Transforms this sink's input chunks. `f` must preserve chunking-invariance. + * + * @since 2.0.0 + * @category mapping + */ +const mapInputChunks = exports.mapInputChunks = internal.mapInputChunks; +/** + * Effectfully transforms this sink's input chunks. `f` must preserve + * chunking-invariance. + * + * @since 2.0.0 + * @category mapping + */ +const mapInputChunksEffect = exports.mapInputChunksEffect = internal.mapInputChunksEffect; +/** + * A sink that counts the number of elements fed to it. + * + * @since 2.0.0 + * @category constructors + */ +const count = exports.count = internal.count; +/** + * Creates a sink halting with the specified defect. + * + * @since 2.0.0 + * @category constructors + */ +const die = exports.die = internal.die; +/** + * Creates a sink halting with the specified message, wrapped in a + * `RuntimeException`. + * + * @since 2.0.0 + * @category constructors + */ +const dieMessage = exports.dieMessage = internal.dieMessage; +/** + * Creates a sink halting with the specified defect. + * + * @since 2.0.0 + * @category constructors + */ +const dieSync = exports.dieSync = internal.dieSync; +/** + * Transforms both inputs and result of this sink using the provided + * functions. + * + * @since 2.0.0 + * @category mapping + */ +const dimap = exports.dimap = internal.dimap; +/** + * Effectfully transforms both inputs and result of this sink using the + * provided functions. + * + * @since 2.0.0 + * @category mapping + */ +const dimapEffect = exports.dimapEffect = internal.dimapEffect; +/** + * Transforms both input chunks and result of this sink using the provided + * functions. + * + * @since 2.0.0 + * @category mapping + */ +const dimapChunks = exports.dimapChunks = internal.dimapChunks; +/** + * Effectfully transforms both input chunks and result of this sink using the + * provided functions. `f` and `g` must preserve chunking-invariance. + * + * @since 2.0.0 + * @category mapping + */ +const dimapChunksEffect = exports.dimapChunksEffect = internal.dimapChunksEffect; +/** + * A sink that ignores its inputs. + * + * @since 2.0.0 + * @category constructors + */ +const drain = exports.drain = internal.drain; +/** + * Creates a sink that drops `n` elements. + * + * @since 2.0.0 + * @category constructors + */ +const drop = exports.drop = internal.drop; +/** + * Drops incoming elements until the predicate is satisfied. + * + * @since 2.0.0 + * @category constructors + */ +const dropUntil = exports.dropUntil = internal.dropUntil; +/** + * Drops incoming elements until the effectful predicate is satisfied. + * + * @since 2.0.0 + * @category constructors + */ +const dropUntilEffect = exports.dropUntilEffect = internal.dropUntilEffect; +/** + * Drops incoming elements as long as the predicate is satisfied. + * + * @since 2.0.0 + * @category constructors + */ +const dropWhile = exports.dropWhile = internal.dropWhile; +/** + * Drops incoming elements as long as the effectful predicate is satisfied. + * + * @since 2.0.0 + * @category constructors + */ +const dropWhileEffect = exports.dropWhileEffect = internal.dropWhileEffect; +/** + * Returns a new sink with an attached finalizer. The finalizer is guaranteed + * to be executed so long as the sink begins execution (and regardless of + * whether or not it completes). + * + * @since 2.0.0 + * @category finalization + */ +const ensuring = exports.ensuring = internal.ensuring; +/** + * Returns a new sink with an attached finalizer. The finalizer is guaranteed + * to be executed so long as the sink begins execution (and regardless of + * whether or not it completes). + * + * @since 2.0.0 + * @category finalization + */ +const ensuringWith = exports.ensuringWith = internal.ensuringWith; +/** + * Accesses the whole context of the sink. + * + * @since 2.0.0 + * @category constructors + */ +const context = exports.context = internal.context; +/** + * Accesses the context of the sink. + * + * @since 2.0.0 + * @category constructors + */ +const contextWith = exports.contextWith = internal.contextWith; +/** + * Accesses the context of the sink in the context of an effect. + * + * @since 2.0.0 + * @category constructors + */ +const contextWithEffect = exports.contextWithEffect = internal.contextWithEffect; +/** + * Accesses the context of the sink in the context of a sink. + * + * @since 2.0.0 + * @category constructors + */ +const contextWithSink = exports.contextWithSink = internal.contextWithSink; +/** + * A sink that returns whether all elements satisfy the specified predicate. + * + * @since 2.0.0 + * @category constructors + */ +const every = exports.every = internal.every; +/** + * A sink that always fails with the specified error. + * + * @since 2.0.0 + * @category constructors + */ +const fail = exports.fail = internal.fail; +/** + * A sink that always fails with the specified lazily evaluated error. + * + * @since 2.0.0 + * @category constructors + */ +const failSync = exports.failSync = internal.failSync; +/** + * Creates a sink halting with a specified `Cause`. + * + * @since 2.0.0 + * @category constructors + */ +const failCause = exports.failCause = internal.failCause; +/** + * Creates a sink halting with a specified lazily evaluated `Cause`. + * + * @since 2.0.0 + * @category constructors + */ +const failCauseSync = exports.failCauseSync = internal.failCauseSync; +/** + * Filters the sink's input with the given predicate. + * + * @since 2.0.0 + * @category filtering + */ +const filterInput = exports.filterInput = internal.filterInput; +/** + * Effectfully filter the input of this sink using the specified predicate. + * + * @since 2.0.0 + * @category filtering + */ +const filterInputEffect = exports.filterInputEffect = internal.filterInputEffect; +/** + * Creates a sink that produces values until one verifies the predicate `f`. + * + * @since 2.0.0 + * @category elements + */ +const findEffect = exports.findEffect = internal.findEffect; +/** + * A sink that folds its inputs with the provided function, termination + * predicate and initial state. + * + * @since 2.0.0 + * @category folding + */ +const fold = exports.fold = internal.fold; +/** + * Folds over the result of the sink + * + * @since 2.0.0 + * @category folding + */ +const foldSink = exports.foldSink = internal.foldSink; +/** + * A sink that folds its input chunks with the provided function, termination + * predicate and initial state. `contFn` condition is checked only for the + * initial value and at the end of processing of each chunk. `f` and `contFn` + * must preserve chunking-invariance. + * + * @since 2.0.0 + * @category constructors + */ +const foldChunks = exports.foldChunks = internal.foldChunks; +/** + * A sink that effectfully folds its input chunks with the provided function, + * termination predicate and initial state. `contFn` condition is checked only + * for the initial value and at the end of processing of each chunk. `f` and + * `contFn` must preserve chunking-invariance. + * + * @since 2.0.0 + * @category constructors + */ +const foldChunksEffect = exports.foldChunksEffect = internal.foldChunksEffect; +/** + * A sink that effectfully folds its inputs with the provided function, + * termination predicate and initial state. + * + * @since 2.0.0 + * @category constructors + */ +const foldEffect = exports.foldEffect = internal.foldEffect; +/** + * A sink that folds its inputs with the provided function and initial state. + * + * @since 2.0.0 + * @category constructors + */ +const foldLeft = exports.foldLeft = internal.foldLeft; +/** + * A sink that folds its input chunks with the provided function and initial + * state. `f` must preserve chunking-invariance. + * + * @since 2.0.0 + * @category constructors + */ +const foldLeftChunks = exports.foldLeftChunks = internal.foldLeftChunks; +/** + * A sink that effectfully folds its input chunks with the provided function + * and initial state. `f` must preserve chunking-invariance. + * + * @since 2.0.0 + * @category constructors + */ +const foldLeftChunksEffect = exports.foldLeftChunksEffect = internal.foldLeftChunksEffect; +/** + * A sink that effectfully folds its inputs with the provided function and + * initial state. + * + * @since 2.0.0 + * @category constructors + */ +const foldLeftEffect = exports.foldLeftEffect = internal.foldLeftEffect; +/** + * Creates a sink that folds elements of type `In` into a structure of type + * `S` until `max` elements have been folded. + * + * Like `Sink.foldWeighted`, but with a constant cost function of `1`. + * + * @since 2.0.0 + * @category constructors + */ +const foldUntil = exports.foldUntil = internal.foldUntil; +/** + * Creates a sink that effectfully folds elements of type `In` into a + * structure of type `S` until `max` elements have been folded. + * + * Like `Sink.foldWeightedEffect` but with a constant cost function of `1`. + * + * @since 2.0.0 + * @category constructors + */ +const foldUntilEffect = exports.foldUntilEffect = internal.foldUntilEffect; +/** + * Creates a sink that folds elements of type `In` into a structure of type `S`, + * until `max` worth of elements (determined by the `costFn`) have been folded. + * + * **Note** + * + * Elements that have an individual cost larger than `max` will force the sink + * to cross the `max` cost. See `Sink.foldWeightedDecompose` for a variant + * that can handle these cases. + * + * @since 2.0.0 + * @category constructors + */ +const foldWeighted = exports.foldWeighted = internal.foldWeighted; +/** + * Creates a sink that folds elements of type `In` into a structure of type + * `S`, until `max` worth of elements (determined by the `costFn`) have been + * folded. + * + * The `decompose` function will be used for decomposing elements that cause + * an `S` aggregate to cross `max` into smaller elements. For example: + * + * ```ts skip-type-checking + * pipe( + * Stream.make(1, 5, 1), + * Stream.transduce( + * Sink.foldWeightedDecompose( + * Chunk.empty(), + * 4, + * (n: number) => n, + * (n: number) => Chunk.make(n - 1, 1), + * (acc, el) => pipe(acc, Chunk.append(el)) + * ) + * ), + * Stream.runCollect + * ) + * ``` + * + * The stream would emit the elements `Chunk(1), Chunk(4), Chunk(1, 1)`. + * + * Be vigilant with this function, it has to generate "simpler" values or the + * fold may never end. A value is considered indivisible if `decompose` yields + * the empty chunk or a single-valued chunk. In these cases, there is no other + * choice than to yield a value that will cross the threshold. + * + * `Sink.foldWeightedDecomposeEffect` allows the decompose function to return an + * effect value, and consequently it allows the sink to fail. + * + * @since 2.0.0 + * @category constructors + */ +const foldWeightedDecompose = exports.foldWeightedDecompose = internal.foldWeightedDecompose; +/** + * Creates a sink that effectfully folds elements of type `In` into a + * structure of type `S`, until `max` worth of elements (determined by the + * `costFn`) have been folded. + * + * The `decompose` function will be used for decomposing elements that cause + * an `S` aggregate to cross `max` into smaller elements. Be vigilant with + * this function, it has to generate "simpler" values or the fold may never + * end. A value is considered indivisible if `decompose` yields the empty + * chunk or a single-valued chunk. In these cases, there is no other choice + * than to yield a value that will cross the threshold. + * + * See `Sink.foldWeightedDecompose` for an example. + * + * @since 2.0.0 + * @category constructors + */ +const foldWeightedDecomposeEffect = exports.foldWeightedDecomposeEffect = internal.foldWeightedDecomposeEffect; +/** + * Creates a sink that effectfully folds elements of type `In` into a + * structure of type `S`, until `max` worth of elements (determined by the + * `costFn`) have been folded. + * + * @note + * Elements that have an individual cost larger than `max` will force the + * sink to cross the `max` cost. See `Sink.foldWeightedDecomposeEffect` for + * a variant that can handle these cases. + * + * @since 2.0.0 + * @category constructors + */ +const foldWeightedEffect = exports.foldWeightedEffect = internal.foldWeightedEffect; +/** + * A sink that executes the provided effectful function for every element fed + * to it. + * + * @since 2.0.0 + * @category constructors + */ +const forEach = exports.forEach = internal.forEach; +/** + * A sink that executes the provided effectful function for every chunk fed to + * it. + * + * @since 2.0.0 + * @category constructors + */ +const forEachChunk = exports.forEachChunk = internal.forEachChunk; +/** + * A sink that executes the provided effectful function for every chunk fed to + * it until `f` evaluates to `false`. + * + * @since 2.0.0 + * @category constructors + */ +const forEachChunkWhile = exports.forEachChunkWhile = internal.forEachChunkWhile; +/** + * A sink that executes the provided effectful function for every element fed + * to it until `f` evaluates to `false`. + * + * @since 2.0.0 + * @category constructors + */ +const forEachWhile = exports.forEachWhile = internal.forEachWhile; +/** + * Runs this sink until it yields a result, then uses that result to create + * another sink from the provided function which will continue to run until it + * yields a result. + * + * This function essentially runs sinks in sequence. + * + * @since 2.0.0 + * @category sequencing + */ +const flatMap = exports.flatMap = internal.flatMap; +/** + * Creates a sink from a `Channel`. + * + * @since 2.0.0 + * @category constructors + */ +const fromChannel = exports.fromChannel = internal.fromChannel; +/** + * Creates a `Channel` from a Sink. + * + * @since 2.0.0 + * @category constructors + */ +const toChannel = exports.toChannel = internal.toChannel; +/** + * Creates a single-value sink produced from an effect. + * + * @since 2.0.0 + * @category constructors + */ +const fromEffect = exports.fromEffect = internal.fromEffect; +/** + * Create a sink which publishes each element to the specified `PubSub`. + * + * If the `shutdown` parameter is `true`, the `PubSub` will be shutdown after + * the sink is evaluated (defaults to `false`). + * + * @since 2.0.0 + * @category constructors + */ +const fromPubSub = exports.fromPubSub = internal.fromPubSub; +/** + * Creates a sink from a chunk processing function. + * + * @since 2.0.0 + * @category constructors + */ +const fromPush = exports.fromPush = internal.fromPush; +/** + * Create a sink which enqueues each element into the specified queue. + * + * If the `shutdown` parameter is `true`, the queue will be shutdown after the + * sink is evaluated (defaults to `false`). + * + * @since 2.0.0 + * @category constructors + */ +const fromQueue = exports.fromQueue = internal.fromQueue; +/** + * Creates a sink containing the first value. + * + * @since 2.0.0 + * @category constructors + */ +const head = exports.head = internal.head; +/** + * Drains the remaining elements from the stream after the sink finishes + * + * @since 2.0.0 + * @category utils + */ +const ignoreLeftover = exports.ignoreLeftover = internal.ignoreLeftover; +/** + * Creates a sink containing the last value. + * + * @since 2.0.0 + * @category constructors + */ +const last = exports.last = internal.last; +/** + * Creates a sink that does not consume any input but provides the given chunk + * as its leftovers + * + * @since 2.0.0 + * @category constructors + */ +const leftover = exports.leftover = internal.leftover; +/** + * Transforms this sink's result. + * + * @since 2.0.0 + * @category mapping + */ +const map = exports.map = internal.map; +/** + * Effectfully transforms this sink's result. + * + * @since 2.0.0 + * @category mapping + */ +const mapEffect = exports.mapEffect = internal.mapEffect; +/** + * Transforms the errors emitted by this sink using `f`. + * + * @since 2.0.0 + * @category mapping + */ +const mapError = exports.mapError = internal.mapError; +/** + * Transforms the leftovers emitted by this sink using `f`. + * + * @since 2.0.0 + * @category mapping + */ +const mapLeftover = exports.mapLeftover = internal.mapLeftover; +/** + * Creates a sink which transforms it's inputs into a string. + * + * @since 2.0.0 + * @category constructors + */ +const mkString = exports.mkString = internal.mkString; +/** + * Creates a sink which never terminates. + * + * @since 2.0.0 + * @category constructors + */ +const never = exports.never = internal.never; +/** + * Switch to another sink in case of failure + * + * @since 2.0.0 + * @category error handling + */ +const orElse = exports.orElse = internal.orElse; +/** + * Provides the sink with its required context, which eliminates its + * dependency on `R`. + * + * @since 2.0.0 + * @category context + */ +const provideContext = exports.provideContext = internal.provideContext; +/** + * Runs both sinks in parallel on the input, , returning the result or the + * error from the one that finishes first. + * + * @since 2.0.0 + * @category utils + */ +const race = exports.race = internal.race; +/** + * Runs both sinks in parallel on the input, returning the result or the error + * from the one that finishes first. + * + * @since 2.0.0 + * @category utils + */ +const raceBoth = exports.raceBoth = internal.raceBoth; +/** + * Runs both sinks in parallel on the input, using the specified merge + * function as soon as one result or the other has been computed. + * + * @since 2.0.0 + * @category utils + */ +const raceWith = exports.raceWith = internal.raceWith; +/** + * @since 2.0.0 + * @category error handling + */ +const refineOrDie = exports.refineOrDie = internal.refineOrDie; +/** + * @since 2.0.0 + * @category error handling + */ +const refineOrDieWith = exports.refineOrDieWith = internal.refineOrDieWith; +/** + * A sink that returns whether an element satisfies the specified predicate. + * + * @since 2.0.0 + * @category constructors + */ +const some = exports.some = internal.some; +/** + * Splits the sink on the specified predicate, returning a new sink that + * consumes elements until an element after the first satisfies the specified + * predicate. + * + * @since 2.0.0 + * @category utils + */ +const splitWhere = exports.splitWhere = internal.splitWhere; +/** + * A sink that immediately ends with the specified value. + * + * @since 2.0.0 + * @category constructors + */ +const succeed = exports.succeed = internal.succeed; +/** + * A sink that sums incoming numeric values. + * + * @since 2.0.0 + * @category constructors + */ +const sum = exports.sum = internal.sum; +/** + * Summarize a sink by running an effect when the sink starts and again when + * it completes. + * + * @since 2.0.0 + * @category utils + */ +const summarized = exports.summarized = internal.summarized; +/** + * Returns a lazily constructed sink that may require effects for its + * creation. + * + * @since 2.0.0 + * @category constructors + */ +const suspend = exports.suspend = internal.suspend; +/** + * A sink that immediately ends with the specified lazy value. + * + * @since 2.0.0 + * @category constructors + */ +const sync = exports.sync = internal.sync; +/** + * A sink that takes the specified number of values. + * + * @since 2.0.0 + * @category constructors + */ +const take = exports.take = internal.take; +/** + * @since 2.0.0 + * @category constructors + */ +const timed = exports.timed = internal.timed; +/** + * Creates a sink produced from an effect. + * + * @since 2.0.0 + * @category constructors + */ +const unwrap = exports.unwrap = internal.unwrap; +/** + * Creates a sink produced from a scoped effect. + * + * @since 2.0.0 + * @category constructors + */ +const unwrapScoped = exports.unwrapScoped = internal.unwrapScoped; +/** + * Constructs a `Sink` from a function which receives a `Scope` and returns + * an effect that will result in a `Sink` if successful. + * + * @since 3.11.0 + * @category constructors + */ +const unwrapScopedWith = exports.unwrapScopedWith = internal.unwrapScopedWith; +/** + * Returns the sink that executes this one and times its execution. + * + * @since 2.0.0 + * @category utils + */ +const withDuration = exports.withDuration = internal.withDuration; +/** + * Feeds inputs to this sink until it yields a result, then switches over to + * the provided sink until it yields a result, finally combining the two + * results into a tuple. + * + * @since 2.0.0 + * @category zipping + */ +const zip = exports.zip = internal.zip; +/** + * Like `Sink.zip` but keeps only the result from this sink. + * + * @since 2.0.0 + * @category zipping + */ +const zipLeft = exports.zipLeft = internal.zipLeft; +/** + * Like `Sink.zip` but keeps only the result from `that` sink. + * + * @since 2.0.0 + * @category zipping + */ +const zipRight = exports.zipRight = internal.zipRight; +/** + * Feeds inputs to this sink until it yields a result, then switches over to + * the provided sink until it yields a result, finally combining the two + * results with `f`. + * + * @since 2.0.0 + * @category zipping + */ +const zipWith = exports.zipWith = internal.zipWith; +//# sourceMappingURL=Sink.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/SortedMap.js b/backend/node_modules/effect/dist/cjs/SortedMap.js new file mode 100644 index 0000000000000000000000000000000000000000..0d3ea43c6c52e666c7a8f8d3b14901bc8153187f --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/SortedMap.js @@ -0,0 +1,189 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.values = exports.size = exports.set = exports.remove = exports.reduce = exports.partition = exports.map = exports.make = exports.lastOption = exports.keys = exports.isSortedMap = exports.isNonEmpty = exports.isEmpty = exports.headOption = exports.has = exports.getOrder = exports.get = exports.fromIterable = exports.entries = exports.empty = void 0; +var Equal = _interopRequireWildcard(require("./Equal.js")); +var _Function = _interopRequireWildcard(require("./Function.js")); +var Dual = _Function; +var Hash = _interopRequireWildcard(require("./Hash.js")); +var _Inspectable = require("./Inspectable.js"); +var Option = _interopRequireWildcard(require("./Option.js")); +var _Pipeable = require("./Pipeable.js"); +var _Predicate = require("./Predicate.js"); +var RBT = _interopRequireWildcard(require("./RedBlackTree.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +const TypeId = /*#__PURE__*/Symbol.for("effect/SortedMap"); +const SortedMapProto = { + [TypeId]: { + _K: _ => _, + _V: _ => _ + }, + [Hash.symbol]() { + return (0, _Function.pipe)(Hash.hash(this.tree), Hash.combine(Hash.hash("effect/SortedMap")), Hash.cached(this)); + }, + [Equal.symbol](that) { + return isSortedMap(that) && Equal.equals(this.tree, that.tree); + }, + [Symbol.iterator]() { + return this.tree[Symbol.iterator](); + }, + toString() { + return (0, _Inspectable.format)(this.toJSON()); + }, + toJSON() { + return { + _id: "SortedMap", + values: Array.from(this).map(_Inspectable.toJSON) + }; + }, + [_Inspectable.NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + } +}; +const makeImpl = tree => { + const self = Object.create(SortedMapProto); + self.tree = tree; + return self; +}; +/** + * @since 2.0.0 + * @category refinements + */ +const isSortedMap = u => (0, _Predicate.hasProperty)(u, TypeId); +/** + * @since 2.0.0 + * @category constructors + */ +exports.isSortedMap = isSortedMap; +const empty = ord => makeImpl(RBT.empty(ord)); +/** + * Creates a new `SortedMap` from an iterable collection of key/value pairs. + * + * @since 2.0.0 + * @category constructors + */ +exports.empty = empty; +const fromIterable = exports.fromIterable = /*#__PURE__*/Dual.dual(2, (iterable, ord) => makeImpl(RBT.fromIterable(iterable, ord))); +/** + * @since 2.0.0 + * @category constructors + */ +const make = ord => (...entries) => fromIterable(ord)(entries); +/** + * @since 2.0.0 + * @category predicates + */ +exports.make = make; +const isEmpty = self => size(self) === 0; +/** + * @since 2.0.0 + * @category predicates + */ +exports.isEmpty = isEmpty; +const isNonEmpty = self => size(self) > 0; +/** + * @since 2.0.0 + * @category elements + */ +exports.isNonEmpty = isNonEmpty; +const get = exports.get = /*#__PURE__*/Dual.dual(2, (self, key) => RBT.findFirst(self.tree, key)); +/** + * Gets the `Order` that the `SortedMap` is using. + * + * @since 2.0.0 + * @category getters + */ +const getOrder = self => RBT.getOrder(self.tree); +/** + * @since 2.0.0 + * @category elements + */ +exports.getOrder = getOrder; +const has = exports.has = /*#__PURE__*/Dual.dual(2, (self, key) => Option.isSome(get(self, key))); +/** + * @since 2.0.0 + * @category elements + */ +const headOption = self => RBT.first(self.tree); +/** + * @since 2.0.0 + * @category mapping + */ +exports.headOption = headOption; +const map = exports.map = /*#__PURE__*/Dual.dual(2, (self, f) => reduce(self, empty(RBT.getOrder(self.tree)), (acc, v, k) => set(acc, k, f(v, k)))); +/** + * @since 2.0.0 + * @category folding + */ +const reduce = exports.reduce = /*#__PURE__*/Dual.dual(3, (self, zero, f) => RBT.reduce(self.tree, zero, f)); +/** + * @since 2.0.0 + * @category elements + */ +const remove = exports.remove = /*#__PURE__*/Dual.dual(2, (self, key) => makeImpl(RBT.removeFirst(self.tree, key))); +/** + * @since 2.0.0 + * @category elements + */ +const set = exports.set = /*#__PURE__*/Dual.dual(3, (self, key, value) => RBT.has(self.tree, key) ? makeImpl(RBT.insert(RBT.removeFirst(self.tree, key), key, value)) : makeImpl(RBT.insert(self.tree, key, value))); +/** + * @since 2.0.0 + * @category getters + */ +const size = self => RBT.size(self.tree); +/** + * @since 2.0.0 + * @category getters + */ +exports.size = size; +const keys = self => RBT.keys(self.tree); +/** + * @since 2.0.0 + * @category getters + */ +exports.keys = keys; +const values = self => RBT.values(self.tree); +/** + * @since 2.0.0 + * @category getters + */ +exports.values = values; +const entries = self => { + const iterator = self.tree[Symbol.iterator](); + iterator[Symbol.iterator] = () => entries(self); + return iterator; +}; +/** + * @since 3.1.0 + * @category elements + */ +exports.entries = entries; +const lastOption = self => RBT.last(self.tree); +/** + * @since 3.1.0 + * @category filtering + */ +exports.lastOption = lastOption; +const partition = exports.partition = /*#__PURE__*/Dual.dual(2, (self, predicate) => { + const ord = RBT.getOrder(self.tree); + let right = empty(ord); + let left = empty(ord); + for (const value of self) { + if (predicate(value[0])) { + right = set(right, value[0], value[1]); + } else { + left = set(left, value[0], value[1]); + } + } + return [left, right]; +}); +//# sourceMappingURL=SortedMap.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/SortedMap.js.map b/backend/node_modules/effect/dist/cjs/SortedMap.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c1942de1fd75f9fb6ea268c383acee7d16f514c8 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/SortedMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SortedMap.js","names":["Equal","_interopRequireWildcard","require","_Function","Dual","Hash","_Inspectable","Option","_Pipeable","_Predicate","RBT","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","Symbol","for","SortedMapProto","_K","_","_V","symbol","pipe","hash","tree","combine","cached","that","isSortedMap","equals","iterator","toString","format","toJSON","_id","values","Array","from","map","NodeInspectSymbol","pipeArguments","arguments","makeImpl","self","create","u","hasProperty","exports","empty","ord","fromIterable","dual","iterable","make","entries","isEmpty","size","isNonEmpty","key","findFirst","getOrder","isSome","headOption","first","reduce","acc","v","k","zero","remove","removeFirst","value","insert","keys","lastOption","last","partition","predicate","right","left"],"sources":["../../src/SortedMap.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAF,uBAAA,CAAAC,OAAA;AAAqC,IAAAE,IAAA,GAAAD,SAAA;AAErC,IAAAE,IAAA,GAAAJ,uBAAA,CAAAC,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAN,uBAAA,CAAAC,OAAA;AAGA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,GAAA,GAAAT,uBAAA,CAAAC,OAAA;AAAwC,SAAAD,wBAAAU,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAZ,uBAAA,YAAAA,CAAAU,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAA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AAC,EAAEA,KAAK,CAAC,CAAC,CAAC,CAAC;IACtC;EACF;EACA,OAAO,CAACQ,IAAI,EAAED,KAAK,CAAC;AACtB,CAAC,CACF","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/SortedSet.js b/backend/node_modules/effect/dist/cjs/SortedSet.js new file mode 100644 index 0000000000000000000000000000000000000000..74ebf850196ee89952d88acdc7f31e0e6b5cc316 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/SortedSet.js @@ -0,0 +1,251 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.values = exports.union = exports.toggle = exports.some = exports.size = exports.remove = exports.partition = exports.map = exports.make = exports.isSubset = exports.isSortedSet = exports.intersection = exports.has = exports.getEquivalence = exports.fromIterable = exports.forEach = exports.flatMap = exports.filter = exports.every = exports.empty = exports.difference = exports.add = void 0; +var Equal = _interopRequireWildcard(require("./Equal.js")); +var _Function = _interopRequireWildcard(require("./Function.js")); +var Dual = _Function; +var Hash = _interopRequireWildcard(require("./Hash.js")); +var _Inspectable = require("./Inspectable.js"); +var _Pipeable = require("./Pipeable.js"); +var _Predicate = require("./Predicate.js"); +var RBT = _interopRequireWildcard(require("./RedBlackTree.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +const TypeId = /*#__PURE__*/Symbol.for("effect/SortedSet"); +const SortedSetProto = { + [TypeId]: { + _A: _ => _ + }, + [Hash.symbol]() { + return (0, _Function.pipe)(Hash.hash(this.keyTree), Hash.combine(Hash.hash(TypeId)), Hash.cached(this)); + }, + [Equal.symbol](that) { + return isSortedSet(that) && Equal.equals(this.keyTree, that.keyTree); + }, + [Symbol.iterator]() { + return RBT.keys(this.keyTree); + }, + toString() { + return (0, _Inspectable.format)(this.toJSON()); + }, + toJSON() { + return { + _id: "SortedSet", + values: Array.from(this).map(_Inspectable.toJSON) + }; + }, + [_Inspectable.NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + } +}; +const fromTree = keyTree => { + const a = Object.create(SortedSetProto); + a.keyTree = keyTree; + return a; +}; +/** + * @since 2.0.0 + * @category refinements + */ +const isSortedSet = u => (0, _Predicate.hasProperty)(u, TypeId); +/** + * @since 2.0.0 + * @category constructors + */ +exports.isSortedSet = isSortedSet; +const empty = O => fromTree(RBT.empty(O)); +/** + * Creates a new `SortedSet` from an iterable collection of values. + * + * @since 2.0.0 + * @category constructors + */ +exports.empty = empty; +const fromIterable = exports.fromIterable = /*#__PURE__*/Dual.dual(2, (iterable, ord) => fromTree(RBT.fromIterable(Array.from(iterable).map(k => [k, true]), ord))); +/** + * @since 2.0.0 + * @category constructors + */ +const make = ord => (...entries) => fromIterable(entries, ord); +/** + * @since 2.0.0 + * @category elements + */ +exports.make = make; +const add = exports.add = /*#__PURE__*/Dual.dual(2, (self, value) => RBT.has(self.keyTree, value) ? self : fromTree(RBT.insert(self.keyTree, value, true))); +/** + * @since 2.0.0 + */ +const difference = exports.difference = /*#__PURE__*/Dual.dual(2, (self, that) => { + let out = self; + for (const value of that) { + out = remove(out, value); + } + return out; +}); +/** + * Check if a predicate holds true for every `SortedSet` element. + * + * @since 2.0.0 + * @category elements + */ +const every = exports.every = /*#__PURE__*/Dual.dual(2, (self, predicate) => { + for (const value of self) { + if (!predicate(value)) { + return false; + } + } + return true; +}); +/** + * @since 2.0.0 + * @category filtering + */ +const filter = exports.filter = /*#__PURE__*/Dual.dual(2, (self, predicate) => { + const ord = RBT.getOrder(self.keyTree); + let out = empty(ord); + for (const value of self) { + if (predicate(value)) { + out = add(out, value); + } + } + return out; +}); +/** + * @since 2.0.0 + * @category sequencing + */ +const flatMap = exports.flatMap = /*#__PURE__*/Dual.dual(3, (self, O, f) => { + let out = empty(O); + forEach(self, a => { + for (const b of f(a)) { + out = add(out, b); + } + }); + return out; +}); +/** + * @since 2.0.0 + * @category traversing + */ +const forEach = exports.forEach = /*#__PURE__*/Dual.dual(2, (self, f) => RBT.forEach(self.keyTree, f)); +/** + * @since 2.0.0 + * @category elements + */ +const has = exports.has = /*#__PURE__*/Dual.dual(2, (self, value) => RBT.has(self.keyTree, value)); +/** + * @since 2.0.0 + */ +const intersection = exports.intersection = /*#__PURE__*/Dual.dual(2, (self, that) => { + const ord = RBT.getOrder(self.keyTree); + let out = empty(ord); + for (const value of that) { + if (has(self, value)) { + out = add(out, value); + } + } + return out; +}); +/** + * @since 2.0.0 + * @category elements + */ +const isSubset = exports.isSubset = /*#__PURE__*/Dual.dual(2, (self, that) => every(self, a => has(that, a))); +/** + * @since 2.0.0 + * @category mapping + */ +const map = exports.map = /*#__PURE__*/Dual.dual(3, (self, O, f) => { + let out = empty(O); + forEach(self, a => { + const b = f(a); + if (!has(out, b)) { + out = add(out, b); + } + }); + return out; +}); +/** + * @since 2.0.0 + * @category filtering + */ +const partition = exports.partition = /*#__PURE__*/Dual.dual(2, (self, predicate) => { + const ord = RBT.getOrder(self.keyTree); + let right = empty(ord); + let left = empty(ord); + for (const value of self) { + if (predicate(value)) { + right = add(right, value); + } else { + left = add(left, value); + } + } + return [left, right]; +}); +/** + * @since 2.0.0 + * @category elements + */ +const remove = exports.remove = /*#__PURE__*/Dual.dual(2, (self, value) => fromTree(RBT.removeFirst(self.keyTree, value))); +/** + * @since 2.0.0 + * @category getters + */ +const size = self => RBT.size(self.keyTree); +/** + * Check if a predicate holds true for some `SortedSet` element. + * + * @since 2.0.0 + * @category elements + */ +exports.size = size; +const some = exports.some = /*#__PURE__*/Dual.dual(2, (self, predicate) => { + for (const value of self) { + if (predicate(value)) { + return true; + } + } + return false; +}); +/** + * @since 2.0.0 + * @category elements + */ +const toggle = exports.toggle = /*#__PURE__*/Dual.dual(2, (self, value) => has(self, value) ? remove(self, value) : add(self, value)); +/** + * @since 2.0.0 + */ +const union = exports.union = /*#__PURE__*/Dual.dual(2, (self, that) => { + const ord = RBT.getOrder(self.keyTree); + let out = empty(ord); + for (const value of self) { + out = add(value)(out); + } + for (const value of that) { + out = add(value)(out); + } + return out; +}); +/** + * @since 2.0.0 + * @category getters + */ +const values = self => RBT.keys(self.keyTree); +/** + * @since 2.0.0 + * @category equivalence + */ +exports.values = values; +const getEquivalence = () => (a, b) => isSubset(a, b) && isSubset(b, a); +exports.getEquivalence = getEquivalence; +//# sourceMappingURL=SortedSet.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Stream.js b/backend/node_modules/effect/dist/cjs/Stream.js new file mode 100644 index 0000000000000000000000000000000000000000..1399ca63e499ea206a6c2d9f9e4cd9fa1526f6fd --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Stream.js @@ -0,0 +1,4112 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.fromIterableEffect = exports.fromIterable = exports.fromEventListener = exports.fromEffectOption = exports.fromEffect = exports.fromChunks = exports.fromChunkQueue = exports.fromChunkPubSub = exports.fromChunk = exports.fromChannel = exports.fromAsyncIterable = exports.forever = exports.flattenTake = exports.flattenIterables = exports.flattenExitOption = exports.flattenEffect = exports.flattenChunks = exports.flatten = exports.flatMap = exports.findEffect = exports.find = exports.finalizer = exports.filterMapWhileEffect = exports.filterMapWhile = exports.filterMapEffect = exports.filterMap = exports.filterEffect = exports.filter = exports.failSync = exports.failCauseSync = exports.failCause = exports.fail = exports.execute = exports.ensuringWith = exports.ensuring = exports.encodeText = exports.empty = exports.either = exports.dropWhileEffect = exports.dropWhile = exports.dropUntilEffect = exports.dropUntil = exports.dropRight = exports.drop = exports.drainFork = exports.drain = exports.distributedWithDynamic = exports.distributedWith = exports.dieSync = exports.dieMessage = exports.die = exports.decodeText = exports.debounce = exports.crossWith = exports.crossRight = exports.crossLeft = exports.cross = exports.contextWithStream = exports.contextWithEffect = exports.contextWith = exports.context = exports.concatAll = exports.concat = exports.combineChunks = exports.combine = exports.chunksWith = exports.chunks = exports.changesWithEffect = exports.changesWith = exports.changes = exports.catchTags = exports.catchTag = exports.catchSomeCause = exports.catchSome = exports.catchAllCause = exports.catchAll = exports.bufferChunks = exports.buffer = exports.broadcastedQueuesDynamic = exports.broadcastedQueues = exports.broadcastDynamic = exports.broadcast = exports.branchAfter = exports.bindTo = exports.bindEffect = exports.bind = exports.asyncScoped = exports.asyncPush = exports.asyncEffect = exports.async = exports.as = exports.aggregateWithinEither = exports.aggregateWithin = exports.aggregate = exports.acquireRelease = exports.accumulateChunks = exports.accumulate = exports.StreamTypeId = exports.Do = exports.DefaultChunkSize = void 0; +exports.retry = exports.repeatWith = exports.repeatValue = exports.repeatElementsWith = exports.repeatElements = exports.repeatEither = exports.repeatEffectWithSchedule = exports.repeatEffectOption = exports.repeatEffectChunkOption = exports.repeatEffectChunk = exports.repeatEffect = exports.repeat = exports.refineOrDieWith = exports.refineOrDie = exports.rechunk = exports.range = exports.raceAll = exports.race = exports.provideSomeLayer = exports.provideSomeContext = exports.provideServiceStream = exports.provideServiceEffect = exports.provideService = exports.provideLayer = exports.provideContext = exports.prepend = exports.pipeThroughChannelOrFail = exports.pipeThroughChannel = exports.pipeThrough = exports.peel = exports.partitionEither = exports.partition = exports.paginateEffect = exports.paginateChunkEffect = exports.paginateChunk = exports.paginate = exports.orElseSucceed = exports.orElseIfEmptyStream = exports.orElseIfEmptyChunk = exports.orElseIfEmpty = exports.orElseFail = exports.orElseEither = exports.orElse = exports.orDieWith = exports.orDie = exports.onStart = exports.onError = exports.onEnd = exports.onDone = exports.never = exports.mkString = exports.mergeWithTag = exports.mergeWith = exports.mergeRight = exports.mergeLeft = exports.mergeEither = exports.mergeAll = exports.merge = exports.mapInputContext = exports.mapErrorCause = exports.mapError = exports.mapEffect = exports.mapConcatEffect = exports.mapConcatChunkEffect = exports.mapConcatChunk = exports.mapConcat = exports.mapChunksEffect = exports.mapChunks = exports.mapBoth = exports.mapAccumEffect = exports.mapAccum = exports.map = exports.make = exports.let = exports.iterate = exports.intersperseAffixes = exports.intersperse = exports.interruptWhenDeferred = exports.interruptWhen = exports.interruptAfter = exports.interleaveWith = exports.interleave = exports.identity = exports.haltWhenDeferred = exports.haltWhen = exports.haltAfter = exports.groupedWithin = exports.grouped = exports.groupByKey = exports.groupBy = exports.groupAdjacentBy = exports.fromTQueue = exports.fromTPubSub = exports.fromSchedule = exports.fromReadableStreamByob = exports.fromReadableStream = exports.fromQueue = exports.fromPull = exports.fromPubSub = exports.fromIteratorSucceed = void 0; +exports.zipAllWith = exports.zipAllSortedByKeyWith = exports.zipAllSortedByKeyRight = exports.zipAllSortedByKeyLeft = exports.zipAllSortedByKey = exports.zipAllRight = exports.zipAllLeft = exports.zipAll = exports.zip = exports.withSpan = exports.withExecutionPlan = exports.whenEffect = exports.whenCaseEffect = exports.whenCase = exports.when = exports.void = exports.updateService = exports.unwrapScopedWith = exports.unwrapScoped = exports.unwrap = exports.unfoldEffect = exports.unfoldChunkEffect = exports.unfoldChunk = exports.unfold = exports.transduce = exports.toReadableStreamRuntime = exports.toReadableStreamEffect = exports.toReadableStream = exports.toQueueOfElements = exports.toQueue = exports.toPull = exports.toPubSub = exports.toChannel = exports.toAsyncIterableRuntime = exports.toAsyncIterableEffect = exports.toAsyncIterable = exports.timeoutTo = exports.timeoutFailCause = exports.timeoutFail = exports.timeout = exports.tick = exports.throttleEffect = exports.throttle = exports.tapSink = exports.tapErrorCause = exports.tapError = exports.tapBoth = exports.tap = exports.takeWhile = exports.takeUntilEffect = exports.takeUntil = exports.takeRight = exports.take = exports.sync = exports.suspend = exports.succeed = exports.splitOnChunk = exports.splitLines = exports.split = exports.someOrFail = exports.someOrElse = exports.some = exports.slidingSize = exports.sliding = exports.share = exports.scopedWith = exports.scoped = exports.scheduleWith = exports.schedule = exports.scanReduceEffect = exports.scanReduce = exports.scanEffect = exports.scan = exports.runSum = exports.runScoped = exports.runLast = exports.runIntoQueueScoped = exports.runIntoQueueElementsScoped = exports.runIntoQueue = exports.runIntoPubSubScoped = exports.runIntoPubSub = exports.runHead = exports.runForEachWhileScoped = exports.runForEachWhile = exports.runForEachScoped = exports.runForEachChunkScoped = exports.runForEachChunk = exports.runForEach = exports.runFoldWhileScopedEffect = exports.runFoldWhileScoped = exports.runFoldWhileEffect = exports.runFoldWhile = exports.runFoldScopedEffect = exports.runFoldScoped = exports.runFoldEffect = exports.runFold = exports.runDrain = exports.runCount = exports.runCollect = exports.run = void 0; +exports.zipWithPreviousAndNext = exports.zipWithPrevious = exports.zipWithNext = exports.zipWithIndex = exports.zipWithChunks = exports.zipWith = exports.zipRight = exports.zipLeft = exports.zipLatestWith = exports.zipLatestAll = exports.zipLatest = exports.zipFlatten = void 0; +var groupBy_ = _interopRequireWildcard(require("./internal/groupBy.js")); +var internal = _interopRequireWildcard(require("./internal/stream.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const StreamTypeId = exports.StreamTypeId = internal.StreamTypeId; +/** + * The default chunk size used by the various combinators and constructors of + * `Stream`. + * + * @since 2.0.0 + * @category constants + */ +const DefaultChunkSize = exports.DefaultChunkSize = internal.DefaultChunkSize; +/** + * Collects each underlying Chunk of the stream into a new chunk, and emits it + * on each pull. + * + * @since 2.0.0 + * @category utils + */ +const accumulate = exports.accumulate = internal.accumulate; +/** + * Re-chunks the elements of the stream by accumulating each underlying chunk. + * + * @since 2.0.0 + * @category utils + */ +const accumulateChunks = exports.accumulateChunks = internal.accumulateChunks; +/** + * Creates a stream from a single value that will get cleaned up after the + * stream is consumed. + * + * @example + * ```ts + * import { Console, Effect, Stream } from "effect" + * + * // Simulating File operations + * const open = (filename: string) => + * Effect.gen(function*() { + * yield* Console.log(`Opening ${filename}`) + * return { + * getLines: Effect.succeed(["Line 1", "Line 2", "Line 3"]), + * close: Console.log(`Closing ${filename}`) + * } + * }) + * + * const stream = Stream.acquireRelease( + * open("file.txt"), + * (file) => file.close + * ).pipe(Stream.flatMap((file) => file.getLines)) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // Opening file.txt + * // Closing file.txt + * // { _id: 'Chunk', values: [ [ 'Line 1', 'Line 2', 'Line 3' ] ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const acquireRelease = exports.acquireRelease = internal.acquireRelease; +/** + * Aggregates elements of this stream using the provided sink for as long as + * the downstream operators on the stream are busy. + * + * This operator divides the stream into two asynchronous "islands". Operators + * upstream of this operator run on one fiber, while downstream operators run + * on another. Whenever the downstream fiber is busy processing elements, the + * upstream fiber will feed elements into the sink until it signals + * completion. + * + * Any sink can be used here, but see `Sink.foldWeightedEffect` and + * `Sink.foldUntilEffect` for sinks that cover the common usecases. + * + * @since 2.0.0 + * @category utils + */ +const aggregate = exports.aggregate = internal.aggregate; +/** + * Like {@link aggregateWithinEither}, but only returns the `Right` results. + * + * @since 2.0.0 + * @category utils + */ +const aggregateWithin = exports.aggregateWithin = internal.aggregateWithin; +/** + * Aggregates elements using the provided sink until it completes, or until + * the delay signalled by the schedule has passed. + * + * This operator divides the stream into two asynchronous islands. Operators + * upstream of this operator run on one fiber, while downstream operators run + * on another. Elements will be aggregated by the sink until the downstream + * fiber pulls the aggregated value, or until the schedule's delay has passed. + * + * Aggregated elements will be fed into the schedule to determine the delays + * between pulls. + * + * @since 2.0.0 + * @category utils + */ +const aggregateWithinEither = exports.aggregateWithinEither = internal.aggregateWithinEither; +/** + * Maps the success values of this stream to the specified constant value. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.range(1, 5).pipe(Stream.as(null)) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ null, null, null, null, null ] } + * ``` + * + * @since 2.0.0 + * @category mapping + */ +const as = exports.as = internal.as; +const _async = exports.async = internal._async; +/** + * Creates a stream from an asynchronous callback that can be called multiple + * times The registration of the callback itself returns an effect. The + * optionality of the error type `E` can be used to signal the end of the + * stream, by setting it to `None`. + * + * @since 2.0.0 + * @category constructors + */ +const asyncEffect = exports.asyncEffect = internal.asyncEffect; +/** + * Creates a stream from an external push-based resource. + * + * You can use the `emit` helper to emit values to the stream. The `emit` helper + * returns a boolean indicating whether the value was emitted or not. + * + * You can also use the `emit` helper to signal the end of the stream by + * using apis such as `emit.end` or `emit.fail`. + * + * By default it uses an "unbounded" buffer size. + * You can customize the buffer size and strategy by passing an object as the + * second argument with the `bufferSize` and `strategy` fields. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * Stream.asyncPush((emit) => + * Effect.acquireRelease( + * Effect.gen(function*() { + * yield* Effect.log("subscribing") + * return setInterval(() => emit.single("tick"), 1000) + * }), + * (handle) => + * Effect.gen(function*() { + * yield* Effect.log("unsubscribing") + * clearInterval(handle) + * }) + * ), { bufferSize: 16, strategy: "dropping" }) + * ``` + * + * @since 3.6.0 + * @category constructors + */ +const asyncPush = exports.asyncPush = internal.asyncPush; +/** + * Creates a stream from an asynchronous callback that can be called multiple + * times. The registration of the callback itself returns an a scoped + * resource. The optionality of the error type `E` can be used to signal the + * end of the stream, by setting it to `None`. + * + * @since 2.0.0 + * @category constructors + */ +const asyncScoped = exports.asyncScoped = internal.asyncScoped; +/** + * Returns a `Stream` that first collects `n` elements from the input `Stream`, + * and then creates a new `Stream` using the specified function, and sends all + * the following elements through that. + * + * @since 2.0.0 + * @category sequencing + */ +const branchAfter = exports.branchAfter = internal.branchAfter; +/** + * Fan out the stream, producing a list of streams that have the same elements + * as this stream. The driver stream will only ever advance the `maximumLag` + * chunks before the slowest downstream stream. + * + * @example + * ```ts + * import { Console, Effect, Fiber, Schedule, Stream } from "effect" + * + * const numbers = Effect.scoped( + * Stream.range(1, 20).pipe( + * Stream.tap((n) => Console.log(`Emit ${n} element before broadcasting`)), + * Stream.broadcast(2, 5), + * Stream.flatMap(([first, second]) => + * Effect.gen(function*() { + * const fiber1 = yield* Stream.runFold(first, 0, (acc, e) => Math.max(acc, e)).pipe( + * Effect.andThen((max) => Console.log(`Maximum: ${max}`)), + * Effect.fork + * ) + * const fiber2 = yield* second.pipe( + * Stream.schedule(Schedule.spaced("1 second")), + * Stream.runForEach((n) => Console.log(`Logging to the Console: ${n}`)), + * Effect.fork + * ) + * yield* Fiber.join(fiber1).pipe( + * Effect.zip(Fiber.join(fiber2), { concurrent: true }) + * ) + * }) + * ), + * Stream.runCollect + * ) + * ) + * + * Effect.runPromise(numbers).then(console.log) + * // Emit 1 element before broadcasting + * // Emit 2 element before broadcasting + * // Emit 3 element before broadcasting + * // Emit 4 element before broadcasting + * // Emit 5 element before broadcasting + * // Emit 6 element before broadcasting + * // Emit 7 element before broadcasting + * // Emit 8 element before broadcasting + * // Emit 9 element before broadcasting + * // Emit 10 element before broadcasting + * // Emit 11 element before broadcasting + * // Logging to the Console: 1 + * // Logging to the Console: 2 + * // Logging to the Console: 3 + * // Logging to the Console: 4 + * // Logging to the Console: 5 + * // Emit 12 element before broadcasting + * // Emit 13 element before broadcasting + * // Emit 14 element before broadcasting + * // Emit 15 element before broadcasting + * // Emit 16 element before broadcasting + * // Logging to the Console: 6 + * // Logging to the Console: 7 + * // Logging to the Console: 8 + * // Logging to the Console: 9 + * // Logging to the Console: 10 + * // Emit 17 element before broadcasting + * // Emit 18 element before broadcasting + * // Emit 19 element before broadcasting + * // Emit 20 element before broadcasting + * // Logging to the Console: 11 + * // Logging to the Console: 12 + * // Logging to the Console: 13 + * // Logging to the Console: 14 + * // Logging to the Console: 15 + * // Maximum: 20 + * // Logging to the Console: 16 + * // Logging to the Console: 17 + * // Logging to the Console: 18 + * // Logging to the Console: 19 + * // Logging to the Console: 20 + * // { _id: 'Chunk', values: [ undefined ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +const broadcast = exports.broadcast = internal.broadcast; +/** + * Returns a new Stream that multicasts the original Stream, subscribing to it as soon as the first consumer subscribes. + * As long as there is at least one consumer, the upstream will continue running and emitting data. + * When all consumers have exited, the upstream will be finalized. + * + * @since 3.8.0 + * @category utils + */ +const share = exports.share = internal.share; +/** + * Fan out the stream, producing a dynamic number of streams that have the + * same elements as this stream. The driver stream will only ever advance the + * `maximumLag` chunks before the slowest downstream stream. + * + * @since 2.0.0 + * @category utils + */ +const broadcastDynamic = exports.broadcastDynamic = internal.broadcastDynamic; +/** + * Converts the stream to a scoped list of queues. Every value will be + * replicated to every queue with the slowest queue being allowed to buffer + * `maximumLag` chunks before the driver is back pressured. + * + * Queues can unsubscribe from upstream by shutting down. + * + * @since 2.0.0 + * @category utils + */ +const broadcastedQueues = exports.broadcastedQueues = internal.broadcastedQueues; +/** + * Converts the stream to a scoped dynamic amount of queues. Every chunk will + * be replicated to every queue with the slowest queue being allowed to buffer + * `maximumLag` chunks before the driver is back pressured. + * + * Queues can unsubscribe from upstream by shutting down. + * + * @since 2.0.0 + * @category utils + */ +const broadcastedQueuesDynamic = exports.broadcastedQueuesDynamic = internal.broadcastedQueuesDynamic; +/** + * Allows a faster producer to progress independently of a slower consumer by + * buffering up to `capacity` elements in a queue. + * + * Note: This combinator destroys the chunking structure. It's recommended to + * use rechunk afterwards. Additionally, prefer capacities that are powers + * of 2 for better performance. + * + * @example + * ```ts + * import { Console, Effect, Schedule, Stream } from "effect" + * + * const stream = Stream.range(1, 10).pipe( + * Stream.tap((n) => Console.log(`before buffering: ${n}`)), + * Stream.buffer({ capacity: 4 }), + * Stream.tap((n) => Console.log(`after buffering: ${n}`)), + * Stream.schedule(Schedule.spaced("5 seconds")) + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // before buffering: 1 + * // before buffering: 2 + * // before buffering: 3 + * // before buffering: 4 + * // before buffering: 5 + * // before buffering: 6 + * // after buffering: 1 + * // after buffering: 2 + * // before buffering: 7 + * // after buffering: 3 + * // before buffering: 8 + * // after buffering: 4 + * // before buffering: 9 + * // after buffering: 5 + * // before buffering: 10 + * // ... + * ``` + * + * @since 2.0.0 + * @category utils + */ +const buffer = exports.buffer = internal.buffer; +/** + * Allows a faster producer to progress independently of a slower consumer by + * buffering up to `capacity` chunks in a queue. + * + * @note Prefer capacities that are powers of 2 for better performance. + * @since 2.0.0 + * @category utils + */ +const bufferChunks = exports.bufferChunks = internal.bufferChunks; +/** + * Switches over to the stream produced by the provided function in case this + * one fails with a typed error. + * + * @since 2.0.0 + * @category error handling + */ +const catchAll = exports.catchAll = internal.catchAll; +/** + * Switches over to the stream produced by the provided function in case this + * one fails. Allows recovery from all causes of failure, including + * interruption if the stream is uninterruptible. + * + * @since 2.0.0 + * @category error handling + */ +const catchAllCause = exports.catchAllCause = internal.catchAllCause; +/** + * Switches over to the stream produced by the provided function in case this + * one fails with some typed error. + * + * @since 2.0.0 + * @category error handling + */ +const catchSome = exports.catchSome = internal.catchSome; +/** + * Switches over to the stream produced by the provided function in case this + * one fails with an error matching the given `_tag`. + * + * @since 2.0.0 + * @category error handling + */ +const catchTag = exports.catchTag = internal.catchTag; +/** + * Switches over to the stream produced by one of the provided functions, in + * case this one fails with an error matching one of the given `_tag`'s. + * + * @since 2.0.0 + * @category error handling + */ +const catchTags = exports.catchTags = internal.catchTags; +/** + * Switches over to the stream produced by the provided function in case this + * one fails with some errors. Allows recovery from all causes of failure, + * including interruption if the stream is uninterruptible. + * + * @since 2.0.0 + * @category error handling + */ +const catchSomeCause = exports.catchSomeCause = internal.catchSomeCause; +/** + * Returns a new stream that only emits elements that are not equal to the + * previous element emitted, using natural equality to determine whether two + * elements are equal. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.make(1, 1, 1, 2, 2, 3, 4).pipe(Stream.changes) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 2, 3, 4 ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +const changes = exports.changes = internal.changes; +/** + * Returns a new stream that only emits elements that are not equal to the + * previous element emitted, using the specified function to determine whether + * two elements are equal. + * + * @since 2.0.0 + * @category utils + */ +const changesWith = exports.changesWith = internal.changesWith; +/** + * Returns a new stream that only emits elements that are not equal to the + * previous element emitted, using the specified effectual function to + * determine whether two elements are equal. + * + * @since 2.0.0 + * @category utils + */ +const changesWithEffect = exports.changesWithEffect = internal.changesWithEffect; +/** + * Exposes the underlying chunks of the stream as a stream of chunks of + * elements. + * + * @since 2.0.0 + * @category utils + */ +const chunks = exports.chunks = internal.chunks; +/** + * Performs the specified stream transformation with the chunk structure of + * the stream exposed. + * + * @since 2.0.0 + * @category utils + */ +const chunksWith = exports.chunksWith = internal.chunksWith; +/** + * Combines the elements from this stream and the specified stream by + * repeatedly applying the function `f` to extract an element using both sides + * and conceptually "offer" it to the destination stream. `f` can maintain + * some internal state to control the combining process, with the initial + * state being specified by `s`. + * + * Where possible, prefer `Stream.combineChunks` for a more efficient + * implementation. + * + * @since 2.0.0 + * @category utils + */ +const combine = exports.combine = internal.combine; +/** + * Combines the chunks from this stream and the specified stream by repeatedly + * applying the function `f` to extract a chunk using both sides and + * conceptually "offer" it to the destination stream. `f` can maintain some + * internal state to control the combining process, with the initial state + * being specified by `s`. + * + * @since 2.0.0 + * @category utils + */ +const combineChunks = exports.combineChunks = internal.combineChunks; +/** + * Concatenates the specified stream with this stream, resulting in a stream + * that emits the elements from this stream and then the elements from the + * specified stream. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const s1 = Stream.make(1, 2, 3) + * const s2 = Stream.make(4, 5) + * + * const stream = Stream.concat(s1, s2) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5 ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +const concat = exports.concat = internal.concat; +/** + * Concatenates all of the streams in the chunk to one stream. + * + * @example + * ```ts + * import { Chunk, Effect, Stream } from "effect" + * + * const s1 = Stream.make(1, 2, 3) + * const s2 = Stream.make(4, 5) + * const s3 = Stream.make(6, 7, 8) + * + * const stream = Stream.concatAll(Chunk.make(s1, s2, s3)) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { + * // _id: 'Chunk', + * // values: [ + * // 1, 2, 3, 4, + * // 5, 6, 7, 8 + * // ] + * // } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const concatAll = exports.concatAll = internal.concatAll; +/** + * Composes this stream with the specified stream to create a cartesian + * product of elements. The `right` stream would be run multiple times, for + * every element in the `left` stream. + * + * See also `Stream.zip` for the more common point-wise variant. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const s1 = Stream.make(1, 2, 3) + * const s2 = Stream.make("a", "b") + * + * const product = Stream.cross(s1, s2) + * + * Effect.runPromise(Stream.runCollect(product)).then(console.log) + * // { + * // _id: "Chunk", + * // values: [ + * // [ 1, "a" ], [ 1, "b" ], [ 2, "a" ], [ 2, "b" ], [ 3, "a" ], [ 3, "b" ] + * // ] + * // } + * ``` + * + * @since 2.0.0 + * @category utils + */ +const cross = exports.cross = internal.cross; +/** + * Composes this stream with the specified stream to create a cartesian + * product of elements, but keeps only elements from `left` stream. The `right` + * stream would be run multiple times, for every element in the `left` stream. + * + * See also `Stream.zipLeft` for the more common point-wise variant. + * + * @since 2.0.0 + * @category utils + */ +const crossLeft = exports.crossLeft = internal.crossLeft; +/** + * Composes this stream with the specified stream to create a cartesian + * product of elements, but keeps only elements from the `right` stream. The + * `left` stream would be run multiple times, for every element in the `right` + * stream. + * + * See also `Stream.zipRight` for the more common point-wise variant. + * + * @since 2.0.0 + * @category utils + */ +const crossRight = exports.crossRight = internal.crossRight; +/** + * Composes this stream with the specified stream to create a cartesian + * product of elements with a specified function. The `right` stream would be + * run multiple times, for every element in the `left` stream. + * + * See also `Stream.zipWith` for the more common point-wise variant. + * + * @since 2.0.0 + * @category utils + */ +const crossWith = exports.crossWith = internal.crossWith; +/** + * Delays the emission of values by holding new values for a set duration. If + * no new values arrive during that time the value is emitted, however if a + * new value is received during the holding period the previous value is + * discarded and the process is repeated with the new value. + * + * This operator is useful if you have a stream of "bursty" events which + * eventually settle down and you only need the final event of the burst. For + * example, a search engine may only want to initiate a search after a user + * has paused typing so as to not prematurely recommend results. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * let last = Date.now() + * const log = (message: string) => + * Effect.sync(() => { + * const end = Date.now() + * console.log(`${message} after ${end - last}ms`) + * last = end + * }) + * + * const stream = Stream.make(1, 2, 3).pipe( + * Stream.concat( + * Stream.fromEffect(Effect.sleep("200 millis").pipe(Effect.as(4))) // Emit 4 after 200 ms + * ), + * Stream.concat(Stream.make(5, 6)), // Continue with more rapid values + * Stream.concat( + * Stream.fromEffect(Effect.sleep("150 millis").pipe(Effect.as(7))) // Emit 7 after 150 ms + * ), + * Stream.concat(Stream.make(8)), + * Stream.tap((n) => log(`Received ${n}`)), + * Stream.debounce("100 millis"), // Only emit values after a pause of at least 100 milliseconds, + * Stream.tap((n) => log(`> Emitted ${n}`)) + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // Received 1 after 5ms + * // Received 2 after 2ms + * // Received 3 after 0ms + * // > Emitted 3 after 104ms + * // Received 4 after 99ms + * // Received 5 after 1ms + * // Received 6 after 0ms + * // > Emitted 6 after 101ms + * // Received 7 after 50ms + * // Received 8 after 1ms + * // > Emitted 8 after 101ms + * // { _id: 'Chunk', values: [ 3, 6, 8 ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +const debounce = exports.debounce = internal.debounce; +/** + * The stream that dies with the specified defect. + * + * @since 2.0.0 + * @category constructors + */ +const die = exports.die = internal.die; +/** + * The stream that dies with the specified lazily evaluated defect. + * + * @since 2.0.0 + * @category constructors + */ +const dieSync = exports.dieSync = internal.dieSync; +/** + * The stream that dies with an exception described by `message`. + * + * @since 2.0.0 + * @category constructors + */ +const dieMessage = exports.dieMessage = internal.dieMessage; +/** + * More powerful version of `Stream.broadcast`. Allows to provide a function + * that determines what queues should receive which elements. The decide + * function will receive the indices of the queues in the resulting list. + * + * @since 2.0.0 + * @category utils + */ +const distributedWith = exports.distributedWith = internal.distributedWith; +/** + * More powerful version of `Stream.distributedWith`. This returns a function + * that will produce new queues and corresponding indices. You can also + * provide a function that will be executed after the final events are + * enqueued in all queues. Shutdown of the queues is handled by the driver. + * Downstream users can also shutdown queues manually. In this case the driver + * will continue but no longer backpressure on them. + * + * @since 2.0.0 + * @category utils + */ +const distributedWithDynamic = exports.distributedWithDynamic = internal.distributedWithDynamic; +/** + * Converts this stream to a stream that executes its effects but emits no + * elements. Useful for sequencing effects using streams: + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * // We create a stream and immediately drain it. + * const stream = Stream.range(1, 6).pipe(Stream.drain) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +const drain = exports.drain = internal.drain; +/** + * Drains the provided stream in the background for as long as this stream is + * running. If this stream ends before `other`, `other` will be interrupted. + * If `other` fails, this stream will fail with that error. + * + * @since 2.0.0 + * @category utils + */ +const drainFork = exports.drainFork = internal.drainFork; +/** + * Drops the specified number of elements from this stream. + * + * @since 2.0.0 + * @category utils + */ +const drop = exports.drop = internal.drop; +/** + * Drops the last specified number of elements from this stream. + * + * @note This combinator keeps `n` elements in memory. Be careful with big + * numbers. + * @since 2.0.0 + * @category utils + */ +const dropRight = exports.dropRight = internal.dropRight; +/** + * Drops all elements of the stream until the specified predicate evaluates to + * `true`. + * + * @since 2.0.0 + * @category utils + */ +const dropUntil = exports.dropUntil = internal.dropUntil; +/** + * Drops all elements of the stream until the specified effectful predicate + * evaluates to `true`. + * + * @since 2.0.0 + * @category utils + */ +const dropUntilEffect = exports.dropUntilEffect = internal.dropUntilEffect; +/** + * Drops all elements of the stream for as long as the specified predicate + * evaluates to `true`. + * + * @since 2.0.0 + * @category utils + */ +const dropWhile = exports.dropWhile = internal.dropWhile; +/** + * Drops all elements of the stream for as long as the specified predicate + * produces an effect that evalutates to `true` + * + * @since 2.0.0 + * @category utils + */ +const dropWhileEffect = exports.dropWhileEffect = internal.dropWhileEffect; +/** + * Returns a stream whose failures and successes have been lifted into an + * `Either`. The resulting stream cannot fail, because the failures have been + * exposed as part of the `Either` success case. + * + * @note The stream will end as soon as the first error occurs. + * + * @since 2.0.0 + * @category utils + */ +const either = exports.either = internal.either; +/** + * The empty stream. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.empty + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const empty = exports.empty = internal.empty; +/** + * Executes the provided finalizer after this stream's finalizers run. + * + * @example + * ```ts + * import { Console, Effect, Stream } from "effect" + * + * const program = Stream.fromEffect(Console.log("Application Logic.")).pipe( + * Stream.concat(Stream.finalizer(Console.log("Finalizing the stream"))), + * Stream.ensuring( + * Console.log("Doing some other works after stream's finalization") + * ) + * ) + * + * Effect.runPromise(Stream.runCollect(program)).then(console.log) + * // Application Logic. + * // Finalizing the stream + * // Doing some other works after stream's finalization + * // { _id: 'Chunk', values: [ undefined, undefined ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +const ensuring = exports.ensuring = internal.ensuring; +/** + * Executes the provided finalizer after this stream's finalizers run. + * + * @since 2.0.0 + * @category utils + */ +const ensuringWith = exports.ensuringWith = internal.ensuringWith; +/** + * Accesses the whole context of the stream. + * + * @since 2.0.0 + * @category context + */ +const context = exports.context = internal.context; +/** + * Accesses the context of the stream. + * + * @since 2.0.0 + * @category context + */ +const contextWith = exports.contextWith = internal.contextWith; +/** + * Accesses the context of the stream in the context of an effect. + * + * @since 2.0.0 + * @category context + */ +const contextWithEffect = exports.contextWithEffect = internal.contextWithEffect; +/** + * Accesses the context of the stream in the context of a stream. + * + * @since 2.0.0 + * @category context + */ +const contextWithStream = exports.contextWithStream = internal.contextWithStream; +/** + * Creates a stream that executes the specified effect but emits no elements. + * + * @since 2.0.0 + * @category constructors + */ +const execute = exports.execute = internal.execute; +/** + * Terminates with the specified error. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.fail("Uh oh!") + * + * Effect.runPromiseExit(Stream.runCollect(stream)).then(console.log) + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { _id: 'Cause', _tag: 'Fail', failure: 'Uh oh!' } + * // } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const fail = exports.fail = internal.fail; +/** + * Terminates with the specified lazily evaluated error. + * + * @since 2.0.0 + * @category constructors + */ +const failSync = exports.failSync = internal.failSync; +/** + * The stream that always fails with the specified `Cause`. + * + * @since 2.0.0 + * @category constructors + */ +const failCause = exports.failCause = internal.failCause; +/** + * The stream that always fails with the specified lazily evaluated `Cause`. + * + * @since 2.0.0 + * @category constructors + */ +const failCauseSync = exports.failCauseSync = internal.failCauseSync; +/** + * Filters the elements emitted by this stream using the provided function. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.range(1, 11).pipe(Stream.filter((n) => n % 2 === 0)) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 2, 4, 6, 8, 10 ] } + * ``` + * + * @since 2.0.0 + * @category filtering + */ +const filter = exports.filter = internal.filter; +/** + * Effectfully filters the elements emitted by this stream. + * + * @since 2.0.0 + * @category filtering + */ +const filterEffect = exports.filterEffect = internal.filterEffect; +/** + * Performs a filter and map in a single step. + * + * @since 2.0.0 + * @category utils + */ +const filterMap = exports.filterMap = internal.filterMap; +/** + * Performs an effectful filter and map in a single step. + * + * @since 2.0.0 + * @category utils + */ +const filterMapEffect = exports.filterMapEffect = internal.filterMapEffect; +/** + * Transforms all elements of the stream for as long as the specified partial + * function is defined. + * + * @since 2.0.0 + * @category utils + */ +const filterMapWhile = exports.filterMapWhile = internal.filterMapWhile; +/** + * Effectfully transforms all elements of the stream for as long as the + * specified partial function is defined. + * + * @since 2.0.0 + * @category utils + */ +const filterMapWhileEffect = exports.filterMapWhileEffect = internal.filterMapWhileEffect; +/** + * Creates a one-element stream that never fails and executes the finalizer + * when it ends. + * + * @example + * ```ts + * import { Console, Effect, Stream } from "effect" + * + * const application = Stream.fromEffect(Console.log("Application Logic.")) + * + * const deleteDir = (dir: string) => Console.log(`Deleting dir: ${dir}`) + * + * const program = application.pipe( + * Stream.concat( + * Stream.finalizer( + * deleteDir("tmp").pipe( + * Effect.andThen(Console.log("Temporary directory was deleted.")) + * ) + * ) + * ) + * ) + * + * Effect.runPromise(Stream.runCollect(program)).then(console.log) + * // Application Logic. + * // Deleting dir: tmp + * // Temporary directory was deleted. + * // { _id: 'Chunk', values: [ undefined, undefined ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const finalizer = exports.finalizer = internal.finalizer; +/** + * Finds the first element emitted by this stream that satisfies the provided + * predicate. + * + * @since 2.0.0 + * @category elements + */ +const find = exports.find = internal.find; +/** + * Finds the first element emitted by this stream that satisfies the provided + * effectful predicate. + * + * @since 2.0.0 + * @category elements + */ +const findEffect = exports.findEffect = internal.findEffect; +/** + * Returns a stream made of the concatenation in strict order of all the + * streams produced by passing each element of this stream to `f0` + * + * @since 2.0.0 + * @category sequencing + */ +const flatMap = exports.flatMap = internal.flatMap; +/** + * Flattens this stream-of-streams into a stream made of the concatenation in + * strict order of all the streams. + * + * @since 2.0.0 + * @category sequencing + */ +const flatten = exports.flatten = internal.flatten; +/** + * Submerges the chunks carried by this stream into the stream's structure, + * while still preserving them. + * + * @since 2.0.0 + * @category sequencing + */ +const flattenChunks = exports.flattenChunks = internal.flattenChunks; +/** + * Flattens `Effect` values into the stream's structure, preserving all + * information about the effect. + * + * @since 2.0.0 + * @category sequencing + */ +const flattenEffect = exports.flattenEffect = internal.flattenEffect; +/** + * Unwraps `Exit` values that also signify end-of-stream by failing with `None`. + * + * @since 2.0.0 + * @category sequencing + */ +const flattenExitOption = exports.flattenExitOption = internal.flattenExitOption; +/** + * Submerges the iterables carried by this stream into the stream's structure, + * while still preserving them. + * + * @since 2.0.0 + * @category sequencing + */ +const flattenIterables = exports.flattenIterables = internal.flattenIterables; +/** + * Unwraps `Exit` values and flatten chunks that also signify end-of-stream + * by failing with `None`. + * + * @since 2.0.0 + * @category sequencing + */ +const flattenTake = exports.flattenTake = internal.flattenTake; +/** + * Repeats this stream forever. + * + * @since 2.0.0 + * @category utils + */ +const forever = exports.forever = internal.forever; +/** + * Creates a stream from an `AsyncIterable`. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const myAsyncIterable = async function*() { + * yield 1 + * yield 2 + * } + * + * const stream = Stream.fromAsyncIterable( + * myAsyncIterable(), + * (e) => new Error(String(e)) // Error Handling + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 2 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const fromAsyncIterable = exports.fromAsyncIterable = internal.fromAsyncIterable; +/** + * Creates a stream from a `Channel`. + * + * @since 2.0.0 + * @category constructors + */ +const fromChannel = exports.fromChannel = internal.fromChannel; +/** + * Creates a channel from a `Stream`. + * + * @since 2.0.0 + * @category constructors + */ +const toChannel = exports.toChannel = internal.toChannel; +/** + * Creates a stream from a `Chunk` of values. + * + * @example + * ```ts + * import { Chunk, Effect, Stream } from "effect" + * + * // Creating a stream with values from a single Chunk + * const stream = Stream.fromChunk(Chunk.make(1, 2, 3)) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 2, 3 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const fromChunk = exports.fromChunk = internal.fromChunk; +/** + * Creates a stream from a subscription to a `PubSub`. + * + * **Options** + * + * - `shutdown`: If `true`, the `PubSub` will be shutdown after the stream is evaluated (defaults to `false`) + * + * @since 2.0.0 + * @category constructors + */ +const fromChunkPubSub = exports.fromChunkPubSub = internal.fromChunkPubSub; +/** + * Creates a stream from a `Queue` of values. + * + * **Options** + * + * - `shutdown`: If `true`, the queue will be shutdown after the stream is evaluated (defaults to `false`) + * + * @since 2.0.0 + * @category constructors + */ +const fromChunkQueue = exports.fromChunkQueue = internal.fromChunkQueue; +/** + * Creates a stream from an arbitrary number of chunks. + * + * @example + * ```ts + * import { Chunk, Effect, Stream } from "effect" + * + * // Creating a stream with values from multiple Chunks + * const stream = Stream.fromChunks(Chunk.make(1, 2, 3), Chunk.make(4, 5, 6)) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5, 6 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const fromChunks = exports.fromChunks = internal.fromChunks; +/** + * Either emits the success value of this effect or terminates the stream + * with the failure value of this effect. + * + * @example + * ```ts + * import { Effect, Random, Stream } from "effect" + * + * const stream = Stream.fromEffect(Random.nextInt) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // Example Output: { _id: 'Chunk', values: [ 922694024 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const fromEffect = exports.fromEffect = internal.fromEffect; +/** + * Creates a stream from an effect producing a value of type `A` or an empty + * `Stream`. + * + * @since 2.0.0 + * @category constructors + */ +const fromEffectOption = exports.fromEffectOption = internal.fromEffectOption; +/** + * Creates a stream from a subscription to a `PubSub`. + * + * **Options** + * + * - `shutdown`: If `true`, the `PubSub` will be shutdown after the stream is evaluated (defaults to `false`) + * + * @since 2.0.0 + * @category constructors + */ +const fromPubSub = exports.fromPubSub = internal.fromPubSub; +/** + * Creates a stream from a subscription to a `TPubSub`. + * + * @since 3.10.0 + * @category constructors + */ +const fromTPubSub = exports.fromTPubSub = internal.fromTPubSub; +/** + * Creates a new `Stream` from an iterable collection of values. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const numbers = [1, 2, 3] + * + * const stream = Stream.fromIterable(numbers) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 2, 3 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const fromIterable = exports.fromIterable = internal.fromIterable; +/** + * Creates a stream from an effect producing a value of type `Iterable`. + * + * @example + * ```ts + * import { Context, Effect, Stream } from "effect" + * + * class Database extends Context.Tag("Database")< + * Database, + * { readonly getUsers: Effect.Effect> } + * >() {} + * + * const getUsers = Database.pipe(Effect.andThen((_) => _.getUsers)) + * + * const stream = Stream.fromIterableEffect(getUsers) + * + * Effect.runPromise( + * Stream.runCollect(stream.pipe(Stream.provideService(Database, { getUsers: Effect.succeed(["user1", "user2"]) }))) + * ).then(console.log) + * // { _id: 'Chunk', values: [ 'user1', 'user2' ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const fromIterableEffect = exports.fromIterableEffect = internal.fromIterableEffect; +/** + * Creates a stream from an iterator + * + * @since 2.0.0 + * @category constructors + */ +const fromIteratorSucceed = exports.fromIteratorSucceed = internal.fromIteratorSucceed; +/** + * Creates a stream from an effect that pulls elements from another stream. + * + * See `Stream.toPull` for reference. + * + * @since 2.0.0 + * @category constructors + */ +const fromPull = exports.fromPull = internal.fromPull; +/** + * Creates a stream from a queue of values + * + * **Options** + * + * - `maxChunkSize`: The maximum number of queued elements to put in one chunk in the stream + * - `shutdown`: If `true`, the queue will be shutdown after the stream is evaluated (defaults to `false`) + * + * @since 2.0.0 + * @category constructors + */ +const fromQueue = exports.fromQueue = internal.fromQueue; +/** + * Creates a stream from a TQueue of values + * + * @since 3.10.0 + * @category constructors + */ +const fromTQueue = exports.fromTQueue = internal.fromTQueue; +/** + * Creates a stream from a `ReadableStream`. + * + * See https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream. + * + * @since 2.0.0 + * @category constructors + */ +const fromReadableStream = exports.fromReadableStream = internal.fromReadableStream; +/** + * Creates a stream from a `ReadableStreamBYOBReader`. + * + * See https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBReader. + * + * @since 2.0.0 + * @category constructors + */ +const fromReadableStreamByob = exports.fromReadableStreamByob = internal.fromReadableStreamByob; +/** + * Creates a stream from a `Schedule` that does not require any further + * input. The stream will emit an element for each value output from the + * schedule, continuing for as long as the schedule continues. + * + * @example + * ```ts + * import { Effect, Schedule, Stream } from "effect" + * + * // Emits values every 1 second for a total of 5 emissions + * const schedule = Schedule.spaced("1 second").pipe( + * Schedule.compose(Schedule.recurs(5)) + * ) + * + * const stream = Stream.fromSchedule(schedule) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const fromSchedule = exports.fromSchedule = internal.fromSchedule; +/** + * Creates a pipeline that groups on adjacent keys, calculated by the + * specified function. + * + * @since 2.0.0 + * @category grouping + */ +const groupAdjacentBy = exports.groupAdjacentBy = internal.groupAdjacentBy; +/** + * More powerful version of `Stream.groupByKey`. + * + * @example + * ```ts + * import { Chunk, Effect, GroupBy, Stream } from "effect" + * + * const groupByKeyResult = Stream.fromIterable([ + * "Mary", + * "James", + * "Robert", + * "Patricia", + * "John", + * "Jennifer", + * "Rebecca", + * "Peter" + * ]).pipe( + * Stream.groupBy((name) => Effect.succeed([name.substring(0, 1), name])) + * ) + * + * const stream = GroupBy.evaluate(groupByKeyResult, (key, stream) => + * Stream.fromEffect( + * Stream.runCollect(stream).pipe( + * Effect.andThen((chunk) => [key, Chunk.size(chunk)] as const) + * ) + * )) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { + * // _id: 'Chunk', + * // values: [ [ 'M', 1 ], [ 'J', 3 ], [ 'R', 2 ], [ 'P', 2 ] ] + * // } + * ``` + * + * @since 2.0.0 + * @category grouping + */ +const groupBy = exports.groupBy = groupBy_.groupBy; +/** + * Partition a stream using a function and process each stream individually. + * This returns a data structure that can be used to further filter down which + * groups shall be processed. + * + * After calling apply on the GroupBy object, the remaining groups will be + * processed in parallel and the resulting streams merged in a + * nondeterministic fashion. + * + * Up to `buffer` elements may be buffered in any group stream before the + * producer is backpressured. Take care to consume from all streams in order + * to prevent deadlocks. + * + * For example, to collect the first 2 words for every starting letter from a + * stream of words: + * + * ```ts + * import { pipe, GroupBy, Stream } from "effect" + * + * pipe( + * Stream.fromIterable(["hello", "world", "hi", "holla"]), + * Stream.groupByKey((word) => word[0]), + * GroupBy.evaluate((key, stream) => + * pipe( + * stream, + * Stream.take(2), + * Stream.map((words) => [key, words] as const) + * ) + * ) + * ) + * ``` + * + * @since 2.0.0 + * @category grouping + */ +const groupByKey = exports.groupByKey = groupBy_.groupByKey; +/** + * Partitions the stream with specified `chunkSize`. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.range(0, 8).pipe(Stream.grouped(3)) + * + * Effect.runPromise(Stream.runCollect(stream)).then((chunks) => console.log("%o", chunks)) + * // { + * // _id: 'Chunk', + * // values: [ + * // { _id: 'Chunk', values: [ 0, 1, 2, [length]: 3 ] }, + * // { _id: 'Chunk', values: [ 3, 4, 5, [length]: 3 ] }, + * // { _id: 'Chunk', values: [ 6, 7, 8, [length]: 3 ] }, + * // [length]: 3 + * // ] + * // } + * ``` + * + * @since 2.0.0 + * @category grouping + */ +const grouped = exports.grouped = internal.grouped; +/** + * Partitions the stream with the specified `chunkSize` or until the specified + * `duration` has passed, whichever is satisfied first. + * + * @example + * ```ts + * import { Chunk, Effect, Schedule, Stream } from "effect" + * + * const stream = Stream.range(0, 9).pipe( + * Stream.repeat(Schedule.spaced("1 second")), + * Stream.groupedWithin(18, "1.5 seconds"), + * Stream.take(3) + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then((chunks) => console.log(Chunk.toArray(chunks))) + * // [ + * // { + * // _id: 'Chunk', + * // values: [ + * // 0, 1, 2, 3, 4, 5, 6, + * // 7, 8, 9, 0, 1, 2, 3, + * // 4, 5, 6, 7 + * // ] + * // }, + * // { + * // _id: 'Chunk', + * // values: [ + * // 8, 9, 0, 1, 2, + * // 3, 4, 5, 6, 7, + * // 8, 9 + * // ] + * // }, + * // { + * // _id: 'Chunk', + * // values: [ + * // 0, 1, 2, 3, 4, 5, 6, + * // 7, 8, 9, 0, 1, 2, 3, + * // 4, 5, 6, 7 + * // ] + * // } + * // ] + * ``` + * + * @since 2.0.0 + * @category grouping + */ +const groupedWithin = exports.groupedWithin = internal.groupedWithin; +/** + * Specialized version of haltWhen which halts the evaluation of this stream + * after the given duration. + * + * An element in the process of being pulled will not be interrupted when the + * given duration completes. See `interruptAfter` for this behavior. + * + * @since 2.0.0 + * @category utils + */ +const haltAfter = exports.haltAfter = internal.haltAfter; +/** + * Halts the evaluation of this stream when the provided effect completes. The + * given effect will be forked as part of the returned stream, and its success + * will be discarded. + * + * An element in the process of being pulled will not be interrupted when the + * effect completes. See `interruptWhen` for this behavior. + * + * If the effect completes with a failure, the stream will emit that failure. + * + * @since 2.0.0 + * @category utils + */ +const haltWhen = exports.haltWhen = internal.haltWhen; +/** + * Halts the evaluation of this stream when the provided promise resolves. + * + * If the promise completes with a failure, the stream will emit that failure. + * + * @since 2.0.0 + * @category utils + */ +const haltWhenDeferred = exports.haltWhenDeferred = internal.haltWhenDeferred; +/** + * The identity pipeline, which does not modify streams in any way. + * + * @since 2.0.0 + * @category utils + */ +const identity = exports.identity = internal.identityStream; +/** + * Interleaves this stream and the specified stream deterministically by + * alternating pulling values from this stream and the specified stream. When + * one stream is exhausted all remaining values in the other stream will be + * pulled. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const s1 = Stream.make(1, 2, 3) + * const s2 = Stream.make(4, 5, 6) + * + * const stream = Stream.interleave(s1, s2) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 4, 2, 5, 3, 6 ] } + * ``` + * @since 2.0.0 + * @category utils + */ +const interleave = exports.interleave = internal.interleave; +/** + * Combines this stream and the specified stream deterministically using the + * stream of boolean values `pull` to control which stream to pull from next. + * A value of `true` indicates to pull from this stream and a value of `false` + * indicates to pull from the specified stream. Only consumes as many elements + * as requested by the `pull` stream. If either this stream or the specified + * stream are exhausted further requests for values from that stream will be + * ignored. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const s1 = Stream.make(1, 3, 5, 7, 9) + * const s2 = Stream.make(2, 4, 6, 8, 10) + * + * const booleanStream = Stream.make(true, false, false).pipe(Stream.forever) + * + * const stream = Stream.interleaveWith(s1, s2, booleanStream) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { + * // _id: 'Chunk', + * // values: [ + * // 1, 2, 4, 3, 6, + * // 8, 5, 10, 7, 9 + * // ] + * // } + * ``` + * + * @since 2.0.0 + * @category utils + */ +const interleaveWith = exports.interleaveWith = internal.interleaveWith; +/** + * Intersperse stream with provided `element`. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.make(1, 2, 3, 4, 5).pipe(Stream.intersperse(0)) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { + * // _id: 'Chunk', + * // values: [ + * // 1, 0, 2, 0, 3, + * // 0, 4, 0, 5 + * // ] + * // } + * ``` + * + * @since 2.0.0 + * @category utils + */ +const intersperse = exports.intersperse = internal.intersperse; +/** + * Intersperse the specified element, also adding a prefix and a suffix. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.make(1, 2, 3, 4, 5).pipe( + * Stream.intersperseAffixes({ + * start: "[", + * middle: "-", + * end: "]" + * }) + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { + * // _id: 'Chunk', + * // values: [ + * // '[', 1, '-', 2, '-', + * // 3, '-', 4, '-', 5, + * // ']' + * // ] + * // } + * ``` + * + * @since 2.0.0 + * @category utils + */ +const intersperseAffixes = exports.intersperseAffixes = internal.intersperseAffixes; +/** + * Specialized version of `Stream.interruptWhen` which interrupts the + * evaluation of this stream after the given `Duration`. + * + * @since 2.0.0 + * @category utils + */ +const interruptAfter = exports.interruptAfter = internal.interruptAfter; +/** + * Interrupts the evaluation of this stream when the provided effect + * completes. The given effect will be forked as part of this stream, and its + * success will be discarded. This combinator will also interrupt any + * in-progress element being pulled from upstream. + * + * If the effect completes with a failure before the stream completes, the + * returned stream will emit that failure. + * + * @since 2.0.0 + * @category utils + */ +const interruptWhen = exports.interruptWhen = internal.interruptWhen; +/** + * Interrupts the evaluation of this stream when the provided promise + * resolves. This combinator will also interrupt any in-progress element being + * pulled from upstream. + * + * If the promise completes with a failure, the stream will emit that failure. + * + * @since 2.0.0 + * @category utils + */ +const interruptWhenDeferred = exports.interruptWhenDeferred = internal.interruptWhenDeferred; +/** + * The infinite stream of iterative function application: a, f(a), f(f(a)), + * f(f(f(a))), ... + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * // An infinite Stream of numbers starting from 1 and incrementing + * const stream = Stream.iterate(1, (n) => n + 1) + * + * Effect.runPromise(Stream.runCollect(stream.pipe(Stream.take(10)))).then(console.log) + * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const iterate = exports.iterate = internal.iterate; +/** + * Creates a stream from an sequence of values. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.make(1, 2, 3) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 2, 3 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * Transforms the elements of this stream using the supplied function. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.make(1, 2, 3).pipe(Stream.map((n) => n + 1)) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 2, 3, 4 ] } + * ``` + * + * @since 2.0.0 + * @category mapping + */ +const map = exports.map = internal.map; +/** + * Statefully maps over the elements of this stream to produce new elements. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const runningTotal = (stream: Stream.Stream): Stream.Stream => + * stream.pipe(Stream.mapAccum(0, (s, a) => [s + a, s + a])) + * + * // input: 0, 1, 2, 3, 4, 5, 6 + * Effect.runPromise(Stream.runCollect(runningTotal(Stream.range(0, 6)))).then( + * console.log + * ) + * // { _id: "Chunk", values: [ 0, 1, 3, 6, 10, 15, 21 ] } + * ``` + * + * @since 2.0.0 + * @category mapping + */ +const mapAccum = exports.mapAccum = internal.mapAccum; +/** + * Statefully and effectfully maps over the elements of this stream to produce + * new elements. + * + * @since 2.0.0 + * @category mapping + */ +const mapAccumEffect = exports.mapAccumEffect = internal.mapAccumEffect; +/** + * Returns a stream whose failure and success channels have been mapped by the + * specified `onFailure` and `onSuccess` functions. + * + * @since 2.0.0 + * @category utils + */ +const mapBoth = exports.mapBoth = internal.mapBoth; +/** + * Transforms the chunks emitted by this stream. + * + * @since 2.0.0 + * @category mapping + */ +const mapChunks = exports.mapChunks = internal.mapChunks; +/** + * Effectfully transforms the chunks emitted by this stream. + * + * @since 2.0.0 + * @category mapping + */ +const mapChunksEffect = exports.mapChunksEffect = internal.mapChunksEffect; +/** + * Maps each element to an iterable, and flattens the iterables into the + * output of this stream. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const numbers = Stream.make("1-2-3", "4-5", "6").pipe( + * Stream.mapConcat((s) => s.split("-")), + * Stream.map((s) => parseInt(s)) + * ) + * + * Effect.runPromise(Stream.runCollect(numbers)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5, 6 ] } + * ``` + * + * @since 2.0.0 + * @category mapping + */ +const mapConcat = exports.mapConcat = internal.mapConcat; +/** + * Maps each element to a chunk, and flattens the chunks into the output of + * this stream. + * + * @since 2.0.0 + * @category mapping + */ +const mapConcatChunk = exports.mapConcatChunk = internal.mapConcatChunk; +/** + * Effectfully maps each element to a chunk, and flattens the chunks into the + * output of this stream. + * + * @since 2.0.0 + * @category mapping + */ +const mapConcatChunkEffect = exports.mapConcatChunkEffect = internal.mapConcatChunkEffect; +/** + * Effectfully maps each element to an iterable, and flattens the iterables + * into the output of this stream. + * + * @since 2.0.0 + * @category mapping + */ +const mapConcatEffect = exports.mapConcatEffect = internal.mapConcatEffect; +/** + * Maps over elements of the stream with the specified effectful function. + * + * @example + * ```ts + * import { Effect, Random, Stream } from "effect" + * + * const stream = Stream.make(10, 20, 30).pipe( + * Stream.mapEffect((n) => Random.nextIntBetween(0, n)) + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // Example Output: { _id: 'Chunk', values: [ 7, 19, 8 ] } + * ``` + * + * @since 2.0.0 + * @category mapping + */ +const mapEffect = exports.mapEffect = groupBy_.mapEffectOptions; +/** + * Transforms the errors emitted by this stream using `f`. + * + * @since 2.0.0 + * @category mapping + */ +const mapError = exports.mapError = internal.mapError; +/** + * Transforms the full causes of failures emitted by this stream. + * + * @since 2.0.0 + * @category mapping + */ +const mapErrorCause = exports.mapErrorCause = internal.mapErrorCause; +/** + * Merges this stream and the specified stream together. + * + * New produced stream will terminate when both specified stream terminate if + * no termination strategy is specified. + * + * @example + * ```ts + * import { Effect, Schedule, Stream } from "effect" + * + * const s1 = Stream.make(1, 2, 3).pipe( + * Stream.schedule(Schedule.spaced("100 millis")) + * ) + * const s2 = Stream.make(4, 5, 6).pipe( + * Stream.schedule(Schedule.spaced("200 millis")) + * ) + * + * const stream = Stream.merge(s1, s2) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 4, 2, 3, 5, 6 ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +const merge = exports.merge = internal.merge; +/** + * Merges a variable list of streams in a non-deterministic fashion. Up to `n` + * streams may be consumed in parallel and up to `outputBuffer` chunks may be + * buffered by this operator. + * + * @since 2.0.0 + * @category utils + */ +const mergeAll = exports.mergeAll = internal.mergeAll; +/** + * Merges a struct of streams into a single stream of tagged values. + * @category combinators + * @since 3.8.5 + * + * @example + * ```ts + * import { Stream } from "effect" + * // Stream.Stream<{ _tag: "a"; value: number; } | { _tag: "b"; value: string; }> + * const res = Stream.mergeWithTag({ + * a: Stream.make(0), + * b: Stream.make("") + * }, { concurrency: "unbounded" }) + * ``` + */ +const mergeWithTag = exports.mergeWithTag = internal.mergeWithTag; +/** + * Merges this stream and the specified stream together to a common element + * type with the specified mapping functions. + * + * New produced stream will terminate when both specified stream terminate if + * no termination strategy is specified. + * + * @example + * ```ts + * import { Effect, Schedule, Stream } from "effect" + * + * const s1 = Stream.make("1", "2", "3").pipe( + * Stream.schedule(Schedule.spaced("100 millis")) + * ) + * const s2 = Stream.make(4.1, 5.3, 6.2).pipe( + * Stream.schedule(Schedule.spaced("200 millis")) + * ) + * + * const stream = Stream.mergeWith(s1, s2, { + * onSelf: (s) => parseInt(s), + * onOther: (n) => Math.floor(n) + * }) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 4, 2, 3, 5, 6 ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +const mergeWith = exports.mergeWith = internal.mergeWith; +/** + * Merges this stream and the specified stream together to produce a stream of + * eithers. + * + * @since 2.0.0 + * @category utils + */ +const mergeEither = exports.mergeEither = internal.mergeEither; +/** + * Merges this stream and the specified stream together, discarding the values + * from the right stream. + * + * @since 2.0.0 + * @category utils + */ +const mergeLeft = exports.mergeLeft = internal.mergeLeft; +/** + * Merges this stream and the specified stream together, discarding the values + * from the left stream. + * + * @since 2.0.0 + * @category utils + */ +const mergeRight = exports.mergeRight = internal.mergeRight; +/** + * Returns a combined string resulting from concatenating each of the values + * from the stream. + * + * @since 2.0.0 + * @category utils + */ +const mkString = exports.mkString = internal.mkString; +/** + * The stream that never produces any value or fails with any error. + * + * @since 2.0.0 + * @category constructors + */ +const never = exports.never = internal.never; +/** + * Adds an effect to be executed at the end of the stream. + * + * @example + * ```ts + * import { Console, Effect, Stream } from "effect" + * + * const stream = Stream.make(1, 2, 3).pipe( + * Stream.map((n) => n * 2), + * Stream.tap((n) => Console.log(`after mapping: ${n}`)), + * Stream.onEnd(Console.log("Stream ended")) + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // after mapping: 2 + * // after mapping: 4 + * // after mapping: 6 + * // Stream ended + * // { _id: 'Chunk', values: [ 2, 4, 6 ] } + * ``` + * + * @since 3.6.0 + * @category sequencing + */ +const onEnd = exports.onEnd = internal.onEnd; +/** + * Runs the specified effect if this stream fails, providing the error to the + * effect if it exists. + * + * Note: Unlike `Effect.onError` there is no guarantee that the provided + * effect will not be interrupted. + * + * @since 2.0.0 + * @category utils + */ +const onError = exports.onError = internal.onError; +/** + * Runs the specified effect if this stream ends. + * + * @since 2.0.0 + * @category utils + */ +const onDone = exports.onDone = internal.onDone; +/** + * Adds an effect to be executed at the start of the stream. + * + * @example + * ```ts + * import { Console, Effect, Stream } from "effect" + * + * const stream = Stream.make(1, 2, 3).pipe( + * Stream.onStart(Console.log("Stream started")), + * Stream.map((n) => n * 2), + * Stream.tap((n) => Console.log(`after mapping: ${n}`)) + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // Stream started + * // after mapping: 2 + * // after mapping: 4 + * // after mapping: 6 + * // { _id: 'Chunk', values: [ 2, 4, 6 ] } + * ``` + * + * @since 3.6.0 + * @category sequencing + */ +const onStart = exports.onStart = internal.onStart; +/** + * Translates any failure into a stream termination, making the stream + * infallible and all failures unchecked. + * + * @since 2.0.0 + * @category error handling + */ +const orDie = exports.orDie = internal.orDie; +/** + * Keeps none of the errors, and terminates the stream with them, using the + * specified function to convert the `E` into a defect. + * + * @since 2.0.0 + * @category error handling + */ +const orDieWith = exports.orDieWith = internal.orDieWith; +/** + * Switches to the provided stream in case this one fails with a typed error. + * + * See also `Stream.catchAll`. + * + * @since 2.0.0 + * @category error handling + */ +const orElse = exports.orElse = internal.orElse; +/** + * Switches to the provided stream in case this one fails with a typed error. + * + * See also `Stream.catchAll`. + * + * @since 2.0.0 + * @category error handling + */ +const orElseEither = exports.orElseEither = internal.orElseEither; +/** + * Fails with given error in case this one fails with a typed error. + * + * See also `Stream.catchAll`. + * + * @since 2.0.0 + * @category error handling + */ +const orElseFail = exports.orElseFail = internal.orElseFail; +/** + * Produces the specified element if this stream is empty. + * + * @since 2.0.0 + * @category error handling + */ +const orElseIfEmpty = exports.orElseIfEmpty = internal.orElseIfEmpty; +/** + * Produces the specified chunk if this stream is empty. + * + * @since 2.0.0 + * @category error handling + */ +const orElseIfEmptyChunk = exports.orElseIfEmptyChunk = internal.orElseIfEmptyChunk; +/** + * Switches to the provided stream in case this one is empty. + * + * @since 2.0.0 + * @category error handling + */ +const orElseIfEmptyStream = exports.orElseIfEmptyStream = internal.orElseIfEmptyStream; +/** + * Succeeds with the specified value if this one fails with a typed error. + * + * @since 2.0.0 + * @category error handling + */ +const orElseSucceed = exports.orElseSucceed = internal.orElseSucceed; +/** + * Like `Stream.unfold`, but allows the emission of values to end one step further + * than the unfolding of the state. This is useful for embedding paginated + * APIs, hence the name. + * + * @example + * ```ts + * import { Effect, Option, Stream } from "effect" + * + * const stream = Stream.paginate(0, (n) => [ + * n, + * n < 3 ? Option.some(n + 1) : Option.none() + * ]) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 0, 1, 2, 3 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const paginate = exports.paginate = internal.paginate; +/** + * Like `Stream.unfoldChunk`, but allows the emission of values to end one step + * further than the unfolding of the state. This is useful for embedding + * paginated APIs, hence the name. + * + * @since 2.0.0 + * @category constructors + */ +const paginateChunk = exports.paginateChunk = internal.paginateChunk; +/** + * Like `Stream.unfoldChunkEffect`, but allows the emission of values to end one step + * further than the unfolding of the state. This is useful for embedding + * paginated APIs, hence the name. + * + * @since 2.0.0 + * @category constructors + */ +const paginateChunkEffect = exports.paginateChunkEffect = internal.paginateChunkEffect; +/** + * Like `Stream.unfoldEffect` but allows the emission of values to end one step + * further than the unfolding of the state. This is useful for embedding + * paginated APIs, hence the name. + * + * @since 2.0.0 + * @category constructors + */ +const paginateEffect = exports.paginateEffect = internal.paginateEffect; +/** + * Splits a stream into two substreams based on a predicate. + * + * **Details** + * + * The `Stream.partition` function splits a stream into two parts: one for + * elements that satisfy the predicate (evaluated to `true`) and another for + * those that do not (evaluated to `false`). + * + * The faster stream may advance up to `bufferSize` elements ahead of the slower + * one. + * + * **Example** (Partitioning a Stream into Even and Odd Numbers) + * + * ```ts + * import { Effect, Stream } from "effect" + * + * const partition = Stream.range(1, 9).pipe( + * Stream.partition((n) => n % 2 === 0, { bufferSize: 5 }) + * ) + * + * const program = Effect.scoped( + * Effect.gen(function*() { + * const [odds, evens] = yield* partition + * console.log(yield* Stream.runCollect(odds)) + * console.log(yield* Stream.runCollect(evens)) + * }) + * ) + * + * Effect.runPromise(program) + * // { _id: 'Chunk', values: [ 1, 3, 5, 7, 9 ] } + * // { _id: 'Chunk', values: [ 2, 4, 6, 8 ] } + * ``` + * + * @see {@link partitionEither} for partitioning a stream based on effectful + * conditions. + * + * @since 2.0.0 + * @category utils + */ +const partition = exports.partition = internal.partition; +/** + * Splits a stream into two substreams based on an effectful condition. + * + * **Details** + * + * The `Stream.partitionEither` function is used to divide a stream into two + * parts: one for elements that satisfy a condition producing `Either.left` + * values, and another for those that produce `Either.right` values. This + * function applies an effectful predicate to each element in the stream to + * determine which substream it belongs to. + * + * The faster stream may advance up to `bufferSize` elements ahead of the slower + * one. + * + * **Example** (Partitioning a Stream with an Effectful Predicate) + * + * ```ts + * import { Effect, Either, Stream } from "effect" + * + * const partition = Stream.range(1, 9).pipe( + * Stream.partitionEither( + * (n) => Effect.succeed(n % 2 === 0 ? Either.right(n) : Either.left(n)), + * { bufferSize: 5 } + * ) + * ) + * + * const program = Effect.scoped( + * Effect.gen(function*() { + * const [evens, odds] = yield* partition + * console.log(yield* Stream.runCollect(evens)) + * console.log(yield* Stream.runCollect(odds)) + * }) + * ) + * + * Effect.runPromise(program) + * // { _id: 'Chunk', values: [ 1, 3, 5, 7, 9 ] } + * // { _id: 'Chunk', values: [ 2, 4, 6, 8 ] } + * ``` + * + * @see {@link partition} for partitioning a stream based on simple conditions. + * + * @since 2.0.0 + * @category utils + */ +const partitionEither = exports.partitionEither = internal.partitionEither; +/** + * Peels off enough material from the stream to construct a `Z` using the + * provided `Sink` and then returns both the `Z` and the rest of the + * `Stream` in a scope. Like all scoped values, the provided stream is + * valid only within the scope. + * + * @since 2.0.0 + * @category utils + */ +const peel = exports.peel = internal.peel; +/** + * Pipes all of the values from this stream through the provided sink. + * + * See also `Stream.transduce`. + * + * @since 2.0.0 + * @category utils + */ +const pipeThrough = exports.pipeThrough = internal.pipeThrough; +/** + * Pipes all the values from this stream through the provided channel. + * + * @since 2.0.0 + * @category utils + */ +const pipeThroughChannel = exports.pipeThroughChannel = internal.pipeThroughChannel; +/** + * Pipes all values from this stream through the provided channel, passing + * through any error emitted by this stream unchanged. + * + * @since 2.0.0 + * @category utils + */ +const pipeThroughChannelOrFail = exports.pipeThroughChannelOrFail = internal.pipeThroughChannelOrFail; +/** + * Emits the provided chunk before emitting any other value. + * + * @since 2.0.0 + * @category utils + */ +const prepend = exports.prepend = internal.prepend; +/** + * Provides the stream with its required context, which eliminates its + * dependency on `R`. + * + * @since 2.0.0 + * @category context + */ +const provideContext = exports.provideContext = internal.provideContext; +/** + * Provides the stream with some of its required context, which eliminates its + * dependency on `R`. + * + * @since 3.16.9 + * @category context + */ +const provideSomeContext = exports.provideSomeContext = internal.provideSomeContext; +/** + * Provides a `Layer` to the stream, which translates it to another level. + * + * @since 2.0.0 + * @category context + */ +const provideLayer = exports.provideLayer = internal.provideLayer; +/** + * Provides the stream with the single service it requires. If the stream + * requires more than one service use `Stream.provideContext` instead. + * + * @since 2.0.0 + * @category context + */ +const provideService = exports.provideService = internal.provideService; +/** + * Provides the stream with the single service it requires. If the stream + * requires more than one service use `Stream.provideContext` instead. + * + * @since 2.0.0 + * @category context + */ +const provideServiceEffect = exports.provideServiceEffect = internal.provideServiceEffect; +/** + * Provides the stream with the single service it requires. If the stream + * requires more than one service use `Stream.provideContext` instead. + * + * @since 2.0.0 + * @category context + */ +const provideServiceStream = exports.provideServiceStream = internal.provideServiceStream; +/** + * Transforms the context being provided to the stream with the specified + * function. + * + * @since 2.0.0 + * @category context + */ +const mapInputContext = exports.mapInputContext = internal.mapInputContext; +/** + * Splits the context into two parts, providing one part using the + * specified layer and leaving the remainder `R0`. + * + * @since 2.0.0 + * @category context + */ +const provideSomeLayer = exports.provideSomeLayer = internal.provideSomeLayer; +/** + * Returns a stream that mirrors the first upstream to emit an item. + * As soon as one of the upstream emits a first value, the other is interrupted. + * The resulting stream will forward all items from the "winning" source stream. + * Any upstream failures will cause the returned stream to fail. + * + * @example + * ```ts + * import { Stream, Schedule, Console, Effect } from "effect" + * + * const stream = Stream.fromSchedule(Schedule.spaced('2 millis')).pipe( + * Stream.race(Stream.fromSchedule(Schedule.spaced('1 millis'))), + * Stream.take(6), + * Stream.tap(Console.log) + * ) + * + * Effect.runPromise(Stream.runDrain(stream)) + * // Output each millisecond from the first stream, the rest streams are interrupted + * // 0 + * // 1 + * // 2 + * // 3 + * // 4 + * // 5 + * ``` + * @since 3.7.0 + * @category racing + */ +const race = exports.race = internal.race; +/** + * Returns a stream that mirrors the first upstream to emit an item. + * As soon as one of the upstream emits a first value, all the others are interrupted. + * The resulting stream will forward all items from the "winning" source stream. + * Any upstream failures will cause the returned stream to fail. + * + * @example + * ```ts + * import { Stream, Schedule, Console, Effect } from "effect" + * + * const stream = Stream.raceAll( + * Stream.fromSchedule(Schedule.spaced('1 millis')), + * Stream.fromSchedule(Schedule.spaced('2 millis')), + * Stream.fromSchedule(Schedule.spaced('4 millis')), + * ).pipe(Stream.take(6), Stream.tap(Console.log)) + * + * Effect.runPromise(Stream.runDrain(stream)) + * // Output each millisecond from the first stream, the rest streams are interrupted + * // 0 + * // 1 + * // 2 + * // 3 + * // 4 + * // 5 + * ``` + * @since 3.5.0 + * @category racing + */ +const raceAll = exports.raceAll = internal.raceAll; +/** + * Constructs a stream from a range of integers, including both endpoints. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * // A Stream with a range of numbers from 1 to 5 + * const stream = Stream.range(1, 5) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const range = exports.range = internal.range; +/** + * Re-chunks the elements of the stream into chunks of `n` elements each. The + * last chunk might contain less than `n` elements. + * + * @since 2.0.0 + * @category utils + */ +const rechunk = exports.rechunk = internal.rechunk; +/** + * Keeps some of the errors, and terminates the fiber with the rest + * + * @since 2.0.0 + * @category error handling + */ +const refineOrDie = exports.refineOrDie = internal.refineOrDie; +/** + * Keeps some of the errors, and terminates the fiber with the rest, using the + * specified function to convert the `E` into a defect. + * + * @since 2.0.0 + * @category error handling + */ +const refineOrDieWith = exports.refineOrDieWith = internal.refineOrDieWith; +/** + * Repeats the entire stream using the specified schedule. The stream will + * execute normally, and then repeat again according to the provided schedule. + * + * @example + * ```ts + * import { Effect, Schedule, Stream } from "effect" + * + * const stream = Stream.repeat(Stream.succeed(1), Schedule.forever) + * + * Effect.runPromise(Stream.runCollect(stream.pipe(Stream.take(5)))).then(console.log) + * // { _id: 'Chunk', values: [ 1, 1, 1, 1, 1 ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +const repeat = exports.repeat = internal.repeat; +/** + * Creates a stream from an effect producing a value of type `A` which repeats + * forever. + * + * @example + * ```ts + * import { Effect, Random, Stream } from "effect" + * + * const stream = Stream.repeatEffect(Random.nextInt) + * + * Effect.runPromise(Stream.runCollect(stream.pipe(Stream.take(5)))).then(console.log) + * // Example Output: { _id: 'Chunk', values: [ 3891571149, 4239494205, 2352981603, 2339111046, 1488052210 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const repeatEffect = exports.repeatEffect = internal.repeatEffect; +/** + * Creates a stream from an effect producing chunks of `A` values which + * repeats forever. + * + * @since 2.0.0 + * @category constructors + */ +const repeatEffectChunk = exports.repeatEffectChunk = internal.repeatEffectChunk; +/** + * Creates a stream from an effect producing chunks of `A` values until it + * fails with `None`. + * + * @since 2.0.0 + * @category constructors + */ +const repeatEffectChunkOption = exports.repeatEffectChunkOption = internal.repeatEffectChunkOption; +/** + * Creates a stream from an effect producing values of type `A` until it fails + * with `None`. + * + * @example + * ```ts + * // In this example, we're draining an Iterator to create a stream from it + * import { Stream, Effect, Option } from "effect" + * + * const drainIterator = (it: Iterator): Stream.Stream => + * Stream.repeatEffectOption( + * Effect.sync(() => it.next()).pipe( + * Effect.andThen((res) => { + * if (res.done) { + * return Effect.fail(Option.none()) + * } + * return Effect.succeed(res.value) + * }) + * ) + * ) + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const repeatEffectOption = exports.repeatEffectOption = internal.repeatEffectOption; +/** + * Creates a stream from an effect producing a value of type `A`, which is + * repeated using the specified schedule. + * + * @since 2.0.0 + * @category constructors + */ +const repeatEffectWithSchedule = exports.repeatEffectWithSchedule = internal.repeatEffectWithSchedule; +/** + * Repeats the entire stream using the specified schedule. The stream will + * execute normally, and then repeat again according to the provided schedule. + * The schedule output will be emitted at the end of each repetition. + * + * @since 2.0.0 + * @category utils + */ +const repeatEither = exports.repeatEither = internal.repeatEither; +/** + * Repeats each element of the stream using the provided schedule. Repetitions + * are done in addition to the first execution, which means using + * `Schedule.recurs(1)` actually results in the original effect, plus an + * additional recurrence, for a total of two repetitions of each value in the + * stream. + * + * @since 2.0.0 + * @category utils + */ +const repeatElements = exports.repeatElements = internal.repeatElements; +/** + * Repeats each element of the stream using the provided schedule. When the + * schedule is finished, then the output of the schedule will be emitted into + * the stream. Repetitions are done in addition to the first execution, which + * means using `Schedule.recurs(1)` actually results in the original effect, + * plus an additional recurrence, for a total of two repetitions of each value + * in the stream. + * + * This function accepts two conversion functions, which allow the output of + * this stream and the output of the provided schedule to be unified into a + * single type. For example, `Either` or similar data type. + * + * @since 2.0.0 + * @category utils + */ +const repeatElementsWith = exports.repeatElementsWith = internal.repeatElementsWith; +/** + * Repeats the provided value infinitely. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.repeatValue(0) + * + * Effect.runPromise(Stream.runCollect(stream.pipe(Stream.take(5)))).then(console.log) + * // { _id: 'Chunk', values: [ 0, 0, 0, 0, 0 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const repeatValue = exports.repeatValue = internal.repeatValue; +/** + * Repeats the entire stream using the specified schedule. The stream will + * execute normally, and then repeat again according to the provided schedule. + * The schedule output will be emitted at the end of each repetition and can + * be unified with the stream elements using the provided functions. + * + * @since 2.0.0 + * @category utils + */ +const repeatWith = exports.repeatWith = internal.repeatWith; +/** + * When the stream fails, retry it according to the given schedule + * + * This retries the entire stream, so will re-execute all of the stream's + * acquire operations. + * + * The schedule is reset as soon as the first element passes through the + * stream again. + * + * @since 2.0.0 + * @category utils + */ +const retry = exports.retry = internal.retry; +/** + * Apply an `ExecutionPlan` to the stream, which allows you to fallback to + * different resources in case of failure. + * + * If you have a stream that could fail with partial results, you can use + * the `preventFallbackOnPartialStream` option to prevent contamination of + * the final stream with partial results. + * + * @since 3.16.0 + * @category Error handling + * @experimental + */ +const withExecutionPlan = exports.withExecutionPlan = internal.withExecutionPlan; +/** + * Runs the sink on the stream to produce either the sink's result or an error. + * + * @since 2.0.0 + * @category destructors + */ +const run = exports.run = internal.run; +/** + * Runs the stream and collects all of its elements to a chunk. + * + * @since 2.0.0 + * @category destructors + */ +const runCollect = exports.runCollect = internal.runCollect; +/** + * Runs the stream and emits the number of elements processed + * + * @since 2.0.0 + * @category destructors + */ +const runCount = exports.runCount = internal.runCount; +/** + * Runs the stream only for its effects. The emitted elements are discarded. + * + * @since 2.0.0 + * @category destructors + */ +const runDrain = exports.runDrain = internal.runDrain; +/** + * Executes a pure fold over the stream of values - reduces all elements in + * the stream to a value of type `S`. + * + * @since 2.0.0 + * @category destructors + */ +const runFold = exports.runFold = internal.runFold; +/** + * Executes an effectful fold over the stream of values. + * + * @since 2.0.0 + * @category destructors + */ +const runFoldEffect = exports.runFoldEffect = internal.runFoldEffect; +/** + * Executes a pure fold over the stream of values. Returns a scoped value that + * represents the scope of the stream. + * + * @since 2.0.0 + * @category destructors + */ +const runFoldScoped = exports.runFoldScoped = internal.runFoldScoped; +/** + * Executes an effectful fold over the stream of values. Returns a scoped + * value that represents the scope of the stream. + * + * @since 2.0.0 + * @category destructors + */ +const runFoldScopedEffect = exports.runFoldScopedEffect = internal.runFoldScopedEffect; +/** + * Reduces the elements in the stream to a value of type `S`. Stops the fold + * early when the condition is not fulfilled. Example: + * + * @since 2.0.0 + * @category destructors + */ +const runFoldWhile = exports.runFoldWhile = internal.runFoldWhile; +/** + * Executes an effectful fold over the stream of values. Stops the fold early + * when the condition is not fulfilled. + * + * @since 2.0.0 + * @category destructors + */ +const runFoldWhileEffect = exports.runFoldWhileEffect = internal.runFoldWhileEffect; +/** + * Executes a pure fold over the stream of values. Returns a scoped value that + * represents the scope of the stream. Stops the fold early when the condition + * is not fulfilled. + * + * @since 2.0.0 + * @category destructors + */ +const runFoldWhileScoped = exports.runFoldWhileScoped = internal.runFoldWhileScoped; +/** + * Executes an effectful fold over the stream of values. Returns a scoped + * value that represents the scope of the stream. Stops the fold early when + * the condition is not fulfilled. + * + * @since 2.0.0 + * @category destructors + */ +const runFoldWhileScopedEffect = exports.runFoldWhileScopedEffect = internal.runFoldWhileScopedEffect; +/** + * Consumes all elements of the stream, passing them to the specified + * callback. + * + * @since 2.0.0 + * @category destructors + */ +const runForEach = exports.runForEach = internal.runForEach; +/** + * Consumes all elements of the stream, passing them to the specified + * callback. + * + * @since 2.0.0 + * @category destructors + */ +const runForEachChunk = exports.runForEachChunk = internal.runForEachChunk; +/** + * Like `Stream.runForEachChunk`, but returns a scoped effect so the + * finalization order can be controlled. + * + * @since 2.0.0 + * @category destructors + */ +const runForEachChunkScoped = exports.runForEachChunkScoped = internal.runForEachChunkScoped; +/** + * Like `Stream.forEach`, but returns a scoped effect so the finalization + * order can be controlled. + * + * @since 2.0.0 + * @category destructors + */ +const runForEachScoped = exports.runForEachScoped = internal.runForEachScoped; +/** + * Consumes elements of the stream, passing them to the specified callback, + * and terminating consumption when the callback returns `false`. + * + * @since 2.0.0 + * @category destructors + */ +const runForEachWhile = exports.runForEachWhile = internal.runForEachWhile; +/** + * Like `Stream.runForEachWhile`, but returns a scoped effect so the + * finalization order can be controlled. + * + * @since 2.0.0 + * @category destructors + */ +const runForEachWhileScoped = exports.runForEachWhileScoped = internal.runForEachWhileScoped; +/** + * Runs the stream to completion and yields the first value emitted by it, + * discarding the rest of the elements. + * + * @since 2.0.0 + * @category destructors + */ +const runHead = exports.runHead = internal.runHead; +/** + * Publishes elements of this stream to a `PubSub`. Stream failure and ending will + * also be signalled. + * + * @since 2.0.0 + * @category destructors + */ +const runIntoPubSub = exports.runIntoPubSub = internal.runIntoPubSub; +/** + * Like `Stream.runIntoPubSub`, but provides the result as a scoped effect to + * allow for scope composition. + * + * @since 2.0.0 + * @category destructors + */ +const runIntoPubSubScoped = exports.runIntoPubSubScoped = internal.runIntoPubSubScoped; +/** + * Enqueues elements of this stream into a queue. Stream failure and ending + * will also be signalled. + * + * @since 2.0.0 + * @category destructors + */ +const runIntoQueue = exports.runIntoQueue = internal.runIntoQueue; +/** + * Like `Stream.runIntoQueue`, but provides the result as a scoped Effect + * to allow for scope composition. + * + * @since 2.0.0 + * @category destructors + */ +const runIntoQueueElementsScoped = exports.runIntoQueueElementsScoped = internal.runIntoQueueElementsScoped; +/** + * Like `Stream.runIntoQueue`, but provides the result as a scoped effect + * to allow for scope composition. + * + * @since 2.0.0 + * @category destructors + */ +const runIntoQueueScoped = exports.runIntoQueueScoped = internal.runIntoQueueScoped; +/** + * Runs the stream to completion and yields the last value emitted by it, + * discarding the rest of the elements. + * + * @since 2.0.0 + * @category destructors + */ +const runLast = exports.runLast = internal.runLast; +/** + * @since 2.0.0 + * @category destructors + */ +const runScoped = exports.runScoped = internal.runScoped; +/** + * Runs the stream to a sink which sums elements, provided they are Numeric. + * + * @since 2.0.0 + * @category destructors + */ +const runSum = exports.runSum = internal.runSum; +/** + * Statefully maps over the elements of this stream to produce all + * intermediate results of type `S` given an initial S. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.range(1, 6).pipe(Stream.scan(0, (a, b) => a + b)) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 0, 1, 3, 6, 10, 15, 21 ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +const scan = exports.scan = internal.scan; +/** + * Statefully and effectfully maps over the elements of this stream to produce + * all intermediate results of type `S` given an initial S. + * + * @since 2.0.0 + * @category utils + */ +const scanEffect = exports.scanEffect = internal.scanEffect; +/** + * Statefully maps over the elements of this stream to produce all + * intermediate results. + * + * See also `Stream.scan`. + * + * @since 2.0.0 + * @category utils + */ +const scanReduce = exports.scanReduce = internal.scanReduce; +/** + * Statefully and effectfully maps over the elements of this stream to produce + * all intermediate results. + * + * See also `Stream.scanEffect`. + * + * @since 2.0.0 + * @category utils + */ +const scanReduceEffect = exports.scanReduceEffect = internal.scanReduceEffect; +/** + * Schedules the output of the stream using the provided `schedule`. + * + * @since 2.0.0 + * @category utils + */ +const schedule = exports.schedule = internal.schedule; +/** + * Schedules the output of the stream using the provided `schedule` and emits + * its output at the end (if `schedule` is finite). Uses the provided function + * to align the stream and schedule outputs on the same type. + * + * @since 2.0.0 + * @category utils + */ +const scheduleWith = exports.scheduleWith = internal.scheduleWith; +/** + * Creates a single-valued stream from a scoped resource. + * + * @example + * ```ts + * import { Console, Effect, Stream } from "effect" + * + * // Creating a single-valued stream from a scoped resource + * const stream = Stream.scoped( + * Effect.acquireRelease( + * Console.log("acquire"), + * () => Console.log("release") + * ) + * ).pipe( + * Stream.flatMap(() => Console.log("use")) + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // acquire + * // use + * // release + * // { _id: 'Chunk', values: [ undefined ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const scoped = exports.scoped = internal.scoped; +/** + * Use a function that receives a scope and returns an effect to emit an output + * element. The output element will be the result of the returned effect, if + * successful. + * + * @since 3.11.0 + * @category constructors + */ +const scopedWith = exports.scopedWith = internal.scopedWith; +/** + * Emits a sliding window of `n` elements. + * + * ```ts + * import { pipe, Stream } from "effect" + * + * pipe( + * Stream.make(1, 2, 3, 4), + * Stream.sliding(2), + * Stream.runCollect + * ) + * // => Chunk(Chunk(1, 2), Chunk(2, 3), Chunk(3, 4)) + * ``` + * + * @since 2.0.0 + * @category utils + */ +const sliding = exports.sliding = internal.sliding; +/** + * Like `sliding`, but with a configurable `stepSize` parameter. + * + * @since 2.0.0 + * @category utils + */ +const slidingSize = exports.slidingSize = internal.slidingSize; +/** + * Converts an option on values into an option on errors. + * + * @since 2.0.0 + * @category utils + */ +const some = exports.some = internal.some; +/** + * Extracts the optional value, or returns the given 'default'. + * + * @since 2.0.0 + * @category utils + */ +const someOrElse = exports.someOrElse = internal.someOrElse; +/** + * Extracts the optional value, or fails with the given error 'e'. + * + * @since 2.0.0 + * @category utils + */ +const someOrFail = exports.someOrFail = internal.someOrFail; +/** + * Splits elements based on a predicate or refinement. + * + * ```ts + * import { pipe, Stream } from "effect" + * + * pipe( + * Stream.range(1, 10), + * Stream.split((n) => n % 4 === 0), + * Stream.runCollect + * ) + * // => Chunk(Chunk(1, 2, 3), Chunk(5, 6, 7), Chunk(9)) + * ``` + * + * @since 2.0.0 + * @category utils + */ +const split = exports.split = internal.split; +/** + * Splits elements on a delimiter and transforms the splits into desired output. + * + * @since 2.0.0 + * @category utils + */ +const splitOnChunk = exports.splitOnChunk = internal.splitOnChunk; +/** + * Splits strings on newlines. Handles both Windows newlines (`\r\n`) and UNIX + * newlines (`\n`). + * + * @since 2.0.0 + * @category combinators + */ +const splitLines = exports.splitLines = internal.splitLines; +/** + * Creates a single-valued pure stream. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * // A Stream with a single number + * const stream = Stream.succeed(3) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 3 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const succeed = exports.succeed = internal.succeed; +/** + * Creates a single-valued pure stream. + * + * @since 2.0.0 + * @category constructors + */ +const sync = exports.sync = internal.sync; +/** + * Returns a lazily constructed stream. + * + * @since 2.0.0 + * @category constructors + */ +const suspend = exports.suspend = internal.suspend; +/** + * Takes the specified number of elements from this stream. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.take(Stream.iterate(0, (n) => n + 1), 5) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4 ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +const take = exports.take = internal.take; +/** + * Takes the last specified number of elements from this stream. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.takeRight(Stream.make(1, 2, 3, 4, 5, 6), 3) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 4, 5, 6 ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +const takeRight = exports.takeRight = internal.takeRight; +/** + * Takes all elements of the stream until the specified predicate evaluates to + * `true`. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.takeUntil(Stream.iterate(0, (n) => n + 1), (n) => n === 4) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4 ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +const takeUntil = exports.takeUntil = internal.takeUntil; +/** + * Takes all elements of the stream until the specified effectual predicate + * evaluates to `true`. + * + * @since 2.0.0 + * @category utils + */ +const takeUntilEffect = exports.takeUntilEffect = internal.takeUntilEffect; +/** + * Takes all elements of the stream for as long as the specified predicate + * evaluates to `true`. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.takeWhile(Stream.iterate(0, (n) => n + 1), (n) => n < 5) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4 ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +const takeWhile = exports.takeWhile = internal.takeWhile; +/** + * Adds an effect to consumption of every element of the stream. + * + * @example + * ```ts + * import { Console, Effect, Stream } from "effect" + * + * const stream = Stream.make(1, 2, 3).pipe( + * Stream.tap((n) => Console.log(`before mapping: ${n}`)), + * Stream.map((n) => n * 2), + * Stream.tap((n) => Console.log(`after mapping: ${n}`)) + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // before mapping: 1 + * // after mapping: 2 + * // before mapping: 2 + * // after mapping: 4 + * // before mapping: 3 + * // after mapping: 6 + * // { _id: 'Chunk', values: [ 2, 4, 6 ] } + * ``` + * + * @since 2.0.0 + * @category sequencing + */ +const tap = exports.tap = internal.tap; +/** + * Returns a stream that effectfully "peeks" at the failure or success of + * the stream. + * + * @since 2.0.0 + * @category sequencing + */ +const tapBoth = exports.tapBoth = internal.tapBoth; +/** + * Returns a stream that effectfully "peeks" at the failure of the stream. + * + * @since 2.0.0 + * @category sequencing + */ +const tapError = exports.tapError = internal.tapError; +/** + * Returns a stream that effectfully "peeks" at the cause of failure of the + * stream. + * + * @since 2.0.0 + * @category utils + */ +const tapErrorCause = exports.tapErrorCause = internal.tapErrorCause; +/** + * Sends all elements emitted by this stream to the specified sink in addition + * to emitting them. + * + * @since 2.0.0 + * @category sequencing + */ +const tapSink = exports.tapSink = internal.tapSink; +/** + * Delays the chunks of this stream according to the given bandwidth + * parameters using the token bucket algorithm. Allows for burst in the + * processing of elements by allowing the token bucket to accumulate tokens up + * to a `units + burst` threshold. The weight of each chunk is determined by + * the `cost` function. + * + * If using the "enforce" strategy, chunks that do not meet the bandwidth + * constraints are dropped. If using the "shape" strategy, chunks are delayed + * until they can be emitted without exceeding the bandwidth constraints. + * + * Defaults to the "shape" strategy. + * + * @example + * ```ts + * import { Chunk, Effect, Schedule, Stream } from "effect" + * + * let last = Date.now() + * const log = (message: string) => + * Effect.sync(() => { + * const end = Date.now() + * console.log(`${message} after ${end - last}ms`) + * last = end + * }) + * + * const stream = Stream.fromSchedule(Schedule.spaced("50 millis")).pipe( + * Stream.take(6), + * Stream.tap((n) => log(`Received ${n}`)), + * Stream.throttle({ + * cost: Chunk.size, + * duration: "100 millis", + * units: 1 + * }), + * Stream.tap((n) => log(`> Emitted ${n}`)) + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // Received 0 after 56ms + * // > Emitted 0 after 0ms + * // Received 1 after 52ms + * // > Emitted 1 after 48ms + * // Received 2 after 52ms + * // > Emitted 2 after 49ms + * // Received 3 after 52ms + * // > Emitted 3 after 48ms + * // Received 4 after 52ms + * // > Emitted 4 after 47ms + * // Received 5 after 52ms + * // > Emitted 5 after 49ms + * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4, 5 ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +const throttle = exports.throttle = internal.throttle; +/** + * Delays the chunks of this stream according to the given bandwidth + * parameters using the token bucket algorithm. Allows for burst in the + * processing of elements by allowing the token bucket to accumulate tokens up + * to a `units + burst` threshold. The weight of each chunk is determined by + * the effectful `costFn` function. + * + * If using the "enforce" strategy, chunks that do not meet the bandwidth + * constraints are dropped. If using the "shape" strategy, chunks are delayed + * until they can be emitted without exceeding the bandwidth constraints. + * + * Defaults to the "shape" strategy. + * + * @since 2.0.0 + * @category utils + */ +const throttleEffect = exports.throttleEffect = internal.throttleEffect; +/** + * A stream that emits void values spaced by the specified duration. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * let last = Date.now() + * const log = (message: string) => + * Effect.sync(() => { + * const end = Date.now() + * console.log(`${message} after ${end - last}ms`) + * last = end + * }) + * + * const stream = Stream.tick("1 seconds").pipe(Stream.tap(() => log("tick"))) + * + * Effect.runPromise(Stream.runCollect(stream.pipe(Stream.take(5)))).then(console.log) + * // tick after 4ms + * // tick after 1003ms + * // tick after 1001ms + * // tick after 1002ms + * // tick after 1002ms + * // { _id: 'Chunk', values: [ undefined, undefined, undefined, undefined, undefined ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const tick = exports.tick = internal.tick; +/** + * Ends the stream if it does not produce a value after the specified duration. + * + * @since 2.0.0 + * @category utils + */ +const timeout = exports.timeout = internal.timeout; +/** + * Fails the stream with given error if it does not produce a value after d + * duration. + * + * @since 2.0.0 + * @category utils + */ +const timeoutFail = exports.timeoutFail = internal.timeoutFail; +/** + * Fails the stream with given cause if it does not produce a value after d + * duration. + * + * @since 2.0.0 + * @category utils + */ +const timeoutFailCause = exports.timeoutFailCause = internal.timeoutFailCause; +/** + * Switches the stream if it does not produce a value after the specified + * duration. + * + * @since 2.0.0 + * @category utils + */ +const timeoutTo = exports.timeoutTo = internal.timeoutTo; +/** + * Converts the stream to a scoped `PubSub` of chunks. After the scope is closed, + * the `PubSub` will never again produce values and should be discarded. + * + * @since 2.0.0 + * @category destructors + */ +const toPubSub = exports.toPubSub = internal.toPubSub; +/** + * Returns in a scope an Effect that can be used to repeatedly pull chunks + * from the stream. The pull effect fails with None when the stream is + * finished, or with Some error if it fails, otherwise it returns a chunk of + * the stream's output. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * // Simulate a chunked stream + * const stream = Stream.fromIterable([1, 2, 3, 4, 5]).pipe(Stream.rechunk(2)) + * + * const program = Effect.gen(function*() { + * // Create an effect to get data chunks from the stream + * const getChunk = yield* Stream.toPull(stream) + * + * // Continuously fetch and process chunks + * while (true) { + * const chunk = yield* getChunk + * console.log(chunk) + * } + * }) + * + * Effect.runPromise(Effect.scoped(program)).then(console.log, console.error) + * // { _id: 'Chunk', values: [ 1, 2 ] } + * // { _id: 'Chunk', values: [ 3, 4 ] } + * // { _id: 'Chunk', values: [ 5 ] } + * // (FiberFailure) Error: { + * // "_id": "Option", + * // "_tag": "None" + * // } + * ``` + * + * @since 2.0.0 + * @category destructors + */ +const toPull = exports.toPull = internal.toPull; +/** + * Converts the stream to a scoped queue of chunks. After the scope is closed, + * the queue will never again produce values and should be discarded. + * + * Defaults to the "suspend" back pressure strategy with a capacity of 2. + * + * @since 2.0.0 + * @category destructors + */ +const toQueue = exports.toQueue = internal.toQueue; +/** + * Converts the stream to a scoped queue of elements. After the scope is + * closed, the queue will never again produce values and should be discarded. + * + * Defaults to a capacity of 2. + * + * @since 2.0.0 + * @category destructors + */ +const toQueueOfElements = exports.toQueueOfElements = internal.toQueueOfElements; +/** + * Converts the stream to a `ReadableStream`. + * + * See https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream. + * + * @since 2.0.0 + * @category destructors + */ +const toReadableStream = exports.toReadableStream = internal.toReadableStream; +/** + * Converts the stream to a `Effect`. + * + * See https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream. + * + * @since 2.0.0 + * @category destructors + */ +const toReadableStreamEffect = exports.toReadableStreamEffect = internal.toReadableStreamEffect; +/** + * Converts the stream to a `ReadableStream` using the provided runtime. + * + * See https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream. + * + * @since 2.0.0 + * @category destructors + */ +const toReadableStreamRuntime = exports.toReadableStreamRuntime = internal.toReadableStreamRuntime; +/** + * Converts the stream to a `AsyncIterable` using the provided runtime. + * + * @since 3.15.0 + * @category destructors + */ +const toAsyncIterableRuntime = exports.toAsyncIterableRuntime = internal.toAsyncIterableRuntime; +/** + * Converts the stream to a `AsyncIterable` capturing the required dependencies. + * + * @since 3.15.0 + * @category destructors + */ +const toAsyncIterableEffect = exports.toAsyncIterableEffect = internal.toAsyncIterableEffect; +/** + * Converts the stream to a `AsyncIterable`. + * + * @since 3.15.0 + * @category destructors + */ +const toAsyncIterable = exports.toAsyncIterable = internal.toAsyncIterable; +/** + * Applies the transducer to the stream and emits its outputs. + * + * @since 2.0.0 + * @category utils + */ +const transduce = exports.transduce = internal.transduce; +/** + * Creates a stream by peeling off the "layers" of a value of type `S`. + * + * @example + * ```ts + * import { Effect, Option, Stream } from "effect" + * + * const stream = Stream.unfold(1, (n) => Option.some([n, n + 1])) + * + * Effect.runPromise(Stream.runCollect(stream.pipe(Stream.take(5)))).then(console.log) + * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const unfold = exports.unfold = internal.unfold; +/** + * Creates a stream by peeling off the "layers" of a value of type `S`. + * + * @since 2.0.0 + * @category constructors + */ +const unfoldChunk = exports.unfoldChunk = internal.unfoldChunk; +/** + * Creates a stream by effectfully peeling off the "layers" of a value of type + * `S`. + * + * @since 2.0.0 + * @category constructors + */ +const unfoldChunkEffect = exports.unfoldChunkEffect = internal.unfoldChunkEffect; +/** + * Creates a stream by effectfully peeling off the "layers" of a value of type + * `S`. + * + * @example + * ```ts + * import { Effect, Option, Random, Stream } from "effect" + * + * const stream = Stream.unfoldEffect(1, (n) => + * Random.nextBoolean.pipe( + * Effect.map((b) => (b ? Option.some([n, -n]) : Option.some([n, n]))) + * )) + * + * Effect.runPromise(Stream.runCollect(stream.pipe(Stream.take(5)))).then(console.log) + * // { _id: 'Chunk', values: [ 1, -1, -1, -1, -1 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +const unfoldEffect = exports.unfoldEffect = internal.unfoldEffect; +const void_ = exports.void = internal.void; +/** + * Creates a stream produced from an `Effect`. + * + * @since 2.0.0 + * @category constructors + */ +const unwrap = exports.unwrap = internal.unwrap; +/** + * Creates a stream produced from a scoped `Effect`. + * + * @since 2.0.0 + * @category constructors + */ +const unwrapScoped = exports.unwrapScoped = internal.unwrapScoped; +/** + * Creates a stream produced from a function which receives a `Scope` and + * returns an `Effect`. The resulting stream will emit a single element, which + * will be the result of the returned effect, if successful. + * + * @since 3.11.0 + * @category constructors + */ +const unwrapScopedWith = exports.unwrapScopedWith = internal.unwrapScopedWith; +/** + * Updates the specified service within the context of the `Stream`. + * + * @since 2.0.0 + * @category context + */ +const updateService = exports.updateService = internal.updateService; +/** + * Returns the specified stream if the given condition is satisfied, otherwise + * returns an empty stream. + * + * @since 2.0.0 + * @category utils + */ +const when = exports.when = internal.when; +/** + * Returns the resulting stream when the given `PartialFunction` is defined + * for the given value, otherwise returns an empty stream. + * + * @since 2.0.0 + * @category constructors + */ +const whenCase = exports.whenCase = internal.whenCase; +/** + * Returns the stream when the given partial function is defined for the given + * effectful value, otherwise returns an empty stream. + * + * @since 2.0.0 + * @category utils + */ +const whenCaseEffect = exports.whenCaseEffect = internal.whenCaseEffect; +/** + * Returns the stream if the given effectful condition is satisfied, otherwise + * returns an empty stream. + * + * @since 2.0.0 + * @category utils + */ +const whenEffect = exports.whenEffect = internal.whenEffect; +/** + * Wraps the stream with a new span for tracing. + * + * @since 2.0.0 + * @category tracing + */ +const withSpan = exports.withSpan = internal.withSpan; +/** + * Zips this stream with another point-wise and emits tuples of elements from + * both streams. + * + * The new stream will end when one of the sides ends. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * // We create two streams and zip them together. + * const stream = Stream.zip( + * Stream.make(1, 2, 3, 4, 5, 6), + * Stream.make("a", "b", "c") + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ [ 1, 'a' ], [ 2, 'b' ], [ 3, 'c' ] ] } + * ``` + * + * @since 2.0.0 + * @category zipping + */ +const zip = exports.zip = internal.zip; +/** + * Zips this stream with another point-wise and emits tuples of elements from + * both streams. + * + * The new stream will end when one of the sides ends. + * + * @since 2.0.0 + * @category zipping + */ +const zipFlatten = exports.zipFlatten = internal.zipFlatten; +/** + * Zips this stream with another point-wise, creating a new stream of pairs of + * elements from both sides. + * + * The defaults `defaultLeft` and `defaultRight` will be used if the streams + * have different lengths and one of the streams has ended before the other. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.zipAll(Stream.make(1, 2, 3, 4, 5, 6), { + * other: Stream.make("a", "b", "c"), + * defaultSelf: 0, + * defaultOther: "x" + * }) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: "Chunk", values: [ [ 1, "a" ], [ 2, "b" ], [ 3, "c" ], [ 4, "x" ], [ 5, "x" ], [ 6, "x" ] ] } + * ``` + * + * @since 2.0.0 + * @category zipping + */ +const zipAll = exports.zipAll = internal.zipAll; +/** + * Zips this stream with another point-wise, and keeps only elements from this + * stream. + * + * The provided default value will be used if the other stream ends before + * this one. + * + * @since 2.0.0 + * @category zipping + */ +const zipAllLeft = exports.zipAllLeft = internal.zipAllLeft; +/** + * Zips this stream with another point-wise, and keeps only elements from the + * other stream. + * + * The provided default value will be used if this stream ends before the + * other one. + * + * @since 2.0.0 + * @category zipping + */ +const zipAllRight = exports.zipAllRight = internal.zipAllRight; +/** + * Zips this stream that is sorted by distinct keys and the specified stream + * that is sorted by distinct keys to produce a new stream that is sorted by + * distinct keys. Combines values associated with each key into a tuple, + * using the specified values `defaultLeft` and `defaultRight` to fill in + * missing values. + * + * This allows zipping potentially unbounded streams of data by key in + * constant space but the caller is responsible for ensuring that the + * streams are sorted by distinct keys. + * + * @since 2.0.0 + * @category zipping + */ +const zipAllSortedByKey = exports.zipAllSortedByKey = internal.zipAllSortedByKey; +/** + * Zips this stream that is sorted by distinct keys and the specified stream + * that is sorted by distinct keys to produce a new stream that is sorted by + * distinct keys. Keeps only values from this stream, using the specified + * value `default` to fill in missing values. + * + * This allows zipping potentially unbounded streams of data by key in + * constant space but the caller is responsible for ensuring that the + * streams are sorted by distinct keys. + * + * @since 2.0.0 + * @category zipping + */ +const zipAllSortedByKeyLeft = exports.zipAllSortedByKeyLeft = internal.zipAllSortedByKeyLeft; +/** + * Zips this stream that is sorted by distinct keys and the specified stream + * that is sorted by distinct keys to produce a new stream that is sorted by + * distinct keys. Keeps only values from that stream, using the specified + * value `default` to fill in missing values. + * + * This allows zipping potentially unbounded streams of data by key in + * constant space but the caller is responsible for ensuring that the + * streams are sorted by distinct keys. + * + * @since 2.0.0 + * @category zipping + */ +const zipAllSortedByKeyRight = exports.zipAllSortedByKeyRight = internal.zipAllSortedByKeyRight; +/** + * Zips this stream that is sorted by distinct keys and the specified stream + * that is sorted by distinct keys to produce a new stream that is sorted by + * distinct keys. Uses the functions `left`, `right`, and `both` to handle + * the cases where a key and value exist in this stream, that stream, or + * both streams. + * + * This allows zipping potentially unbounded streams of data by key in + * constant space but the caller is responsible for ensuring that the + * streams are sorted by distinct keys. + * + * @since 2.0.0 + * @category zipping + */ +const zipAllSortedByKeyWith = exports.zipAllSortedByKeyWith = internal.zipAllSortedByKeyWith; +/** + * Zips this stream with another point-wise. The provided functions will be + * used to create elements for the composed stream. + * + * The functions `left` and `right` will be used if the streams have different + * lengths and one of the streams has ended before the other. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.zipAllWith(Stream.make(1, 2, 3, 4, 5, 6), { + * other: Stream.make("a", "b", "c"), + * onSelf: (n) => [n, "x"], + * onOther: (s) => [0, s], + * onBoth: (n, s) => [n - s.length, s] + * }) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: "Chunk", values: [ [ 0, "a" ], [ 1, "b" ], [ 2, "c" ], [ 4, "x" ], [ 5, "x" ], [ 6, "x" ] ] } + * ``` + * + * @since 2.0.0 + * @category zipping + */ +const zipAllWith = exports.zipAllWith = internal.zipAllWith; +/** + * Zips the two streams so that when a value is emitted by either of the two + * streams, it is combined with the latest value from the other stream to + * produce a result. + * + * Note: tracking the latest value is done on a per-chunk basis. That means + * that emitted elements that are not the last value in chunks will never be + * used for zipping. + * + * @example + * ```ts + * import { Effect, Schedule, Stream } from "effect" + * + * const s1 = Stream.make(1, 2, 3).pipe( + * Stream.schedule(Schedule.spaced("1 second")) + * ) + * + * const s2 = Stream.make("a", "b", "c", "d").pipe( + * Stream.schedule(Schedule.spaced("500 millis")) + * ) + * + * const stream = Stream.zipLatest(s1, s2) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: "Chunk", values: [ [ 1, "a" ], [ 1, "b" ], [ 2, "b" ], [ 2, "c" ], [ 2, "d" ], [ 3, "d" ] ] } + * ``` + * + * @since 2.0.0 + * @category zipping + */ +const zipLatest = exports.zipLatest = internal.zipLatest; +/** + * Zips multiple streams so that when a value is emitted by any of the streams, + * it is combined with the latest values from the other streams to produce a result. + * + * Note: tracking the latest value is done on a per-chunk basis. That means + * that emitted elements that are not the last value in chunks will never be + * used for zipping. + * + * @example + * ```ts + * import { Stream, Schedule, Console, Effect } from "effect" + * + * const stream = Stream.zipLatestAll( + * Stream.fromSchedule(Schedule.spaced('1 millis')), + * Stream.fromSchedule(Schedule.spaced('2 millis')), + * Stream.fromSchedule(Schedule.spaced('4 millis')), + * ).pipe(Stream.take(6), Stream.tap(Console.log)) + * + * Effect.runPromise(Stream.runDrain(stream)) + * // Output: + * // [ 0, 0, 0 ] + * // [ 1, 0, 0 ] + * // [ 1, 1, 0 ] + * // [ 2, 1, 0 ] + * // [ 3, 1, 0 ] + * // [ 3, 1, 1 ] + * // ..... + * ``` + * + * @since 3.3.0 + * @category zipping + */ +const zipLatestAll = exports.zipLatestAll = internal.zipLatestAll; +/** + * Zips the two streams so that when a value is emitted by either of the two + * streams, it is combined with the latest value from the other stream to + * produce a result. + * + * Note: tracking the latest value is done on a per-chunk basis. That means + * that emitted elements that are not the last value in chunks will never be + * used for zipping. + * + * @since 2.0.0 + * @category zipping + */ +const zipLatestWith = exports.zipLatestWith = internal.zipLatestWith; +/** + * Zips this stream with another point-wise, but keeps only the outputs of + * `left` stream. + * + * The new stream will end when one of the sides ends. + * + * @since 2.0.0 + * @category zipping + */ +const zipLeft = exports.zipLeft = internal.zipLeft; +/** + * Zips this stream with another point-wise, but keeps only the outputs of the + * `right` stream. + * + * The new stream will end when one of the sides ends. + * + * @since 2.0.0 + * @category zipping + */ +const zipRight = exports.zipRight = internal.zipRight; +/** + * Zips this stream with another point-wise and applies the function to the + * paired elements. + * + * The new stream will end when one of the sides ends. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * // We create two streams and zip them with custom logic. + * const stream = Stream.zipWith( + * Stream.make(1, 2, 3, 4, 5, 6), + * Stream.make("a", "b", "c"), + * (n, s) => [n - s.length, s] + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ [ 0, 'a' ], [ 1, 'b' ], [ 2, 'c' ] ] } + * ``` + * + * @since 2.0.0 + * @category zipping + */ +const zipWith = exports.zipWith = internal.zipWith; +/** + * Zips this stream with another point-wise and applies the function to the + * paired elements. + * + * The new stream will end when one of the sides ends. + * + * @since 2.0.0 + * @category zipping + */ +const zipWithChunks = exports.zipWithChunks = internal.zipWithChunks; +/** + * Zips each element with the next element if present. + * + * @example + * ```ts + * import { Chunk, Effect, Stream } from "effect" + * + * const stream = Stream.zipWithNext(Stream.make(1, 2, 3, 4)) + * + * Effect.runPromise(Stream.runCollect(stream)).then((chunk) => console.log(Chunk.toArray(chunk))) + * // [ + * // [ 1, { _id: 'Option', _tag: 'Some', value: 2 } ], + * // [ 2, { _id: 'Option', _tag: 'Some', value: 3 } ], + * // [ 3, { _id: 'Option', _tag: 'Some', value: 4 } ], + * // [ 4, { _id: 'Option', _tag: 'None' } ] + * // ] + * ``` + * + * @since 2.0.0 + * @category zipping + */ +const zipWithNext = exports.zipWithNext = internal.zipWithNext; +/** + * Zips each element with the previous element. Initially accompanied by + * `None`. + * + * @example + * ```ts + * import { Chunk, Effect, Stream } from "effect" + * + * const stream = Stream.zipWithPrevious(Stream.make(1, 2, 3, 4)) + * + * Effect.runPromise(Stream.runCollect(stream)).then((chunk) => console.log(Chunk.toArray(chunk))) + * // [ + * // [ { _id: 'Option', _tag: 'None' }, 1 ], + * // [ { _id: 'Option', _tag: 'Some', value: 1 }, 2 ], + * // [ { _id: 'Option', _tag: 'Some', value: 2 }, 3 ], + * // [ { _id: 'Option', _tag: 'Some', value: 3 }, 4 ] + * // ] + * ``` + * + * @since 2.0.0 + * @category zipping + */ +const zipWithPrevious = exports.zipWithPrevious = internal.zipWithPrevious; +/** + * Zips each element with both the previous and next element. + * + * @example + * ```ts + * import { Chunk, Effect, Stream } from "effect" + * + * const stream = Stream.zipWithPreviousAndNext(Stream.make(1, 2, 3, 4)) + * + * Effect.runPromise(Stream.runCollect(stream)).then((chunk) => console.log(Chunk.toArray(chunk))) + * // [ + * // [ + * // { _id: 'Option', _tag: 'None' }, + * // 1, + * // { _id: 'Option', _tag: 'Some', value: 2 } + * // ], + * // [ + * // { _id: 'Option', _tag: 'Some', value: 1 }, + * // 2, + * // { _id: 'Option', _tag: 'Some', value: 3 } + * // ], + * // [ + * // { _id: 'Option', _tag: 'Some', value: 2 }, + * // 3, + * // { _id: 'Option', _tag: 'Some', value: 4 } + * // ], + * // [ + * // { _id: 'Option', _tag: 'Some', value: 3 }, + * // 4, + * // { _id: 'Option', _tag: 'None' } + * // ] + * // ] + * ``` + * + * @since 2.0.0 + * @category zipping + */ +const zipWithPreviousAndNext = exports.zipWithPreviousAndNext = internal.zipWithPreviousAndNext; +/** + * Zips this stream together with the index of elements. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.make("Mary", "James", "Robert", "Patricia") + * + * const indexedStream = Stream.zipWithIndex(stream) + * + * Effect.runPromise(Stream.runCollect(indexedStream)).then(console.log) + * // { + * // _id: 'Chunk', + * // values: [ [ 'Mary', 0 ], [ 'James', 1 ], [ 'Robert', 2 ], [ 'Patricia', 3 ] ] + * // } + * ``` + * + * @since 2.0.0 + * @category zipping + */ +const zipWithIndex = exports.zipWithIndex = internal.zipWithIndex; +// ------------------------------------------------------------------------------------- +// do notation +// ------------------------------------------------------------------------------------- +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Stream` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Chunk, Effect, pipe, Stream } from "effect" + * + * const result = pipe( + * Stream.Do, + * Stream.bind("x", () => Stream.succeed(2)), + * Stream.bind("y", () => Stream.succeed(3)), + * Stream.let("sum", ({ x, y }) => x + y) + * ) + * assert.deepStrictEqual(Effect.runSync(Stream.runCollect(result)), Chunk.of({ x: 2, y: 3, sum: 5 })) + * ``` + * + * @see {@link bindTo} + * @see {@link bind} + * @see {@link bindEffect} + * @see {@link let_ let} + * + * @category do notation + * @since 2.0.0 + */ +const Do = exports.Do = internal.Do; +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Stream` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Chunk, Effect, pipe, Stream } from "effect" + * + * const result = pipe( + * Stream.Do, + * Stream.bind("x", () => Stream.succeed(2)), + * Stream.bind("y", () => Stream.succeed(3)), + * Stream.let("sum", ({ x, y }) => x + y) + * ) + * assert.deepStrictEqual(Effect.runSync(Stream.runCollect(result)), Chunk.of({ x: 2, y: 3, sum: 5 })) + * ``` + * + * @see {@link Do} + * @see {@link bindTo} + * @see {@link bindEffect} + * @see {@link let_ let} + * + * @category do notation + * @since 2.0.0 + */ +const bind = exports.bind = internal.bind; +/** + * Binds an effectful value in a `do` scope + * + * @see {@link Do} + * @see {@link bindTo} + * @see {@link bind} + * @see {@link let_ let} + * + * @since 2.0.0 + * @category do notation + */ +const bindEffect = exports.bindEffect = groupBy_.bindEffect; +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Stream` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Chunk, Effect, pipe, Stream } from "effect" + * + * const result = pipe( + * Stream.Do, + * Stream.bind("x", () => Stream.succeed(2)), + * Stream.bind("y", () => Stream.succeed(3)), + * Stream.let("sum", ({ x, y }) => x + y) + * ) + * assert.deepStrictEqual(Effect.runSync(Stream.runCollect(result)), Chunk.of({ x: 2, y: 3, sum: 5 })) + * ``` + * + * @see {@link Do} + * @see {@link bind} + * @see {@link bindEffect} + * @see {@link let_ let} + * + * @category do notation + * @since 2.0.0 + */ +const bindTo = exports.bindTo = internal.bindTo; +const let_ = exports.let = internal.let_; +// ------------------------------------------------------------------------------------- +// encoding +// ------------------------------------------------------------------------------------- +/** + * Decode Uint8Array chunks into a stream of strings using the specified encoding. + * + * @since 2.0.0 + * @category encoding + */ +const decodeText = exports.decodeText = internal.decodeText; +/** + * Encode a stream of strings into a stream of Uint8Array chunks using the specified encoding. + * + * @since 2.0.0 + * @category encoding + */ +const encodeText = exports.encodeText = internal.encodeText; +/** + * Creates a `Stream` using addEventListener. + * @since 3.1.0 + */ +const fromEventListener = exports.fromEventListener = internal.fromEventListener; +//# sourceMappingURL=Stream.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Stream.js.map b/backend/node_modules/effect/dist/cjs/Stream.js.map new file mode 100644 index 0000000000000000000000000000000000000000..3bd596ac9ec8b5f00fd6e461f3c8c9ad07c5afb4 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Stream.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Stream.js","names":["groupBy_","_interopRequireWildcard","require","internal","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","StreamTypeId","exports","DefaultChunkSize","accumulate","accumulateChunks","acquireRelease","aggregate","aggregateWithin","aggregateWithinEither","as","_async","async","asyncEffect","asyncPush","asyncScoped","branchAfter","broadcast","share","broadcastDynamic","broadcastedQueues","broadcastedQueuesDynamic","buffer","bufferChunks","catchAll","catchAllCause","catchSome","catchTag","catchTags","catchSomeCause","changes","changesWith","changesWithEffect","chunks","chunksWith","combine","combineChunks","concat","concatAll","cross","crossLeft","crossRight","crossWith","debounce","die","dieSync","dieMessage","distributedWith","distributedWithDynamic","drain","drainFork","drop","dropRight","dropUntil","dropUntilEffect","dropWhile","dropWhileEffect","either","empty","ensuring","ensuringWith","context","contextWith","contextWithEffect","contextWithStream","execute","fail","failSync","failCause","failCauseSync","filter","filterEffect","filterMap","filterMapEffect","filterMapWhile","filterMapWhileEffect","finalizer","find","findEffect","flatMap","flatten","flattenChunks","flattenEffect","flattenExitOption","flattenIterables","flattenTake","forever","fromAsyncIterable","fromChannel","toChannel","fromChunk","fromChunkPubSub","fromChunkQueue","fromChunks","fromEffect","fromEffectOption","fromPubSub","fromTPubSub","fromIterable","fromIterableEffect","fromIteratorSucceed","fromPull","fromQueue","fromTQueue","fromReadableStream","fromReadableStreamByob","fromSchedule","groupAdjacentBy","groupBy","groupByKey","grouped","groupedWithin","haltAfter","haltWhen","haltWhenDeferred","identity","identityStream","interleave","interleaveWith","intersperse","intersperseAffixes","interruptAfter","interruptWhen","interruptWhenDeferred","iterate","make","map","mapAccum","mapAccumEffect","mapBoth","mapChunks","mapChunksEffect","mapConcat","mapConcatChunk","mapConcatChunkEffect","mapConcatEffect","mapEffect","mapEffectOptions","mapError","mapErrorCause","merge","mergeAll","mergeWithTag","mergeWith","mergeEither","mergeLeft","mergeRight","mkString","never","onEnd","onError","onDone","onStart","orDie","orDieWith","orElse","orElseEither","orElseFail","orElseIfEmpty","orElseIfEmptyChunk","orElseIfEmptyStream","orElseSucceed","paginate","paginateChunk","paginateChunkEffect","paginateEffect","partition","partitionEither","peel","pipeThrough","pipeThroughChannel","pipeThroughChannelOrFail","prepend","provideContext","provideSomeContext","provideLayer","provideService","provideServiceEffect","provideServiceStream","mapInputContext","provideSomeLayer","race","raceAll","range","rechunk","refineOrDie","refineOrDieWith","repeat","repeatEffect","repeatEffectChunk","repeatEffectChunkOption","repeatEffectOption","repeatEffectWithSchedule","repeatEither","repeatElements","repeatElementsWith","repeatValue","repeatWith","retry","withExecutionPlan","run","runCollect","runCount","runDrain","runFold","runFoldEffect","runFoldScoped","runFoldScopedEffect","runFoldWhile","runFoldWhileEffect","runFoldWhileScoped","runFoldWhileScopedEffect","runForEach","runForEachChunk","runForEachChunkScoped","runForEachScoped","runForEachWhile","runForEachWhileScoped","runHead","runIntoPubSub","runIntoPubSubScoped","runIntoQueue","runIntoQueueElementsScoped","runIntoQueueScoped","runLast","runScoped","runSum","scan","scanEffect","scanReduce","scanReduceEffect","schedule","scheduleWith","scoped","scopedWith","sliding","slidingSize","some","someOrElse","someOrFail","split","splitOnChunk","splitLines","succeed","sync","suspend","take","takeRight","takeUntil","takeUntilEffect","takeWhile","tap","tapBoth","tapError","tapErrorCause","tapSink","throttle","throttleEffect","tick","timeout","timeoutFail","timeoutFailCause","timeoutTo","toPubSub","toPull","toQueue","toQueueOfElements","toReadableStream","toReadableStreamEffect","toReadableStreamRuntime","toAsyncIterableRuntime","toAsyncIterableEffect","toAsyncIterable","transduce","unfold","unfoldChunk","unfoldChunkEffect","unfoldEffect","void_","void","unwrap","unwrapScoped","unwrapScopedWith","updateService","when","whenCase","whenCaseEffect","whenEffect","withSpan","zip","zipFlatten","zipAll","zipAllLeft","zipAllRight","zipAllSortedByKey","zipAllSortedByKeyLeft","zipAllSortedByKeyRight","zipAllSortedByKeyWith","zipAllWith","zipLatest","zipLatestAll","zipLatestWith","zipLeft","zipRight","zipWith","zipWithChunks","zipWithNext","zipWithPrevious","zipWithPreviousAndNext","zipWithIndex","Do","bind","bindEffect","bindTo","let_","let","decodeText","encodeText","fromEventListener"],"sources":["../../src/Stream.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;AAgBA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,uBAAA,CAAAC,OAAA;AAAgD,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EA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AQ,CAACsU,eAAe;AAE1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCO,MAAMC,sBAAsB,GAAAlT,OAAA,CAAAkT,sBAAA,GAE0BvU,QAAQ,CAACuU,sBAAsB;AAE5F;;;;;;;;;;;;;;;;;;;;;AAqBO,MAAMC,YAAY,GAAAnT,OAAA,CAAAmT,YAAA,GAAkExU,QAAQ,CAACwU,YAAY;AAEhH;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCO,MAAMC,EAAE,GAAApT,OAAA,CAAAoT,EAAA,GAAezU,QAAQ,CAACyU,EAAE;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCO,MAAMC,IAAI,GAAArT,OAAA,CAAAqT,IAAA,GAgFb1U,QAAQ,CAAC0U,IAAI;AAEjB;;;;;;;;;;;AAWO,MAAMC,UAAU,GAAAtT,OAAA,CAAAsT,UAAA,GAkCnB9U,QAAQ,CAAC8U,UAAU;AAEvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCO,MAAMC,MAAM,GAAAvT,OAAA,CAAAuT,MAAA,GAmEf5U,QAAQ,CAAC4U,MAAM;AAEnB,MAAMC,IAAI,GAAAxT,OAAA,CAAAyT,GAAA,GAUN9U,QAAQ,CAAC6U,IAAI;AAsCjB;AACA;AACA;AAEA;;;;;;AAMO,MAAME,UAAU,GAAA1T,OAAA,CAAA0T,UAAA,GAuBnB/U,QAAQ,CAAC+U,UAAU;AAEvB;;;;;;AAMO,MAAMC,UAAU,GAAA3T,OAAA,CAAA2T,UAAA,GAAmEhV,QAAQ,CAACgV,UAAU;AA0B7G;;;;AAIO,MAAMC,iBAAiB,GAAA5T,OAAA,CAAA4T,iBAAA,GASbjV,QAAQ,CAACiV,iBAAiB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/StreamEmit.js b/backend/node_modules/effect/dist/cjs/StreamEmit.js new file mode 100644 index 0000000000000000000000000000000000000000..a485e5b7713658a1388fffbf2b67e9d880211034 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/StreamEmit.js @@ -0,0 +1,6 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +//# sourceMappingURL=StreamEmit.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/StreamEmit.js.map b/backend/node_modules/effect/dist/cjs/StreamEmit.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b97b0173f272ea739a2fca2e4da622c78a15e90e --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/StreamEmit.js.map @@ -0,0 +1 @@ +{"version":3,"file":"StreamEmit.js","names":[],"sources":["../../src/StreamEmit.ts"],"sourcesContent":[null],"mappings":"","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/StreamHaltStrategy.js b/backend/node_modules/effect/dist/cjs/StreamHaltStrategy.js new file mode 100644 index 0000000000000000000000000000000000000000..a17e573426f2d3e6f7318d64355ae8232243c575 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/StreamHaltStrategy.js @@ -0,0 +1,65 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.match = exports.isRight = exports.isLeft = exports.isEither = exports.isBoth = exports.fromInput = exports.Right = exports.Left = exports.Either = exports.Both = void 0; +var internal = _interopRequireWildcard(require("./internal/stream/haltStrategy.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * @since 2.0.0 + * @category constructors + */ +const Left = exports.Left = internal.Left; +/** + * @since 2.0.0 + * @category constructors + */ +const Right = exports.Right = internal.Right; +/** + * @since 2.0.0 + * @category constructors + */ +const Both = exports.Both = internal.Both; +/** + * @since 2.0.0 + * @category constructors + */ +const Either = exports.Either = internal.Either; +/** + * @since 2.0.0 + * @category constructors + */ +const fromInput = exports.fromInput = internal.fromInput; +/** + * @since 2.0.0 + * @category refinements + */ +const isLeft = exports.isLeft = internal.isLeft; +/** + * @since 2.0.0 + * @category refinements + */ +const isRight = exports.isRight = internal.isRight; +/** + * @since 2.0.0 + * @category refinements + */ +const isBoth = exports.isBoth = internal.isBoth; +/** + * @since 2.0.0 + * @category refinements + */ +const isEither = exports.isEither = internal.isEither; +/** + * Folds over the specified `HaltStrategy` using the provided case functions. + * + * @since 2.0.0 + * @category folding + */ +const match = exports.match = internal.match; +//# sourceMappingURL=StreamHaltStrategy.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/StreamHaltStrategy.js.map b/backend/node_modules/effect/dist/cjs/StreamHaltStrategy.js.map new file mode 100644 index 0000000000000000000000000000000000000000..2ff8db0cfbefb1eecba7bc73118de113819e9ead --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/StreamHaltStrategy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"StreamHaltStrategy.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Left","exports","Right","Both","Either","fromInput","isLeft","isRight","isBoth","isEither","match"],"sources":["../../src/StreamHaltStrategy.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA6D,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAA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CAAAI,SAAA,GAA+C3B,QAAQ,CAAC2B,SAAS;AAEvF;;;;AAIO,MAAMC,MAAM,GAAAL,OAAA,CAAAK,MAAA,GAAyC5B,QAAQ,CAAC4B,MAAM;AAE3E;;;;AAIO,MAAMC,OAAO,GAAAN,OAAA,CAAAM,OAAA,GAA0C7B,QAAQ,CAAC6B,OAAO;AAE9E;;;;AAIO,MAAMC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAyC9B,QAAQ,CAAC8B,MAAM;AAE3E;;;;AAIO,MAAMC,QAAQ,GAAAR,OAAA,CAAAQ,QAAA,GAA2C/B,QAAQ,CAAC+B,QAAQ;AAEjF;;;;;;AAMO,MAAMC,KAAK,GAAAT,OAAA,CAAAS,KAAA,GA8BdhC,QAAQ,CAACgC,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Streamable.js b/backend/node_modules/effect/dist/cjs/Streamable.js new file mode 100644 index 0000000000000000000000000000000000000000..418b6b3a54648a442053459ded02a4ffddb34001 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Streamable.js @@ -0,0 +1,45 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Class = void 0; +var _Pipeable = require("./Pipeable.js"); +var Stream = _interopRequireWildcard(require("./Stream.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +const streamVariance = { + /* c8 ignore next */ + _R: _ => _, + /* c8 ignore next */ + _E: _ => _, + /* c8 ignore next */ + _A: _ => _ +}; +/** + * @since 2.0.0 + * @category constructors + */ +class Class { + /** + * @since 2.0.0 + */ + [Stream.StreamTypeId] = streamVariance; + /** + * @since 2.0.0 + */ + pipe() { + return (0, _Pipeable.pipeArguments)(this, arguments); + } + /** + * @internal + */ + get channel() { + return Stream.toChannel(this.toStream()); + } +} +exports.Class = Class; +//# sourceMappingURL=Streamable.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Streamable.js.map b/backend/node_modules/effect/dist/cjs/Streamable.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a68fe3371d2de979c37b6620b86ccba73abf84b6 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Streamable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Streamable.js","names":["_Pipeable","require","Stream","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","streamVariance","_R","_","_E","_A","Class","StreamTypeId","pipe","pipeArguments","arguments","channel","toChannel","toStream"],"sources":["../../src/Streamable.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAAqC,SAAAE,wBAAAC,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAH,uBAAA,YAAAA,CAAAC,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AALrC;;;;AAOA,MAAMkB,cAAc,GAAG;EACrB;EACAC,EAAE,EAAGC,CAAQ,IAAKA,CAAC;EACnB;EACAC,EAAE,EAAGD,CAAQ,IAAKA,CAAC;EACnB;EACAE,EAAE,EAAGF,CAAQ,IAAKA;CACnB;AAED;;;;AAIM,MAAgBG,KAAK;EACzB;;;EAGS,CAAC1B,MAAM,CAAC2B,YAAY,IAAIN,cAAc;EAE/C;;;EAGAO,IAAIA,CAAA;IACF,OAAO,IAAAC,uBAAa,EAAC,IAAI,EAAEC,SAAS,CAAC;EACvC;EAOA;;;EAGA,IAAIC,OAAOA,CAAA;IACT,OAAO/B,MAAM,CAACgC,SAAS,CAAC,IAAI,CAACC,QAAQ,EAAE,CAAC;EAC1C","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/String.js b/backend/node_modules/effect/dist/cjs/String.js new file mode 100644 index 0000000000000000000000000000000000000000..ae25899af6510a73ca85db5c998d1411300172a0 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/String.js @@ -0,0 +1,680 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.uncapitalize = exports.trimStart = exports.trimEnd = exports.trim = exports.toUpperCase = exports.toLowerCase = exports.toLocaleUpperCase = exports.toLocaleLowerCase = exports.takeRight = exports.takeLeft = exports.substring = exports.stripMarginWith = exports.stripMargin = exports.startsWith = exports.split = exports.snakeToPascal = exports.snakeToKebab = exports.snakeToCamel = exports.slice = exports.search = exports.replaceAll = exports.replace = exports.repeat = exports.pascalToSnake = exports.padStart = exports.padEnd = exports.normalize = exports.matchAll = exports.match = exports.localeCompare = exports.linesWithSeparators = exports.linesIterator = exports.length = exports.lastIndexOf = exports.kebabToSnake = exports.isString = exports.isNonEmpty = exports.isEmpty = exports.indexOf = exports.includes = exports.endsWith = exports.empty = exports.concat = exports.codePointAt = exports.charCodeAt = exports.charAt = exports.capitalize = exports.camelToSnake = exports.at = exports.Order = exports.Equivalence = void 0; +var equivalence = _interopRequireWildcard(require("./Equivalence.js")); +var _Function = require("./Function.js"); +var readonlyArray = _interopRequireWildcard(require("./internal/array.js")); +var number = _interopRequireWildcard(require("./Number.js")); +var Option = _interopRequireWildcard(require("./Option.js")); +var order = _interopRequireWildcard(require("./Order.js")); +var predicate = _interopRequireWildcard(require("./Predicate.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * This module provides utility functions and type class instances for working with the `string` type in TypeScript. + * It includes functions for basic string manipulation, as well as type class instances for + * `Equivalence` and `Order`. + * + * @since 2.0.0 + */ + +/** + * Tests if a value is a `string`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { String } from "effect" + * + * assert.deepStrictEqual(String.isString("a"), true) + * assert.deepStrictEqual(String.isString(1), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +const isString = exports.isString = predicate.isString; +/** + * @category instances + * @since 2.0.0 + */ +const Equivalence = exports.Equivalence = equivalence.string; +/** + * @category instances + * @since 2.0.0 + */ +const Order = exports.Order = order.string; +/** + * The empty string `""`. + * + * @since 2.0.0 + */ +const empty = exports.empty = ""; +/** + * Concatenates two strings at runtime. + * + * @since 2.0.0 + */ +const concat = exports.concat = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => self + that); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * assert.deepStrictEqual(pipe('a', String.toUpperCase), 'A') + * ``` + * + * @since 2.0.0 + */ +const toUpperCase = self => self.toUpperCase(); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * assert.deepStrictEqual(pipe('A', String.toLowerCase), 'a') + * ``` + * + * @since 2.0.0 + */ +exports.toUpperCase = toUpperCase; +const toLowerCase = self => self.toLowerCase(); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * assert.deepStrictEqual(pipe('abc', String.capitalize), 'Abc') + * ``` + * + * @since 2.0.0 + */ +exports.toLowerCase = toLowerCase; +const capitalize = self => { + if (self.length === 0) return self; + return toUpperCase(self[0]) + self.slice(1); +}; +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * assert.deepStrictEqual(pipe('ABC', String.uncapitalize), 'aBC') + * ``` + * + * @since 2.0.0 + */ +exports.capitalize = capitalize; +const uncapitalize = self => { + if (self.length === 0) return self; + return toLowerCase(self[0]) + self.slice(1); +}; +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * assert.deepStrictEqual(pipe('abc', String.replace('b', 'd')), 'adc') + * ``` + * + * @since 2.0.0 + */ +exports.uncapitalize = uncapitalize; +const replace = (searchValue, replaceValue) => self => self.replace(searchValue, replaceValue); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { String } from "effect" + * + * assert.deepStrictEqual(String.trim(' a '), 'a') + * ``` + * + * @since 2.0.0 + */ +exports.replace = replace; +const trim = self => self.trim(); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { String } from "effect" + * + * assert.deepStrictEqual(String.trimStart(' a '), 'a ') + * ``` + * + * @since 2.0.0 + */ +exports.trim = trim; +const trimStart = self => self.trimStart(); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { String } from "effect" + * + * assert.deepStrictEqual(String.trimEnd(' a '), ' a') + * ``` + * + * @since 2.0.0 + */ +exports.trimStart = trimStart; +const trimEnd = self => self.trimEnd(); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * assert.deepStrictEqual(pipe('abcd', String.slice(1, 3)), 'bc') + * ``` + * + * @since 2.0.0 + */ +exports.trimEnd = trimEnd; +const slice = (start, end) => self => self.slice(start, end); +/** + * Test whether a `string` is empty. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { String } from "effect" + * + * assert.deepStrictEqual(String.isEmpty(''), true) + * assert.deepStrictEqual(String.isEmpty('a'), false) + * ``` + * + * @since 2.0.0 + */ +exports.slice = slice; +const isEmpty = self => self.length === 0; +/** + * Test whether a `string` is non empty. + * + * @since 2.0.0 + */ +exports.isEmpty = isEmpty; +const isNonEmpty = self => self.length > 0; +/** + * Calculate the number of characters in a `string`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { String } from "effect" + * + * assert.deepStrictEqual(String.length('abc'), 3) + * ``` + * + * @since 2.0.0 + */ +exports.isNonEmpty = isNonEmpty; +const length = self => self.length; +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * assert.deepStrictEqual(pipe('abc', String.split('')), ['a', 'b', 'c']) + * assert.deepStrictEqual(pipe('', String.split('')), ['']) + * ``` + * + * @since 2.0.0 + */ +exports.length = length; +const split = exports.split = /*#__PURE__*/(0, _Function.dual)(2, (self, separator) => { + const out = self.split(separator); + return readonlyArray.isNonEmptyArray(out) ? out : [self]; +}); +/** + * Returns `true` if `searchString` appears as a substring of `self`, at one or more positions that are + * greater than or equal to `position`; otherwise, returns `false`. + * + * @since 2.0.0 + */ +const includes = (searchString, position) => self => self.includes(searchString, position); +/** + * @since 2.0.0 + */ +exports.includes = includes; +const startsWith = (searchString, position) => self => self.startsWith(searchString, position); +/** + * @since 2.0.0 + */ +exports.startsWith = startsWith; +const endsWith = (searchString, position) => self => self.endsWith(searchString, position); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String, Option } from "effect" + * + * assert.deepStrictEqual(pipe("abc", String.charCodeAt(1)), Option.some(98)) + * assert.deepStrictEqual(pipe("abc", String.charCodeAt(4)), Option.none()) + * ``` + * + * @since 2.0.0 + */ +exports.endsWith = endsWith; +const charCodeAt = exports.charCodeAt = /*#__PURE__*/(0, _Function.dual)(2, (self, index) => Option.filter(Option.some(self.charCodeAt(index)), charCode => !isNaN(charCode))); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String, Option } from "effect" + * + * assert.deepStrictEqual(pipe("abcd", String.substring(1)), "bcd") + * assert.deepStrictEqual(pipe("abcd", String.substring(1, 3)), "bc") + * ``` + * + * @since 2.0.0 + */ +const substring = (start, end) => self => self.substring(start, end); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String, Option } from "effect" + * + * assert.deepStrictEqual(pipe("abc", String.at(1)), Option.some("b")) + * assert.deepStrictEqual(pipe("abc", String.at(4)), Option.none()) + * ``` + * + * @since 2.0.0 + */ +exports.substring = substring; +const at = exports.at = /*#__PURE__*/(0, _Function.dual)(2, (self, index) => Option.fromNullable(self.at(index))); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String, Option } from "effect" + * + * assert.deepStrictEqual(pipe("abc", String.charAt(1)), Option.some("b")) + * assert.deepStrictEqual(pipe("abc", String.charAt(4)), Option.none()) + * ``` + * + * @since 2.0.0 + */ +const charAt = exports.charAt = /*#__PURE__*/(0, _Function.dual)(2, (self, index) => Option.filter(Option.some(self.charAt(index)), isNonEmpty)); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String, Option } from "effect" + * + * assert.deepStrictEqual(pipe("abc", String.codePointAt(1)), Option.some(98)) + * ``` + * + * @since 2.0.0 + */ +const codePointAt = exports.codePointAt = /*#__PURE__*/(0, _Function.dual)(2, (self, index) => Option.fromNullable(self.codePointAt(index))); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String, Option } from "effect" + * + * assert.deepStrictEqual(pipe("abbbc", String.indexOf("b")), Option.some(1)) + * ``` + * + * @since 2.0.0 + */ +const indexOf = searchString => self => Option.filter(Option.some(self.indexOf(searchString)), number.greaterThanOrEqualTo(0)); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String, Option } from "effect" + * + * assert.deepStrictEqual(pipe("abbbc", String.lastIndexOf("b")), Option.some(3)) + * assert.deepStrictEqual(pipe("abbbc", String.lastIndexOf("d")), Option.none()) + * ``` + * + * @since 2.0.0 + */ +exports.indexOf = indexOf; +const lastIndexOf = searchString => self => Option.filter(Option.some(self.lastIndexOf(searchString)), number.greaterThanOrEqualTo(0)); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * assert.deepStrictEqual(pipe("a", String.localeCompare("b")), -1) + * assert.deepStrictEqual(pipe("b", String.localeCompare("a")), 1) + * assert.deepStrictEqual(pipe("a", String.localeCompare("a")), 0) + * ``` + * + * @since 2.0.0 + */ +exports.lastIndexOf = lastIndexOf; +const localeCompare = (that, locales, options) => self => number.sign(self.localeCompare(that, locales, options)); +/** + * It is the `pipe`-able version of the native `match` method. + * + * @since 2.0.0 + */ +exports.localeCompare = localeCompare; +const match = regexp => self => Option.fromNullable(self.match(regexp)); +/** + * It is the `pipe`-able version of the native `matchAll` method. + * + * @since 2.0.0 + */ +exports.match = match; +const matchAll = regexp => self => self.matchAll(regexp); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * const str = "\u1E9B\u0323"; + * assert.deepStrictEqual(pipe(str, String.normalize()), "\u1E9B\u0323") + * assert.deepStrictEqual(pipe(str, String.normalize("NFC")), "\u1E9B\u0323") + * assert.deepStrictEqual(pipe(str, String.normalize("NFD")), "\u017F\u0323\u0307") + * assert.deepStrictEqual(pipe(str, String.normalize("NFKC")), "\u1E69") + * assert.deepStrictEqual(pipe(str, String.normalize("NFKD")), "\u0073\u0323\u0307") + * ``` + * + * @since 2.0.0 + */ +exports.matchAll = matchAll; +const normalize = form => self => self.normalize(form); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * assert.deepStrictEqual(pipe("a", String.padEnd(5)), "a ") + * assert.deepStrictEqual(pipe("a", String.padEnd(5, "_")), "a____") + * ``` + * + * @since 2.0.0 + */ +exports.normalize = normalize; +const padEnd = (maxLength, fillString) => self => self.padEnd(maxLength, fillString); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * assert.deepStrictEqual(pipe("a", String.padStart(5)), " a") + * assert.deepStrictEqual(pipe("a", String.padStart(5, "_")), "____a") + * ``` + * + * @since 2.0.0 + */ +exports.padEnd = padEnd; +const padStart = (maxLength, fillString) => self => self.padStart(maxLength, fillString); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * assert.deepStrictEqual(pipe("a", String.repeat(5)), "aaaaa") + * ``` + * + * @since 2.0.0 + */ +exports.padStart = padStart; +const repeat = count => self => self.repeat(count); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * assert.deepStrictEqual(pipe("ababb", String.replaceAll("b", "c")), "acacc") + * assert.deepStrictEqual(pipe("ababb", String.replaceAll(/ba/g, "cc")), "accbb") + * ``` + * + * @since 2.0.0 + */ +exports.repeat = repeat; +const replaceAll = (searchValue, replaceValue) => self => self.replaceAll(searchValue, replaceValue); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String, Option } from "effect" + * + * assert.deepStrictEqual(pipe("ababb", String.search("b")), Option.some(1)) + * assert.deepStrictEqual(pipe("ababb", String.search(/abb/)), Option.some(2)) + * assert.deepStrictEqual(pipe("ababb", String.search("d")), Option.none()) + * ``` + * + * @since 2.0.0 + */ +exports.replaceAll = replaceAll; +const search = exports.search = /*#__PURE__*/(0, _Function.dual)(2, (self, regexp) => Option.filter(Option.some(self.search(regexp)), number.greaterThanOrEqualTo(0))); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * const str = "\u0130" + * assert.deepStrictEqual(pipe(str, String.toLocaleLowerCase("tr")), "i") + * ``` + * + * @since 2.0.0 + */ +const toLocaleLowerCase = locale => self => self.toLocaleLowerCase(locale); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * const str = "i\u0307" + * assert.deepStrictEqual(pipe(str, String.toLocaleUpperCase("lt-LT")), "I") + * ``` + * + * @since 2.0.0 + */ +exports.toLocaleLowerCase = toLocaleLowerCase; +const toLocaleUpperCase = locale => self => self.toLocaleUpperCase(locale); +/** + * Keep the specified number of characters from the start of a string. + * + * If `n` is larger than the available number of characters, the string will + * be returned whole. + * + * If `n` is not a positive number, an empty string will be returned. + * + * If `n` is a float, it will be rounded down to the nearest integer. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { String } from "effect" + * + * assert.deepStrictEqual(String.takeLeft("Hello World", 5), "Hello") + * ``` + * + * @since 2.0.0 + */ +exports.toLocaleUpperCase = toLocaleUpperCase; +const takeLeft = exports.takeLeft = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => self.slice(0, Math.max(n, 0))); +/** + * Keep the specified number of characters from the end of a string. + * + * If `n` is larger than the available number of characters, the string will + * be returned whole. + * + * If `n` is not a positive number, an empty string will be returned. + * + * If `n` is a float, it will be rounded down to the nearest integer. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { String } from "effect" + * + * assert.deepStrictEqual(String.takeRight("Hello World", 5), "World") + * ``` + * + * @since 2.0.0 + */ +const takeRight = exports.takeRight = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => self.slice(Math.max(0, self.length - Math.floor(n)), Infinity)); +const CR = 0x0d; +const LF = 0x0a; +/** + * Returns an `IterableIterator` which yields each line contained within the + * string, trimming off the trailing newline character. + * + * @since 2.0.0 + */ +const linesIterator = self => linesSeparated(self, true); +/** + * Returns an `IterableIterator` which yields each line contained within the + * string as well as the trailing newline character. + * + * @since 2.0.0 + */ +exports.linesIterator = linesIterator; +const linesWithSeparators = s => linesSeparated(s, false); +/** + * For every line in this string, strip a leading prefix consisting of blanks + * or control characters followed by the character specified by `marginChar` + * from the line. + * + * @since 2.0.0 + */ +exports.linesWithSeparators = linesWithSeparators; +const stripMarginWith = exports.stripMarginWith = /*#__PURE__*/(0, _Function.dual)(2, (self, marginChar) => { + let out = ""; + for (const line of linesWithSeparators(self)) { + let index = 0; + while (index < line.length && line.charAt(index) <= " ") { + index = index + 1; + } + const stripped = index < line.length && line.charAt(index) === marginChar ? line.substring(index + 1) : line; + out = out + stripped; + } + return out; +}); +/** + * For every line in this string, strip a leading prefix consisting of blanks + * or control characters followed by the `"|"` character from the line. + * + * @since 2.0.0 + */ +const stripMargin = self => stripMarginWith(self, "|"); +/** + * @since 2.0.0 + */ +exports.stripMargin = stripMargin; +const snakeToCamel = self => { + let str = self[0]; + for (let i = 1; i < self.length; i++) { + str += self[i] === "_" ? self[++i].toUpperCase() : self[i]; + } + return str; +}; +/** + * @since 2.0.0 + */ +exports.snakeToCamel = snakeToCamel; +const snakeToPascal = self => { + let str = self[0].toUpperCase(); + for (let i = 1; i < self.length; i++) { + str += self[i] === "_" ? self[++i].toUpperCase() : self[i]; + } + return str; +}; +/** + * @since 2.0.0 + */ +exports.snakeToPascal = snakeToPascal; +const snakeToKebab = self => self.replace(/_/g, "-"); +/** + * @since 2.0.0 + */ +exports.snakeToKebab = snakeToKebab; +const camelToSnake = self => self.replace(/([A-Z])/g, "_$1").toLowerCase(); +/** + * @since 2.0.0 + */ +exports.camelToSnake = camelToSnake; +const pascalToSnake = self => (self.slice(0, 1) + self.slice(1).replace(/([A-Z])/g, "_$1")).toLowerCase(); +/** + * @since 2.0.0 + */ +exports.pascalToSnake = pascalToSnake; +const kebabToSnake = self => self.replace(/-/g, "_"); +exports.kebabToSnake = kebabToSnake; +class LinesIterator { + s; + stripped; + index; + length; + constructor(s, stripped = false) { + this.s = s; + this.stripped = stripped; + this.index = 0; + this.length = s.length; + } + next() { + if (this.done) { + return { + done: true, + value: undefined + }; + } + const start = this.index; + while (!this.done && !isLineBreak(this.s[this.index])) { + this.index = this.index + 1; + } + let end = this.index; + if (!this.done) { + const char = this.s[this.index]; + this.index = this.index + 1; + if (!this.done && isLineBreak2(char, this.s[this.index])) { + this.index = this.index + 1; + } + if (!this.stripped) { + end = this.index; + } + } + return { + done: false, + value: this.s.substring(start, end) + }; + } + [Symbol.iterator]() { + return new LinesIterator(this.s, this.stripped); + } + get done() { + return this.index >= this.length; + } +} +/** + * Test if the provided character is a line break character (i.e. either `"\r"` + * or `"\n"`). + */ +const isLineBreak = char => { + const code = char.charCodeAt(0); + return code === CR || code === LF; +}; +/** + * Test if the provided characters combine to form a carriage return/line-feed + * (i.e. `"\r\n"`). + */ +const isLineBreak2 = (char0, char1) => char0.charCodeAt(0) === CR && char1.charCodeAt(0) === LF; +const linesSeparated = (self, stripped) => new LinesIterator(self, stripped); +//# sourceMappingURL=String.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Struct.js b/backend/node_modules/effect/dist/cjs/Struct.js new file mode 100644 index 0000000000000000000000000000000000000000..d910238f3aea7df0e114ad82a3520fb5f60060f1 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Struct.js @@ -0,0 +1,202 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.pick = exports.omit = exports.keys = exports.getOrder = exports.getEquivalence = exports.get = exports.evolve = exports.entries = void 0; +var Equivalence = _interopRequireWildcard(require("./Equivalence.js")); +var _Function = require("./Function.js"); +var order = _interopRequireWildcard(require("./Order.js")); +var Predicate = _interopRequireWildcard(require("./Predicate.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * This module provides utility functions for working with structs in TypeScript. + * + * @since 2.0.0 + */ + +/** + * Create a new object by picking properties of an existing object. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, Struct } from "effect" + * + * assert.deepStrictEqual(pipe({ a: "a", b: 1, c: true }, Struct.pick("a", "b")), { a: "a", b: 1 }) + * assert.deepStrictEqual(Struct.pick({ a: "a", b: 1, c: true }, "a", "b"), { a: "a", b: 1 }) + * ``` + * + * @since 2.0.0 + */ +const pick = exports.pick = /*#__PURE__*/(0, _Function.dual)(args => Predicate.isObject(args[0]), (s, ...keys) => { + const out = {}; + for (const k of keys) { + if (k in s) { + out[k] = s[k]; + } + } + return out; +}); +/** + * Create a new object by omitting properties of an existing object. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, Struct } from "effect" + * + * assert.deepStrictEqual(pipe({ a: "a", b: 1, c: true }, Struct.omit("c")), { a: "a", b: 1 }) + * assert.deepStrictEqual(Struct.omit({ a: "a", b: 1, c: true }, "c"), { a: "a", b: 1 }) + * ``` + * + * @since 2.0.0 + */ +const omit = exports.omit = /*#__PURE__*/(0, _Function.dual)(args => Predicate.isObject(args[0]), (s, ...keys) => { + const out = { + ...s + }; + for (const k of keys) { + delete out[k]; + } + return out; +}); +/** + * Given a struct of `Equivalence`s returns a new `Equivalence` that compares values of a struct + * by applying each `Equivalence` to the corresponding property of the struct. + * + * Alias of {@link Equivalence.struct}. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Struct, String, Number } from "effect" + * + * const PersonEquivalence = Struct.getEquivalence({ + * name: String.Equivalence, + * age: Number.Equivalence + * }) + * + * assert.deepStrictEqual( + * PersonEquivalence({ name: "John", age: 25 }, { name: "John", age: 25 }), + * true + * ) + * assert.deepStrictEqual( + * PersonEquivalence({ name: "John", age: 25 }, { name: "John", age: 40 }), + * false + * ) + * ``` + * + * @category combinators + * @since 2.0.0 + */ +const getEquivalence = exports.getEquivalence = Equivalence.struct; +/** + * This function creates and returns a new `Order` for a struct of values based on the given `Order`s + * for each property in the struct. + * + * Alias of {@link order.struct}. + * + * @category combinators + * @since 2.0.0 + */ +const getOrder = exports.getOrder = order.struct; +/** + * Transforms the values of a Struct provided a transformation function for each key. + * If no transformation function is provided for a key, it will return the original value for that key. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, Struct } from "effect" + * + * assert.deepStrictEqual( + * pipe( + * { a: 'a', b: 1, c: 3 }, + * Struct.evolve({ + * a: (a) => a.length, + * b: (b) => b * 2 + * }) + * ), + * { a: 1, b: 2, c: 3 } + * ) + * ``` + * + * @since 2.0.0 + */ +const evolve = exports.evolve = /*#__PURE__*/(0, _Function.dual)(2, (obj, t) => { + const out = { + ...obj + }; + for (const k in t) { + if (Object.prototype.hasOwnProperty.call(obj, k)) { + // @ts-expect-error + out[k] = t[k](obj[k]); + } + } + return out; +}); +/** + * Retrieves the value associated with the specified key from a struct. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, Struct } from "effect" + * + * const value = pipe({ a: 1, b: 2 }, Struct.get("a")) + * + * assert.deepStrictEqual(value, 1) + * ``` + * + * @since 2.0.0 + */ +const get = key => s => s[key]; +/** + * Retrieves the object keys that are strings in a typed manner + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Struct } from "effect" + * + * const symbol: unique symbol = Symbol() + * + * const value = { + * a: 1, + * b: 2, + * [symbol]: 3 + * } + * + * const keys: Array<"a" | "b"> = Struct.keys(value) + * + * assert.deepStrictEqual(keys, ["a", "b"]) + * ``` + * + * @since 3.6.0 + */ +exports.get = get; +const keys = o => Object.keys(o); +/** + * Retrieves the entries (key-value pairs) of an object, where keys are strings, + * in a type-safe manner. Symbol keys are excluded from the result. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Struct } from "effect" + * + * const c = Symbol("c") + * const value = { a: "foo", b: 1, [c]: true } + * + * const entries: Array<["a" | "b", string | number]> = Struct.entries(value) + * + * assert.deepStrictEqual(entries, [["a", "foo"], ["b", 1]]) + * ``` + * + * @since 3.17.0 + */ +exports.keys = keys; +const entries = obj => Object.entries(obj); +exports.entries = entries; +//# sourceMappingURL=Struct.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Struct.js.map b/backend/node_modules/effect/dist/cjs/Struct.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a84b7c9c2acb1b8125ecc5df8c45a3501896ac3f --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Struct.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Struct.js","names":["Equivalence","_interopRequireWildcard","require","_Function","order","Predicate","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","pick","exports","dual","args","isObject","s","keys","out","k","omit","getEquivalence","struct","getOrder","evolve","obj","prototype","key","entries"],"sources":["../../src/Struct.ts"],"sourcesContent":[null],"mappings":";;;;;;AAMA,IAAAA,WAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAH,uBAAA,CAAAC,OAA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,GAAG,CAACN,CAAC,CAAC,CAAC;IACvB;EACF;EACA,OAAOD,GAAU;AACnB,CAAC,CACF;AAED;;;;;;;;;;;;;;;AAeO,MAAMd,GAAG,GACUuB,GAAM,IAAoCX,CAAI,IACpEA,CAAC,CAACW,GAAG,CAAC;AAEV;;;;;;;;;;;;;;;;;;;;;;;AAAAf,OAAA,CAAAR,GAAA,GAAAA,GAAA;AAuBO,MAAMa,IAAI,GAAkBnB,CAAI,IAAgCU,MAAM,CAACS,IAAI,CAACnB,CAAC,CAA8B;AAElH;;;;;;;;;;;;;;;;;;;AAAAc,OAAA,CAAAK,IAAA,GAAAA,IAAA;AAmBO,MAAMW,OAAO,GAAaH,GAAM,IACrCjB,MAAM,CAACoB,OAAO,CAACH,GAAU,CAAQ;AAAAb,OAAA,CAAAgB,OAAA,GAAAA,OAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Subscribable.js.map b/backend/node_modules/effect/dist/cjs/Subscribable.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5d1f853b007f40b5446db8324092fea6ccd8375b --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Subscribable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Subscribable.js","names":["Effect","_interopRequireWildcard","require","_Function","_Pipeable","_Predicate","Readable","Stream","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","exports","Symbol","for","isSubscribable","u","hasProperty","Proto","pipe","pipeArguments","arguments","make","options","assign","create","map","dual","self","changes","mapEffect","flatMap","unwrap","effect","s"],"sources":["../../src/Subscribable.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAL,uBA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AC,CAAC9B,GAAG,CAAC;EACzCyB,OAAO,EAAEtC,MAAM,CAACyC,MAAM,CAAChD,MAAM,CAAC0C,GAAG,CAACO,MAAM,EAAGC,CAAC,IAAKA,CAAC,CAACL,OAAO,CAAC;CAC5D,CAAC;AAAAjB,OAAA,CAAAoB,MAAA,GAAAA,MAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/SubscriptionRef.js b/backend/node_modules/effect/dist/cjs/SubscriptionRef.js new file mode 100644 index 0000000000000000000000000000000000000000..0ad7d6448071a407179d639093b4fd7d949a4f1a --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/SubscriptionRef.js @@ -0,0 +1,123 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.updateSomeEffect = exports.updateSomeAndGetEffect = exports.updateSomeAndGet = exports.updateSome = exports.updateEffect = exports.updateAndGetEffect = exports.updateAndGet = exports.update = exports.setAndGet = exports.set = exports.modifySomeEffect = exports.modifySome = exports.modifyEffect = exports.modify = exports.make = exports.getAndUpdateSomeEffect = exports.getAndUpdateSome = exports.getAndUpdateEffect = exports.getAndUpdate = exports.getAndSet = exports.get = exports.SubscriptionRefTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/subscriptionRef.js")); +var Ref = _interopRequireWildcard(require("./Ref.js")); +var Synchronized = _interopRequireWildcard(require("./SynchronizedRef.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const SubscriptionRefTypeId = exports.SubscriptionRefTypeId = internal.SubscriptionRefTypeId; +/** + * @since 2.0.0 + * @category getters + */ +const get = exports.get = internal.get; +/** + * @since 2.0.0 + * @category utils + */ +const getAndSet = exports.getAndSet = Ref.getAndSet; +/** + * @since 2.0.0 + * @category utils + */ +const getAndUpdate = exports.getAndUpdate = Ref.getAndUpdate; +/** + * @since 2.0.0 + * @category utils + */ +const getAndUpdateEffect = exports.getAndUpdateEffect = Synchronized.getAndUpdateEffect; +/** + * @since 2.0.0 + * @category utils + */ +const getAndUpdateSome = exports.getAndUpdateSome = Ref.getAndUpdateSome; +/** + * @since 2.0.0 + * @category utils + */ +const getAndUpdateSomeEffect = exports.getAndUpdateSomeEffect = Synchronized.getAndUpdateSomeEffect; +/** + * Creates a new `SubscriptionRef` with the specified value. + * + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * @since 2.0.0 + * @category utils + */ +const modify = exports.modify = internal.modify; +/** + * @since 2.0.0 + * @category utils + */ +const modifyEffect = exports.modifyEffect = internal.modifyEffect; +/** + * @since 2.0.0 + * @category utils + */ +const modifySome = exports.modifySome = Ref.modifySome; +/** + * @since 2.0.0 + * @category utils + */ +const modifySomeEffect = exports.modifySomeEffect = Synchronized.modifySomeEffect; +/** + * @since 2.0.0 + * @category utils + */ +const set = exports.set = internal.set; +/** + * @since 2.0.0 + * @category utils + */ +const setAndGet = exports.setAndGet = Ref.setAndGet; +/** + * @since 2.0.0 + * @category utils + */ +const update = exports.update = Ref.update; +/** + * @since 2.0.0 + * @category utils + */ +const updateEffect = exports.updateEffect = Synchronized.updateEffect; +/** + * @since 2.0.0 + * @category utils + */ +const updateAndGet = exports.updateAndGet = Ref.updateAndGet; +/** + * @since 2.0.0 + * @category utils + */ +const updateAndGetEffect = exports.updateAndGetEffect = Synchronized.updateAndGetEffect; +/** + * @since 2.0.0 + * @category utils + */ +const updateSome = exports.updateSome = Ref.updateSome; +/** + * @since 2.0.0 + * @category utils + */ +const updateSomeEffect = exports.updateSomeEffect = Synchronized.updateSomeEffect; +/** + * @since 2.0.0 + * @category utils + */ +const updateSomeAndGet = exports.updateSomeAndGet = Ref.updateSomeAndGet; +/** + * @since 2.0.0 + * @category utils + */ +const updateSomeAndGetEffect = exports.updateSomeAndGetEffect = Synchronized.updateSomeAndGetEffect; +//# sourceMappingURL=SubscriptionRef.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Supervisor.js b/backend/node_modules/effect/dist/cjs/Supervisor.js new file mode 100644 index 0000000000000000000000000000000000000000..441b6b872ffb6a7bbcce122437c92cec6aef38d7 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Supervisor.js @@ -0,0 +1,115 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.unsafeTrack = exports.track = exports.none = exports.fromEffect = exports.fibersIn = exports.addSupervisor = exports.SupervisorTypeId = exports.AbstractSupervisor = void 0; +var core = _interopRequireWildcard(require("./internal/core.js")); +var circular = _interopRequireWildcard(require("./internal/layer/circular.js")); +var internal = _interopRequireWildcard(require("./internal/supervisor.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const SupervisorTypeId = exports.SupervisorTypeId = internal.SupervisorTypeId; +/** + * @since 2.0.0 + * @category context + */ +const addSupervisor = exports.addSupervisor = circular.addSupervisor; +/** + * Creates a new supervisor that tracks children in a set. + * + * @since 2.0.0 + * @category constructors + */ +const fibersIn = exports.fibersIn = internal.fibersIn; +/** + * Creates a new supervisor that constantly yields effect when polled + * + * @since 2.0.0 + * @category constructors + */ +const fromEffect = exports.fromEffect = internal.fromEffect; +/** + * A supervisor that doesn't do anything in response to supervision events. + * + * @since 2.0.0 + * @category constructors + */ +const none = exports.none = internal.none; +/** + * Creates a new supervisor that tracks children in a set. + * + * @since 2.0.0 + * @category constructors + */ +const track = exports.track = internal.track; +/** + * Unsafely creates a new supervisor that tracks children in a set. + * + * @since 2.0.0 + * @category unsafe + */ +const unsafeTrack = exports.unsafeTrack = internal.unsafeTrack; +/** + * @since 2.0.0 + * @category constructors + */ +class AbstractSupervisor { + /** + * @since 2.0.0 + */ + onStart(_context, _effect, _parent, _fiber) { + // + } + /** + * @since 2.0.0 + */ + onEnd(_value, _fiber) { + // + } + /** + * @since 2.0.0 + */ + onEffect(_fiber, _effect) { + // + } + /** + * @since 2.0.0 + */ + onSuspend(_fiber) { + // + } + /** + * @since 2.0.0 + */ + onResume(_fiber) { + // + } + /** + * @since 2.0.0 + */ + map(f) { + return new internal.ProxySupervisor(this, core.map(this.value, f)); + } + /** + * @since 2.0.0 + */ + zip(right) { + return new internal.Zip(this, right); + } + /** + * @since 2.0.0 + */ + onRun(execution, _fiber) { + return execution(); + } + /** + * @since 2.0.0 + */ + [SupervisorTypeId] = internal.supervisorVariance; +} +exports.AbstractSupervisor = AbstractSupervisor; +//# sourceMappingURL=Supervisor.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Supervisor.js.map b/backend/node_modules/effect/dist/cjs/Supervisor.js.map new file mode 100644 index 0000000000000000000000000000000000000000..cc6f1590f7d72ebd4e1e592e7373fa0eb0a80738 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Supervisor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Supervisor.js","names":["core","_interopRequireWildcard","require","circular","internal","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","SupervisorTypeId","exports","addSupervisor","fibersIn","fromEffect","none","track","unsafeTrack","AbstractSupervisor","onStart","_context","_effect","_parent","_fiber","onEnd","_value","onEffect","onSuspend","onResume","map","ProxySupervisor","value","zip","right","Zip","onRun","execution","supervisorVariance"],"sources":["../../src/Supervisor.ts"],"sourcesContent":[null],"mappings":";;;;;;AAUA,IAAAA,IAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,QAAA,GAAAH,uBAAA,CAAAC,OAAA;AAAoD,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAA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AC,CAAC;EACpE;EAEA;;;EAGAiC,GAAGA,CACDC,KAAoB;IAEpB,OAAO,IAAI3C,QAAQ,CAAC4C,GAAG,CAAC,IAAI,EAAED,KAAK,CAAC;EACtC;EAEA;;;EAGAE,KAAKA,CAAUC,SAAkB,EAAEb,MAAgC;IACjE,OAAOa,SAAS,EAAE;EACpB;EAEA;;;EAGS,CAAC1B,gBAAgB,IAEtBpB,QAAQ,CAAC+C,kBAAkB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Symbol.js b/backend/node_modules/effect/dist/cjs/Symbol.js new file mode 100644 index 0000000000000000000000000000000000000000..7a0fd7ea2e48bcbfed2f58236f82d4ccd7b33d33 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Symbol.js @@ -0,0 +1,35 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isSymbol = exports.Equivalence = void 0; +var equivalence = _interopRequireWildcard(require("./Equivalence.js")); +var predicate = _interopRequireWildcard(require("./Predicate.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * Tests if a value is a `symbol`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Predicate } from "effect" + * + * assert.deepStrictEqual(Predicate.isSymbol(Symbol.for("a")), true) + * assert.deepStrictEqual(Predicate.isSymbol("a"), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +const isSymbol = exports.isSymbol = predicate.isSymbol; +/** + * @category instances + * @since 2.0.0 + */ +const Equivalence = exports.Equivalence = equivalence.symbol; +//# sourceMappingURL=Symbol.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Symbol.js.map b/backend/node_modules/effect/dist/cjs/Symbol.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d29456854a728a3b55ac75ec27bbd7ba7b29e717 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Symbol.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Symbol.js","names":["equivalence","_interopRequireWildcard","require","predicate","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","isSymbol","exports","Equivalence","symbol"],"sources":["../../src/Symbol.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,WAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAF,uBAAA,CAAAC,OAAA;AAA2C,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAL3C;;;;AAOA;;;;;;;;;;;;;;;AAeO,MAAMkB,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAgCpB,SAAS,CAACoB,QAAQ;AAEvE;;;;AAIO,MAAME,WAAW,GAAAD,OAAA,CAAAC,WAAA,GAAoCzB,WAAW,CAAC0B,MAAM","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/SynchronizedRef.js b/backend/node_modules/effect/dist/cjs/SynchronizedRef.js new file mode 100644 index 0000000000000000000000000000000000000000..40612ae63d3d46e5aa6cac2e80531e1a72ac27c7 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/SynchronizedRef.js @@ -0,0 +1,126 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.updateSomeEffect = exports.updateSomeAndGetEffect = exports.updateSomeAndGet = exports.updateSome = exports.updateEffect = exports.updateAndGetEffect = exports.updateAndGet = exports.update = exports.unsafeMake = exports.setAndGet = exports.set = exports.modifySomeEffect = exports.modifySome = exports.modifyEffect = exports.modify = exports.make = exports.getAndUpdateSomeEffect = exports.getAndUpdateSome = exports.getAndUpdateEffect = exports.getAndUpdate = exports.getAndSet = exports.get = exports.SynchronizedRefTypeId = void 0; +var circular = _interopRequireWildcard(require("./internal/effect/circular.js")); +var ref = _interopRequireWildcard(require("./internal/ref.js")); +var internal = _interopRequireWildcard(require("./internal/synchronizedRef.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const SynchronizedRefTypeId = exports.SynchronizedRefTypeId = circular.SynchronizedTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = circular.makeSynchronized; +/** + * @since 2.0.0 + * @category getters + */ +const get = exports.get = ref.get; +/** + * @since 2.0.0 + * @category utils + */ +const getAndSet = exports.getAndSet = ref.getAndSet; +/** + * @since 2.0.0 + * @category utils + */ +const getAndUpdate = exports.getAndUpdate = ref.getAndUpdate; +/** + * @since 2.0.0 + * @category utils + */ +const getAndUpdateEffect = exports.getAndUpdateEffect = internal.getAndUpdateEffect; +/** + * @since 2.0.0 + * @category utils + */ +const getAndUpdateSome = exports.getAndUpdateSome = ref.getAndUpdateSome; +/** + * @since 2.0.0 + * @category utils + */ +const getAndUpdateSomeEffect = exports.getAndUpdateSomeEffect = internal.getAndUpdateSomeEffect; +/** + * @since 2.0.0 + * @category utils + */ +const modify = exports.modify = internal.modify; +/** + * @since 2.0.0 + * @category utils + */ +const modifyEffect = exports.modifyEffect = internal.modifyEffect; +/** + * @since 2.0.0 + * @category utils + */ +const modifySome = exports.modifySome = ref.modifySome; +/** + * @since 2.0.0 + * @category utils + */ +const modifySomeEffect = exports.modifySomeEffect = internal.modifySomeEffect; +/** + * @since 2.0.0 + * @category utils + */ +const set = exports.set = ref.set; +/** + * @since 2.0.0 + * @category utils + */ +const setAndGet = exports.setAndGet = ref.setAndGet; +/** + * @since 2.0.0 + * @category utils + */ +const update = exports.update = ref.update; +/** + * @since 2.0.0 + * @category utils + */ +const updateEffect = exports.updateEffect = internal.updateEffect; +/** + * @since 2.0.0 + * @category utils + */ +const updateAndGet = exports.updateAndGet = ref.updateAndGet; +/** + * @since 2.0.0 + * @category utils + */ +const updateAndGetEffect = exports.updateAndGetEffect = internal.updateAndGetEffect; +/** + * @since 2.0.0 + * @category utils + */ +const updateSome = exports.updateSome = ref.updateSome; +/** + * @since 2.0.0 + * @category utils + */ +const updateSomeEffect = exports.updateSomeEffect = internal.updateSomeEffect; +/** + * @since 2.0.0 + * @category utils + */ +const updateSomeAndGet = exports.updateSomeAndGet = ref.updateSomeAndGet; +/** + * @since 2.0.0 + * @category utils + */ +const updateSomeAndGetEffect = exports.updateSomeAndGetEffect = circular.updateSomeAndGetEffectSynchronized; +/** + * @since 2.0.0 + * @category unsafe + */ +const unsafeMake = exports.unsafeMake = circular.unsafeMakeSynchronized; +//# sourceMappingURL=SynchronizedRef.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/SynchronizedRef.js.map b/backend/node_modules/effect/dist/cjs/SynchronizedRef.js.map new file mode 100644 index 0000000000000000000000000000000000000000..cab945ac9917e0bb8f295aa0815591660df6b6d9 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/SynchronizedRef.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SynchronizedRef.js","names":["circular","_interopRequireWildcard","require","ref","internal","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","SynchronizedRefTypeId","exports","SynchronizedTypeId","make","makeSynchronized","getAndSet","getAndUpdate","getAndUpdateEffect","getAndUpdateSome","getAndUpdateSomeEffect","modify","modifyEffect","modifySome","modifySomeEffect","setAndGet","update","updateEffect","updateAndGet","updateAndGetEffect","updateSome","updateSomeEffect","updateSomeAndGet","updateSomeAndGetEffect","updateSomeAndGetEffectSynchronized","unsafeMake","unsafeMakeSynchronized"],"sources":["../../src/SynchronizedRef.ts"],"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MC,YAAY,GAAAf,OAAA,CAAAe,YAAA,GAWrBpC,QAAQ,CAACoC,YAAY;AAEzB;;;;AAIO,MAAMC,YAAY,GAAAhB,OAAA,CAAAgB,YAAA,GAWrBtC,GAAG,CAACsC,YAAY;AAEpB;;;;AAIO,MAAMC,kBAAkB,GAAAjB,OAAA,CAAAiB,kBAAA,GAW3BtC,QAAQ,CAACsC,kBAAkB;AAE/B;;;;AAIO,MAAMC,UAAU,GAAAlB,OAAA,CAAAkB,UAAA,GAWnBxC,GAAG,CAACwC,UAAU;AAElB;;;;AAIO,MAAMC,gBAAgB,GAAAnB,OAAA,CAAAmB,gBAAA,GAczBxC,QAAQ,CAACwC,gBAAgB;AAE7B;;;;AAIO,MAAMC,gBAAgB,GAAApB,OAAA,CAAAoB,gBAAA,GAWzB1C,GAAG,CAAC0C,gBAAgB;AAExB;;;;AAIO,MAAMC,sBAAsB,GAAArB,OAAA,CAAAqB,sBAAA,GAc/B9C,QAAQ,CAAC+C,kCAAkC;AAE/C;;;;AAIO,MAAMC,UAAU,GAAAvB,OAAA,CAAAuB,UAAA,GAAwChD,QAAQ,CAACiD,sBAAsB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TArray.js b/backend/node_modules/effect/dist/cjs/TArray.js new file mode 100644 index 0000000000000000000000000000000000000000..7f6c65c8c6313baf9da05e35d0629ea8a2547da5 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TArray.js @@ -0,0 +1,314 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.updateSTM = exports.update = exports.transformSTM = exports.transform = exports.toArray = exports.someSTM = exports.some = exports.size = exports.reduceSTM = exports.reduceOptionSTM = exports.reduceOption = exports.reduce = exports.minOption = exports.maxOption = exports.make = exports.lastOption = exports.headOption = exports.get = exports.fromIterable = exports.forEach = exports.findLastSTM = exports.findLastIndexFrom = exports.findLastIndex = exports.findLast = exports.findFirstSTM = exports.findFirstIndexWhereSTM = exports.findFirstIndexWhereFromSTM = exports.findFirstIndexWhereFrom = exports.findFirstIndexWhere = exports.findFirstIndexFrom = exports.findFirstIndex = exports.findFirst = exports.everySTM = exports.every = exports.empty = exports.countSTM = exports.count = exports.contains = exports.collectFirstSTM = exports.collectFirst = exports.TArrayTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/stm/tArray.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * @since 2.0.0 + * @category symbols + */ +const TArrayTypeId = exports.TArrayTypeId = internal.TArrayTypeId; +/** + * Finds the result of applying a partial function to the first value in its + * domain. + * + * @since 2.0.0 + * @category elements + */ +const collectFirst = exports.collectFirst = internal.collectFirst; +/** + * Finds the result of applying an transactional partial function to the first + * value in its domain. + * + * @since 2.0.0 + * @category elements + */ +const collectFirstSTM = exports.collectFirstSTM = internal.collectFirstSTM; +/** + * Determine if the array contains a specified value. + * + * @macro trace + * @since 2.0.0 + * @category elements + */ +const contains = exports.contains = internal.contains; +/** + * Count the values in the array matching a predicate. + * + * @macro trace + * @since 2.0.0 + * @category folding + */ +const count = exports.count = internal.count; +/** + * Count the values in the array matching a transactional predicate. + * + * @macro trace + * @since 2.0.0 + * @category folding + */ +const countSTM = exports.countSTM = internal.countSTM; +/** + * Makes an empty `TArray`. + * + * @since 2.0.0 + * @category constructors + */ +const empty = exports.empty = internal.empty; +/** + * Atomically evaluate the conjunction of a predicate across the members of + * the array. + * + * @since 2.0.0 + * @category elements + */ +const every = exports.every = internal.every; +/** + * Atomically evaluate the conjunction of a transactional predicate across the + * members of the array. + * + * @since 2.0.0 + * @category elements + */ +const everySTM = exports.everySTM = internal.everySTM; +/** + * Find the first element in the array matching the specified predicate. + * + * @since 2.0.0 + * @category elements + */ +const findFirst = exports.findFirst = internal.findFirst; +/** + * Get the first index of a specific value in the array. + * + * @since 2.0.0 + * @category elements + */ +const findFirstIndex = exports.findFirstIndex = internal.findFirstIndex; +/** + * Get the first index of a specific value in the array starting from the + * specified index. + * + * @since 2.0.0 + * @category elements + */ +const findFirstIndexFrom = exports.findFirstIndexFrom = internal.findFirstIndexFrom; +/** + * Get the index of the first entry in the array matching a predicate. + * + * @since 2.0.0 + * @category elements + */ +const findFirstIndexWhere = exports.findFirstIndexWhere = internal.findFirstIndexWhere; +/** + * Get the index of the first entry in the array starting from the specified + * index, matching a predicate. + * + * @since 2.0.0 + * @category elements + */ +const findFirstIndexWhereFrom = exports.findFirstIndexWhereFrom = internal.findFirstIndexWhereFrom; +/** + * Get the index of the next entry that matches a transactional predicate. + * + * @since 2.0.0 + * @category elements + */ +const findFirstIndexWhereSTM = exports.findFirstIndexWhereSTM = internal.findFirstIndexWhereSTM; +/** + * Starting at specified index, get the index of the next entry that matches a + * transactional predicate. + * + * @since 2.0.0 + * @category elements + */ +const findFirstIndexWhereFromSTM = exports.findFirstIndexWhereFromSTM = internal.findFirstIndexWhereFromSTM; +/** + * Find the first element in the array matching a transactional predicate. + * + * @since 2.0.0 + * @category elements + */ +const findFirstSTM = exports.findFirstSTM = internal.findFirstSTM; +/** + * Find the last element in the array matching a predicate. + * + * @since 2.0.0 + * @category elements + */ +const findLast = exports.findLast = internal.findLast; +/** + * Get the last index of a specific value in the array bounded above by a + * specific index. + * + * @since 2.0.0 + * @category elements + */ +const findLastIndex = exports.findLastIndex = internal.findLastIndex; +/** + * Get the last index of a specific value in the array bounded above by a + * specific index. + * + * @since 2.0.0 + * @category elements + */ +const findLastIndexFrom = exports.findLastIndexFrom = internal.findLastIndexFrom; +/** + * Find the last element in the array matching a transactional predicate. + * + * @since 2.0.0 + * @category elements + */ +const findLastSTM = exports.findLastSTM = internal.findLastSTM; +/** + * Atomically performs transactional effect for each item in array. + * + * @since 2.0.0 + * @category elements + */ +const forEach = exports.forEach = internal.forEach; +/** + * Creates a new `TArray` from an iterable collection of values. + * + * @since 2.0.0 + * @category constructors + */ +const fromIterable = exports.fromIterable = internal.fromIterable; +/** + * Extracts value from ref in array. + * + * @since 2.0.0 + * @category elements + */ +const get = exports.get = internal.get; +/** + * The first entry of the array, if it exists. + * + * @since 2.0.0 + * @category elements + */ +const headOption = exports.headOption = internal.headOption; +/** + * The last entry in the array, if it exists. + * + * @since 2.0.0 + * @category elements + */ +const lastOption = exports.lastOption = internal.lastOption; +/** + * Makes a new `TArray` that is initialized with specified values. + * + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * Atomically compute the greatest element in the array, if it exists. + * + * @since 2.0.0 + * @category elements + */ +const maxOption = exports.maxOption = internal.maxOption; +/** + * Atomically compute the least element in the array, if it exists. + * + * @since 2.0.0 + * @category elements + */ +const minOption = exports.minOption = internal.minOption; +/** + * Atomically folds using a pure function. + * + * @since 2.0.0 + * @category folding + */ +const reduce = exports.reduce = internal.reduce; +/** + * Atomically reduce the array, if non-empty, by a binary operator. + * + * @since 2.0.0 + * @category elements + */ +const reduceOption = exports.reduceOption = internal.reduceOption; +/** + * Atomically reduce the non-empty array using a transactional binary + * operator. + * + * @since 2.0.0 + * @category elements + */ +const reduceOptionSTM = exports.reduceOptionSTM = internal.reduceOptionSTM; +/** + * Atomically folds using a transactional function. + * + * @macro trace + * @since 2.0.0 + * @category folding + */ +const reduceSTM = exports.reduceSTM = internal.reduceSTM; +/** + * Returns the size of the `TArray`. + * + * @since 2.0.0 + * @category getters + */ +const size = exports.size = internal.size; +/** + * Determine if the array contains a value satisfying a predicate. + * + * @since 2.0.0 + * @category elements + */ +const some = exports.some = internal.some; +/** + * Determine if the array contains a value satisfying a transactional + * predicate. + * + * @since 2.0.0 + * @category elements + */ +const someSTM = exports.someSTM = internal.someSTM; +/** + * Collects all elements into a chunk. + * + * @since 2.0.0 + * @since 2.0.0 + * @category destructors + */ +const toArray = exports.toArray = internal.toArray; +/** + * Atomically updates all elements using a pure function. + * + * @since 2.0.0 + * @category elements + */ +const transform = exports.transform = internal.transform; +/** + * Atomically updates all elements using a transactional effect. + * + * @since 2.0.0 + * @category elements + */ +const transformSTM = exports.transformSTM = internal.transformSTM; +/** + * Updates element in the array with given function. + * + * @since 2.0.0 + * @category elements + */ +const update = exports.update = internal.update; +/** + * Atomically updates element in the array with given transactional effect. + * + * @since 2.0.0 + * @category elements + */ +const updateSTM = exports.updateSTM = internal.updateSTM; +//# sourceMappingURL=TArray.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TDeferred.js b/backend/node_modules/effect/dist/cjs/TDeferred.js new file mode 100644 index 0000000000000000000000000000000000000000..1feb6140c443b98686dce01d8fd39c253f067e85 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TDeferred.js @@ -0,0 +1,40 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.succeed = exports.poll = exports.make = exports.fail = exports.done = exports.await = exports.TDeferredTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/stm/tDeferred.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const TDeferredTypeId = exports.TDeferredTypeId = internal.TDeferredTypeId; +const _await = exports.await = internal._await; +/** + * @since 2.0.0 + * @category mutations + */ +const done = exports.done = internal.done; +/** + * @since 2.0.0 + * @category mutations + */ +const fail = exports.fail = internal.fail; +/** + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * @since 2.0.0 + * @category getters + */ +const poll = exports.poll = internal.poll; +/** + * @since 2.0.0 + * @category mutations + */ +const succeed = exports.succeed = internal.succeed; +//# sourceMappingURL=TDeferred.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TMap.js b/backend/node_modules/effect/dist/cjs/TMap.js new file mode 100644 index 0000000000000000000000000000000000000000..acbf3e3388c068d66ebc2c4ddbd403ca950dcd75 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TMap.js @@ -0,0 +1,286 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.values = exports.updateWith = exports.transformValuesSTM = exports.transformValues = exports.transformSTM = exports.transform = exports.toMap = exports.toHashMap = exports.toChunk = exports.toArray = exports.takeSomeSTM = exports.takeSome = exports.takeFirstSTM = exports.takeFirst = exports.size = exports.setIfAbsent = exports.set = exports.retainIf = exports.removeIf = exports.removeAll = exports.remove = exports.reduceSTM = exports.reduce = exports.merge = exports.make = exports.keys = exports.isEmpty = exports.has = exports.getOrElse = exports.get = exports.fromIterable = exports.forEach = exports.findSTM = exports.findAllSTM = exports.findAll = exports.find = exports.empty = exports.TMapTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/stm/tMap.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const TMapTypeId = exports.TMapTypeId = internal.TMapTypeId; +/** + * Makes an empty `TMap`. + * + * @since 2.0.0 + * @category constructors + */ +const empty = exports.empty = internal.empty; +/** + * Finds the key/value pair matching the specified predicate, and uses the + * provided function to extract a value out of it. + * + * @since 2.0.0 + * @category elements + */ +const find = exports.find = internal.find; +/** + * Finds the key/value pair matching the specified predicate, and uses the + * provided effectful function to extract a value out of it. + * + * @since 2.0.0 + * @category elements + */ +const findSTM = exports.findSTM = internal.findSTM; +/** + * Finds all the key/value pairs matching the specified predicate, and uses + * the provided function to extract values out them. + * + * @since 2.0.0 + * @category elements + */ +const findAll = exports.findAll = internal.findAll; +/** + * Finds all the key/value pairs matching the specified predicate, and uses + * the provided effectful function to extract values out of them.. + * + * @since 2.0.0 + * @category elements + */ +const findAllSTM = exports.findAllSTM = internal.findAllSTM; +/** + * Atomically performs transactional-effect for each binding present in map. + * + * @since 2.0.0 + * @category elements + */ +const forEach = exports.forEach = internal.forEach; +/** + * Creates a new `TMap` from an iterable collection of key/value pairs. + * + * @since 2.0.0 + * @category constructors + */ +const fromIterable = exports.fromIterable = internal.fromIterable; +/** + * Retrieves value associated with given key. + * + * @since 2.0.0 + * @category elements + */ +const get = exports.get = internal.get; +/** + * Retrieves value associated with given key or default value, in case the key + * isn't present. + * + * @since 2.0.0 + * @category elements + */ +const getOrElse = exports.getOrElse = internal.getOrElse; +/** + * Tests whether or not map contains a key. + * + * @since 2.0.0 + * @category elements + */ +const has = exports.has = internal.has; +/** + * Tests if the map is empty or not. + * + * @since 2.0.0 + * @category getters + */ +const isEmpty = exports.isEmpty = internal.isEmpty; +/** + * Collects all keys stored in map. + * + * @since 2.0.0 + * @category elements + */ +const keys = exports.keys = internal.keys; +/** + * Makes a new `TMap` that is initialized with specified values. + * + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * If the key is not already associated with a value, stores the provided value, + * otherwise merge the existing value with the new one using function `f` and + * store the result. + * + * @since 2.0.0 + * @category mutations + */ +const merge = exports.merge = internal.merge; +/** + * Atomically folds using a pure function. + * + * @since 2.0.0 + * @category folding + */ +const reduce = exports.reduce = internal.reduce; +/** + * Atomically folds using a transactional function. + * + * @since 2.0.0 + * @category folding + */ +const reduceSTM = exports.reduceSTM = internal.reduceSTM; +/** + * Removes binding for given key. + * + * @since 2.0.0 + * @category mutations + */ +const remove = exports.remove = internal.remove; +/** + * Deletes all entries associated with the specified keys. + * + * @since 2.0.0 + * @category mutations + */ +const removeAll = exports.removeAll = internal.removeAll; +/** + * Removes entries from a `TMap` that satisfy the specified predicate and returns the removed entries + * (or `void` if `discard = true`). + * + * @since 2.0.0 + * @category mutations + */ +const removeIf = exports.removeIf = internal.removeIf; +/** + * Retains entries in a `TMap` that satisfy the specified predicate and returns the removed entries + * (or `void` if `discard = true`). + * + * @since 2.0.0 + * @category mutations + */ +const retainIf = exports.retainIf = internal.retainIf; +/** + * Stores new binding into the map. + * + * @since 2.0.0 + * @category mutations + */ +const set = exports.set = internal.set; +/** + * Stores new binding in the map if it does not already exist. + * + * @since 2.0.0 + * @category mutations + */ +const setIfAbsent = exports.setIfAbsent = internal.setIfAbsent; +/** + * Returns the number of bindings. + * + * @since 2.0.0 + * @category getters + */ +const size = exports.size = internal.size; +/** + * Takes the first matching value, or retries until there is one. + * + * @since 2.0.0 + * @category mutations + */ +const takeFirst = exports.takeFirst = internal.takeFirst; +/** + * Takes the first matching value, or retries until there is one. + * + * @since 2.0.0 + * @category mutations + */ +const takeFirstSTM = exports.takeFirstSTM = internal.takeFirstSTM; +/** + * Takes all matching values, or retries until there is at least one. + * + * @since 2.0.0 + * @category mutations + */ +const takeSome = exports.takeSome = internal.takeSome; +/** + * Takes all matching values, or retries until there is at least one. + * + * @since 2.0.0 + * @category mutations + */ +const takeSomeSTM = exports.takeSomeSTM = internal.takeSomeSTM; +/** + * Collects all bindings into a `Chunk`. + * + * @since 2.0.0 + * @category destructors + */ +const toChunk = exports.toChunk = internal.toChunk; +/** + * Collects all bindings into a `HashMap`. + * + * @since 2.0.0 + * @category destructors + */ +const toHashMap = exports.toHashMap = internal.toHashMap; +/** + * Collects all bindings into an `Array`. + * + * @since 2.0.0 + * @category destructors + */ +const toArray = exports.toArray = internal.toArray; +/** + * Collects all bindings into a `Map`. + * + * @since 2.0.0 + * @category destructors + */ +const toMap = exports.toMap = internal.toMap; +/** + * Atomically updates all bindings using a pure function. + * + * @since 2.0.0 + * @category mutations + */ +const transform = exports.transform = internal.transform; +/** + * Atomically updates all bindings using a transactional function. + * + * @since 2.0.0 + * @category mutations + */ +const transformSTM = exports.transformSTM = internal.transformSTM; +/** + * Atomically updates all values using a pure function. + * + * @since 2.0.0 + * @category mutations + */ +const transformValues = exports.transformValues = internal.transformValues; +/** + * Atomically updates all values using a transactional function. + * + * @since 2.0.0 + * @category mutations + */ +const transformValuesSTM = exports.transformValuesSTM = internal.transformValuesSTM; +/** + * Updates the mapping for the specified key with the specified function, + * which takes the current value of the key as an input, if it exists, and + * either returns `Some` with a new value to indicate to update the value in + * the map or `None` to remove the value from the map. Returns `Some` with the + * updated value or `None` if the value was removed from the map. + * + * @since 2.0.0 + * @category mutations + */ +const updateWith = exports.updateWith = internal.updateWith; +/** + * Collects all values stored in map. + * + * @since 2.0.0 + * @category elements + */ +const values = exports.values = internal.values; +//# sourceMappingURL=TMap.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TMap.js.map b/backend/node_modules/effect/dist/cjs/TMap.js.map new file mode 100644 index 0000000000000000000000000000000000000000..96b5c0297c2653a6d73bfc6a38feef8aedea4d96 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TMap.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TMapTypeId","exports","empty","find","findSTM","findAll","findAllSTM","forEach","fromIterable","getOrElse","isEmpty","keys","make","merge","reduce","reduceSTM","remove","removeAll","removeIf","retainIf","setIfAbsent","size","takeFirst","takeFirstSTM","takeSome","takeSomeSTM","toChunk","toHashMap","toArray","toMap","transform","transformSTM","transformValues","transformValuesSTM","updateWith","values"],"sources":["../../src/TMap.ts"],"sourcesContent":[null],"mappings":";;;;;;AAMA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAkD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,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,GAejB9C,QAAQ,CAAC8C,QAAQ;AAErB;;;;;;AAMO,MAAMC,WAAW,GAAAxB,OAAA,CAAAwB,WAAA,GAkBpB/C,QAAQ,CAAC+C,WAAW;AAExB;;;;;;AAMO,MAAMC,OAAO,GAAAzB,OAAA,CAAAyB,OAAA,GAA6DhD,QAAQ,CAACgD,OAAO;AAEjG;;;;;;AAMO,MAAMC,SAAS,GAAA1B,OAAA,CAAA0B,SAAA,GAA+DjD,QAAQ,CAACiD,SAAS;AAEvG;;;;;;AAMO,MAAMC,OAAO,GAAA3B,OAAA,CAAA2B,OAAA,GAAuDlD,QAAQ,CAACkD,OAAO;AAE3F;;;;;;AAMO,MAAMC,KAAK,GAAA5B,OAAA,CAAA4B,KAAA,GAA2DnD,QAAQ,CAACmD,KAAK;AAE3F;;;;;;AAMO,MAAMC,SAAS,GAAA7B,OAAA,CAAA6B,SAAA,GAelBpD,QAAQ,CAACoD,SAAS;AAEtB;;;;;;AAMO,MAAMC,YAAY,GAAA9B,OAAA,CAAA8B,YAAA,GAerBrD,QAAQ,CAACqD,YAAY;AAEzB;;;;;;AAMO,MAAMC,eAAe,GAAA/B,OAAA,CAAA+B,eAAA,GAexBtD,QAAQ,CAACsD,eAAe;AAE5B;;;;;;AAMO,MAAMC,kBAAkB,GAAAhC,OAAA,CAAAgC,kBAAA,GAe3BvD,QAAQ,CAACuD,kBAAkB;AAE/B;;;;;;;;;;AAUO,MAAMC,UAAU,GAAAjC,OAAA,CAAAiC,UAAA,GAuBnBxD,QAAQ,CAACwD,UAAU;AAEvB;;;;;;AAMO,MAAMC,MAAM,GAAAlC,OAAA,CAAAkC,MAAA,GAAkDzD,QAAQ,CAACyD,MAAM","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TPriorityQueue.js b/backend/node_modules/effect/dist/cjs/TPriorityQueue.js new file mode 100644 index 0000000000000000000000000000000000000000..5563f3b20d993b1fe201400968e8de008dbc225d --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TPriorityQueue.js @@ -0,0 +1,143 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.toChunk = exports.toArray = exports.takeUpTo = exports.takeOption = exports.takeAll = exports.take = exports.size = exports.retainIf = exports.removeIf = exports.peekOption = exports.peek = exports.offerAll = exports.offer = exports.make = exports.isNonEmpty = exports.isEmpty = exports.fromIterable = exports.empty = exports.TPriorityQueueTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/stm/tPriorityQueue.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const TPriorityQueueTypeId = exports.TPriorityQueueTypeId = internal.TPriorityQueueTypeId; +/** + * Constructs a new empty `TPriorityQueue` with the specified `Order`. + * + * @since 2.0.0 + * @category constructors + */ +const empty = exports.empty = internal.empty; +/** + * Creates a new `TPriorityQueue` from an iterable collection of values. + * + * @since 2.0.0 + * @category constructors + */ +const fromIterable = exports.fromIterable = internal.fromIterable; +/** + * Checks whether the queue is empty. + * + * @since 2.0.0 + * @category getters + */ +const isEmpty = exports.isEmpty = internal.isEmpty; +/** + * Checks whether the queue is not empty. + * + * @since 2.0.0 + * @category getters + */ +const isNonEmpty = exports.isNonEmpty = internal.isNonEmpty; +/** + * Makes a new `TPriorityQueue` that is initialized with specified values. + * + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * Offers the specified value to the queue. + * + * @since 2.0.0 + * @category mutations + */ +const offer = exports.offer = internal.offer; +/** + * Offers all of the elements in the specified collection to the queue. + * + * @since 2.0.0 + * @category mutations + */ +const offerAll = exports.offerAll = internal.offerAll; +/** + * Peeks at the first value in the queue without removing it, retrying until a + * value is in the queue. + * + * @since 2.0.0 + * @category getters + */ +const peek = exports.peek = internal.peek; +/** + * Peeks at the first value in the queue without removing it, returning `None` + * if there is not a value in the queue. + * + * @since 2.0.0 + * @category getters + */ +const peekOption = exports.peekOption = internal.peekOption; +/** + * Removes all elements from the queue matching the specified predicate. + * + * @since 2.0.0 + * @category getters + */ +const removeIf = exports.removeIf = internal.removeIf; +/** + * Retains only elements from the queue matching the specified predicate. + * + * @since 2.0.0 + * @category getters + */ +const retainIf = exports.retainIf = internal.retainIf; +/** + * Returns the size of the queue. + * + * @since 2.0.0 + * @category getters + */ +const size = exports.size = internal.size; +/** + * Takes a value from the queue, retrying until a value is in the queue. + * + * @since 2.0.0 + * @category mutations + */ +const take = exports.take = internal.take; +/** + * Takes all values from the queue. + * + * @since 2.0.0 + * @category mutations + */ +const takeAll = exports.takeAll = internal.takeAll; +/** + * Takes a value from the queue, returning `None` if there is not a value in + * the queue. + * + * @since 2.0.0 + * @category mutations + */ +const takeOption = exports.takeOption = internal.takeOption; +/** + * Takes up to the specified maximum number of elements from the queue. + * + * @since 2.0.0 + * @category mutations + */ +const takeUpTo = exports.takeUpTo = internal.takeUpTo; +/** + * Collects all values into a `Chunk`. + * + * @since 2.0.0 + * @category destructors + */ +const toChunk = exports.toChunk = internal.toChunk; +/** + * Collects all values into an array. + * + * @since 2.0.0 + * @category destructors + */ +const toArray = exports.toArray = internal.toArray; +//# sourceMappingURL=TPriorityQueue.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TPriorityQueue.js.map b/backend/node_modules/effect/dist/cjs/TPriorityQueue.js.map new file mode 100644 index 0000000000000000000000000000000000000000..6d114295eb529e5861532465b9afd71a7453d7f3 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TPriorityQueue.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TPriorityQueue.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TPriorityQueueTypeId","exports","empty","fromIterable","isEmpty","isNonEmpty","make","offer","offerAll","peek","peekOption","removeIf","retainIf","size","take","takeAll","takeOption","takeUpTo","toChunk","toArray"],"sources":["../../src/TPriorityQueue.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA4D,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAA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oDnC,QAAQ,CAACmC,IAAI;AAElF;;;;;;AAMO,MAAMC,IAAI,GAAAb,OAAA,CAAAa,IAAA,GAA+CpC,QAAQ,CAACoC,IAAI;AAE7E;;;;;;AAMO,MAAMC,OAAO,GAAAd,OAAA,CAAAc,OAAA,GAAsDrC,QAAQ,CAACqC,OAAO;AAE1F;;;;;;;AAOO,MAAMC,UAAU,GAAAf,OAAA,CAAAe,UAAA,GAA8DtC,QAAQ,CAACsC,UAAU;AAExG;;;;;;AAMO,MAAMC,QAAQ,GAAAhB,OAAA,CAAAgB,QAAA,GAejBvC,QAAQ,CAACuC,QAAQ;AAErB;;;;;;AAMO,MAAMC,OAAO,GAAAjB,OAAA,CAAAiB,OAAA,GAA4DxC,QAAQ,CAACwC,OAAO;AAEhG;;;;;;AAMO,MAAMC,OAAO,GAAAlB,OAAA,CAAAkB,OAAA,GAAsDzC,QAAQ,CAACyC,OAAO","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TPubSub.js b/backend/node_modules/effect/dist/cjs/TPubSub.js new file mode 100644 index 0000000000000000000000000000000000000000..e160bf2cebabc98050c75fb8a6a443a75f3b3cd6 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TPubSub.js @@ -0,0 +1,138 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.unbounded = exports.subscribeScoped = exports.subscribe = exports.sliding = exports.size = exports.shutdown = exports.publishAll = exports.publish = exports.isShutdown = exports.isFull = exports.isEmpty = exports.dropping = exports.capacity = exports.bounded = exports.awaitShutdown = exports.TPubSubTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/stm/tPubSub.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const TPubSubTypeId = exports.TPubSubTypeId = internal.TPubSubTypeId; +/** + * Waits until the `TPubSub` is shutdown. The `STM` returned by this method will + * not resume until the queue has been shutdown. If the `TPubSub` is already + * shutdown, the `STM` will resume right away. + * + * @since 2.0.0 + * @category mutations + */ +const awaitShutdown = exports.awaitShutdown = internal.awaitShutdown; +/** + * Creates a bounded `TPubSub` with the back pressure strategy. The `TPubSub` will retain + * messages until they have been taken by all subscribers, applying back + * pressure to publishers if the `TPubSub` is at capacity. + * + * @since 2.0.0 + * @category constructors + */ +const bounded = exports.bounded = internal.bounded; +/** + * Returns the number of elements the `TPubSub` can hold. + * + * @since 2.0.0 + * @category getters + */ +const capacity = exports.capacity = internal.capacity; +/** + * Creates a bounded `TPubSub` with the dropping strategy. The `TPubSub` will drop new + * messages if the `TPubSub` is at capacity. + * + * @since 2.0.0 + * @category constructors + */ +const dropping = exports.dropping = internal.dropping; +/** + * Returns `true` if the `TPubSub` contains zero elements, `false` otherwise. + * + * @since 2.0.0 + * @category getters + */ +const isEmpty = exports.isEmpty = internal.isEmpty; +/** + * Returns `true` if the `TPubSub` contains at least one element, `false` + * otherwise. + * + * @since 2.0.0 + * @category getters + */ +const isFull = exports.isFull = internal.isFull; +/** + * Interrupts any fibers that are suspended on `offer` or `take`. Future calls + * to `offer*` and `take*` will be interrupted immediately. + * + * @since 2.0.0 + * @category utils + */ +const shutdown = exports.shutdown = internal.shutdown; +/** + * Returns `true` if `shutdown` has been called, otherwise returns `false`. + * + * @since 2.0.0 + * @category getters + */ +const isShutdown = exports.isShutdown = internal.isShutdown; +/** + * Publishes a message to the `TPubSub`, returning whether the message was published + * to the `TPubSub`. + * + * @since 2.0.0 + * @category mutations + */ +const publish = exports.publish = internal.publish; +/** + * Publishes all of the specified messages to the `TPubSub`, returning whether they + * were published to the `TPubSub`. + * + * @since 2.0.0 + * @category mutations + */ +const publishAll = exports.publishAll = internal.publishAll; +/** + * Retrieves the size of the `TPubSub`, which is equal to the number of elements + * in the `TPubSub`. This may be negative if fibers are suspended waiting for + * elements to be added to the `TPubSub`. + * + * @since 2.0.0 + * @category getters + */ +const size = exports.size = internal.size; +/** + * Creates a bounded `TPubSub` with the sliding strategy. The `TPubSub` will add new + * messages and drop old messages if the `TPubSub` is at capacity. + * + * For best performance use capacities that are powers of two. + * + * @since 2.0.0 + * @category constructors + */ +const sliding = exports.sliding = internal.sliding; +/** + * Subscribes to receive messages from the `TPubSub`. The resulting subscription can + * be evaluated multiple times to take a message from the `TPubSub` each time. The + * caller is responsible for unsubscribing from the `TPubSub` by shutting down the + * queue. + * + * @since 2.0.0 + * @category mutations + */ +const subscribe = exports.subscribe = internal.subscribe; +/** + * Subscribes to receive messages from the `TPubSub`. The resulting subscription can + * be evaluated multiple times within the scope to take a message from the `TPubSub` + * each time. + * + * @since 2.0.0 + * @category mutations + */ +const subscribeScoped = exports.subscribeScoped = internal.subscribeScoped; +/** + * Creates an unbounded `TPubSub`. + * + * @since 2.0.0 + * @category constructors + */ +const unbounded = exports.unbounded = internal.unbounded; +//# sourceMappingURL=TPubSub.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TQueue.js.map b/backend/node_modules/effect/dist/cjs/TQueue.js.map new file mode 100644 index 0000000000000000000000000000000000000000..17a9b54c18528110a51c9fc5ac769a8f5d513512 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TQueue.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TQueue.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TDequeueTypeId","exports","TEnqueueTypeId","isTQueue","isTDequeue","isTEnqueue","awaitShutdown","bounded","capacity","dropping","isEmpty","isFull","isShutdown","offer","offerAll","peek","peekOption","poll","seek","shutdown","size","sliding","take","takeAll","takeBetween","takeN","takeUpTo","unbounded"],"sources":["../../src/TQueue.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAoD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAHpD;;;;AASA;;;;AAIO,MAAMkB,cAAc,GAAAC,OAAA,CAAAD,cAAA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end/node_modules/effect/dist/cjs/TRandom.js b/backend/node_modules/effect/dist/cjs/TRandom.js new file mode 100644 index 0000000000000000000000000000000000000000..fac6354a91acf4c0a85f57da0f8989794d28977c --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TRandom.js @@ -0,0 +1,72 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.shuffle = exports.nextRange = exports.nextIntBetween = exports.nextInt = exports.nextBoolean = exports.next = exports.live = exports.Tag = exports.TRandomTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/stm/tRandom.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + * @category symbols + */ +const TRandomTypeId = exports.TRandomTypeId = internal.TRandomTypeId; +/** + * The service tag used to access `TRandom` in the environment of an effect. + * + * @since 2.0.0 + * @category context + */ +const Tag = exports.Tag = internal.Tag; +/** + * The "live" `TRandom` service wrapped into a `Layer`. + * + * @since 2.0.0 + * @category context + */ +const live = exports.live = internal.live; +/** + * Returns the next number from the pseudo-random number generator. + * + * @since 2.0.0 + * @category random + */ +const next = exports.next = internal.next; +/** + * Returns the next boolean value from the pseudo-random number generator. + * + * @since 2.0.0 + * @category random + */ +const nextBoolean = exports.nextBoolean = internal.nextBoolean; +/** + * Returns the next integer from the pseudo-random number generator. + * + * @since 2.0.0 + * @category random + */ +const nextInt = exports.nextInt = internal.nextInt; +/** + * Returns the next integer in the specified range from the pseudo-random number + * generator. + * + * @since 2.0.0 + * @category random + */ +const nextIntBetween = exports.nextIntBetween = internal.nextIntBetween; +/** + * Returns the next number in the specified range from the pseudo-random number + * generator. + * + * @since 2.0.0 + * @category random + */ +const nextRange = exports.nextRange = internal.nextRange; +/** + * Uses the pseudo-random number generator to shuffle the specified iterable. + * + * @since 2.0.0 + * @category random + */ +const shuffle = exports.shuffle = internal.shuffle; +//# sourceMappingURL=TRandom.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TReentrantLock.js.map b/backend/node_modules/effect/dist/cjs/TReentrantLock.js.map new file mode 100644 index 0000000000000000000000000000000000000000..035f7bd2e88cda52ff186556805b9f25c4dba07e --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TReentrantLock.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TReentrantLock.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TReentrantLockTypeId","exports","acquireRead","acquireWrite","fiberReadLocks","fiberWriteLocks","lock","locked","make","readLock","readLocks","readLocked","releaseRead","releaseWrite","withLock","withReadLock","withWriteLock","writeLock","writeLocked","writeLocks"],"sources":["../../src/TReentrantLock.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA4D,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAA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GAAAP,OAAA,CAAAO,IAAA,GAA4B9B,QAAQ,CAAC8B,IAAI;AAE1D;;;;;;AAMO,MAAMC,QAAQ,GAAAR,OAAA,CAAAQ,QAAA,GAAwE/B,QAAQ,CAAC+B,QAAQ;AAE9G;;;;;;AAMO,MAAMC,SAAS,GAAAT,OAAA,CAAAS,SAAA,GAA8ChC,QAAQ,CAACgC,SAAS;AAEtF;;;;;;AAMO,MAAMC,UAAU,GAAAV,OAAA,CAAAU,UAAA,GAA+CjC,QAAQ,CAACiC,UAAU;AAEzF;;;;;;;AAOO,MAAMC,WAAW,GAAAX,OAAA,CAAAW,WAAA,GAA8ClC,QAAQ,CAACkC,WAAW;AAE1F;;;;;;;AAOO,MAAMC,YAAY,GAAAZ,OAAA,CAAAY,YAAA,GAA8CnC,QAAQ,CAACmC,YAAY;AAE5F;;;;;;AAMO,MAAMC,QAAQ,GAAAb,OAAA,CAAAa,QAAA,GAejBpC,QAAQ,CAACoC,QAAQ;AAErB;;;;;;AAMO,MAAMC,YAAY,GAAAd,OAAA,CAAAc,YAAA,GAerBrC,QAAQ,CAACqC,YAAY;AAEzB;;;;;;AAMO,MAAMC,aAAa,GAAAf,OAAA,CAAAe,aAAA,GAetBtC,QAAQ,CAACsC,aAAa;AAE1B;;;;;;AAMO,MAAMC,SAAS,GAAAhB,OAAA,CAAAgB,SAAA,GAAwEvC,QAAQ,CAACuC,SAAS;AAEhH;;;;;;AAMO,MAAMC,WAAW,GAAAjB,OAAA,CAAAiB,WAAA,GAA+CxC,QAAQ,CAACwC,WAAW;AAE3F;;;;;;AAMO,MAAMC,UAAU,GAAAlB,OAAA,CAAAkB,UAAA,GAA8CzC,QAAQ,CAACyC,UAAU","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TRef.js b/backend/node_modules/effect/dist/cjs/TRef.js new file mode 100644 index 0000000000000000000000000000000000000000..ee34c186f97fa62bfb4f2e6374480f0efc4fb13e --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TRef.js @@ -0,0 +1,83 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.updateSomeAndGet = exports.updateSome = exports.updateAndGet = exports.update = exports.setAndGet = exports.set = exports.modifySome = exports.modify = exports.make = exports.getAndUpdateSome = exports.getAndUpdate = exports.getAndSet = exports.get = exports.TRefTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/stm/tRef.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * @since 2.0.0 + * @category symbols + */ +const TRefTypeId = exports.TRefTypeId = internal.TRefTypeId; +/** + * @since 2.0.0 + * @category mutations + */ +const get = exports.get = internal.get; +/** + * @since 2.0.0 + * @category mutations + */ +const getAndSet = exports.getAndSet = internal.getAndSet; +/** + * @since 2.0.0 + * @category mutations + */ +const getAndUpdate = exports.getAndUpdate = internal.getAndUpdate; +/** + * @since 2.0.0 + * @category mutations + */ +const getAndUpdateSome = exports.getAndUpdateSome = internal.getAndUpdateSome; +/** + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * @since 2.0.0 + * @category mutations + */ +const modify = exports.modify = internal.modify; +/** + * @since 2.0.0 + * @category mutations + */ +const modifySome = exports.modifySome = internal.modifySome; +/** + * @since 2.0.0 + * @category mutations + */ +const set = exports.set = internal.set; +/** + * @since 2.0.0 + * @category mutations + */ +const setAndGet = exports.setAndGet = internal.setAndGet; +/** + * @since 2.0.0 + * @category mutations + */ +const update = exports.update = internal.update; +/** + * @since 2.0.0 + * @category mutations + */ +const updateAndGet = exports.updateAndGet = internal.updateAndGet; +/** + * @since 2.0.0 + * @category mutations + */ +const updateSome = exports.updateSome = internal.updateSome; +/** + * @since 2.0.0 + * @category mutations + */ +const updateSomeAndGet = exports.updateSomeAndGet = internal.updateSomeAndGet; +//# sourceMappingURL=TRef.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TRef.js.map b/backend/node_modules/effect/dist/cjs/TRef.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b67dec1acf03a8b52329937dd74046a9b5fcdfba --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TRef.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TRef.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TRefTypeId","exports","getAndSet","getAndUpdate","getAndUpdateSome","make","modify","modifySome","setAndGet","update","updateAndGet","updateSome","updateSomeAndGet"],"sources":["../../src/TRef.ts"],"sourcesContent":[null],"mappings":";;;;;;AAKA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAkD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA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AP,GAAA,GAWZhB,QAAQ,CAACgB,GAAG;AAEhB;;;;AAIO,MAAMc,SAAS,GAAAP,OAAA,CAAAO,SAAA,GAWlB9B,QAAQ,CAAC8B,SAAS;AAEtB;;;;AAIO,MAAMC,MAAM,GAAAR,OAAA,CAAAQ,MAAA,GAWf/B,QAAQ,CAAC+B,MAAM;AAEnB;;;;AAIO,MAAMC,YAAY,GAAAT,OAAA,CAAAS,YAAA,GAWrBhC,QAAQ,CAACgC,YAAY;AAEzB;;;;AAIO,MAAMC,UAAU,GAAAV,OAAA,CAAAU,UAAA,GAWnBjC,QAAQ,CAACiC,UAAU;AAEvB;;;;AAIO,MAAMC,gBAAgB,GAAAX,OAAA,CAAAW,gBAAA,GAWzBlC,QAAQ,CAACkC,gBAAgB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TSemaphore.js b/backend/node_modules/effect/dist/cjs/TSemaphore.js new file mode 100644 index 0000000000000000000000000000000000000000..ee1768c57a27c83fbf981bd83cbc11ad88fe9b02 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TSemaphore.js @@ -0,0 +1,73 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.withPermitsScoped = exports.withPermits = exports.withPermitScoped = exports.withPermit = exports.unsafeMake = exports.releaseN = exports.release = exports.make = exports.available = exports.acquireN = exports.acquire = exports.TSemaphoreTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/stm/tSemaphore.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * @since 2.0.0 + * @category symbols + */ +const TSemaphoreTypeId = exports.TSemaphoreTypeId = internal.TSemaphoreTypeId; +/** + * @since 2.0.0 + * @category mutations + */ +const acquire = exports.acquire = internal.acquire; +/** + * @since 2.0.0 + * @category mutations + */ +const acquireN = exports.acquireN = internal.acquireN; +/** + * @since 2.0.0 + * @category getters + */ +const available = exports.available = internal.available; +/** + * @since 2.0.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * @since 2.0.0 + * @category mutations + */ +const release = exports.release = internal.release; +/** + * @since 2.0.0 + * @category mutations + */ +const releaseN = exports.releaseN = internal.releaseN; +/** + * @since 2.0.0 + * @category mutations + */ +const withPermit = exports.withPermit = internal.withPermit; +/** + * @since 2.0.0 + * @category mutations + */ +const withPermits = exports.withPermits = internal.withPermits; +/** + * @since 2.0.0 + * @category mutations + */ +const withPermitScoped = exports.withPermitScoped = internal.withPermitScoped; +/** + * @since 2.0.0 + * @category mutations + */ +const withPermitsScoped = exports.withPermitsScoped = internal.withPermitsScoped; +/** + * @since 2.0.0 + * @category unsafe + */ +const unsafeMake = exports.unsafeMake = internal.unsafeMakeSemaphore; +//# sourceMappingURL=TSemaphore.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TSemaphore.js.map b/backend/node_modules/effect/dist/cjs/TSemaphore.js.map new file mode 100644 index 0000000000000000000000000000000000000000..26c2c28af8009ca75b02ab1351398a7fab3d58c5 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TSemaphore.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TSemaphore.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TSemaphoreTypeId","exports","acquire","acquireN","available","make","release","releaseN","withPermit","withPermits","withPermitScoped","withPermitsScoped","unsafeMake","unsafeMakeSem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AACwB,OAAO;AAE5E;;;;AAIO,MAAMC,QAAQ,GAAAF,OAAA,CAAAE,QAAA,GAWjBzB,QAAQ,CAACyB,QAAQ;AAErB;;;;AAIO,MAAMC,SAAS,GAAAH,OAAA,CAAAG,SAAA,GAA0C1B,QAAQ,CAAC0B,SAAS;AAElF;;;;AAIO,MAAMC,IAAI,GAAAJ,OAAA,CAAAI,IAAA,GAA6C3B,QAAQ,CAAC2B,IAAI;AAE3E;;;;AAIO,MAAMC,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAwC5B,QAAQ,CAAC4B,OAAO;AAE5E;;;;AAIO,MAAMC,QAAQ,GAAAN,OAAA,CAAAM,QAAA,GAWjB7B,QAAQ,CAAC6B,QAAQ;AAErB;;;;AAIO,MAAMC,UAAU,GAAAP,OAAA,CAAAO,UAAA,GAWnB9B,QAAQ,CAAC8B,UAAU;AAEvB;;;;AAIO,MAAMC,WAAW,GAAAR,OAAA,CAAAQ,WAAA,GAWpB/B,QAAQ,CAAC+B,WAAW;AAExB;;;;AAIO,MAAMC,gBAAgB,GAAAT,OAAA,CAAAS,gBAAA,GAAkEhC,QAAQ,CAACgC,gBAAgB;AAExH;;;;AAIO,MAAMC,iBAAiB,GAAAV,OAAA,CAAAU,iBAAA,GAW1BjC,QAAQ,CAACiC,iBAAiB;AAE9B;;;;AAIO,MAAMC,UAAU,GAAAX,OAAA,CAAAW,UAAA,GAAoClC,QAAQ,CAACmC,mBAAmB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TSubscriptionRef.js b/backend/node_modules/effect/dist/cjs/TSubscriptionRef.js new file mode 100644 index 0000000000000000000000000000000000000000..776637448082eab6a2eb31e4cc7b9b1aedcbbb56 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TSubscriptionRef.js @@ -0,0 +1,95 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.updateSomeAndGet = exports.updateSome = exports.updateAndGet = exports.update = exports.setAndGet = exports.set = exports.modifySome = exports.modify = exports.make = exports.getAndUpdateSome = exports.getAndUpdate = exports.getAndSet = exports.get = exports.changesStream = exports.changesScoped = exports.changes = exports.TSubscriptionRefTypeId = void 0; +var internal = _interopRequireWildcard(require("./internal/stm/tSubscriptionRef.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 3.10.0 + * @category symbols + */ +const TSubscriptionRefTypeId = exports.TSubscriptionRefTypeId = internal.TSubscriptionRefTypeId; +/** + * @since 3.10.0 + * @category mutations + */ +const get = exports.get = internal.get; +/** + * @since 3.10.0 + * @category mutations + */ +const getAndSet = exports.getAndSet = internal.getAndSet; +/** + * @since 3.10.0 + * @category mutations + */ +const getAndUpdate = exports.getAndUpdate = internal.getAndUpdate; +/** + * @since 3.10.0 + * @category mutations + */ +const getAndUpdateSome = exports.getAndUpdateSome = internal.getAndUpdateSome; +/** + * @since 3.10.0 + * @category constructors + */ +const make = exports.make = internal.make; +/** + * @since 3.10.0 + * @category mutations + */ +const modify = exports.modify = internal.modify; +/** + * @since 3.10.0 + * @category mutations + */ +const modifySome = exports.modifySome = internal.modifySome; +/** + * @since 3.10.0 + * @category mutations + */ +const set = exports.set = internal.set; +/** + * @since 3.10.0 + * @category mutations + */ +const setAndGet = exports.setAndGet = internal.setAndGet; +/** + * @since 3.10.0 + * @category mutations + */ +const update = exports.update = internal.update; +/** + * @since 3.10.0 + * @category mutations + */ +const updateAndGet = exports.updateAndGet = internal.updateAndGet; +/** + * @since 3.10.0 + * @category mutations + */ +const updateSome = exports.updateSome = internal.updateSome; +/** + * @since 3.10.0 + * @category mutations + */ +const updateSomeAndGet = exports.updateSomeAndGet = internal.updateSomeAndGet; +/** + * @since 3.10.0 + * @category mutations + */ +const changesScoped = exports.changesScoped = internal.changesScoped; +/** + * @since 3.10.0 + * @category mutations + */ +const changesStream = exports.changesStream = internal.changesStream; +/** + * @since 3.10.0 + * @category mutations + */ +const changes = self => self.changes; +exports.changes = changes; +//# sourceMappingURL=TSubscriptionRef.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TSubscriptionRef.js.map b/backend/node_modules/effect/dist/cjs/TSubscriptionRef.js.map new file mode 100644 index 0000000000000000000000000000000000000000..1098ee967ee72f512d885cf50a2ef35dacc58bc3 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TSubscriptionRef.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TSubscriptionRef.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TSubscriptionRefTypeId","exports","getAndSet","getAndUpdate","getAndUpdateSome","make","modify","modifySome","setAndGet","update","updateAndGet","updateSome","updateSomeAndGet","changesScoped","changesStream","changes","self"],"sources":["../../src/TSubscriptionRef.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA8D,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAA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AQ,CAAC4B,MAAM;AAEnB;;;;AAIO,MAAMC,UAAU,GAAAN,OAAA,CAAAM,UAAA,GAenB7B,QAAQ,CAAC6B,UAAU;AAEvB;;;;AAIO,MAAMb,GAAG,GAAAO,OAAA,CAAAP,GAAA,GAWZhB,QAAQ,CAACgB,GAAG;AAEhB;;;;AAIO,MAAMc,SAAS,GAAAP,OAAA,CAAAO,SAAA,GAWlB9B,QAAQ,CAAC8B,SAAS;AAEtB;;;;AAIO,MAAMC,MAAM,GAAAR,OAAA,CAAAQ,MAAA,GAWf/B,QAAQ,CAAC+B,MAAM;AAEnB;;;;AAIO,MAAMC,YAAY,GAAAT,OAAA,CAAAS,YAAA,GAWrBhC,QAAQ,CAACgC,YAAY;AAEzB;;;;AAIO,MAAMC,UAAU,GAAAV,OAAA,CAAAU,UAAA,GAWnBjC,QAAQ,CAACiC,UAAU;AAEvB;;;;AAIO,MAAMC,gBAAgB,GAAAX,OAAA,CAAAW,gBAAA,GAWzBlC,QAAQ,CAACkC,gBAAgB;AAE7B;;;;AAIO,MAAMC,aAAa,GAAAZ,OAAA,CAAAY,aAAA,GACxBnC,QAAQ,CAACmC,aAAa;AAExB;;;;AAIO,MAAMC,aAAa,GAAAb,OAAA,CAAAa,aAAA,GAAuDpC,QAAQ,CAACoC,aAAa;AAEvG;;;;AAIO,MAAMC,OAAO,GAAmEC,IAAI,IAAKA,IAAI,CAACD,OAAO;AAAAd,OAAA,CAAAc,OAAA,GAAAA,OAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TestAnnotation.js b/backend/node_modules/effect/dist/cjs/TestAnnotation.js new file mode 100644 index 0000000000000000000000000000000000000000..901754b7e47a929a6dec56e675931adbbf5c0157 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TestAnnotation.js @@ -0,0 +1,105 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.tagged = exports.retried = exports.repeated = exports.make = exports.isTestAnnotation = exports.ignored = exports.fibers = exports.compose = exports.TestAnnotationTypeId = void 0; +var Chunk = _interopRequireWildcard(require("./Chunk.js")); +var Either = _interopRequireWildcard(require("./Either.js")); +var Equal = _interopRequireWildcard(require("./Equal.js")); +var _Function = require("./Function.js"); +var Hash = _interopRequireWildcard(require("./Hash.js")); +var HashSet = _interopRequireWildcard(require("./HashSet.js")); +var _errors = require("./internal/errors.js"); +var _Predicate = require("./Predicate.js"); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** @internal */ +const TestAnnotationSymbolKey = "effect/TestAnnotation"; +/** + * @since 2.0.0 + */ +const TestAnnotationTypeId = exports.TestAnnotationTypeId = /*#__PURE__*/Symbol.for(TestAnnotationSymbolKey); +/** @internal */ +class TestAnnotationImpl { + identifier; + initial; + combine; + [TestAnnotationTypeId] = { + _A: _ => _ + }; + constructor(identifier, initial, combine) { + this.identifier = identifier; + this.initial = initial; + this.combine = combine; + } + [Hash.symbol]() { + return (0, _Function.pipe)(Hash.hash(TestAnnotationSymbolKey), Hash.combine(Hash.hash(this.identifier)), Hash.cached(this)); + } + [Equal.symbol](that) { + return isTestAnnotation(that) && this.identifier === that.identifier; + } +} +/** + * @since 2.0.0 + */ +const isTestAnnotation = u => (0, _Predicate.hasProperty)(u, TestAnnotationTypeId); +/** + * @since 2.0.0 + */ +exports.isTestAnnotation = isTestAnnotation; +const make = (identifier, initial, combine) => { + return new TestAnnotationImpl(identifier, initial, combine); +}; +/** + * @since 2.0.0 + */ +exports.make = make; +const compose = (left, right) => { + if (Either.isLeft(left) && Either.isLeft(right)) { + return Either.left(left.left + right.left); + } + if (Either.isRight(left) && Either.isRight(right)) { + return Either.right((0, _Function.pipe)(left.right, Chunk.appendAll(right.right))); + } + if (Either.isRight(left) && Either.isLeft(right)) { + return right; + } + if (Either.isLeft(left) && Either.isRight(right)) { + return right; + } + throw new Error((0, _errors.getBugErrorMessage)("TestAnnotation.compose")); +}; +/** + * @since 2.0.0 + */ +exports.compose = compose; +const fibers = exports.fibers = /*#__PURE__*/make("fibers", /*#__PURE__*/Either.left(0), compose); +/** + * An annotation which counts ignored tests. + * + * @since 2.0.0 + */ +const ignored = exports.ignored = /*#__PURE__*/make("ignored", 0, (a, b) => a + b); +/** + * An annotation which counts repeated tests. + * + * @since 2.0.0 + */ +const repeated = exports.repeated = /*#__PURE__*/make("repeated", 0, (a, b) => a + b); +/** + * An annotation which counts retried tests. + * + * @since 2.0.0 + */ +const retried = exports.retried = /*#__PURE__*/make("retried", 0, (a, b) => a + b); +/** + * An annotation which tags tests with strings. + * + * @since 2.0.0 + */ +const tagged = exports.tagged = /*#__PURE__*/make("tagged", /*#__PURE__*/HashSet.empty(), (a, b) => (0, _Function.pipe)(a, HashSet.union(b))); +//# sourceMappingURL=TestAnnotation.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TestAnnotation.js.map b/backend/node_modules/effect/dist/cjs/TestAnnotation.js.map new file mode 100644 index 0000000000000000000000000000000000000000..8de22088113c3010521d666f503df6ab188b5789 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TestAnnotation.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TestAnnotation.js","names":["Chunk","_interopRequireWildcard","require","Either","Equal","_Function","Hash","HashSet","_errors","_Predicate","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TestAnnotationSymbolKey","TestAnnotationTypeId","exports","Symbol","for","TestAnnotationImpl","identifier","initial","combine","_A","_","constructor","symbol","pipe","hash","cached","that","isTestAnnotation","u","hasProperty","make","compose","left","right","isLeft","isRight","appendAll","Error","getBugErrorMessage","fibers","ignored","a","b","repeated","retried","tagged","empty","union"],"sources":["../../src/TestAnnotation.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,KAAA,GAAAH,uBAAA,CAAAC,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAL,uBAAA,CAAAC,OAAA;AACA,IAAAK,OAAA,GAAAN,uBAAA,CAAAC,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAEA,IAAAO,UAAA,GAAAP,OAAA;AAA4C,SAAAD,wBAAAS,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAX,uBAAA,YAAAA,CAAAS,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAA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CAAC,CAAC,CAAC,EACdD,OAAO,CACR;AAED;;;;;AAKO,MAAMS,OAAO,GAAA5B,OAAA,CAAA4B,OAAA,gBAA2BV,IAAI,CACjD,SAAS,EACT,CAAC,EACD,CAACW,CAAC,EAAEC,CAAC,KAAKD,CAAC,GAAGC,CAAC,CAChB;AAED;;;;;AAKO,MAAMC,QAAQ,GAAA/B,OAAA,CAAA+B,QAAA,gBAA2Bb,IAAI,CAClD,UAAU,EACV,CAAC,EACD,CAACW,CAAC,EAAEC,CAAC,KAAKD,CAAC,GAAGC,CAAC,CAChB;AAED;;;;;AAKO,MAAME,OAAO,GAAAhC,OAAA,CAAAgC,OAAA,gBAA2Bd,IAAI,CACjD,SAAS,EACT,CAAC,EACD,CAACW,CAAC,EAAEC,CAAC,KAAKD,CAAC,GAAGC,CAAC,CAChB;AAED;;;;;AAKO,MAAMG,MAAM,GAAAjC,OAAA,CAAAiC,MAAA,gBAA4Cf,IAAI,CACjE,QAAQ,eACR1C,OAAO,CAAC0D,KAAK,EAAE,EACf,CAACL,CAAC,EAAEC,CAAC,KAAK,IAAAnB,cAAI,EAACkB,CAAC,EAAErD,OAAO,CAAC2D,KAAK,CAACL,CAAC,CAAC,CAAC,CACpC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TestAnnotationMap.js b/backend/node_modules/effect/dist/cjs/TestAnnotationMap.js new file mode 100644 index 0000000000000000000000000000000000000000..a631951258e227d65c52f0633726480fdd12836c --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TestAnnotationMap.js @@ -0,0 +1,91 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.update = exports.overwrite = exports.make = exports.isTestAnnotationMap = exports.get = exports.empty = exports.combine = exports.annotate = exports.TestAnnotationMapTypeId = void 0; +var _Function = require("./Function.js"); +var HashMap = _interopRequireWildcard(require("./HashMap.js")); +var _Predicate = require("./Predicate.js"); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * @since 2.0.0 + */ +const TestAnnotationMapTypeId = exports.TestAnnotationMapTypeId = /*#__PURE__*/Symbol.for("effect/TestAnnotationMap"); +/** @internal */ +class TestAnnotationMapImpl { + map; + [TestAnnotationMapTypeId] = TestAnnotationMapTypeId; + constructor(map) { + this.map = map; + } +} +/** + * @since 2.0.0 + */ +const isTestAnnotationMap = u => (0, _Predicate.hasProperty)(u, TestAnnotationMapTypeId); +/** + * @since 2.0.0 + */ +exports.isTestAnnotationMap = isTestAnnotationMap; +const empty = () => new TestAnnotationMapImpl(HashMap.empty()); +/** + * @since 2.0.0 + */ +exports.empty = empty; +const make = map => { + return new TestAnnotationMapImpl(map); +}; +/** + * @since 2.0.0 + */ +exports.make = make; +const overwrite = exports.overwrite = /*#__PURE__*/(0, _Function.dual)(3, (self, key, value) => make(HashMap.set(self.map, key, value))); +/** + * @since 2.0.0 + */ +const update = exports.update = /*#__PURE__*/(0, _Function.dual)(3, (self, key, f) => { + let value = key.initial; + if (HashMap.has(self.map, key)) { + value = HashMap.unsafeGet(self.map, key); + } + return overwrite(self, key, f(value)); +}); +/** + * Retrieves the annotation of the specified type, or its default value if + * there is none. + * + * @since 2.0.0 + */ +const get = exports.get = /*#__PURE__*/(0, _Function.dual)(2, (self, key) => { + if (HashMap.has(self.map, key)) { + return HashMap.unsafeGet(self.map, key); + } + return key.initial; +}); +/** + * Appends the specified annotation to the annotation map. + * + * @since 2.0.0 + */ +const annotate = exports.annotate = /*#__PURE__*/(0, _Function.dual)(3, (self, key, value) => update(self, key, _ => key.combine(_, value))); +/** + * @since 2.0.0 + */ +const combine = exports.combine = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => { + let result = self.map; + for (const entry of that.map) { + if (HashMap.has(result, entry[0])) { + const value = HashMap.get(result, entry[0]); + result = HashMap.set(result, entry[0], entry[0].combine(value, entry[1])); + } else { + result = HashMap.set(result, entry[0], entry[1]); + } + } + return make(result); +}); +//# sourceMappingURL=TestAnnotationMap.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TestAnnotationMap.js.map b/backend/node_modules/effect/dist/cjs/TestAnnotationMap.js.map new file mode 100644 index 0000000000000000000000000000000000000000..af74da094478daff595b594ab24fb6485d8c3ccc --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TestAnnotationMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TestAnnotationMap.js","names":["_Function","require","HashMap","_interopRequireWildcard","_Predicate","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TestAnnotationMapTypeId","exports","Symbol","for","TestAnnotationMapImpl","map","constructor","isTestAnnotationMap","u","hasProperty","empty","make","overwrite","dual","self","key","value","update","initial","unsafeGet","annotate","_","combine","that","result","entry"],"sources":["../../src/TestAnnotationMap.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAA4C,SAAAE,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAA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AAEF;;;;;AAKO,MAAME,QAAQ,GAAAnB,OAAA,CAAAmB,QAAA,gBAAG,IAAAP,cAAI,EAa1B,CAAC,EAAE,CAACC,IAAI,EAAEC,GAAG,EAAEC,KAAK,KAAKC,MAAM,CAACH,IAAI,EAAEC,GAAG,EAAGM,CAAC,IAAKN,GAAG,CAACO,OAAO,CAACD,CAAC,EAAEL,KAAK,CAAC,CAAC,CAAC;AAE3E;;;AAGO,MAAMM,OAAO,GAAArB,OAAA,CAAAqB,OAAA,gBAAG,IAAAT,cAAI,EASzB,CAAC,EAAE,CAACC,IAAI,EAAES,IAAI,KAAI;EAClB,IAAIC,MAAM,GAAGV,IAAI,CAACT,GAAG;EACrB,KAAK,MAAMoB,KAAK,IAAIF,IAAI,CAAClB,GAAG,EAAE;IAC5B,IAAI3B,OAAO,CAACc,GAAG,CAACgC,MAAM,EAAEC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;MACjC,MAAMT,KAAK,GAAGtC,OAAO,CAACe,GAAG,CAAC+B,MAAM,EAAEC,KAAK,CAAC,CAAC,CAAC,CAAE;MAC5CD,MAAM,GAAG9C,OAAO,CAACgB,GAAG,CAAC8B,MAAM,EAAEC,KAAK,CAAC,CAAC,CAAC,EAAEA,KAAK,CAAC,CAAC,CAAC,CAACH,OAAO,CAACN,KAAK,EAAES,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3E,CAAC,MAAM;MACLD,MAAM,GAAG9C,OAAO,CAACgB,GAAG,CAAC8B,MAAM,EAAEC,KAAK,CAAC,CAAC,CAAC,EAAEA,KAAK,CAAC,CAAC,CAAC,CAAC;IAClD;EACF;EACA,OAAOd,IAAI,CAACa,MAAM,CAAC;AACrB,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TestAnnotations.js b/backend/node_modules/effect/dist/cjs/TestAnnotations.js new file mode 100644 index 0000000000000000000000000000000000000000..17694884964eab7b1e9600231115e9f1e6ba2138 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TestAnnotations.js @@ -0,0 +1,71 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.make = exports.isTestAnnotations = exports.TestAnnotationsTypeId = exports.TestAnnotations = void 0; +var RA = _interopRequireWildcard(require("./Array.js")); +var Context = _interopRequireWildcard(require("./Context.js")); +var Equal = _interopRequireWildcard(require("./Equal.js")); +var _Function = require("./Function.js"); +var effect = _interopRequireWildcard(require("./internal/core-effect.js")); +var core = _interopRequireWildcard(require("./internal/core.js")); +var fiber = _interopRequireWildcard(require("./internal/fiber.js")); +var MutableRef = _interopRequireWildcard(require("./MutableRef.js")); +var _Predicate = require("./Predicate.js"); +var Ref = _interopRequireWildcard(require("./Ref.js")); +var SortedSet = _interopRequireWildcard(require("./SortedSet.js")); +var TestAnnotation = _interopRequireWildcard(require("./TestAnnotation.js")); +var TestAnnotationMap = _interopRequireWildcard(require("./TestAnnotationMap.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * @since 2.0.0 + */ +const TestAnnotationsTypeId = exports.TestAnnotationsTypeId = /*#__PURE__*/Symbol.for("effect/TestAnnotations"); +/** @internal */ +class AnnotationsImpl { + ref; + [TestAnnotationsTypeId] = TestAnnotationsTypeId; + constructor(ref) { + this.ref = ref; + } + get(key) { + return core.map(Ref.get(this.ref), TestAnnotationMap.get(key)); + } + annotate(key, value) { + return Ref.update(this.ref, TestAnnotationMap.annotate(key, value)); + } + get supervisedFibers() { + return effect.descriptorWith(descriptor => core.flatMap(this.get(TestAnnotation.fibers), either => { + switch (either._tag) { + case "Left": + { + return core.succeed(SortedSet.empty(fiber.Order)); + } + case "Right": + { + return (0, _Function.pipe)(either.right, core.forEachSequential(ref => core.sync(() => MutableRef.get(ref))), core.map(RA.reduce(SortedSet.empty(fiber.Order), (a, b) => SortedSet.union(a, b))), core.map(SortedSet.filter(fiber => !Equal.equals(fiber.id(), descriptor.id)))); + } + } + })); + } +} +/** + * @since 2.0.0 + */ +const TestAnnotations = exports.TestAnnotations = /*#__PURE__*/Context.GenericTag("effect/Annotations"); +/** + * @since 2.0.0 + */ +const isTestAnnotations = u => (0, _Predicate.hasProperty)(u, TestAnnotationsTypeId); +/** + * @since 2.0.0 + */ +exports.isTestAnnotations = isTestAnnotations; +const make = ref => new AnnotationsImpl(ref); +exports.make = make; +//# sourceMappingURL=TestAnnotations.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TestAnnotations.js.map b/backend/node_modules/effect/dist/cjs/TestAnnotations.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ea7fab9143a2bd9c2de06d0ed8477bc5bdb6e8ac --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TestAnnotations.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TestAnnotations.js","names":["RA","_interopRequireWildcard","require","Context","Equal","_Function","effect","core","fiber","MutableRef","_Predicate","Ref","SortedSet","TestAnnotation","TestAnnotationMap","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TestAnnotationsTypeId","exports","Symbol","for","AnnotationsImpl","ref","constructor","key","map","annotate","value","update","supervisedFibers","descriptorWith","descriptor","flatMap","fibers","either","_tag","succeed","empty","Order","pipe","right","forEachSequential","sync","reduce","a","b","union","filter","equals","id","TestAnnotations","GenericTag","isTestAnnotations","u","hasProperty","make"],"sources":["../../src/TestAnnotations.ts"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,CAAC9C,KAAK,CAAC+C,KAAK,CAAC,CAAC;UACnD;QACA,KAAK,OAAO;UAAE;YACZ,OAAO,IAAAC,cAAI,EACTL,MAAM,CAACM,KAAK,EACZlD,IAAI,CAACmD,iBAAiB,CAAEnB,GAAG,IAAKhC,IAAI,CAACoD,IAAI,CAAC,MAAMlD,UAAU,CAACkB,GAAG,CAACY,GAAG,CAAC,CAAC,CAAC,EACrEhC,IAAI,CAACmC,GAAG,CAAC1C,EAAE,CAAC4D,MAAM,CAAChD,SAAS,CAAC0C,KAAK,CAAC9C,KAAK,CAAC+C,KAAK,CAAC,EAAE,CAACM,CAAC,EAAEC,CAAC,KAAKlD,SAAS,CAACmD,KAAK,CAACF,CAAC,EAAEC,CAAC,CAAC,CAAC,CAAC,EAClFvD,IAAI,CAACmC,GAAG,CAAC9B,SAAS,CAACoD,MAAM,CAAExD,KAAK,IAAK,CAACJ,KAAK,CAAC6D,MAAM,CAACzD,KAAK,CAAC0D,EAAE,EAAE,EAAElB,UAAU,CAACkB,EAAE,CAAC,CAAC,CAAC,CAChF;UACH;MACF;IACF,CAAC,CAAC,CACH;EACH;;AAGF;;;AAGO,MAAMC,eAAe,GAAAhC,OAAA,CAAAgC,eAAA,gBAAkDhE,OAAO,CAACiE,UAAU,CAC9F,oBAAoB,CACrB;AAED;;;AAGO,MAAMC,iBAAiB,GAAIC,CAAU,IAA2B,IAAAC,sBAAW,EAACD,CAAC,EAAEpC,qBAAqB,CAAC;AAE5G;;;AAAAC,OAAA,CAAAkC,iBAAA,GAAAA,iBAAA;AAGO,MAAMG,IAAI,GACfjC,GAAiD,IAC7B,IAAID,eAAe,CAACC,GAAG,CAAC;AAAAJ,OAAA,CAAAqC,IAAA,GAAAA,IAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TestClock.js.map b/backend/node_modules/effect/dist/cjs/TestClock.js.map new file mode 100644 index 0000000000000000000000000000000000000000..3ee6101f8fe42fbf7b25d92124969662c8756a94 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TestClock.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TestClock.js","names":["Chunk","_interopRequireWildcard","require","Context","DateTime","Duration","Equal","FiberStatus","_Function","HashMap","clock","effect","core","defaultServices","circular","fiberRuntime","layer","ref","synchronized","SuspendedWarningData","WarningData","number","Option","Order","Annotations","Live","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","makeData","instant","sleeps","exports","TestClock","GenericTag","warning","suspendedWarning","TestClockImpl","clockState","live","annotations","warningState","suspendedWarningState","ClockTypeId","constructor","currentTimeMillis","map","data","currentTimeNanos","BigInt","unsafeCurrentTimeMillis","unsafeGet","unsafeCurrentTimeNanos","save","setTime","zipRight","warningDone","run","sleep","durationInput","duration","decode","flatMap","deferredMake","deferred","pipe","modify","end","toMillis","prepend","shouldAwait","warningStart","deferredAwait","deferredSucceed","asVoid","_","adjust","adjustWith","zipLeftOptions","concurrent","supervisedFibers","freeze","fibers","reduce","empty","fiber","status","isDone","succeed","id","isSuspended","fail","updateSomeEffect","isStart","some","provide","logWarning","delay","seconds","interruptible","fork","pending","none","warningData","done","isPending","interruptFiber","as","yieldTimer","async","resume","timer","setTimeout","void","sync","clearTimeout","suspended","zip","first","last","equals","awaitSuspended","suspendedWarningStart","zipWith","filterOrFail","identity","constVoid","eventually","suspendedWarningDone","suspendedWarningData","start","sorted","sort","mapInput","isNonEmpty","headNonEmpty","tailNonEmpty","option","_tag","value","yieldNow","scoped","gen","TestLive","TestAnnotations","unsafeMake","makeSynchronized","testClock","withClockScoped","addFinalizer","defaultTestClock","Date","getTime","testClockWith","dual","input","epochMillis","fiberRefGetWith","currentServices","services","clockTag"],"sources":["../../src/TestClock.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAF,uBAAA,CAAAC,OAAA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AAK7I,CAAC,CAAC,IAAA+C,cAAI,EAAC8F,QAAQ,EAAE5K,OAAO,CAACmC,GAAG,CAAC5B,KAAK,CAACsK,QAAQ,CAAC,CAAc,CAAC,CAC1E;AAEH;;;;;;AAAAhI,OAAA,CAAAyH,aAAA,GAAAA,aAAA;AAMO,MAAM5G,iBAAiB,GAAAb,OAAA,CAAAa,iBAAA,gBAA0B4G,aAAa,CAAEN,SAAS,IAAKA,SAAS,CAACtG,iBAAiB,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TestConfig.js b/backend/node_modules/effect/dist/cjs/TestConfig.js new file mode 100644 index 0000000000000000000000000000000000000000..4402e231d9cccc9fe5bf0ef295d93a7d31d38db3 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TestConfig.js @@ -0,0 +1,22 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.make = exports.TestConfig = void 0; +var Context = _interopRequireWildcard(require("./Context.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * @since 2.0.0 + */ +const TestConfig = exports.TestConfig = /*#__PURE__*/Context.GenericTag("effect/TestConfig"); +/** + * @since 2.0.0 + */ +const make = params => params; +exports.make = make; +//# sourceMappingURL=TestConfig.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TestConfig.js.map b/backend/node_modules/effect/dist/cjs/TestConfig.js.map new file mode 100644 index 0000000000000000000000000000000000000000..aaf580a4eebe7a5393f6a317a77b3da2419a60ce --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TestConfig.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TestConfig.js","names":["Context","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TestConfig","exports","GenericTag","make","params"],"sources":["../../src/TestConfig.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,OAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAuC,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAHvC;;;;AAiCA;;;AAGO,MAAMkB,UAAU,GAAAC,OAAA,CAAAD,UAAA,gBAAwCtB,OAAO,CAACwB,UAAU,CAAa,mBAAmB,CAAC;AAElH;;;AAGO,MAAMC,IAAI,GAAIC,MAKpB,IAAiBA,MAAM;AAAAH,OAAA,CAAAE,IAAA,GAAAA,IAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TestContext.js.map b/backend/node_modules/effect/dist/cjs/TestContext.js.map new file mode 100644 index 0000000000000000000000000000000000000000..35ef2c93a4fceff7c30ce12ae91a5100d118de1f --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TestContext.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TestContext.js","names":["_Function","require","defaultServices","_interopRequireWildcard","layer","TestClock","TestServices","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","live","exports","pipe","annotationsLayer","merge","liveLayer","sizedLayer","defaultTestClock","provideMerge","testConfigLayer","repeats","retries","samples","shrinks","LiveContext","syncContext","liveServices","TestContext"],"sources":["../../src/TestContext.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,KAAA,GAAAD,uBAAA,CAAAF,OAAA;AAEA,IAAAI,SAAA,GAAAF,uBAAA,CAAAF,OAAA;AACA,IAAAK,YAAA,GAAAH,uBAAA,CAAAF,OAAA;AAAiD,SAAAE,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAA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C,CACvE,CACF,CAAC,eACFzB,KAAK,CAAC0B,KAAK,cAACxB,YAAY,CAAC6B,eAAe,CAAC;EAAEC,OAAO,EAAE,GAAG;EAAEC,OAAO,EAAE,GAAG;EAAEC,OAAO,EAAE,GAAG;EAAEC,OAAO,EAAE;AAAI,CAAE,CAAC,CAAC,CACvG;AAED;;;AAGO,MAAMC,WAAW,GAAAb,OAAA,CAAAa,WAAA,gBAAiDpC,KAAK,CAACqC,WAAW,CAAC,MACzFvC,eAAe,CAACwC,YAAY,CAC7B;AAED;;;AAGO,MAAMC,WAAW,GAAAhB,OAAA,CAAAgB,WAAA,gBAA2CvC,KAAK,CAAC8B,YAAY,CAACR,IAAI,EAAEc,WAAW,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TestLive.js b/backend/node_modules/effect/dist/cjs/TestLive.js new file mode 100644 index 0000000000000000000000000000000000000000..5818481104954c76425e41293a53502cbdcdc5de --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TestLive.js @@ -0,0 +1,39 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.make = exports.TestLiveTypeId = exports.TestLive = void 0; +var Context = _interopRequireWildcard(require("./Context.js")); +var core = _interopRequireWildcard(require("./internal/core.js")); +var defaultServices = _interopRequireWildcard(require("./internal/defaultServices.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * @since 2.0.0 + */ +const TestLiveTypeId = exports.TestLiveTypeId = /*#__PURE__*/Symbol.for("effect/TestLive"); +/** + * @since 2.0.0 + */ +const TestLive = exports.TestLive = /*#__PURE__*/Context.GenericTag("effect/TestLive"); +/** @internal */ +class LiveImpl { + services; + [TestLiveTypeId] = TestLiveTypeId; + constructor(services) { + this.services = services; + } + provide(effect) { + return core.fiberRefLocallyWith(defaultServices.currentServices, Context.merge(this.services))(effect); + } +} +/** + * @since 2.0.0 + */ +const make = services => new LiveImpl(services); +exports.make = make; +//# sourceMappingURL=TestLive.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TestLive.js.map b/backend/node_modules/effect/dist/cjs/TestLive.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0ce71fd1963e4d42ff897a740253864efc3ffcf4 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TestLive.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TestLive.js","names":["Context","_interopRequireWildcard","require","core","defaultServices","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TestLiveTypeId","exports","Symbol","for","TestLive","GenericTag","LiveImpl","services","constructor","provide","effect","fiberRefLocallyWith","currentServices","merge","make"],"sources":["../../src/TestLive.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,OAAA,GAAAC,uBAAA,CAAAC,OAAA;AAGA,IAAAC,IAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,eAAA,GAAAH,uBAAA,CAAAC,OAAA;AAAgE,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC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;;;AAGO,MAAMI,IAAI,GAAIP,QAA0D,IAAe,IAAID,QAAQ,CAACC,QAAQ,CAAC;AAAAN,OAAA,CAAAa,IAAA,GAAAA,IAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TestServices.js b/backend/node_modules/effect/dist/cjs/TestServices.js new file mode 100644 index 0000000000000000000000000000000000000000..525fedb69d3f063770ce58e647a6ae64eeb2e258 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TestServices.js @@ -0,0 +1,255 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.withTestConfigScoped = exports.withTestConfig = exports.withSizedScoped = exports.withSized = exports.withSize = exports.withLiveScoped = exports.withLive = exports.withAnnotationsScoped = exports.withAnnotations = exports.testConfigWith = exports.testConfigLayer = exports.testConfig = exports.supervisedFibers = exports.sizedWith = exports.sizedLayer = exports.sized = exports.size = exports.shrinks = exports.samples = exports.retries = exports.repeats = exports.provideWithLive = exports.provideLive = exports.liveWith = exports.liveServices = exports.liveLayer = exports.live = exports.get = exports.currentServices = exports.annotationsWith = exports.annotationsLayer = exports.annotations = exports.annotate = void 0; +var Context = _interopRequireWildcard(require("./Context.js")); +var Effect = _interopRequireWildcard(require("./Effect.js")); +var _Function = require("./Function.js"); +var core = _interopRequireWildcard(require("./internal/core.js")); +var defaultServices = _interopRequireWildcard(require("./internal/defaultServices.js")); +var fiberRuntime = _interopRequireWildcard(require("./internal/fiberRuntime.js")); +var layer = _interopRequireWildcard(require("./internal/layer.js")); +var ref = _interopRequireWildcard(require("./internal/ref.js")); +var TestAnnotationMap = _interopRequireWildcard(require("./TestAnnotationMap.js")); +var Annotations = _interopRequireWildcard(require("./TestAnnotations.js")); +var TestConfig = _interopRequireWildcard(require("./TestConfig.js")); +var Live = _interopRequireWildcard(require("./TestLive.js")); +var Sized = _interopRequireWildcard(require("./TestSized.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * The default Effect test services. + * + * @since 2.0.0 + */ +const liveServices = exports.liveServices = /*#__PURE__*/(0, _Function.pipe)(/*#__PURE__*/Context.make(Annotations.TestAnnotations, /*#__PURE__*/Annotations.make(/*#__PURE__*/ref.unsafeMake(/*#__PURE__*/TestAnnotationMap.empty()))), /*#__PURE__*/Context.add(Live.TestLive, /*#__PURE__*/Live.make(defaultServices.liveServices)), /*#__PURE__*/Context.add(Sized.TestSized, /*#__PURE__*/Sized.make(100)), /*#__PURE__*/Context.add(TestConfig.TestConfig, /*#__PURE__*/TestConfig.make({ + repeats: 100, + retries: 100, + samples: 200, + shrinks: 1000 +}))); +/** + * @since 2.0.0 + */ +const currentServices = exports.currentServices = /*#__PURE__*/core.fiberRefUnsafeMakeContext(liveServices); +/** + * Retrieves the `Annotations` service for this test. + * + * @since 2.0.0 + */ +const annotations = () => annotationsWith(core.succeed); +/** + * Retrieves the `Annotations` service for this test and uses it to run the + * specified workflow. + * + * @since 2.0.0 + */ +exports.annotations = annotations; +const annotationsWith = f => core.fiberRefGetWith(currentServices, services => f(Context.get(services, Annotations.TestAnnotations))); +/** + * Executes the specified workflow with the specified implementation of the + * annotations service. + * + * @since 2.0.0 + */ +exports.annotationsWith = annotationsWith; +const withAnnotations = exports.withAnnotations = /*#__PURE__*/(0, _Function.dual)(2, (effect, annotations) => core.fiberRefLocallyWith(currentServices, Context.add(Annotations.TestAnnotations, annotations))(effect)); +/** + * Sets the implementation of the annotations service to the specified value + * and restores it to its original value when the scope is closed. + * + * @since 2.0.0 + */ +const withAnnotationsScoped = annotations => fiberRuntime.fiberRefLocallyScopedWith(currentServices, Context.add(Annotations.TestAnnotations, annotations)); +/** + * Constructs a new `Annotations` service wrapped in a layer. + * + * @since 2.0.0 + */ +exports.withAnnotationsScoped = withAnnotationsScoped; +const annotationsLayer = () => layer.scoped(Annotations.TestAnnotations, (0, _Function.pipe)(core.sync(() => ref.unsafeMake(TestAnnotationMap.empty())), core.map(Annotations.make), core.tap(withAnnotationsScoped))); +/** + * Accesses an `Annotations` instance in the context and retrieves the + * annotation of the specified type, or its default value if there is none. + * + * @since 2.0.0 + */ +exports.annotationsLayer = annotationsLayer; +const get = key => annotationsWith(annotations => annotations.get(key)); +/** + * Accesses an `Annotations` instance in the context and appends the + * specified annotation to the annotation map. + * + * @since 2.0.0 + */ +exports.get = get; +const annotate = (key, value) => annotationsWith(annotations => annotations.annotate(key, value)); +/** + * Returns the set of all fibers in this test. + * + * @since 2.0.0 + */ +exports.annotate = annotate; +const supervisedFibers = () => annotationsWith(annotations => annotations.supervisedFibers); +/** + * Retrieves the `Live` service for this test and uses it to run the specified + * workflow. + * + * @since 2.0.0 + */ +exports.supervisedFibers = supervisedFibers; +const liveWith = f => core.fiberRefGetWith(currentServices, services => f(Context.get(services, Live.TestLive))); +/** + * Retrieves the `Live` service for this test. + * + * @since 2.0.0 + */ +exports.liveWith = liveWith; +const live = exports.live = /*#__PURE__*/liveWith(core.succeed); +/** + * Executes the specified workflow with the specified implementation of the + * live service. + * + * @since 2.0.0 + */ +const withLive = exports.withLive = /*#__PURE__*/(0, _Function.dual)(2, (effect, live) => core.fiberRefLocallyWith(currentServices, Context.add(Live.TestLive, live))(effect)); +/** + * Sets the implementation of the live service to the specified value and + * restores it to its original value when the scope is closed. + * + * @since 2.0.0 + */ +const withLiveScoped = live => fiberRuntime.fiberRefLocallyScopedWith(currentServices, Context.add(Live.TestLive, live)); +/** + * Constructs a new `Live` service wrapped in a layer. + * + * @since 2.0.0 + */ +exports.withLiveScoped = withLiveScoped; +const liveLayer = () => layer.scoped(Live.TestLive, (0, _Function.pipe)(core.context(), core.map(Live.make), core.tap(withLiveScoped))); +/** + * Provides a workflow with the "live" default Effect services. + * + * @since 2.0.0 + */ +exports.liveLayer = liveLayer; +const provideLive = effect => liveWith(live => live.provide(effect)); +/** + * Runs a transformation function with the live default Effect services while + * ensuring that the workflow itself is run with the test services. + * + * @since 2.0.0 + */ +exports.provideLive = provideLive; +const provideWithLive = exports.provideWithLive = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => core.fiberRefGetWith(defaultServices.currentServices, services => provideLive(f(core.fiberRefLocally(defaultServices.currentServices, services)(self))))); +/** + * Retrieves the `Sized` service for this test and uses it to run the + * specified workflow. + * + * @since 2.0.0 + */ +const sizedWith = f => core.fiberRefGetWith(currentServices, services => f(Context.get(services, Sized.TestSized))); +/** + * Retrieves the `Sized` service for this test. + * + * @since 2.0.0 + */ +exports.sizedWith = sizedWith; +const sized = exports.sized = /*#__PURE__*/sizedWith(core.succeed); +/** + * Executes the specified workflow with the specified implementation of the + * sized service. + * + * @since 2.0.0 + */ +const withSized = exports.withSized = /*#__PURE__*/(0, _Function.dual)(2, (effect, sized) => core.fiberRefLocallyWith(currentServices, Context.add(Sized.TestSized, sized))(effect)); +/** + * Sets the implementation of the sized service to the specified value and + * restores it to its original value when the scope is closed. + * + * @since 2.0.0 + */ +const withSizedScoped = sized => fiberRuntime.fiberRefLocallyScopedWith(currentServices, Context.add(Sized.TestSized, sized)); +/** + * @since 2.0.0 + */ +exports.withSizedScoped = withSizedScoped; +const sizedLayer = size => layer.scoped(Sized.TestSized, (0, _Function.pipe)(fiberRuntime.fiberRefMake(size), core.map(Sized.fromFiberRef), core.tap(withSizedScoped))); +/** + * @since 2.0.0 + */ +exports.sizedLayer = sizedLayer; +const size = exports.size = /*#__PURE__*/sizedWith(sized => sized.size); +/** + * @since 2.0.0 + */ +const withSize = exports.withSize = /*#__PURE__*/(0, _Function.dual)(2, (effect, size) => sizedWith(sized => sized.withSize(size)(effect))); +/** + * Retrieves the `TestConfig` service for this test and uses it to run the + * specified workflow. + * + * @since 2.0.0 + */ +const testConfigWith = f => core.fiberRefGetWith(currentServices, services => f(Context.get(services, TestConfig.TestConfig))); +/** + * Retrieves the `TestConfig` service for this test. + * + * @since 2.0.0 + */ +exports.testConfigWith = testConfigWith; +const testConfig = exports.testConfig = /*#__PURE__*/testConfigWith(core.succeed); +/** + * Executes the specified workflow with the specified implementation of the + * config service. + * + * @since 2.0.0 + */ +const withTestConfig = exports.withTestConfig = /*#__PURE__*/(0, _Function.dual)(2, (effect, config) => core.fiberRefLocallyWith(currentServices, Context.add(TestConfig.TestConfig, config))(effect)); +/** + * Sets the implementation of the config service to the specified value and + * restores it to its original value when the scope is closed. + * + * @since 2.0.0 + */ +const withTestConfigScoped = config => fiberRuntime.fiberRefLocallyScopedWith(currentServices, Context.add(TestConfig.TestConfig, config)); +/** + * Constructs a new `TestConfig` service with the specified settings. + * + * @since 2.0.0 + */ +exports.withTestConfigScoped = withTestConfigScoped; +const testConfigLayer = params => layer.scoped(TestConfig.TestConfig, Effect.suspend(() => { + const testConfig = TestConfig.make(params); + return (0, _Function.pipe)(withTestConfigScoped(testConfig), core.as(testConfig)); +})); +/** + * The number of times to repeat tests to ensure they are stable. + * + * @since 2.0.0 + */ +exports.testConfigLayer = testConfigLayer; +const repeats = exports.repeats = /*#__PURE__*/testConfigWith(config => core.succeed(config.repeats)); +/** + * The number of times to retry flaky tests. + * + * @since 2.0.0 + */ +const retries = exports.retries = /*#__PURE__*/testConfigWith(config => core.succeed(config.retries)); +/** + * The number of sufficient samples to check for a random variable. + * + * @since 2.0.0 + */ +const samples = exports.samples = /*#__PURE__*/testConfigWith(config => core.succeed(config.samples)); +/** + * The maximum number of shrinkings to minimize large failures. + * + * @since 2.0.0 + */ +const shrinks = exports.shrinks = /*#__PURE__*/testConfigWith(config => core.succeed(config.shrinks)); +//# sourceMappingURL=TestServices.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TestServices.js.map b/backend/node_modules/effect/dist/cjs/TestServices.js.map new file mode 100644 index 0000000000000000000000000000000000000000..912ed32e639cd8dd93395d97f634994d5040c31c --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TestServices.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TestServices.js","names":["Context","_interopRequireWildcard","require","Effect","_Function","core","defaultServices","fiberRuntime","layer","ref","TestAnnotationMap","Annotations","TestConfig","Live","Sized","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","liveServices","exports","pipe","make","TestAnnotations","unsafeMake","empty","add","TestLive","TestSized","repeats","retries","samples","shrinks","currentServices","fiberRefUnsafeMakeContext","annotations","annotationsWith","succeed","fiberRefGetWith","services","withAnnotations","dual","effect","fiberRefLocallyWith","withAnnotationsScoped","fiberRefLocallyScopedWith","annotationsLayer","scoped","sync","map","tap","key","annotate","value","supervisedFibers","liveWith","live","withLive","withLiveScoped","liveLayer","context","provideLive","provide","provideWithLive","self","fiberRefLocally","sizedWith","sized","withSized","withSizedScoped","sizedLayer","size","fiberRefMake","fromFiberRef","withSize","testConfigWith","testConfig","withTestConfig","config","withTestConfigScoped","testConfigLayer","params","suspend","as"],"sources":["../../src/TestServices.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,OAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAF,uBAAA,CAAAC,OAAA;AAGA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,IAAA,GAAAJ,uBAAA,CAAAC,OAAA;AACA,IAAAI,eAAA,GAAAL,uBAAA,CAAAC,OAAA;AACA,IAAAK,YAAA,GAAAN,uBAAA,CAAAC,OAAA;AACA,IAAAM,KAAA,GAAAP,uBAAA,CAAAC,OAAA;AACA,IAAAO,GAAA,GAAAR,uBAAA,CAAAC,OAAA;AAKA,IAAAQ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,IAAKxF,IAAI,CAAC+C,OAAO,CAACyC,MAAM,CAAC/C,OAAO,CAAC,CAAC;AAEtG;;;;;AAKO,MAAMC,OAAO,GAAAZ,OAAA,CAAAY,OAAA,gBAA0B2C,cAAc,CAAEG,MAAM,IAAKxF,IAAI,CAAC+C,OAAO,CAACyC,MAAM,CAAC9C,OAAO,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TestSized.js b/backend/node_modules/effect/dist/cjs/TestSized.js new file mode 100644 index 0000000000000000000000000000000000000000..63edffbc846d23824e4d6adce87ef5767001f19e --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TestSized.js @@ -0,0 +1,46 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.make = exports.fromFiberRef = exports.TestSizedTypeId = exports.TestSized = void 0; +var Context = _interopRequireWildcard(require("./Context.js")); +var core = _interopRequireWildcard(require("./internal/core.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * @since 2.0.0 + */ +const TestSizedTypeId = exports.TestSizedTypeId = /*#__PURE__*/Symbol.for("effect/TestSized"); +/** + * @since 2.0.0 + */ +const TestSized = exports.TestSized = /*#__PURE__*/Context.GenericTag("effect/TestSized"); +/** @internal */ +class SizedImpl { + fiberRef; + [TestSizedTypeId] = TestSizedTypeId; + constructor(fiberRef) { + this.fiberRef = fiberRef; + } + get size() { + return core.fiberRefGet(this.fiberRef); + } + withSize(size) { + return effect => core.fiberRefLocally(this.fiberRef, size)(effect); + } +} +/** + * @since 2.0.0 + */ +const make = size => new SizedImpl(core.fiberRefUnsafeMake(size)); +/** + * @since 2.0.0 + */ +exports.make = make; +const fromFiberRef = fiberRef => new SizedImpl(fiberRef); +exports.fromFiberRef = fromFiberRef; +//# sourceMappingURL=TestSized.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/TestSized.js.map b/backend/node_modules/effect/dist/cjs/TestSized.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c85db90d312cd8308342644cb23169d8da081a59 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/TestSized.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TestSized.js","names":["Context","_interopRequireWildcard","require","core","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TestSizedTypeId","exports","Symbol","for","TestSized","GenericTag","SizedImpl","fiberRef","constructor","size","fiberRefGet","withSize","effect","fiberRefLocally","make","fiberRefUnsafeMake","fromFiberRef"],"sources":["../../src/TestSized.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,OAAA,GAAAC,uBAAA,CAAAC,OAAA;AAGA,IAAAC,IAAA,GAAAF,uBAAA,CAAAC,OAAA;AAA0C,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAA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BAAkB,CAACN,IAAI,CAAC,CAAC;AAE7F;;;AAAAR,OAAA,CAAAa,IAAA,GAAAA,IAAA;AAGO,MAAME,YAAY,GAAIT,QAAmC,IAAgB,IAAID,SAAS,CAACC,QAAQ,CAAC;AAAAN,OAAA,CAAAe,YAAA,GAAAA,YAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Tracer.js.map b/backend/node_modules/effect/dist/cjs/Tracer.js.map new file mode 100644 index 0000000000000000000000000000000000000000..49d28f069d1ac80c722f429716a1533ae58b87cb --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Tracer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Tracer.js","names":["defaultServices","_interopRequireWildcard","require","internal","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TracerTypeId","exports","ParentSpan","spanTag","Tracer","tracerTag","make","externalSpan","tracerWith","DisablePropagation"],"sources":["../../src/Tracer.ts"],"sourcesContent":[null],"mappings":";;;;;;AAQA,IAAAA,eAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,uBAAA,CAAAC,OAAA;AAAgD,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAGhD;;;AAGO,MAAMkB,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAkBpB,QAAQ,CAACoB,YAAY;AAoDhE;;;;AAIO,MAAME,UAAU,GAAAD,OAAA,CAAAC,UAAA,GAAqCtB,QAAQ,CAACuB,OAAO;AAkE5E;;;;AAIO,MAAMC,MAAM,GAAAH,OAAA,CAAAG,MAAA,GAAgCxB,QAAQ,CAACyB,SAAS;AAErE;;;;AAIO,MAAMC,IAAI,GAAAL,OAAA,CAAAK,IAAA,GAA2D1B,QAAQ,CAAC0B,IAAI;AAEzF;;;;AAIO,MAAMC,YAAY,GAAAN,OAAA,CAAAM,YAAA,GAOL3B,QAAQ,CAAC2B,YAAY;AAEzC;;;;AAIO,MAAMC,UAAU,GAAAP,OAAA,CAAAO,UAAA,GACrB/B,eAAe,CAAC+B,UAAU;AAU5B;;;;AAIO,MAAMC,kBAAkB,GAAAR,OAAA,CAAAQ,kBAAA,GAAmD7B,QAAQ,CAAC6B,kBAAkB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Tuple.js b/backend/node_modules/effect/dist/cjs/Tuple.js new file mode 100644 index 0000000000000000000000000000000000000000..1e95f167b47a36712ace9c74ec14b5bb58809e69 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Tuple.js @@ -0,0 +1,210 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getSecond = exports.getOrder = exports.getFirst = exports.getEquivalence = exports.at = exports.appendElement = void 0; +Object.defineProperty(exports, "isTupleOf", { + enumerable: true, + get: function () { + return _Predicate.isTupleOf; + } +}); +Object.defineProperty(exports, "isTupleOfAtLeast", { + enumerable: true, + get: function () { + return _Predicate.isTupleOfAtLeast; + } +}); +exports.swap = exports.mapSecond = exports.mapFirst = exports.mapBoth = exports.map = exports.make = void 0; +var Equivalence = _interopRequireWildcard(require("./Equivalence.js")); +var _Function = require("./Function.js"); +var order = _interopRequireWildcard(require("./Order.js")); +var _Predicate = require("./Predicate.js"); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * This module provides utility functions for working with tuples in TypeScript. + * + * @since 2.0.0 + */ + +/** + * Constructs a new tuple from the provided values. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { make } from "effect/Tuple" + * + * assert.deepStrictEqual(make(1, 'hello', true), [1, 'hello', true]) + * ``` + * + * @category constructors + * @since 2.0.0 + */ +const make = (...elements) => elements; +/** + * Return the first element from a tuple with two elements. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { getFirst } from "effect/Tuple" + * + * assert.deepStrictEqual(getFirst(["hello", 42]), "hello") + * ``` + * + * @category getters + * @since 2.0.0 + */ +exports.make = make; +const getFirst = self => self[0]; +/** + * Return the second element from a tuple with two elements. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { getSecond } from "effect/Tuple" + * + * assert.deepStrictEqual(getSecond(["hello", 42]), 42) + * ``` + * + * @category getters + * @since 2.0.0 + */ +exports.getFirst = getFirst; +const getSecond = self => self[1]; +/** + * Transforms each element of tuple using the given function, treating tuple homomorphically + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, Tuple } from "effect" + * + * const result = pipe( + * ["a", 1, false] as const, + * Tuple.map((el) => el.toString().toUpperCase()) + * ) + * assert.deepStrictEqual(result, ['A', '1', 'FALSE']) + * ``` + * + * @category mapping + * @since 3.9.0 + */ +exports.getSecond = getSecond; +const map = exports.map = /*#__PURE__*/(0, _Function.dual)(2, (self, fn) => self.map(element => fn(element))); +/** + * Transforms both elements of a tuple with two elements using the given functions. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { mapBoth } from "effect/Tuple" + * + * assert.deepStrictEqual( + * mapBoth(["hello", 42], { onFirst: s => s.toUpperCase(), onSecond: n => n.toString() }), + * ["HELLO", "42"] + * ) + * ``` + * + * @category mapping + * @since 2.0.0 + */ +const mapBoth = exports.mapBoth = /*#__PURE__*/(0, _Function.dual)(2, (self, { + onFirst, + onSecond +}) => [onFirst(self[0]), onSecond(self[1])]); +/** + * Transforms the first component of a tuple with two elements using a given function. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { mapFirst } from "effect/Tuple" + * + * assert.deepStrictEqual( + * mapFirst(["hello", 42], s => s.toUpperCase()), + * ["HELLO", 42] + * ) + * ``` + * + * @category mapping + * @since 2.0.0 + */ +const mapFirst = exports.mapFirst = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => [f(self[0]), self[1]]); +/** + * Transforms the second component of a tuple with two elements using a given function. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { mapSecond } from "effect/Tuple" + * + * assert.deepStrictEqual( + * mapSecond(["hello", 42], n => n.toString()), + * ["hello", "42"] + * ) + * ``` + * + * @category mapping + * @since 2.0.0 + */ +const mapSecond = exports.mapSecond = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => [self[0], f(self[1])]); +/** + * Swaps the elements of a tuple with two elements. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { swap } from "effect/Tuple" + * + * assert.deepStrictEqual(swap(["hello", 42]), [42, "hello"]) + * ``` + * + * @since 2.0.0 + */ +const swap = self => [self[1], self[0]]; +/** + * Given a tuple of `Equivalence`s returns a new `Equivalence` that compares values of a tuple + * by applying each `Equivalence` to the corresponding element of the tuple. + * + * @category combinators + * @since 2.0.0 + */ +exports.swap = swap; +const getEquivalence = exports.getEquivalence = Equivalence.tuple; +/** + * This function creates and returns a new `Order` for a tuple of values based on the given `Order`s for each element in the tuple. + * The returned `Order` compares two tuples of the same type by applying the corresponding `Order` to each element in the tuple. + * It is useful when you need to compare two tuples of the same type and you have a specific way of comparing each element + * of the tuple. + * + * @category combinators + * @since 2.0.0 + */ +const getOrder = exports.getOrder = order.tuple; +/** + * Appends an element to the end of a tuple. + * + * @category concatenating + * @since 2.0.0 + */ +const appendElement = exports.appendElement = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => [...self, that]); +/** + * Retrieves the element at a specified index from a tuple. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Tuple } from "effect" + * + * assert.deepStrictEqual(Tuple.at([1, 'hello', true], 1), 'hello') + * ``` + * + * @category getters + * @since 3.4.0 + */ +const at = exports.at = /*#__PURE__*/(0, _Function.dual)(2, (self, index) => self[index]); +//# sourceMappingURL=Tuple.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Tuple.js.map b/backend/node_modules/effect/dist/cjs/Tuple.js.map new file mode 100644 index 0000000000000000000000000000000000000000..329dfb80490b85d6b04aa43e0112fd643d9782f1 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Tuple.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Tuple.js","names":["Equivalence","_interopRequireWildcard","require","_Function","order","_Predicate","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","make","elements","exports","getFirst","self","getSecond","map","dual","fn","element","mapBoth","onFirst","onSecond","mapFirst","mapSecond","swap","getEquivalence","tuple","getOrder","appendElement","that","at","index"],"sources":["../../src/Tuple.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAKA,IAAAA,WAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,KAAA,GAAAH,uBAAA,CAAAC,OAAA;AAuaA,IAAAG,UAAA,GAAAH,OAAA;AAmDuB,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA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AEA,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAEvG;;;;;;;;;;;;;;;;;AAiBO,MAAMU,SAAS,GAAAZ,OAAA,CAAAY,SAAA,gBAqClB,IAAAP,cAAI,EAAC,CAAC,EAAE,CAAYH,IAAsB,EAAEf,CAAoB,KAAc,CAACe,IAAI,CAAC,CAAC,CAAC,EAAEf,CAAC,CAACe,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAExG;;;;;;;;;;;;;AAaO,MAAMW,IAAI,GAAUX,IAAqB,IAAa,CAACA,IAAI,CAAC,CAAC,CAAC,EAAEA,IAAI,CAAC,CAAC,CAAC,CAAC;AAE/E;;;;;;;AAAAF,OAAA,CAAAa,IAAA,GAAAA,IAAA;AAOO,MAAMC,cAAc,GAAAd,OAAA,CAAAc,cAAA,GAIvBzC,WAAW,CAAC0C,KAAK;AAErB;;;;;;;;;AASO,MAAMC,QAAQ,GAAAhB,OAAA,CAAAgB,QAAA,GAEqEvC,KAAK,CAACsC,KAAK;AAErG;;;;;;AAMO,MAAME,aAAa,GAAAjB,OAAA,CAAAiB,aAAA,gBAetB,IAAAZ,cAAI,EAAC,CAAC,EAAE,CAAsCH,IAAO,EAAEgB,IAAO,KAAgB,CAAC,GAAGhB,IAAI,EAAEgB,IAAI,CAAC,CAAC;AAElG;;;;;;;;;;;;;;AAcO,MAAMC,EAAE,GAAAnB,OAAA,CAAAmB,EAAA,gBA+BX,IAAAd,cAAI,EAAC,CAAC,EAAE,CAAqDH,IAAO,EAAEkB,KAAQ,KAAWlB,IAAI,CAACkB,KAAK,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Types.js b/backend/node_modules/effect/dist/cjs/Types.js new file mode 100644 index 0000000000000000000000000000000000000000..1fa3f0eb8dd89ec33155c37265dbbcd8839150c5 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Types.js @@ -0,0 +1,6 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +//# sourceMappingURL=Types.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Types.js.map b/backend/node_modules/effect/dist/cjs/Types.js.map new file mode 100644 index 0000000000000000000000000000000000000000..494ea4e8d0f71eed1a3c49a1546deece07034378 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Types.js","names":[],"sources":["../../src/Types.ts"],"sourcesContent":[null],"mappings":"","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Unify.js b/backend/node_modules/effect/dist/cjs/Unify.js new file mode 100644 index 0000000000000000000000000000000000000000..717443d8b1ca6bfe394456914d8e88ec77fccc51 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Unify.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.unify = void 0; +var _Function = require("./Function.js"); +/** + * @since 2.0.0 + */ + +/** + * @since 2.0.0 + */ +const unify = exports.unify = _Function.identity; +//# sourceMappingURL=Unify.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/Unify.js.map b/backend/node_modules/effect/dist/cjs/Unify.js.map new file mode 100644 index 0000000000000000000000000000000000000000..107a7dbdba0a923b1bbf3242956a550c57908710 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/Unify.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Unify.js","names":["_Function","require","unify","exports","identity"],"sources":["../../src/Unify.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,SAAA,GAAAC,OAAA;AAJA;;;;AAqEA;;;AAGO,MAAMC,KAAK,GAAAC,OAAA,CAAAD,KAAA,GAsDdE,kBAAe","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/UpstreamPullRequest.js b/backend/node_modules/effect/dist/cjs/UpstreamPullRequest.js new file mode 100644 index 0000000000000000000000000000000000000000..3fd49e604c1eb23f6742f7b31969edc9b41d8916 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/UpstreamPullRequest.js @@ -0,0 +1,59 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.match = exports.isUpstreamPullRequest = exports.isPulled = exports.isNoUpstream = exports.UpstreamPullRequestTypeId = exports.Pulled = exports.NoUpstream = void 0; +var internal = _interopRequireWildcard(require("./internal/channel/upstreamPullRequest.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * @since 2.0.0 + * @category symbols + */ +const UpstreamPullRequestTypeId = exports.UpstreamPullRequestTypeId = internal.UpstreamPullRequestTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +const Pulled = exports.Pulled = internal.Pulled; +/** + * @since 2.0.0 + * @category constructors + */ +const NoUpstream = exports.NoUpstream = internal.NoUpstream; +/** + * Returns `true` if the specified value is an `UpstreamPullRequest`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isUpstreamPullRequest = exports.isUpstreamPullRequest = internal.isUpstreamPullRequest; +/** + * Returns `true` if the specified `UpstreamPullRequest` is a `Pulled`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isPulled = exports.isPulled = internal.isPulled; +/** + * Returns `true` if the specified `UpstreamPullRequest` is a `NoUpstream`, + * `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isNoUpstream = exports.isNoUpstream = internal.isNoUpstream; +/** + * Folds an `UpstreamPullRequest` into a value of type `Z`. + * + * @since 2.0.0 + * @category folding + */ +const match = exports.match = internal.match; +//# sourceMappingURL=UpstreamPullRequest.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/UpstreamPullRequest.js.map b/backend/node_modules/effect/dist/cjs/UpstreamPullRequest.js.map new file mode 100644 index 0000000000000000000000000000000000000000..8e07ed5f1c2c5da141802fbd4986936e4e1cc07f --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/UpstreamPullRequest.js.map @@ -0,0 +1 @@ +{"version":3,"file":"UpstreamPullRequest.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","UpstreamPullRequestTypeId","exports","Pulled","NoUpstream","isUpstreamPullRequest","isPulled","isNoUpstream","match"],"sources":["../../src/UpstreamPullRequest.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAqE,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAHrE;;;;AAMA;;;;AAIO,MAAMkB,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAkBtB,QAAQ,CAACsB,yBAAyB;AA+C1F;;;;AAIO,MAAME,MAAM,GAAAD,OAAA,CAAAC,MAAA,GAA4CxB,QAAQ,CAACwB,MAAM;AAE9E;;;;AAIO,MAAMC,UAAU,GAAAF,OAAA,CAAAE,UAAA,GAAkEzB,QAAQ,CAACyB,UAAU;AAE5G;;;;;;;AAOO,MAAMC,qBAAqB,GAAAH,OAAA,CAAAG,qBAAA,GAAsD1B,QAAQ,CAAC0B,qBAAqB;AAEtH;;;;;;;AAOO,MAAMC,QAAQ,GAAAJ,OAAA,CAAAI,QAAA,GAA2D3B,QAAQ,CAAC2B,QAAQ;AAEjG;;;;;;;AAOO,MAAMC,YAAY,GAAAL,OAAA,CAAAK,YAAA,GAA4D5B,QAAQ,CAAC4B,YAAY;AAE1G;;;;;;AAMO,MAAMC,KAAK,GAAAN,OAAA,CAAAM,KAAA,GA0Bd7B,QAAQ,CAAC6B,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/UpstreamPullStrategy.js b/backend/node_modules/effect/dist/cjs/UpstreamPullStrategy.js new file mode 100644 index 0000000000000000000000000000000000000000..043d5ab9776b8aff3d9e631c38a3d7bacae5e3ad --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/UpstreamPullStrategy.js @@ -0,0 +1,59 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.match = exports.isUpstreamPullStrategy = exports.isPullAfterNext = exports.isPullAfterAllEnqueued = exports.UpstreamPullStrategyTypeId = exports.PullAfterNext = exports.PullAfterAllEnqueued = void 0; +var internal = _interopRequireWildcard(require("./internal/channel/upstreamPullStrategy.js")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +/** + * @since 2.0.0 + */ + +/** + * @since 2.0.0 + * @category symbols + */ +const UpstreamPullStrategyTypeId = exports.UpstreamPullStrategyTypeId = internal.UpstreamPullStrategyTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +const PullAfterNext = exports.PullAfterNext = internal.PullAfterNext; +/** + * @since 2.0.0 + * @category constructors + */ +const PullAfterAllEnqueued = exports.PullAfterAllEnqueued = internal.PullAfterAllEnqueued; +/** + * Returns `true` if the specified value is an `UpstreamPullStrategy`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isUpstreamPullStrategy = exports.isUpstreamPullStrategy = internal.isUpstreamPullStrategy; +/** + * Returns `true` if the specified `UpstreamPullStrategy` is a `PullAfterNext`, + * `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isPullAfterNext = exports.isPullAfterNext = internal.isPullAfterNext; +/** + * Returns `true` if the specified `UpstreamPullStrategy` is a + * `PullAfterAllEnqueued`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +const isPullAfterAllEnqueued = exports.isPullAfterAllEnqueued = internal.isPullAfterAllEnqueued; +/** + * Folds an `UpstreamPullStrategy` into a value of type `Z`. + * + * @since 2.0.0 + * @category folding + */ +const match = exports.match = internal.match; +//# sourceMappingURL=UpstreamPullStrategy.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/UpstreamPullStrategy.js.map b/backend/node_modules/effect/dist/cjs/UpstreamPullStrategy.js.map new file mode 100644 index 0000000000000000000000000000000000000000..87ac07f3053bd1f320a9e0dfb2cbdff205efbff0 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/UpstreamPullStrategy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"UpstreamPullStrategy.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","UpstreamPullStrategyTypeId","exports","PullAfterNext","PullAfterAllEnqueued","isUpstreamPullStrategy","isPullAfterNext","isPullAfterAllEnqueued","match"],"sources":["../../src/UpstreamPullStrategy.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAsE,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAHtE;;;;AAOA;;;;AAIO,MAAMkB,0BAA0B,GAAAC,OAAA,CAAAD,0BAAA,GAAkBtB,QAAQ,CAACsB,0BAA0B;AA+C5F;;;;AAIO,MAAME,aAAa,GAAAD,OAAA,CAAAC,aAAA,GAAoExB,QAAQ,CAACwB,aAAa;AAEpH;;;;AAIO,MAAMC,oBAAoB,GAAAF,OAAA,CAAAE,oBAAA,GAC/BzB,QAAQ,CAACyB,oBAAoB;AAE/B;;;;;;;AAOO,MAAMC,sBAAsB,GAAAH,OAAA,CAAAG,sBAAA,GACjC1B,QAAQ,CAAC0B,sBAAsB;AAEjC;;;;;;;AAOO,MAAMC,eAAe,GAAAJ,OAAA,CAAAI,eAAA,GAAmE3B,QAAQ,CAAC2B,eAAe;AAEvH;;;;;;;AAOO,MAAMC,sBAAsB,GAAAL,OAAA,CAAAK,sBAAA,GACjC5B,QAAQ,CAAC4B,sBAAsB;AAEjC;;;;;;AAMO,MAAMC,KAAK,GAAAN,OAAA,CAAAM,KAAA,GA0Bd7B,QAAQ,CAAC6B,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/cjs/index.js b/backend/node_modules/effect/dist/cjs/index.js new file mode 100644 index 0000000000000000000000000000000000000000..c552cd3eba7f22adb84570f57f84108919db2720 --- /dev/null +++ b/backend/node_modules/effect/dist/cjs/index.js @@ -0,0 +1,395 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Queue = exports.PubSub = exports.PrimaryKey = exports.Pretty = exports.Predicate = exports.Pool = exports.Pipeable = exports.PartitionedSemaphore = exports.ParseResult = exports.Ordering = exports.Order = exports.Option = exports.Number = exports.NonEmptyIterable = exports.MutableRef = exports.MutableQueue = exports.MutableList = exports.MutableHashSet = exports.MutableHashMap = exports.ModuleVersion = exports.Micro = exports.MetricState = exports.MetricRegistry = exports.MetricPolling = exports.MetricPair = exports.MetricLabel = exports.MetricKeyType = exports.MetricKey = exports.MetricHook = exports.MetricBoundaries = exports.Metric = exports.MergeStrategy = exports.MergeState = exports.MergeDecision = exports.Match = exports.ManagedRuntime = exports.Mailbox = exports.Logger = exports.LogSpan = exports.LogLevel = exports.List = exports.LayerMap = exports.Layer = exports.KeyedPool = exports.JSONSchema = exports.Iterable = exports.Inspectable = exports.HashSet = exports.HashRing = exports.HashMap = exports.Hash = exports.HKT = exports.GroupBy = exports.Graph = exports.GlobalValue = exports.Function = exports.FiberStatus = exports.FiberSet = exports.FiberRefsPatch = exports.FiberRefs = exports.FiberRef = exports.FiberMap = exports.FiberId = exports.FiberHandle = exports.Fiber = exports.FastCheck = exports.Exit = exports.ExecutionStrategy = exports.ExecutionPlan = exports.Equivalence = exports.Equal = exports.Encoding = exports.Either = exports.Effectable = exports.Effect = exports.Duration = exports.Differ = exports.Deferred = exports.DefaultServices = exports.DateTime = exports.Data = exports.Cron = exports.Context = exports.Console = exports.ConfigProviderPathPatch = exports.ConfigProvider = exports.ConfigError = exports.Config = exports.Clock = exports.Chunk = exports.ChildExecutorDecision = exports.Channel = exports.Cause = exports.Cache = exports.Brand = exports.Boolean = exports.BigInt = exports.BigDecimal = exports.Array = exports.Arbitrary = void 0; +exports.Utils = exports.UpstreamPullStrategy = exports.UpstreamPullRequest = exports.Unify = exports.Types = exports.Tuple = exports.Trie = exports.Tracer = exports.TestSized = exports.TestServices = exports.TestLive = exports.TestContext = exports.TestConfig = exports.TestClock = exports.TestAnnotations = exports.TestAnnotationMap = exports.TestAnnotation = exports.Take = exports.TSubscriptionRef = exports.TSet = exports.TSemaphore = exports.TRef = exports.TReentrantLock = exports.TRandom = exports.TQueue = exports.TPubSub = exports.TPriorityQueue = exports.TMap = exports.TDeferred = exports.TArray = exports.SynchronizedRef = exports.Symbol = exports.Supervisor = exports.SubscriptionRef = exports.Subscribable = exports.Struct = exports.String = exports.Streamable = exports.StreamHaltStrategy = exports.StreamEmit = exports.Stream = exports.SortedSet = exports.SortedMap = exports.Sink = exports.SingleProducerAsyncInput = exports.Secret = exports.ScopedRef = exports.ScopedCache = exports.Scope = exports.SchemaAST = exports.Schema = exports.Scheduler = exports.ScheduleIntervals = exports.ScheduleInterval = exports.ScheduleDecision = exports.Schedule = exports.STM = exports.RuntimeFlagsPatch = exports.RuntimeFlags = exports.Runtime = exports.Resource = exports.RequestResolver = exports.RequestBlock = exports.Request = exports.Reloadable = exports.RegExp = exports.Ref = exports.Redacted = exports.RedBlackTree = exports.Record = exports.Readable = exports.RcRef = exports.RcMap = exports.RateLimiter = exports.Random = void 0; +Object.defineProperty(exports, "absurd", { + enumerable: true, + get: function () { + return _Function.absurd; + } +}); +Object.defineProperty(exports, "flow", { + enumerable: true, + get: function () { + return _Function.flow; + } +}); +Object.defineProperty(exports, "hole", { + enumerable: true, + get: function () { + return _Function.hole; + } +}); +Object.defineProperty(exports, "identity", { + enumerable: true, + get: function () { + return _Function.identity; + } +}); +Object.defineProperty(exports, "pipe", { + enumerable: true, + get: function () { + return _Function.pipe; + } +}); +Object.defineProperty(exports, "unsafeCoerce", { + enumerable: true, + get: function () { + return _Function.unsafeCoerce; + } +}); +var _Function = _interopRequireWildcard(require("./Function.js")); +exports.Function = _Function; +var _Arbitrary = _interopRequireWildcard(require("./Arbitrary.js")); +exports.Arbitrary = _Arbitrary; +var _Array = _interopRequireWildcard(require("./Array.js")); +exports.Array = _Array; +var _BigDecimal = _interopRequireWildcard(require("./BigDecimal.js")); +exports.BigDecimal = _BigDecimal; +var _BigInt = _interopRequireWildcard(require("./BigInt.js")); +exports.BigInt = _BigInt; +var _Boolean = _interopRequireWildcard(require("./Boolean.js")); +exports.Boolean = _Boolean; +var _Brand = _interopRequireWildcard(require("./Brand.js")); +exports.Brand = _Brand; +var _Cache = _interopRequireWildcard(require("./Cache.js")); +exports.Cache = _Cache; +var _Cause = _interopRequireWildcard(require("./Cause.js")); +exports.Cause = _Cause; +var _Channel = _interopRequireWildcard(require("./Channel.js")); +exports.Channel = _Channel; +var _ChildExecutorDecision = _interopRequireWildcard(require("./ChildExecutorDecision.js")); +exports.ChildExecutorDecision = _ChildExecutorDecision; +var _Chunk = _interopRequireWildcard(require("./Chunk.js")); +exports.Chunk = _Chunk; +var _Clock = _interopRequireWildcard(require("./Clock.js")); +exports.Clock = _Clock; +var _Config = _interopRequireWildcard(require("./Config.js")); +exports.Config = _Config; +var _ConfigError = _interopRequireWildcard(require("./ConfigError.js")); +exports.ConfigError = _ConfigError; +var _ConfigProvider = _interopRequireWildcard(require("./ConfigProvider.js")); +exports.ConfigProvider = _ConfigProvider; +var _ConfigProviderPathPatch = _interopRequireWildcard(require("./ConfigProviderPathPatch.js")); +exports.ConfigProviderPathPatch = _ConfigProviderPathPatch; +var _Console = _interopRequireWildcard(require("./Console.js")); +exports.Console = _Console; +var _Context = _interopRequireWildcard(require("./Context.js")); +exports.Context = _Context; +var _Cron = _interopRequireWildcard(require("./Cron.js")); +exports.Cron = _Cron; +var _Data = _interopRequireWildcard(require("./Data.js")); +exports.Data = _Data; +var _DateTime = _interopRequireWildcard(require("./DateTime.js")); +exports.DateTime = _DateTime; +var _DefaultServices = _interopRequireWildcard(require("./DefaultServices.js")); +exports.DefaultServices = _DefaultServices; +var _Deferred = _interopRequireWildcard(require("./Deferred.js")); +exports.Deferred = _Deferred; +var _Differ = _interopRequireWildcard(require("./Differ.js")); +exports.Differ = _Differ; +var _Duration = _interopRequireWildcard(require("./Duration.js")); +exports.Duration = _Duration; +var _Effect = _interopRequireWildcard(require("./Effect.js")); +exports.Effect = _Effect; +var _Effectable = _interopRequireWildcard(require("./Effectable.js")); +exports.Effectable = _Effectable; +var _Either = _interopRequireWildcard(require("./Either.js")); +exports.Either = _Either; +var _Encoding = _interopRequireWildcard(require("./Encoding.js")); +exports.Encoding = _Encoding; +var _Equal = _interopRequireWildcard(require("./Equal.js")); +exports.Equal = _Equal; +var _Equivalence = _interopRequireWildcard(require("./Equivalence.js")); +exports.Equivalence = _Equivalence; +var _ExecutionPlan = _interopRequireWildcard(require("./ExecutionPlan.js")); +exports.ExecutionPlan = _ExecutionPlan; +var _ExecutionStrategy = _interopRequireWildcard(require("./ExecutionStrategy.js")); +exports.ExecutionStrategy = _ExecutionStrategy; +var _Exit = _interopRequireWildcard(require("./Exit.js")); +exports.Exit = _Exit; +var _FastCheck = _interopRequireWildcard(require("./FastCheck.js")); +exports.FastCheck = _FastCheck; +var _Fiber = _interopRequireWildcard(require("./Fiber.js")); +exports.Fiber = _Fiber; +var _FiberHandle = _interopRequireWildcard(require("./FiberHandle.js")); +exports.FiberHandle = _FiberHandle; +var _FiberId = _interopRequireWildcard(require("./FiberId.js")); +exports.FiberId = _FiberId; +var _FiberMap = _interopRequireWildcard(require("./FiberMap.js")); +exports.FiberMap = _FiberMap; +var _FiberRef = _interopRequireWildcard(require("./FiberRef.js")); +exports.FiberRef = _FiberRef; +var _FiberRefs = _interopRequireWildcard(require("./FiberRefs.js")); +exports.FiberRefs = _FiberRefs; +var _FiberRefsPatch = _interopRequireWildcard(require("./FiberRefsPatch.js")); +exports.FiberRefsPatch = _FiberRefsPatch; +var _FiberSet = _interopRequireWildcard(require("./FiberSet.js")); +exports.FiberSet = _FiberSet; +var _FiberStatus = _interopRequireWildcard(require("./FiberStatus.js")); +exports.FiberStatus = _FiberStatus; +var _GlobalValue = _interopRequireWildcard(require("./GlobalValue.js")); +exports.GlobalValue = _GlobalValue; +var _Graph = _interopRequireWildcard(require("./Graph.js")); +exports.Graph = _Graph; +var _GroupBy = _interopRequireWildcard(require("./GroupBy.js")); +exports.GroupBy = _GroupBy; +var _HKT = _interopRequireWildcard(require("./HKT.js")); +exports.HKT = _HKT; +var _Hash = _interopRequireWildcard(require("./Hash.js")); +exports.Hash = _Hash; +var _HashMap = _interopRequireWildcard(require("./HashMap.js")); +exports.HashMap = _HashMap; +var _HashRing = _interopRequireWildcard(require("./HashRing.js")); +exports.HashRing = _HashRing; +var _HashSet = _interopRequireWildcard(require("./HashSet.js")); +exports.HashSet = _HashSet; +var _Inspectable = _interopRequireWildcard(require("./Inspectable.js")); +exports.Inspectable = _Inspectable; +var _Iterable = _interopRequireWildcard(require("./Iterable.js")); +exports.Iterable = _Iterable; +var _JSONSchema = _interopRequireWildcard(require("./JSONSchema.js")); +exports.JSONSchema = _JSONSchema; +var _KeyedPool = _interopRequireWildcard(require("./KeyedPool.js")); +exports.KeyedPool = _KeyedPool; +var _Layer = _interopRequireWildcard(require("./Layer.js")); +exports.Layer = _Layer; +var _LayerMap = _interopRequireWildcard(require("./LayerMap.js")); +exports.LayerMap = _LayerMap; +var _List = _interopRequireWildcard(require("./List.js")); +exports.List = _List; +var _LogLevel = _interopRequireWildcard(require("./LogLevel.js")); +exports.LogLevel = _LogLevel; +var _LogSpan = _interopRequireWildcard(require("./LogSpan.js")); +exports.LogSpan = _LogSpan; +var _Logger = _interopRequireWildcard(require("./Logger.js")); +exports.Logger = _Logger; +var _Mailbox = _interopRequireWildcard(require("./Mailbox.js")); +exports.Mailbox = _Mailbox; +var _ManagedRuntime = _interopRequireWildcard(require("./ManagedRuntime.js")); +exports.ManagedRuntime = _ManagedRuntime; +var _Match = _interopRequireWildcard(require("./Match.js")); +exports.Match = _Match; +var _MergeDecision = _interopRequireWildcard(require("./MergeDecision.js")); +exports.MergeDecision = _MergeDecision; +var _MergeState = _interopRequireWildcard(require("./MergeState.js")); +exports.MergeState = _MergeState; +var _MergeStrategy = _interopRequireWildcard(require("./MergeStrategy.js")); +exports.MergeStrategy = _MergeStrategy; +var _Metric = _interopRequireWildcard(require("./Metric.js")); +exports.Metric = _Metric; +var _MetricBoundaries = _interopRequireWildcard(require("./MetricBoundaries.js")); +exports.MetricBoundaries = _MetricBoundaries; +var _MetricHook = _interopRequireWildcard(require("./MetricHook.js")); +exports.MetricHook = _MetricHook; +var _MetricKey = _interopRequireWildcard(require("./MetricKey.js")); +exports.MetricKey = _MetricKey; +var _MetricKeyType = _interopRequireWildcard(require("./MetricKeyType.js")); +exports.MetricKeyType = _MetricKeyType; +var _MetricLabel = _interopRequireWildcard(require("./MetricLabel.js")); +exports.MetricLabel = _MetricLabel; +var _MetricPair = _interopRequireWildcard(require("./MetricPair.js")); +exports.MetricPair = _MetricPair; +var _MetricPolling = _interopRequireWildcard(require("./MetricPolling.js")); +exports.MetricPolling = _MetricPolling; +var _MetricRegistry = _interopRequireWildcard(require("./MetricRegistry.js")); +exports.MetricRegistry = _MetricRegistry; +var _MetricState = _interopRequireWildcard(require("./MetricState.js")); +exports.MetricState = _MetricState; +var _Micro = _interopRequireWildcard(require("./Micro.js")); +exports.Micro = _Micro; +var _ModuleVersion = _interopRequireWildcard(require("./ModuleVersion.js")); +exports.ModuleVersion = _ModuleVersion; +var _MutableHashMap = _interopRequireWildcard(require("./MutableHashMap.js")); +exports.MutableHashMap = _MutableHashMap; +var _MutableHashSet = _interopRequireWildcard(require("./MutableHashSet.js")); +exports.MutableHashSet = _MutableHashSet; +var _MutableList = _interopRequireWildcard(require("./MutableList.js")); +exports.MutableList = _MutableList; +var _MutableQueue = _interopRequireWildcard(require("./MutableQueue.js")); +exports.MutableQueue = _MutableQueue; +var _MutableRef = _interopRequireWildcard(require("./MutableRef.js")); +exports.MutableRef = _MutableRef; +var _NonEmptyIterable = _interopRequireWildcard(require("./NonEmptyIterable.js")); +exports.NonEmptyIterable = _NonEmptyIterable; +var _Number = _interopRequireWildcard(require("./Number.js")); +exports.Number = _Number; +var _Option = _interopRequireWildcard(require("./Option.js")); +exports.Option = _Option; +var _Order = _interopRequireWildcard(require("./Order.js")); +exports.Order = _Order; +var _Ordering = _interopRequireWildcard(require("./Ordering.js")); +exports.Ordering = _Ordering; +var _ParseResult = _interopRequireWildcard(require("./ParseResult.js")); +exports.ParseResult = _ParseResult; +var _PartitionedSemaphore = _interopRequireWildcard(require("./PartitionedSemaphore.js")); +exports.PartitionedSemaphore = _PartitionedSemaphore; +var _Pipeable = _interopRequireWildcard(require("./Pipeable.js")); +exports.Pipeable = _Pipeable; +var _Pool = _interopRequireWildcard(require("./Pool.js")); +exports.Pool = _Pool; +var _Predicate = _interopRequireWildcard(require("./Predicate.js")); +exports.Predicate = _Predicate; +var _Pretty = _interopRequireWildcard(require("./Pretty.js")); +exports.Pretty = _Pretty; +var _PrimaryKey = _interopRequireWildcard(require("./PrimaryKey.js")); +exports.PrimaryKey = _PrimaryKey; +var _PubSub = _interopRequireWildcard(require("./PubSub.js")); +exports.PubSub = _PubSub; +var _Queue = _interopRequireWildcard(require("./Queue.js")); +exports.Queue = _Queue; +var _Random = _interopRequireWildcard(require("./Random.js")); +exports.Random = _Random; +var _RateLimiter = _interopRequireWildcard(require("./RateLimiter.js")); +exports.RateLimiter = _RateLimiter; +var _RcMap = _interopRequireWildcard(require("./RcMap.js")); +exports.RcMap = _RcMap; +var _RcRef = _interopRequireWildcard(require("./RcRef.js")); +exports.RcRef = _RcRef; +var _Readable = _interopRequireWildcard(require("./Readable.js")); +exports.Readable = _Readable; +var _Record = _interopRequireWildcard(require("./Record.js")); +exports.Record = _Record; +var _RedBlackTree = _interopRequireWildcard(require("./RedBlackTree.js")); +exports.RedBlackTree = _RedBlackTree; +var _Redacted = _interopRequireWildcard(require("./Redacted.js")); +exports.Redacted = _Redacted; +var _Ref = _interopRequireWildcard(require("./Ref.js")); +exports.Ref = _Ref; +var _RegExp = _interopRequireWildcard(require("./RegExp.js")); +exports.RegExp = _RegExp; +var _Reloadable = _interopRequireWildcard(require("./Reloadable.js")); +exports.Reloadable = _Reloadable; +var _Request = _interopRequireWildcard(require("./Request.js")); +exports.Request = _Request; +var _RequestBlock = _interopRequireWildcard(require("./RequestBlock.js")); +exports.RequestBlock = _RequestBlock; +var _RequestResolver = _interopRequireWildcard(require("./RequestResolver.js")); +exports.RequestResolver = _RequestResolver; +var _Resource = _interopRequireWildcard(require("./Resource.js")); +exports.Resource = _Resource; +var _Runtime = _interopRequireWildcard(require("./Runtime.js")); +exports.Runtime = _Runtime; +var _RuntimeFlags = _interopRequireWildcard(require("./RuntimeFlags.js")); +exports.RuntimeFlags = _RuntimeFlags; +var _RuntimeFlagsPatch = _interopRequireWildcard(require("./RuntimeFlagsPatch.js")); +exports.RuntimeFlagsPatch = _RuntimeFlagsPatch; +var _STM = _interopRequireWildcard(require("./STM.js")); +exports.STM = _STM; +var _Schedule = _interopRequireWildcard(require("./Schedule.js")); +exports.Schedule = _Schedule; +var _ScheduleDecision = _interopRequireWildcard(require("./ScheduleDecision.js")); +exports.ScheduleDecision = _ScheduleDecision; +var _ScheduleInterval = _interopRequireWildcard(require("./ScheduleInterval.js")); +exports.ScheduleInterval = _ScheduleInterval; +var _ScheduleIntervals = _interopRequireWildcard(require("./ScheduleIntervals.js")); +exports.ScheduleIntervals = _ScheduleIntervals; +var _Scheduler = _interopRequireWildcard(require("./Scheduler.js")); +exports.Scheduler = _Scheduler; +var _Schema = _interopRequireWildcard(require("./Schema.js")); +exports.Schema = _Schema; +var _SchemaAST = _interopRequireWildcard(require("./SchemaAST.js")); +exports.SchemaAST = _SchemaAST; +var _Scope = _interopRequireWildcard(require("./Scope.js")); +exports.Scope = _Scope; +var _ScopedCache = _interopRequireWildcard(require("./ScopedCache.js")); +exports.ScopedCache = _ScopedCache; +var _ScopedRef = _interopRequireWildcard(require("./ScopedRef.js")); +exports.ScopedRef = _ScopedRef; +var _Secret = _interopRequireWildcard(require("./Secret.js")); +exports.Secret = _Secret; +var _SingleProducerAsyncInput = _interopRequireWildcard(require("./SingleProducerAsyncInput.js")); +exports.SingleProducerAsyncInput = _SingleProducerAsyncInput; +var _Sink = _interopRequireWildcard(require("./Sink.js")); +exports.Sink = _Sink; +var _SortedMap = _interopRequireWildcard(require("./SortedMap.js")); +exports.SortedMap = _SortedMap; +var _SortedSet = _interopRequireWildcard(require("./SortedSet.js")); +exports.SortedSet = _SortedSet; +var _Stream = _interopRequireWildcard(require("./Stream.js")); +exports.Stream = _Stream; +var _StreamEmit = _interopRequireWildcard(require("./StreamEmit.js")); +exports.StreamEmit = _StreamEmit; +var _StreamHaltStrategy = _interopRequireWildcard(require("./StreamHaltStrategy.js")); +exports.StreamHaltStrategy = _StreamHaltStrategy; +var _Streamable = _interopRequireWildcard(require("./Streamable.js")); +exports.Streamable = _Streamable; +var _String = _interopRequireWildcard(require("./String.js")); +exports.String = _String; +var _Struct = _interopRequireWildcard(require("./Struct.js")); +exports.Struct = _Struct; +var _Subscribable = _interopRequireWildcard(require("./Subscribable.js")); +exports.Subscribable = _Subscribable; +var _SubscriptionRef = _interopRequireWildcard(require("./SubscriptionRef.js")); +exports.SubscriptionRef = _SubscriptionRef; +var _Supervisor = _interopRequireWildcard(require("./Supervisor.js")); +exports.Supervisor = _Supervisor; +var _Symbol = _interopRequireWildcard(require("./Symbol.js")); +exports.Symbol = _Symbol; +var _SynchronizedRef = _interopRequireWildcard(require("./SynchronizedRef.js")); +exports.SynchronizedRef = _SynchronizedRef; +var _TArray = _interopRequireWildcard(require("./TArray.js")); +exports.TArray = _TArray; +var _TDeferred = _interopRequireWildcard(require("./TDeferred.js")); +exports.TDeferred = _TDeferred; +var _TMap = _interopRequireWildcard(require("./TMap.js")); +exports.TMap = _TMap; +var _TPriorityQueue = _interopRequireWildcard(require("./TPriorityQueue.js")); +exports.TPriorityQueue = _TPriorityQueue; +var _TPubSub = _interopRequireWildcard(require("./TPubSub.js")); +exports.TPubSub = _TPubSub; +var _TQueue = _interopRequireWildcard(require("./TQueue.js")); +exports.TQueue = _TQueue; +var _TRandom = _interopRequireWildcard(require("./TRandom.js")); +exports.TRandom = _TRandom; +var _TReentrantLock = _interopRequireWildcard(require("./TReentrantLock.js")); +exports.TReentrantLock = _TReentrantLock; +var _TRef = _interopRequireWildcard(require("./TRef.js")); +exports.TRef = _TRef; +var _TSemaphore = _interopRequireWildcard(require("./TSemaphore.js")); +exports.TSemaphore = _TSemaphore; +var _TSet = _interopRequireWildcard(require("./TSet.js")); +exports.TSet = _TSet; +var _TSubscriptionRef = _interopRequireWildcard(require("./TSubscriptionRef.js")); +exports.TSubscriptionRef = _TSubscriptionRef; +var _Take = _interopRequireWildcard(require("./Take.js")); +exports.Take = _Take; +var _TestAnnotation = _interopRequireWildcard(require("./TestAnnotation.js")); +exports.TestAnnotation = _TestAnnotation; +var _TestAnnotationMap = _interopRequireWildcard(require("./TestAnnotationMap.js")); +exports.TestAnnotationMap = _TestAnnotationMap; +var _TestAnnotations = _interopRequireWildcard(require("./TestAnnotations.js")); +exports.TestAnnotations = _TestAnnotations; +var _TestClock = _interopRequireWildcard(require("./TestClock.js")); +exports.TestClock = _TestClock; +var _TestConfig = _interopRequireWildcard(require("./TestConfig.js")); +exports.TestConfig = _TestConfig; +var _TestContext = _interopRequireWildcard(require("./TestContext.js")); +exports.TestContext = _TestContext; +var _TestLive = _interopRequireWildcard(require("./TestLive.js")); +exports.TestLive = _TestLive; +var _TestServices = _interopRequireWildcard(require("./TestServices.js")); +exports.TestServices = _TestServices; +var _TestSized = _interopRequireWildcard(require("./TestSized.js")); +exports.TestSized = _TestSized; +var _Tracer = _interopRequireWildcard(require("./Tracer.js")); +exports.Tracer = _Tracer; +var _Trie = _interopRequireWildcard(require("./Trie.js")); +exports.Trie = _Trie; +var _Tuple = _interopRequireWildcard(require("./Tuple.js")); +exports.Tuple = _Tuple; +var _Types = _interopRequireWildcard(require("./Types.js")); +exports.Types = _Types; +var _Unify = _interopRequireWildcard(require("./Unify.js")); +exports.Unify = _Unify; +var _UpstreamPullRequest = _interopRequireWildcard(require("./UpstreamPullRequest.js")); +exports.UpstreamPullRequest = _UpstreamPullRequest; +var _UpstreamPullStrategy = _interopRequireWildcard(require("./UpstreamPullStrategy.js")); +exports.UpstreamPullStrategy = _UpstreamPullStrategy; +var _Utils = _interopRequireWildcard(require("./Utils.js")); +exports.Utils = _Utils; +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Arbitrary.js.map b/backend/node_modules/effect/dist/esm/Arbitrary.js.map new file mode 100644 index 0000000000000000000000000000000000000000..6dbff062d73e0becc48251dd6e4ccb2260a0b720 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Arbitrary.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Arbitrary.js","names":["Arr","FastCheck","globalValue","errors_","schemaId_","util_","Option","Predicate","SchemaAST","makeLazy","schema","description","getDescription","ast","go","maxDepth","make","makeStringConstraints","options","out","_tag","constraints","isNumber","minLength","maxLength","isString","pattern","makeNumberConstraints","isInteger","min","Math","fround","isBoolean","minExcluded","max","maxExcluded","noNaN","noDefaultInfinity","makeBigIntConstraints","isBigInt","makeArrayConstraints","makeDateConstraints","isDate","noInvalidDate","getArbitraryAnnotation","getAnnotation","ArbitraryAnnotationId","getASTConstraints","TypeAnnotationId","annotations","SchemaIdAnnotationId","isPropertyKey","isReadonlyRecord","idMemoMap","Symbol","for","Map","counter","wrapGetDescription","f","g","path","parseMeta","jsonSchema","getJSONSchemaAnnotation","pipe","filter","getOrUndefined","schemaId","getOrElse","getSchemaIdAnnotation","undefined","schemaParams","fromNullable","map","id","annotation","isSome","value","meta","from","refinements","c","NonNaNSchemaId","FiniteSchemaId","JsonNumberSchemaId","type","exclusiveMinimum","minimum","exclusiveMaximum","maximum","minItems","maxItems","DateFromSelfSchemaId","typeParameters","literal","symbol","enums","head","spans","span","elements","element","i","isOptional","rest","propertySignatures","ps","name","indexSignatures","is","parameter","members","types","member","memoId","get","set","to","getMax","n1","n2","getMin","getOr","a","b","mergePattern","pattern1","pattern2","mergeStringConstraints","c1","c2","buildStringConstraints","length","reduce","mergeNumberConstraints","buildNumberConstraints","mergeBigIntConstraints","buildBigIntConstraints","mergeDateConstraints","buildDateConstraints","constArrayConstraints","mergeArrayConstraints","buildArrayConstraints","arbitraryMemoMap","WeakMap","applyFilters","filters","arb","fc","absurd","message","Error","getContextConstraints","wrapGo","ctx","lazyArb","getArbitraryMissingAnnotationErrorMessage","getArbitraryEmptyEnumErrorMessage","isNone","defaultParseOption","p","date","constant","anything","boolean","string","s","oneof","object","array","_","number","float","getTemplateLiteralArb","components","getTemplateLiteralSpanTypeArb","String","forEach","push","tuple","join","stringMatching","RegExp","integer","bigInt","hasOptionals","d","output","indexes","chain","booleans","reverse","entries","splice","isNonEmptyReadonlyArray","tail","item","as","len","restArrayConstraints","subtractElementsLength","arr","depthIdentifier","getSuspendedArray","j","requiredKeys","pps","record","key","o","tuples","Object","fromEntries","memo","memoizeThunk","JSON","stringify","maxLengthLimit"],"sources":["../../src/Arbitrary.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAIA,OAAO,KAAKA,GAAG,MAAM,YAAY;AACjC,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,SAASC,WAAW,QAAQ,kBAAkB;AAC9C,OAAO,KAAKC,OAAO,MAAM,6BAA6B;AACtD,OAAO,KAAKC,SAAS,MAAM,+BAA+B;AAC1D,OAAO,KAAKC,KAA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AW;MAAEG,SAAS,EAAEkM;IAAc,CAAE;EAC7D;EACA,OAAOrE,EAAE,CAACmB,KAAK,CACb;IAAEzJ,QAAQ;IAAE4L;EAAe,CAAE,EAC7BtD,EAAE,CAACc,QAAQ,CAAC,EAAE,CAAC,EACfd,EAAE,CAACqB,KAAK,CAAC2B,IAAI,EAAEhL,WAAW,CAAC,CAC5B;AACH,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Array.js.map b/backend/node_modules/effect/dist/esm/Array.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e83977843736864b391cf222ea93d02f12a5c2cb --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Array.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Array.js","names":["Either","Equal","Equivalence","dual","identity","internalArray","internalDoNotation","moduleIterable","Option","Order","Predicate","Record","Tuple","make","elements","allocate","n","Array","makeBy","f","max","Math","floor","out","i","range","start","end","replicate","a","fromIterable","collection","isArray","from","ensure","self","fromRecord","toEntries","fromOption","toArray","match","onEmpty","onNonEmpty","isNonEmptyReadonlyArray","matchLeft","headNonEmpty","tailNonEmpty","matchRight","initNonEmpty","lastNonEmpty","prepend","head","prependAll","that","concat","append","last","appendAll","scan","b","scanRight","input","length","isEmptyArray","isEmptyReadonlyArray","isNonEmptyArray","isOutOfBounds","as","clamp","min","get","index","none","some","unsafeGet","Error","unprepend","unappend","tail","slice","init","take","takeRight","takeWhile","predicate","push","spanIndex","span","splitAt","drop","dropRight","dropWhile","findFirstIndex","findLastIndex","findFirst","findLast","o","isBoolean","isSome","findFirstWithIndex","value","countBy","count","insertAt","splice","replace","modify","replaceOption","modifyOption","arr","remove","removeOption","reverse","sort","O","sortWith","order","map","_","sortBy","orders","sortByAll","combineAll","zip","zipWith","bs","len","unzip","fa","fb","intersperse","middle","modifyNonEmptyHead","setNonEmptyHead","modifyNonEmptyLast","setNonEmptyLast","rotate","m","round","abs","copy","s","splitNonEmptyAt","containsWith","isEquivalent","_equivalence","equivalence","contains","chop","rest","next","_n","split","chunksOf","ceil","splitWhere","pad","fill","window","groupWith","h","group","groupBy","k","Object","prototype","hasOwnProperty","call","unionWith","dedupe","dedupeWith","union","intersectionWith","has","filter","intersection","differenceWith","difference","empty","of","flatMap","inner","j","flatten","filterMap","filterMapWhile","partitionMap","left","right","e","isLeft","getSomes","getLefts","getRights","isRight","partition","separate","reduce","reduceRight","liftPredicate","liftOption","fromNullable","liftNullable","flatMapNullable","liftEither","every","refinement","extend","unfold","getOrder","array","getEquivalence","forEach","r","dedupeAdjacentWith","lastA","isNone","dedupeAdjacent","join","sep","mapAccum","s1","cartesianWith","cartesian","Do","bind","bindTo","let_","let"],"sources":["../../src/Array.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;AAMA,OAAO,KAAKA,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAE/C,SAASC,IAAI,EAAEC,QAAQ,QAAQ,eAAe;AAE9C,OAAO,KAAKC,aAAa,MAAM,qBAAqB;AACpD,OAAO,KAAKC,kBAAkB,MAAM,0BAA0B;AAC9D,OAAO,KAAKC,cAAc,MAAM,eAAe;AAC/C,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,KAAK,MAAM,YAAY;AAuBnC;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,IAAI,GAAGA,CAClB,GAAGC,QAAkB,KACeA,QAAQ;AAE9C;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,QAAQ,GAAeC,CAAS,IAA2B,IAAIC,KAAK,CAACD,CAAC,CAAC;AAEpF;;;;;;;;;;;;;;;;;AAiBA,OAAO,MAAME,MAAM,gBAqCff,IAAI,CAAC,CAAC,EAAE,CA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AAEkB,IAAI,EAAE,CAACxB,CAAC,EAAE8B,CAAC,KAAK,CAAC9B,CAAC,EAAE8B,CAAC,CAAC,CAAC,CACrH;AAED;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,OAAO,MAAMqK,EAAE,gBAAsB7C,EAAE,CAAC,EAAE,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,OAAO,MAAM8C,IAAI,gBAuGb3N,kBAAkB,CAAC2N,IAAI,CAA0B5G,GAAG,EAAE+D,OAAO,CAAQ;AAEzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,OAAO,MAAM8C,MAAM,gBAiGf5N,kBAAkB,CAAC4N,MAAM,CAA0B7G,GAAG,CAAQ;AAElE,MAAM8G,IAAI,gBAUN7N,kBAAkB,CAAC6N,IAAI,CAA0B9G,GAAG,CAAQ;AAEhE;AACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA8G,IAAI,IAAIC,GAAG","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/BigDecimal.js b/backend/node_modules/effect/dist/esm/BigDecimal.js new file mode 100644 index 0000000000000000000000000000000000000000..fae433b96b5fea885063d236a238a740e55ab3f5 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/BigDecimal.js @@ -0,0 +1,1087 @@ +/** + * This module provides utility functions and type class instances for working with the `BigDecimal` type in TypeScript. + * It includes functions for basic arithmetic operations, as well as type class instances for `Equivalence` and `Order`. + * + * A `BigDecimal` allows storing any real number to arbitrary precision; which avoids common floating point errors + * (such as 0.1 + 0.2 ≠ 0.3) at the cost of complexity. + * + * Internally, `BigDecimal` uses a `BigInt` object, paired with a 64-bit integer which determines the position of the + * decimal point. Therefore, the precision *is not* actually arbitrary, but limited to 263 decimal places. + * + * It is not recommended to convert a floating point number to a decimal directly, as the floating point representation + * may be unexpected. + * + * @module BigDecimal + * @since 2.0.0 + * @see {@link module:BigInt} for more similar operations on `bigint` types + * @see {@link module:Number} for more similar operations on `number` types + */ +import * as Equal from "./Equal.js"; +import * as equivalence from "./Equivalence.js"; +import { dual, pipe } from "./Function.js"; +import * as Hash from "./Hash.js"; +import { NodeInspectSymbol } from "./Inspectable.js"; +import * as Option from "./Option.js"; +import * as order from "./Order.js"; +import { pipeArguments } from "./Pipeable.js"; +import { hasProperty } from "./Predicate.js"; +const DEFAULT_PRECISION = 100; +const FINITE_INT_REGEX = /^[+-]?\d+$/; +/** + * @since 2.0.0 + * @category symbols + */ +export const TypeId = /*#__PURE__*/Symbol.for("effect/BigDecimal"); +const BigDecimalProto = { + [TypeId]: TypeId, + [Hash.symbol]() { + const normalized = normalize(this); + return pipe(Hash.hash(normalized.value), Hash.combine(Hash.number(normalized.scale)), Hash.cached(this)); + }, + [Equal.symbol](that) { + return isBigDecimal(that) && equals(this, that); + }, + toString() { + return `BigDecimal(${format(this)})`; + }, + toJSON() { + return { + _id: "BigDecimal", + value: String(this.value), + scale: this.scale + }; + }, + [NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return pipeArguments(this, arguments); + } +}; +/** + * Checks if a given value is a `BigDecimal`. + * + * @since 2.0.0 + * @category guards + */ +export const isBigDecimal = u => hasProperty(u, TypeId); +/** + * Creates a `BigDecimal` from a `bigint` value and a scale. + * + * @since 2.0.0 + * @category constructors + */ +export const make = (value, scale) => { + const o = Object.create(BigDecimalProto); + o.value = value; + o.scale = scale; + return o; +}; +/** + * Internal function used to create pre-normalized `BigDecimal`s. + * + * @internal + */ +export const unsafeMakeNormalized = (value, scale) => { + if (value !== bigint0 && value % bigint10 === bigint0) { + throw new RangeError("Value must be normalized"); + } + const o = make(value, scale); + o.normalized = o; + return o; +}; +const bigint0 = /*#__PURE__*/BigInt(0); +const bigint1 = /*#__PURE__*/BigInt(1); +const bigint10 = /*#__PURE__*/BigInt(10); +const zero = /*#__PURE__*/unsafeMakeNormalized(bigint0, 0); +/** + * Normalizes a given `BigDecimal` by removing trailing zeros. + * + * **Example** + * + * ```ts + * import * as assert from "node:assert" + * import { normalize, make, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(normalize(unsafeFromString("123.00000")), normalize(make(123n, 0))) + * assert.deepStrictEqual(normalize(unsafeFromString("12300000")), normalize(make(123n, -5))) + * ``` + * + * @since 2.0.0 + * @category scaling + */ +export const normalize = self => { + if (self.normalized === undefined) { + if (self.value === bigint0) { + self.normalized = zero; + } else { + const digits = `${self.value}`; + let trail = 0; + for (let i = digits.length - 1; i >= 0; i--) { + if (digits[i] === "0") { + trail++; + } else { + break; + } + } + if (trail === 0) { + self.normalized = self; + } + const value = BigInt(digits.substring(0, digits.length - trail)); + const scale = self.scale - trail; + self.normalized = unsafeMakeNormalized(value, scale); + } + } + return self.normalized; +}; +/** + * Scales a given `BigDecimal` to the specified scale. + * + * If the given scale is smaller than the current scale, the value will be rounded down to + * the nearest integer. + * + * @since 2.0.0 + * @category scaling + */ +export const scale = /*#__PURE__*/dual(2, (self, scale) => { + if (scale > self.scale) { + return make(self.value * bigint10 ** BigInt(scale - self.scale), scale); + } + if (scale < self.scale) { + return make(self.value / bigint10 ** BigInt(self.scale - scale), scale); + } + return self; +}); +/** + * Provides an addition operation on `BigDecimal`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { sum, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(sum(unsafeFromString("2"), unsafeFromString("3")), unsafeFromString("5")) + * ``` + * + * @since 2.0.0 + * @category math + */ +export const sum = /*#__PURE__*/dual(2, (self, that) => { + if (that.value === bigint0) { + return self; + } + if (self.value === bigint0) { + return that; + } + if (self.scale > that.scale) { + return make(scale(that, self.scale).value + self.value, self.scale); + } + if (self.scale < that.scale) { + return make(scale(self, that.scale).value + that.value, that.scale); + } + return make(self.value + that.value, self.scale); +}); +/** + * Provides a multiplication operation on `BigDecimal`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { multiply, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(multiply(unsafeFromString("2"), unsafeFromString("3")), unsafeFromString("6")) + * ``` + * + * @since 2.0.0 + * @category math + */ +export const multiply = /*#__PURE__*/dual(2, (self, that) => { + if (that.value === bigint0 || self.value === bigint0) { + return zero; + } + return make(self.value * that.value, self.scale + that.scale); +}); +/** + * Provides a subtraction operation on `BigDecimal`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { subtract, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(subtract(unsafeFromString("2"), unsafeFromString("3")), unsafeFromString("-1")) + * ``` + * + * @since 2.0.0 + * @category math + */ +export const subtract = /*#__PURE__*/dual(2, (self, that) => { + if (that.value === bigint0) { + return self; + } + if (self.value === bigint0) { + return make(-that.value, that.scale); + } + if (self.scale > that.scale) { + return make(self.value - scale(that, self.scale).value, self.scale); + } + if (self.scale < that.scale) { + return make(scale(self, that.scale).value - that.value, that.scale); + } + return make(self.value - that.value, self.scale); +}); +/** + * Internal function used for arbitrary precision division. + */ +const divideWithPrecision = (num, den, scale, precision) => { + const numNegative = num < bigint0; + const denNegative = den < bigint0; + const negateResult = numNegative !== denNegative; + num = numNegative ? -num : num; + den = denNegative ? -den : den; + // Shift digits until numerator is larger than denominator (set scale appropriately). + while (num < den) { + num *= bigint10; + scale++; + } + // First division. + let quotient = num / den; + let remainder = num % den; + if (remainder === bigint0) { + // No remainder, return immediately. + return make(negateResult ? -quotient : quotient, scale); + } + // The quotient is guaranteed to be non-negative at this point. No need to consider sign. + let count = `${quotient}`.length; + // Shift the remainder by 1 decimal; The quotient will be 1 digit upon next division. + remainder *= bigint10; + while (remainder !== bigint0 && count < precision) { + const q = remainder / den; + const r = remainder % den; + quotient = quotient * bigint10 + q; + remainder = r * bigint10; + count++; + scale++; + } + if (remainder !== bigint0) { + // Round final number with remainder. + quotient += roundTerminal(remainder / den); + } + return make(negateResult ? -quotient : quotient, scale); +}; +/** + * Internal function used for rounding. + * + * Returns 1 if the most significant digit is >= 5, otherwise 0. + * + * This is used after dividing a number by a power of ten and rounding the last digit. + * + * @internal + */ +export const roundTerminal = n => { + const pos = n >= bigint0 ? 0 : 1; + return Number(`${n}`[pos]) < 5 ? bigint0 : bigint1; +}; +/** + * Provides a division operation on `BigDecimal`s. + * + * If the dividend is not a multiple of the divisor the result will be a `BigDecimal` value + * which represents the integer division rounded down to the nearest integer. + * + * If the divisor is `0`, the result will be `None`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigDecimal, Option } from "effect" + * + * assert.deepStrictEqual(BigDecimal.divide(BigDecimal.unsafeFromString("6"), BigDecimal.unsafeFromString("3")), Option.some(BigDecimal.unsafeFromString("2"))) + * assert.deepStrictEqual(BigDecimal.divide(BigDecimal.unsafeFromString("6"), BigDecimal.unsafeFromString("4")), Option.some(BigDecimal.unsafeFromString("1.5"))) + * assert.deepStrictEqual(BigDecimal.divide(BigDecimal.unsafeFromString("6"), BigDecimal.unsafeFromString("0")), Option.none()) + * ``` + * + * @since 2.0.0 + * @category math + */ +export const divide = /*#__PURE__*/dual(2, (self, that) => { + if (that.value === bigint0) { + return Option.none(); + } + if (self.value === bigint0) { + return Option.some(zero); + } + const scale = self.scale - that.scale; + if (self.value === that.value) { + return Option.some(make(bigint1, scale)); + } + return Option.some(divideWithPrecision(self.value, that.value, scale, DEFAULT_PRECISION)); +}); +/** + * Provides an unsafe division operation on `BigDecimal`s. + * + * If the dividend is not a multiple of the divisor the result will be a `BigDecimal` value + * which represents the integer division rounded down to the nearest integer. + * + * Throws a `RangeError` if the divisor is `0`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { unsafeDivide, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(unsafeDivide(unsafeFromString("6"), unsafeFromString("3")), unsafeFromString("2")) + * assert.deepStrictEqual(unsafeDivide(unsafeFromString("6"), unsafeFromString("4")), unsafeFromString("1.5")) + * ``` + * + * @since 2.0.0 + * @category math + */ +export const unsafeDivide = /*#__PURE__*/dual(2, (self, that) => { + if (that.value === bigint0) { + throw new RangeError("Division by zero"); + } + if (self.value === bigint0) { + return zero; + } + const scale = self.scale - that.scale; + if (self.value === that.value) { + return make(bigint1, scale); + } + return divideWithPrecision(self.value, that.value, scale, DEFAULT_PRECISION); +}); +/** + * @since 2.0.0 + * @category instances + */ +export const Order = /*#__PURE__*/order.make((self, that) => { + const scmp = order.number(sign(self), sign(that)); + if (scmp !== 0) { + return scmp; + } + if (self.scale > that.scale) { + return order.bigint(self.value, scale(that, self.scale).value); + } + if (self.scale < that.scale) { + return order.bigint(scale(self, that.scale).value, that.value); + } + return order.bigint(self.value, that.value); +}); +/** + * Returns `true` if the first argument is less than the second, otherwise `false`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { lessThan, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(lessThan(unsafeFromString("2"), unsafeFromString("3")), true) + * assert.deepStrictEqual(lessThan(unsafeFromString("3"), unsafeFromString("3")), false) + * assert.deepStrictEqual(lessThan(unsafeFromString("4"), unsafeFromString("3")), false) + * ``` + * + * @since 2.0.0 + * @category predicates + */ +export const lessThan = /*#__PURE__*/order.lessThan(Order); +/** + * Checks if a given `BigDecimal` is less than or equal to the provided one. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { lessThanOrEqualTo, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(lessThanOrEqualTo(unsafeFromString("2"), unsafeFromString("3")), true) + * assert.deepStrictEqual(lessThanOrEqualTo(unsafeFromString("3"), unsafeFromString("3")), true) + * assert.deepStrictEqual(lessThanOrEqualTo(unsafeFromString("4"), unsafeFromString("3")), false) + * ``` + * + * @since 2.0.0 + * @category predicates + */ +export const lessThanOrEqualTo = /*#__PURE__*/order.lessThanOrEqualTo(Order); +/** + * Returns `true` if the first argument is greater than the second, otherwise `false`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { greaterThan, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(greaterThan(unsafeFromString("2"), unsafeFromString("3")), false) + * assert.deepStrictEqual(greaterThan(unsafeFromString("3"), unsafeFromString("3")), false) + * assert.deepStrictEqual(greaterThan(unsafeFromString("4"), unsafeFromString("3")), true) + * ``` + * + * @since 2.0.0 + * @category predicates + */ +export const greaterThan = /*#__PURE__*/order.greaterThan(Order); +/** + * Checks if a given `BigDecimal` is greater than or equal to the provided one. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { greaterThanOrEqualTo, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(greaterThanOrEqualTo(unsafeFromString("2"), unsafeFromString("3")), false) + * assert.deepStrictEqual(greaterThanOrEqualTo(unsafeFromString("3"), unsafeFromString("3")), true) + * assert.deepStrictEqual(greaterThanOrEqualTo(unsafeFromString("4"), unsafeFromString("3")), true) + * ``` + * + * @since 2.0.0 + * @category predicates + */ +export const greaterThanOrEqualTo = /*#__PURE__*/order.greaterThanOrEqualTo(Order); +/** + * Checks if a `BigDecimal` is between a `minimum` and `maximum` value (inclusive). + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigDecimal } from "effect" + * + * const between = BigDecimal.between({ + * minimum: BigDecimal.unsafeFromString("1"), + * maximum: BigDecimal.unsafeFromString("5") } + * ) + * + * assert.deepStrictEqual(between(BigDecimal.unsafeFromString("3")), true) + * assert.deepStrictEqual(between(BigDecimal.unsafeFromString("0")), false) + * assert.deepStrictEqual(between(BigDecimal.unsafeFromString("6")), false) + * ``` + * + * @since 2.0.0 + * @category predicates + */ +export const between = /*#__PURE__*/order.between(Order); +/** + * Restricts the given `BigDecimal` to be within the range specified by the `minimum` and `maximum` values. + * + * - If the `BigDecimal` is less than the `minimum` value, the function returns the `minimum` value. + * - If the `BigDecimal` is greater than the `maximum` value, the function returns the `maximum` value. + * - Otherwise, it returns the original `BigDecimal`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigDecimal } from "effect" + * + * const clamp = BigDecimal.clamp({ + * minimum: BigDecimal.unsafeFromString("1"), + * maximum: BigDecimal.unsafeFromString("5") } + * ) + * + * assert.deepStrictEqual(clamp(BigDecimal.unsafeFromString("3")), BigDecimal.unsafeFromString("3")) + * assert.deepStrictEqual(clamp(BigDecimal.unsafeFromString("0")), BigDecimal.unsafeFromString("1")) + * assert.deepStrictEqual(clamp(BigDecimal.unsafeFromString("6")), BigDecimal.unsafeFromString("5")) + * ``` + * + * @since 2.0.0 + * @category math + */ +export const clamp = /*#__PURE__*/order.clamp(Order); +/** + * Returns the minimum between two `BigDecimal`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { min, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(min(unsafeFromString("2"), unsafeFromString("3")), unsafeFromString("2")) + * ``` + * + * @since 2.0.0 + * @category math + */ +export const min = /*#__PURE__*/order.min(Order); +/** + * Returns the maximum between two `BigDecimal`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { max, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(max(unsafeFromString("2"), unsafeFromString("3")), unsafeFromString("3")) + * ``` + * + * @since 2.0.0 + * @category math + */ +export const max = /*#__PURE__*/order.max(Order); +/** + * Determines the sign of a given `BigDecimal`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { sign, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(sign(unsafeFromString("-5")), -1) + * assert.deepStrictEqual(sign(unsafeFromString("0")), 0) + * assert.deepStrictEqual(sign(unsafeFromString("5")), 1) + * ``` + * + * @since 2.0.0 + * @category math + */ +export const sign = n => n.value === bigint0 ? 0 : n.value < bigint0 ? -1 : 1; +/** + * Determines the absolute value of a given `BigDecimal`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { abs, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(abs(unsafeFromString("-5")), unsafeFromString("5")) + * assert.deepStrictEqual(abs(unsafeFromString("0")), unsafeFromString("0")) + * assert.deepStrictEqual(abs(unsafeFromString("5")), unsafeFromString("5")) + * ``` + * + * @since 2.0.0 + * @category math + */ +export const abs = n => n.value < bigint0 ? make(-n.value, n.scale) : n; +/** + * Provides a negate operation on `BigDecimal`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { negate, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(negate(unsafeFromString("3")), unsafeFromString("-3")) + * assert.deepStrictEqual(negate(unsafeFromString("-6")), unsafeFromString("6")) + * ``` + * + * @since 2.0.0 + * @category math + */ +export const negate = n => make(-n.value, n.scale); +/** + * Returns the remainder left over when one operand is divided by a second operand. + * + * If the divisor is `0`, the result will be `None`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigDecimal, Option } from "effect" + * + * assert.deepStrictEqual(BigDecimal.remainder(BigDecimal.unsafeFromString("2"), BigDecimal.unsafeFromString("2")), Option.some(BigDecimal.unsafeFromString("0"))) + * assert.deepStrictEqual(BigDecimal.remainder(BigDecimal.unsafeFromString("3"), BigDecimal.unsafeFromString("2")), Option.some(BigDecimal.unsafeFromString("1"))) + * assert.deepStrictEqual(BigDecimal.remainder(BigDecimal.unsafeFromString("-4"), BigDecimal.unsafeFromString("2")), Option.some(BigDecimal.unsafeFromString("0"))) + * ``` + * + * @since 2.0.0 + * @category math + */ +export const remainder = /*#__PURE__*/dual(2, (self, divisor) => { + if (divisor.value === bigint0) { + return Option.none(); + } + const max = Math.max(self.scale, divisor.scale); + return Option.some(make(scale(self, max).value % scale(divisor, max).value, max)); +}); +/** + * Returns the remainder left over when one operand is divided by a second operand. + * + * Throws a `RangeError` if the divisor is `0`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { unsafeRemainder, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(unsafeRemainder(unsafeFromString("2"), unsafeFromString("2")), unsafeFromString("0")) + * assert.deepStrictEqual(unsafeRemainder(unsafeFromString("3"), unsafeFromString("2")), unsafeFromString("1")) + * assert.deepStrictEqual(unsafeRemainder(unsafeFromString("-4"), unsafeFromString("2")), unsafeFromString("0")) + * ``` + * + * @since 2.0.0 + * @category math + */ +export const unsafeRemainder = /*#__PURE__*/dual(2, (self, divisor) => { + if (divisor.value === bigint0) { + throw new RangeError("Division by zero"); + } + const max = Math.max(self.scale, divisor.scale); + return make(scale(self, max).value % scale(divisor, max).value, max); +}); +/** + * @category instances + * @since 2.0.0 + */ +export const Equivalence = /*#__PURE__*/equivalence.make((self, that) => { + if (self.scale > that.scale) { + return scale(that, self.scale).value === self.value; + } + if (self.scale < that.scale) { + return scale(self, that.scale).value === that.value; + } + return self.value === that.value; +}); +/** + * Checks if two `BigDecimal`s are equal. + * + * @since 2.0.0 + * @category predicates + */ +export const equals = /*#__PURE__*/dual(2, (self, that) => Equivalence(self, that)); +/** + * Creates a `BigDecimal` from a `bigint` value. + * + * @since 2.0.0 + * @category constructors + */ +export const fromBigInt = n => make(n, 0); +/** + * Creates a `BigDecimal` from a `number` value. + * + * It is not recommended to convert a floating point number to a decimal directly, + * as the floating point representation may be unexpected. + * + * Throws a `RangeError` if the number is not finite (`NaN`, `+Infinity` or `-Infinity`). + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { unsafeFromNumber, make } from "effect/BigDecimal" + * + * assert.deepStrictEqual(unsafeFromNumber(123), make(123n, 0)) + * assert.deepStrictEqual(unsafeFromNumber(123.456), make(123456n, 3)) + * ``` + * + * @since 3.11.0 + * @category constructors + */ +export const unsafeFromNumber = n => Option.getOrThrowWith(safeFromNumber(n), () => new RangeError(`Number must be finite, got ${n}`)); +/** + * Creates a `BigDecimal` from a `number` value. + * + * It is not recommended to convert a floating point number to a decimal directly, + * as the floating point representation may be unexpected. + * + * Throws a `RangeError` if the number is not finite (`NaN`, `+Infinity` or `-Infinity`). + * + * @since 2.0.0 + * @category constructors + * @deprecated Use {@link unsafeFromNumber} instead. + */ +export const fromNumber = unsafeFromNumber; +// TODO(4.0): Rename this to `fromNumber` after removing the current, unsafe implementation of `fromNumber`. +/** + * Creates a `BigDecimal` from a `number` value. + * + * It is not recommended to convert a floating point number to a decimal directly, + * as the floating point representation may be unexpected. + * + * Returns `None` if the number is not finite (`NaN`, `+Infinity` or `-Infinity`). + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigDecimal, Option } from "effect" + * + * assert.deepStrictEqual(BigDecimal.safeFromNumber(123), Option.some(BigDecimal.make(123n, 0))) + * assert.deepStrictEqual(BigDecimal.safeFromNumber(123.456), Option.some(BigDecimal.make(123456n, 3))) + * assert.deepStrictEqual(BigDecimal.safeFromNumber(Infinity), Option.none()) + * ``` + * + * @since 3.11.0 + * @category constructors + */ +export const safeFromNumber = n => { + if (!Number.isFinite(n)) { + return Option.none(); + } + const string = `${n}`; + if (string.includes("e")) { + return fromString(string); + } + const [lead, trail = ""] = string.split("."); + return Option.some(make(BigInt(`${lead}${trail}`), trail.length)); +}; +/** + * Parses a numerical `string` into a `BigDecimal`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigDecimal, Option } from "effect" + * + * assert.deepStrictEqual(BigDecimal.fromString("123"), Option.some(BigDecimal.make(123n, 0))) + * assert.deepStrictEqual(BigDecimal.fromString("123.456"), Option.some(BigDecimal.make(123456n, 3))) + * assert.deepStrictEqual(BigDecimal.fromString("123.abc"), Option.none()) + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const fromString = s => { + if (s === "") { + return Option.some(zero); + } + let base; + let exp; + const seperator = s.search(/[eE]/); + if (seperator !== -1) { + const trail = s.slice(seperator + 1); + base = s.slice(0, seperator); + exp = Number(trail); + if (base === "" || !Number.isSafeInteger(exp) || !FINITE_INT_REGEX.test(trail)) { + return Option.none(); + } + } else { + base = s; + exp = 0; + } + let digits; + let offset; + const dot = base.search(/\./); + if (dot !== -1) { + const lead = base.slice(0, dot); + const trail = base.slice(dot + 1); + digits = `${lead}${trail}`; + offset = trail.length; + } else { + digits = base; + offset = 0; + } + if (!FINITE_INT_REGEX.test(digits)) { + return Option.none(); + } + const scale = offset - exp; + if (!Number.isSafeInteger(scale)) { + return Option.none(); + } + return Option.some(make(BigInt(digits), scale)); +}; +/** + * Parses a numerical `string` into a `BigDecimal`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { unsafeFromString, make } from "effect/BigDecimal" + * + * assert.deepStrictEqual(unsafeFromString("123"), make(123n, 0)) + * assert.deepStrictEqual(unsafeFromString("123.456"), make(123456n, 3)) + * assert.throws(() => unsafeFromString("123.abc")) + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const unsafeFromString = s => Option.getOrThrowWith(fromString(s), () => new Error("Invalid numerical string")); +/** + * Formats a given `BigDecimal` as a `string`. + * + * If the scale of the `BigDecimal` is greater than or equal to 16, the `BigDecimal` will + * be formatted in scientific notation. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { format, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(format(unsafeFromString("-5")), "-5") + * assert.deepStrictEqual(format(unsafeFromString("123.456")), "123.456") + * assert.deepStrictEqual(format(unsafeFromString("-0.00000123")), "-0.00000123") + * ``` + * + * @since 2.0.0 + * @category conversions + */ +export const format = n => { + const normalized = normalize(n); + if (Math.abs(normalized.scale) >= 16) { + return toExponential(normalized); + } + const negative = normalized.value < bigint0; + const absolute = negative ? `${normalized.value}`.substring(1) : `${normalized.value}`; + let before; + let after; + if (normalized.scale >= absolute.length) { + before = "0"; + after = "0".repeat(normalized.scale - absolute.length) + absolute; + } else { + const location = absolute.length - normalized.scale; + if (location > absolute.length) { + const zeros = location - absolute.length; + before = `${absolute}${"0".repeat(zeros)}`; + after = ""; + } else { + after = absolute.slice(location); + before = absolute.slice(0, location); + } + } + const complete = after === "" ? before : `${before}.${after}`; + return negative ? `-${complete}` : complete; +}; +/** + * Formats a given `BigDecimal` as a `string` in scientific notation. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { toExponential, make } from "effect/BigDecimal" + * + * assert.deepStrictEqual(toExponential(make(123456n, -5)), "1.23456e+10") + * ``` + * + * @since 3.11.0 + * @category conversions + */ +export const toExponential = n => { + if (isZero(n)) { + return "0e+0"; + } + const normalized = normalize(n); + const digits = `${abs(normalized).value}`; + const head = digits.slice(0, 1); + const tail = digits.slice(1); + let output = `${isNegative(normalized) ? "-" : ""}${head}`; + if (tail !== "") { + output += `.${tail}`; + } + const exp = tail.length - normalized.scale; + return `${output}e${exp >= 0 ? "+" : ""}${exp}`; +}; +/** + * Converts a `BigDecimal` to a `number`. + * + * This function will produce incorrect results if the `BigDecimal` exceeds the 64-bit range of a `number`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { unsafeToNumber, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(unsafeToNumber(unsafeFromString("123.456")), 123.456) + * ``` + * + * @since 2.0.0 + * @category conversions + */ +export const unsafeToNumber = n => Number(format(n)); +/** + * Checks if a given `BigDecimal` is an integer. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isInteger, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(isInteger(unsafeFromString("0")), true) + * assert.deepStrictEqual(isInteger(unsafeFromString("1")), true) + * assert.deepStrictEqual(isInteger(unsafeFromString("1.1")), false) + * ``` + * + * @since 2.0.0 + * @category predicates + */ +export const isInteger = n => normalize(n).scale <= 0; +/** + * Checks if a given `BigDecimal` is `0`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isZero, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(isZero(unsafeFromString("0")), true) + * assert.deepStrictEqual(isZero(unsafeFromString("1")), false) + * ``` + * + * @since 2.0.0 + * @category predicates + */ +export const isZero = n => n.value === bigint0; +/** + * Checks if a given `BigDecimal` is negative. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isNegative, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(isNegative(unsafeFromString("-1")), true) + * assert.deepStrictEqual(isNegative(unsafeFromString("0")), false) + * assert.deepStrictEqual(isNegative(unsafeFromString("1")), false) + * ``` + * + * @since 2.0.0 + * @category predicates + */ +export const isNegative = n => n.value < bigint0; +/** + * Checks if a given `BigDecimal` is positive. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isPositive, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(isPositive(unsafeFromString("-1")), false) + * assert.deepStrictEqual(isPositive(unsafeFromString("0")), false) + * assert.deepStrictEqual(isPositive(unsafeFromString("1")), true) + * ``` + * + * @since 2.0.0 + * @category predicates + */ +export const isPositive = n => n.value > bigint0; +const isBigDecimalArgs = args => isBigDecimal(args[0]); +/** + * Calculate the ceiling of a `BigDecimal` at the given scale. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { ceil, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(ceil(unsafeFromString("145"), -1), unsafeFromString("150")) + * assert.deepStrictEqual(ceil(unsafeFromString("-14.5")), unsafeFromString("-14")) + * ``` + * + * @since 3.16.0 + * @category math + */ +export const ceil = /*#__PURE__*/dual(isBigDecimalArgs, (self, scale = 0) => { + const truncated = truncate(self, scale); + if (isPositive(self) && lessThan(truncated, self)) { + return sum(truncated, make(1n, scale)); + } + return truncated; +}); +/** + * Calculate the floor of a `BigDecimal` at the given scale. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { floor, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(floor(unsafeFromString("145"), -1), unsafeFromString("140")) + * assert.deepStrictEqual(floor(unsafeFromString("-14.5")), unsafeFromString("-15")) + * ``` + * + * @since 3.16.0 + * @category math + */ +export const floor = /*#__PURE__*/dual(isBigDecimalArgs, (self, scale = 0) => { + const truncated = truncate(self, scale); + if (isNegative(self) && greaterThan(truncated, self)) { + return sum(truncated, make(-1n, scale)); + } + return truncated; +}); +/** + * Truncate a `BigDecimal` at the given scale. This is the same operation as rounding away from zero. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { truncate, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(truncate(unsafeFromString("145"), -1), unsafeFromString("140")) + * assert.deepStrictEqual(truncate(unsafeFromString("-14.5")), unsafeFromString("-14")) + * ``` + * + * @since 3.16.0 + * @category math + */ +export const truncate = /*#__PURE__*/dual(isBigDecimalArgs, (self, scale = 0) => { + if (self.scale <= scale) { + return self; + } + // BigInt division truncates towards zero + return make(self.value / 10n ** BigInt(self.scale - scale), scale); +}); +/** + * Internal function used by `round` for `half-even` and `half-odd` rounding modes. + * + * Returns the digit at the position of the given `scale` within the `BigDecimal`. + * + * @internal + */ +export const digitAt = /*#__PURE__*/dual(2, (self, scale) => { + if (self.scale < scale) { + return 0n; + } + const scaled = self.value / 10n ** BigInt(self.scale - scale); + return scaled % 10n; +}); +/** + * Rounds a `BigDecimal` at the given scale with the specified rounding mode. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { round, unsafeFromString } from "effect/BigDecimal" + * + * assert.deepStrictEqual(round(unsafeFromString("145"), { mode: "from-zero", scale: -1 }), unsafeFromString("150")) + * assert.deepStrictEqual(round(unsafeFromString("-14.5")), unsafeFromString("-15")) + * ``` + * + * @since 3.16.0 + * @category math + */ +export const round = /*#__PURE__*/dual(isBigDecimalArgs, (self, options) => { + const mode = options?.mode ?? "half-from-zero"; + const scale = options?.scale ?? 0; + switch (mode) { + case "ceil": + return ceil(self, scale); + case "floor": + return floor(self, scale); + case "to-zero": + return truncate(self, scale); + case "from-zero": + return isPositive(self) ? ceil(self, scale) : floor(self, scale); + case "half-ceil": + return floor(sum(self, make(5n, scale + 1)), scale); + case "half-floor": + return ceil(sum(self, make(-5n, scale + 1)), scale); + case "half-to-zero": + return isNegative(self) ? floor(sum(self, make(5n, scale + 1)), scale) : ceil(sum(self, make(-5n, scale + 1)), scale); + case "half-from-zero": + return isNegative(self) ? ceil(sum(self, make(-5n, scale + 1)), scale) : floor(sum(self, make(5n, scale + 1)), scale); + } + const halfCeil = floor(sum(self, make(5n, scale + 1)), scale); + const halfFloor = ceil(sum(self, make(-5n, scale + 1)), scale); + const digit = digitAt(halfCeil, scale); + switch (mode) { + case "half-even": + return equals(halfCeil, halfFloor) ? halfCeil : digit % 2n === 0n ? halfCeil : halfFloor; + case "half-odd": + return equals(halfCeil, halfFloor) ? halfCeil : digit % 2n === 0n ? halfFloor : halfCeil; + } +}); +/** + * Takes an `Iterable` of `BigDecimal`s and returns their sum as a single `BigDecimal` + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { unsafeFromString, sumAll } from "effect/BigDecimal" + * + * assert.deepStrictEqual(sumAll([unsafeFromString("2"), unsafeFromString("3"), unsafeFromString("4")]), unsafeFromString("9")) + * ``` + * + * @category math + * @since 3.16.0 + */ +export const sumAll = collection => { + let out = zero; + for (const n of collection) { + out = sum(out, n); + } + return out; +}; +//# sourceMappingURL=BigDecimal.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Brand.js b/backend/node_modules/effect/dist/esm/Brand.js new file mode 100644 index 0000000000000000000000000000000000000000..b94cca44fdd4128996b15a54869641d6fca065e9 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Brand.js @@ -0,0 +1,161 @@ +/** + * This module provides types and utility functions to create and work with branded types, + * which are TypeScript types with an added type tag to prevent accidental usage of a value in the wrong context. + * + * The `refined` and `nominal` functions are both used to create branded types in TypeScript. + * The main difference between them is that `refined` allows for validation of the data, while `nominal` does not. + * + * The `nominal` function is used to create a new branded type that has the same underlying type as the input, but with a different name. + * This is useful when you want to distinguish between two values of the same type that have different meanings. + * The `nominal` function does not perform any validation of the input data. + * + * On the other hand, the `refined` function is used to create a new branded type that has the same underlying type as the input, + * but with a different name, and it also allows for validation of the input data. + * The `refined` function takes a predicate that is used to validate the input data. + * If the input data fails the validation, a `BrandErrors` is returned, which provides information about the specific validation failure. + * + * @since 2.0.0 + */ +import * as Arr from "./Array.js"; +import * as Either from "./Either.js"; +import { identity, unsafeCoerce } from "./Function.js"; +import * as Option from "./Option.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const BrandTypeId = /*#__PURE__*/Symbol.for("effect/Brand"); +/** + * @since 2.0.0 + * @category symbols + */ +export const RefinedConstructorsTypeId = /*#__PURE__*/Symbol.for("effect/Brand/Refined"); +/** + * Returns a `BrandErrors` that contains a single `RefinementError`. + * + * @since 2.0.0 + * @category constructors + */ +export const error = (message, meta) => [{ + message, + meta +}]; +/** + * Takes a variable number of `BrandErrors` and returns a single `BrandErrors` that contains all refinement errors. + * + * @since 2.0.0 + * @category constructors + */ +export const errors = (...errors) => Arr.flatten(errors); +export function refined(...args) { + const either = args.length === 2 ? unbranded => args[0](unbranded) ? Either.right(unbranded) : Either.left(args[1](unbranded)) : unbranded => { + return Option.match(args[0](unbranded), { + onNone: () => Either.right(unbranded), + onSome: Either.left + }); + }; + return Object.assign(unbranded => Either.getOrThrowWith(either(unbranded), identity), { + [RefinedConstructorsTypeId]: RefinedConstructorsTypeId, + option: args => Option.getRight(either(args)), + either, + is: args => Either.isRight(either(args)) + }); +} +/** + * This function returns a `Brand.Constructor` that **does not apply any runtime checks**, it just returns the provided value. + * It can be used to create nominal types that allow distinguishing between two values of the same type but with different meanings. + * + * If you also want to perform some validation, see {@link refined}. + * + * **Example** + * + * ```ts + * import * as assert from "node:assert" + * import { Brand } from "effect" + * + * type UserId = number & Brand.Brand<"UserId"> + * + * const UserId = Brand.nominal() + * + * console.log(UserId(1)) + * // 1 + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const nominal = () => { + // @ts-expect-error + return Object.assign(args => args, { + [RefinedConstructorsTypeId]: RefinedConstructorsTypeId, + option: args => Option.some(args), + either: args => Either.right(args), + is: _args => true + }); +}; +/** + * Combines two or more brands together to form a single branded type. + * This API is useful when you want to validate that the input data passes multiple brand validators. + * + * **Example** + * + * ```ts + * import * as assert from "node:assert" + * import { Brand } from "effect" + * + * type Int = number & Brand.Brand<"Int"> + * const Int = Brand.refined( + * (n) => Number.isInteger(n), + * (n) => Brand.error(`Expected ${n} to be an integer`) + * ) + * type Positive = number & Brand.Brand<"Positive"> + * const Positive = Brand.refined( + * (n) => n > 0, + * (n) => Brand.error(`Expected ${n} to be positive`) + * ) + * + * const PositiveInt = Brand.all(Int, Positive) + * + * console.log(PositiveInt(1)) + * // 1 + * + * assert.throws(() => PositiveInt(1.1)) + * ``` + * + * @since 2.0.0 + * @category combining + */ +export const all = (...brands) => { + const either = args => { + let result = Either.right(args); + for (const brand of brands) { + const nextResult = brand.either(args); + if (Either.isLeft(result) && Either.isLeft(nextResult)) { + result = Either.left([...result.left, ...nextResult.left]); + } else { + result = Either.isLeft(result) ? result : nextResult; + } + } + return result; + }; + // @ts-expect-error + return Object.assign(args => Either.match(either(args), { + onLeft: e => { + throw e; + }, + onRight: identity + }), { + [RefinedConstructorsTypeId]: RefinedConstructorsTypeId, + option: args => Option.getRight(either(args)), + either, + is: args => Either.isRight(either(args)) + }); +}; +/** + * Retrieves the unbranded value from a `Brand` instance. + * + * @since 3.15.0 + * @category getters + */ +export const unbranded = unsafeCoerce; +//# sourceMappingURL=Brand.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Channel.js.map b/backend/node_modules/effect/dist/esm/Channel.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ca8ff12ba6609e6e585fb7ac471818ea72af10ca --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Channel.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Channel.js","names":["channel","core","sink","stream","ChannelTypeId","ChannelExceptionTypeId","isChannel","acquireUseRelease","acquireReleaseOut","as","asVoid","buffer","bufferChunk","catchAll","catchAllCause","concatAll","concatAllWith","concatMap","concatMapWith","concatMapWithCustom","collect","concatOut","mapInput","mapInputEffect","mapInputError","mapInputErrorEffect","mapInputIn","mapInputInEffect","doneCollect","drain","embedInput","emitCollect","ensuring","ensuringWith","context","contextWith","contextWithChannel","contextWithEffect","fail","failSync","failCause","failCauseSync","flatMap","flatten","foldChannel","foldCauseChannel","fromEffect","fromEither","fromInput","fromPubSub","fromPubSubScoped","fromOption","fromQueue","identity","identityChannel","interruptWhen","interruptWhenDeferred","map","mapEffect","mapError","mapErrorCause","mapOut","mapOutEffect","mapOutEffectPar","mergeAll","mergeAllUnbounded","mergeAllUnboundedWith","mergeAllWith","mergeMap","mergeOut","mergeOutWith","mergeWith","never","orDie","orDieWith","orElse","pipeTo","pipeToOrFail","provideContext","provideLayer","mapInputContext","provideSomeLayer","provideService","read","readOrFail","readWith","readWithCause","repeated","run","runCollect","runDrain","runScoped","scoped","scopedWith","splitLines","succeed","suspend","sync","toPubSub","toPull","toPullIn","toQueue","toSink","channelToSink","toStream","channelToStream","void_","void","unwrap","unwrapScoped","unwrapScopedWith","updateService","withSpan","write","writeAll","writeChunk","zip","zipLeft","zipRight","ChannelException","isChannelException"],"sources":["../../src/Channel.ts"],"sourcesContent":[null],"mappings":"AAYA,OAAO,KAAKA,OAAO,MAAM,uBAAuB;AAChD,OAAO,KAAKC,IAAI,MAAM,2BAA2B;AACjD,OAAO,KAAKC,IAAI,MAAM,oBAAoB;AAC1C,OAAO,KAAKC,MAAM,MAAM,sBAAsB;AAoB9C;;;;AAIA,OAAO,MAAMC,aAAa,GAAkBH,IAAI,CAACG,aAAa;AA4H9D;;;;AAIA,OAAO,MAAMC,sBAAsB,GAAkBL,OAAO,CAACK,sBAAsB;AAqBnF;;;;AAIA,OAAO,MAAMC,SAAS,GAQlBL,IAAI,CAACK,SAAS;AAElB;;;;AAIA,OAAO,MAAMC,iBAAiB,GAIwCP,OAAO,CAACO,iBAAiB;AAE/F;;;;AAIA,OAAO,MAAMC,iBAAiB,GAgB1BP,IAAI,CAACO,iBAAiB;AAE1B;;;;;;;;;;AAUA,OAAO,MAAMC,EAAE,GA4BXT,OAAO,CAACS,EAAE;AAEd;;;;AAIA,OAAO,MAAMC,MAAM,GAE+CV,OAAO,CAACU,MAAM;AAEhF;;;;;;;;AAQA,OAAO,MAAMC,MAAM,GAEiDX,OAAO,CAACW,MAAM;AAElF;;;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ules/effect/dist/esm/Chunk.js.map b/backend/node_modules/effect/dist/esm/Chunk.js.map new file mode 100644 index 0000000000000000000000000000000000000000..8bafcd3fd73fbdf6198d959d01be3c5103794f12 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Chunk.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Chunk.js","names":["RA","Equal","Equivalence","dual","identity","pipe","Hash","format","NodeInspectSymbol","toJSON","O","Order","pipeArguments","hasProperty","TypeId","Symbol","for","copy","src","srcPos","dest","destPos","len","i","Math","min","length","emptyArray","getEquivalence","isEquivalent","make","self","that","toReadonlyArray","every","value","unsafeGet","_equivalence","equals","ChunkProto","_A","_","toString","_id","values","map","symbol","isChunk","cached","array","iterator","backing","_tag","arguments","makeChunk","chunk","Object","create","depth","left","right","max","_empty","u","empty","as","unsafeFromNonEmptyArray","of","a","fromIterable","unsafeFromArray","copyToArray","initial","j","toArray_","slice","toArray","toReadonlyArray_","arr","Array","reverseChunk","reverse","get","index","none","some","Error","offset","append","appendAll","prepend","elem","take","n","drop","dropRight","dropWhile","predicate","prependAll","diff","abs","nr","nrr","nl","nll","filterMap","f","filter","filterMapWhile","compact","flatMap","out","k","forEach","flatten","chunksOf","gr","current","push","intersection","isEmpty","isNonEmpty","head","unsafeHead","headNonEmpty","last","unsafeLast","lastNonEmpty","mapAccum","s","s1","partition","l","r","partitionMap","separate","size","sort","sortWith","order","mapInput","splitAt","splitNonEmptyAt","_n","floor","split","ceil","splitWhere","tail","tailNonEmpty","takeRight","takeWhile","union","dedupe","dedupeAdjacent","unzip","zipWith","zip","b","remove","removeOption","modifyOption","modify","getOrElse","replace","replaceOption","makeBy","range","start","end","contains","containsWith","findFirst","findFirstIndex","findLast","findLastIndex","refinement","join","reduce","reduceRight","differenceWith","difference"],"sources":["../../src/Chunk.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,EAAE,MAAM,YAAY;AAGhC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO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AMC,cAAc,GAevB7K,EAAE,CAAC6K,cAAc;AAErB;;;;;;AAMA,OAAO,MAAMC,QAAQ,GA6BjB9K,EAAE,CAAC8K,QAAQ;AAEf;;;;;;AAMA,OAAO,MAAMC,aAAa,GAetB/K,EAAE,CAAC+K,aAAa;AAEpB;;;;;;AAMA,OAAO,MAAM7I,KAAK,gBA6Bd/B,IAAI,CACN,CAAC,EACD,CAAiB4B,IAAc,EAAEiJ,UAA4B,KAC3DhL,EAAE,CAACqE,YAAY,CAACtC,IAAI,CAAC,CAACG,KAAK,CAAC8I,UAAU,CAAC,CAC1C;AAED;;;;;;AAMA,OAAO,MAAM3F,IAAI,gBAeblF,IAAI,CACN,CAAC,EACD,CAAI4B,IAAc,EAAEkE,SAAuB,KAA+BjG,EAAE,CAACqE,YAAY,CAACtC,IAAI,CAAC,CAACsD,IAAI,CAACY,SAAS,CAAC,CAChH;AAED;;;;;;AAMA,OAAO,MAAMgF,IAAI,GAebjL,EAAE,CAACiL,IAAI;AAEX;;;;AAIA,OAAO,MAAMC,MAAM,GAWflL,EAAE,CAACkL,MAAM;AAEb;;;;AAIA,OAAO,MAAMC,WAAW,GAWpBnL,EAAE,CAACmL,WAAW;AAElB;;;;;;AAMA,OAAO,MAAMC,cAAc,GAAOvJ,YAA2C,IAGzE;EACF,OAAO1B,IAAI,CACT,CAAC,EACD,CAAC4B,IAAc,EAAEC,IAAc,KAAesC,eAAe,CAACtE,EAAE,CAACoL,cAAc,CAACvJ,YAAY,CAAC,CAACG,IAAI,EAAED,IAAI,CAAC,CAAC,CAC3G;AACH,CAAC;AAED;;;;;;AAMA,OAAO,MAAMsJ,UAAU,gBAenBlL,IAAI,CACN,CAAC,EACD,CAAI4B,IAAc,EAAEC,IAAc,KAAesC,eAAe,CAACtE,EAAE,CAACqL,UAAU,CAACrJ,IAAI,EAAED,IAAI,CAAC,CAAC,CAC5F","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ConfigProvider.js b/backend/node_modules/effect/dist/esm/ConfigProvider.js new file mode 100644 index 0000000000000000000000000000000000000000..428a290058388e02e3421cf98d2754f8b116b4ad --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ConfigProvider.js @@ -0,0 +1,166 @@ +import * as internal from "./internal/configProvider.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const ConfigProviderTypeId = internal.ConfigProviderTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +export const FlatConfigProviderTypeId = internal.FlatConfigProviderTypeId; +/** + * The service tag for `ConfigProvider`. + * + * @since 2.0.0 + * @category context + */ +export const ConfigProvider = internal.configProviderTag; +/** + * Creates a new config provider. + * + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * Creates a new flat config provider. + * + * @since 2.0.0 + * @category constructors + */ +export const makeFlat = internal.makeFlat; +/** + * A config provider that loads configuration from context variables + * + * **Options**: + * + * - `pathDelim`: The delimiter for the path segments (default: `"_"`). + * - `seqDelim`: The delimiter for the sequence of values (default: `","`). + * + * @since 2.0.0 + * @category constructors + */ +export const fromEnv = internal.fromEnv; +/** + * Constructs a new `ConfigProvider` from a key/value (flat) provider, where + * nesting is embedded into the string keys. + * + * @since 2.0.0 + * @category constructors + */ +export const fromFlat = internal.fromFlat; +/** + * Constructs a new `ConfigProvider` from a JSON object. + * + * @since 2.0.0 + * @category constructors + */ +export const fromJson = internal.fromJson; +// TODO(4.0): use `_` for nested configs instead of `.` in next major +/** + * Constructs a ConfigProvider using a map and the specified delimiter string, + * which determines how to split the keys in the map into path segments. + * + * @since 2.0.0 + * @category constructors + */ +export const fromMap = internal.fromMap; +/** + * Returns a new config provider that will automatically convert all property + * names to constant case. This can be utilized to adapt the names of + * configuration properties from the default naming convention of camel case + * to the naming convention of a config provider. + * + * @since 2.0.0 + * @category combinators + */ +export const constantCase = internal.constantCase; +/** + * Returns a new config provider that will automatically tranform all path + * configuration names with the specified function. This can be utilized to + * adapt the names of configuration properties from one naming convention to + * another. + * + * @since 2.0.0 + * @category utils + */ +export const mapInputPath = internal.mapInputPath; +/** + * Returns a new config provider that will automatically convert all property + * names to kebab case. This can be utilized to adapt the names of + * configuration properties from the default naming convention of camel case + * to the naming convention of a config provider. + * + * @since 2.0.0 + * @category combinators + */ +export const kebabCase = internal.kebabCase; +/** + * Returns a new config provider that will automatically convert all property + * names to lower case. This can be utilized to adapt the names of + * configuration properties from the default naming convention of camel case + * to the naming convention of a config provider. + * + * @since 2.0.0 + * @category combinators + */ +export const lowerCase = internal.lowerCase; +/** + * Returns a new config provider that will automatically nest all + * configuration under the specified property name. This can be utilized to + * aggregate separate configuration sources that are all required to load a + * single configuration value. + * + * @since 2.0.0 + * @category utils + */ +export const nested = internal.nested; +/** + * Returns a new config provider that preferentially loads configuration data + * from this one, but which will fall back to the specified alternate provider + * if there are any issues loading the configuration from this provider. + * + * @since 2.0.0 + * @category utils + */ +export const orElse = internal.orElse; +/** + * Returns a new config provider that will automatically un-nest all + * configuration under the specified property name. This can be utilized to + * de-aggregate separate configuration sources that are all required to load a + * single configuration value. + * + * @since 2.0.0 + * @category utils + */ +export const unnested = internal.unnested; +/** + * Returns a new config provider that will automatically convert all property + * names to upper case. This can be utilized to adapt the names of + * configuration properties from the default naming convention of camel case + * to the naming convention of a config provider. + * + * @since 2.0.0 + * @category combinators + */ +export const snakeCase = internal.snakeCase; +/** + * Returns a new config provider that will automatically convert all property + * names to upper case. This can be utilized to adapt the names of + * configuration properties from the default naming convention of camel case + * to the naming convention of a config provider. + * + * @since 2.0.0 + * @category combinators + */ +export const upperCase = internal.upperCase; +/** + * Returns a new config provider that transforms the config provider with the + * specified function within the specified path. + * + * @since 2.0.0 + * @category combinators + */ +export const within = internal.within; +//# sourceMappingURL=ConfigProvider.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ConfigProvider.js.map b/backend/node_modules/effect/dist/esm/ConfigProvider.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5820b27f7efddcf9b0e63cbf8d50f48e5f950b9b --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ConfigProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ConfigProvider.js","names":["internal","ConfigProviderTypeId","FlatConfigProviderTypeId","ConfigProvider","configProviderTag","make","makeFlat","fromEnv","fromFlat","fromJson","fromMap","constantCase","mapInputPath","kebabCase","lowerCase","nested","orElse","unnested","snakeCase","upperCase","within"],"sources":["../../src/ConfigProvider.ts"],"sourcesContent":[null],"mappings":"AAUA,OAAO,KAAKA,QAAQ,MAAM,8BAA8B;AAGxD;;;;AAIA,OAAO,MAAMC,oBAAoB,GAAkBD,QAAQ,CAACC,oBAAoB;AAQhF;;;;AAIA,OAAO,MAAMC,wBAAwB,GAAkBF,QAAQ,CAACE,wBAAwB;AAuGxF;;;;;;AAMA,OAAO,MAAMC,cAAc,GAAgDH,QAAQ,CAACI,iBAAiB;AAErG;;;;;;AAMA,OAAO,MAAMC,IAAI,GAKKL,QAAQ,CAACK,IAAI;AAEnC;;;;;;AAMA,OAAO,MAAMC,QAAQ,GAUON,QAAQ,CAACM,QAAQ;AAE7C;;;;;;;;;;;AAWA,OAAO,MAAMC,OAAO,GAAwEP,QAAQ,CAACO,OAAO;AAE5G;;;;;;;AAOA,OAAO,MAAMC,QAAQ,GAAkDR,QAAQ,CAACQ,QAAQ;AAExF;;;;;;AAMA,OAAO,MAAMC,QAAQ,GAAsCT,QAAQ,CAACS,QAAQ;AAE5E;AACA;;;;;;;AAOA,OAAO,MAAMC,OAAO,GAClBV,QAAQ,CAACU,OAAO;AAElB;;;;;;;;;AASA,OAAO,MAAMC,YAAY,GAA6CX,QAAQ,CAACW,YAAY;AAE3F;;;;;;;;;AASA,OAAO,MAAMC,YAAY,GAqBrBZ,QAAQ,CAACY,YAAY;AAEzB;;;;;;;;;AASA,OAAO,MAAMC,SAAS,GAA6Cb,QAAQ,CAACa,SAAS;AAErF;;;;;;;;;AASA,OAAO,MAAMC,SAAS,GAA6Cd,QAAQ,CAACc,SAAS;AAErF;;;;;;;;;AASA,OAAO,MAAMC,MAAM,GAqBff,QAAQ,CAACe,MAAM;AAEnB;;;;;;;;AAQA,OAAO,MAAMC,MAAM,GAmBfhB,QAAQ,CAACgB,MAAM;AAEnB;;;;;;;;;AASA,OAAO,MAAMC,QAAQ,GAqBjBjB,QAAQ,CAACiB,QAAQ;AAErB;;;;;;;;;AASA,OAAO,MAAMC,SAAS,GAA6ClB,QAAQ,CAACkB,SAAS;AAErF;;;;;;;;;AASA,OAAO,MAAMC,SAAS,GAA6CnB,QAAQ,CAACmB,SAAS;AAErF;;;;;;;AAOA,OAAO,MAAMC,MAAM,GAqBfpB,QAAQ,CAACoB,MAAM","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Context.js b/backend/node_modules/effect/dist/esm/Context.js new file mode 100644 index 0000000000000000000000000000000000000000..59e2c68fa05538535d7cf60ab9a137a50d109714 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Context.js @@ -0,0 +1,360 @@ +import * as internal from "./internal/context.js"; +/** + * @since 2.0.0 + * @category symbol + */ +export const TagTypeId = internal.TagTypeId; +/** + * @since 3.11.0 + * @category symbol + */ +export const ReferenceTypeId = internal.ReferenceTypeId; +/** + * Creates a new `Tag` instance with an optional key parameter. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Context } from "effect" + * + * assert.strictEqual(Context.GenericTag("PORT").key === Context.GenericTag("PORT").key, true) + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const GenericTag = internal.makeGenericTag; +const TypeId = internal.TypeId; +/** + * @since 2.0.0 + * @category constructors + */ +export const unsafeMake = internal.makeContext; +/** + * Checks if the provided argument is a `Context`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Context } from "effect" + * + * assert.strictEqual(Context.isContext(Context.empty()), true) + * ``` + * + * @since 2.0.0 + * @category guards + */ +export const isContext = internal.isContext; +/** + * Checks if the provided argument is a `Tag`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Context } from "effect" + * + * assert.strictEqual(Context.isTag(Context.GenericTag("Tag")), true) + * ``` + * + * @since 2.0.0 + * @category guards + */ +export const isTag = internal.isTag; +/** + * Checks if the provided argument is a `Reference`. + * + * @since 3.11.0 + * @category guards + * @experimental + */ +export const isReference = internal.isReference; +/** + * Returns an empty `Context`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Context } from "effect" + * + * assert.strictEqual(Context.isContext(Context.empty()), true) + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const empty = internal.empty; +/** + * Creates a new `Context` with a single service associated to the tag. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Context } from "effect" + * + * const Port = Context.GenericTag<{ PORT: number }>("Port") + * + * const Services = Context.make(Port, { PORT: 8080 }) + * + * assert.deepStrictEqual(Context.get(Services, Port), { PORT: 8080 }) + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * Adds a service to a given `Context`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Context, pipe } from "effect" + * + * const Port = Context.GenericTag<{ PORT: number }>("Port") + * const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout") + * + * const someContext = Context.make(Port, { PORT: 8080 }) + * + * const Services = pipe( + * someContext, + * Context.add(Timeout, { TIMEOUT: 5000 }) + * ) + * + * assert.deepStrictEqual(Context.get(Services, Port), { PORT: 8080 }) + * assert.deepStrictEqual(Context.get(Services, Timeout), { TIMEOUT: 5000 }) + * ``` + * + * @since 2.0.0 + */ +export const add = internal.add; +/** + * Get a service from the context that corresponds to the given tag. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, Context } from "effect" + * + * const Port = Context.GenericTag<{ PORT: number }>("Port") + * const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout") + * + * const Services = pipe( + * Context.make(Port, { PORT: 8080 }), + * Context.add(Timeout, { TIMEOUT: 5000 }) + * ) + * + * assert.deepStrictEqual(Context.get(Services, Timeout), { TIMEOUT: 5000 }) + * ``` + * + * @since 2.0.0 + * @category getters + */ +export const get = internal.get; +/** + * Get a service from the context that corresponds to the given tag, or + * use the fallback value. + * + * @since 3.7.0 + * @category getters + */ +export const getOrElse = internal.getOrElse; +/** + * Get a service from the context that corresponds to the given tag. + * This function is unsafe because if the tag is not present in the context, a runtime error will be thrown. + * + * For a safer version see {@link getOption}. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Context } from "effect" + * + * const Port = Context.GenericTag<{ PORT: number }>("Port") + * const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout") + * + * const Services = Context.make(Port, { PORT: 8080 }) + * + * assert.deepStrictEqual(Context.unsafeGet(Services, Port), { PORT: 8080 }) + * assert.throws(() => Context.unsafeGet(Services, Timeout)) + * ``` + * + * @since 2.0.0 + * @category unsafe + */ +export const unsafeGet = internal.unsafeGet; +/** + * Get the value associated with the specified tag from the context wrapped in an `Option` object. If the tag is not + * found, the `Option` object will be `None`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Context, Option } from "effect" + * + * const Port = Context.GenericTag<{ PORT: number }>("Port") + * const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout") + * + * const Services = Context.make(Port, { PORT: 8080 }) + * + * assert.deepStrictEqual(Context.getOption(Services, Port), Option.some({ PORT: 8080 })) + * assert.deepStrictEqual(Context.getOption(Services, Timeout), Option.none()) + * ``` + * + * @since 2.0.0 + * @category getters + */ +export const getOption = internal.getOption; +/** + * Merges two `Context`s, returning a new `Context` containing the services of both. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Context } from "effect" + * + * const Port = Context.GenericTag<{ PORT: number }>("Port") + * const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout") + * + * const firstContext = Context.make(Port, { PORT: 8080 }) + * const secondContext = Context.make(Timeout, { TIMEOUT: 5000 }) + * + * const Services = Context.merge(firstContext, secondContext) + * + * assert.deepStrictEqual(Context.get(Services, Port), { PORT: 8080 }) + * assert.deepStrictEqual(Context.get(Services, Timeout), { TIMEOUT: 5000 }) + * ``` + * + * @since 2.0.0 + */ +export const merge = internal.merge; +/** + * Merges any number of `Context`s, returning a new `Context` containing the services of all. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Context } from "effect" + * + * const Port = Context.GenericTag<{ PORT: number }>("Port") + * const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout") + * const Host = Context.GenericTag<{ HOST: string }>("Host") + * + * const firstContext = Context.make(Port, { PORT: 8080 }) + * const secondContext = Context.make(Timeout, { TIMEOUT: 5000 }) + * const thirdContext = Context.make(Host, { HOST: "localhost" }) + * + * const Services = Context.mergeAll(firstContext, secondContext, thirdContext) + * + * assert.deepStrictEqual(Context.get(Services, Port), { PORT: 8080 }) + * assert.deepStrictEqual(Context.get(Services, Timeout), { TIMEOUT: 5000 }) + * assert.deepStrictEqual(Context.get(Services, Host), { HOST: "localhost" }) + * ``` + * + * @since 3.12.0 + */ +export const mergeAll = internal.mergeAll; +/** + * Returns a new `Context` that contains only the specified services. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, Context, Option } from "effect" + * + * const Port = Context.GenericTag<{ PORT: number }>("Port") + * const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout") + * + * const someContext = pipe( + * Context.make(Port, { PORT: 8080 }), + * Context.add(Timeout, { TIMEOUT: 5000 }) + * ) + * + * const Services = pipe(someContext, Context.pick(Port)) + * + * assert.deepStrictEqual(Context.getOption(Services, Port), Option.some({ PORT: 8080 })) + * assert.deepStrictEqual(Context.getOption(Services, Timeout), Option.none()) + * ``` + * + * @since 2.0.0 + */ +export const pick = internal.pick; +/** + * @since 2.0.0 + */ +export const omit = internal.omit; +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { Context, Layer } from "effect" + * + * class MyTag extends Context.Tag("MyTag")< + * MyTag, + * { readonly myNum: number } + * >() { + * static Live = Layer.succeed(this, { myNum: 108 }) + * } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const Tag = internal.Tag; +/** + * Creates a context tag with a default value. + * + * **Details** + * + * `Context.Reference` allows you to create a tag that can hold a value. You can + * provide a default value for the service, which will automatically be used + * when the context is accessed, or override it with a custom implementation + * when needed. + * + * **Example** (Declaring a Tag with a default value) + * + * ```ts + * import * as assert from "node:assert" + * import { Context, Effect } from "effect" + * + * class SpecialNumber extends Context.Reference()( + * "SpecialNumber", + * { defaultValue: () => 2048 } + * ) {} + * + * // ┌─── Effect + * // ▼ + * const program = Effect.gen(function* () { + * const specialNumber = yield* SpecialNumber + * console.log(`The special number is ${specialNumber}`) + * }) + * + * // No need to provide the SpecialNumber implementation + * Effect.runPromise(program) + * // Output: The special number is 2048 + * ``` + * + * **Example** (Overriding the default value) + * + * ```ts + * import { Context, Effect } from "effect" + * + * class SpecialNumber extends Context.Reference()( + * "SpecialNumber", + * { defaultValue: () => 2048 } + * ) {} + * + * const program = Effect.gen(function* () { + * const specialNumber = yield* SpecialNumber + * console.log(`The special number is ${specialNumber}`) + * }) + * + * Effect.runPromise(program.pipe(Effect.provideService(SpecialNumber, -1))) + * // Output: The special number is -1 + * ``` + * + * @since 3.11.0 + * @category constructors + * @experimental + */ +export const Reference = internal.Reference; +//# sourceMappingURL=Context.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Context.js.map b/backend/node_modules/effect/dist/esm/Context.js.map new file mode 100644 index 0000000000000000000000000000000000000000..12ae3f894da15f4889154fb33a7f3bd56b0fa74c --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Context.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Context.js","names":["internal","TagTypeId","ReferenceTypeId","GenericTag","makeGenericTag","TypeId","unsafeMake","makeContext","isContext","isTag","isReference","empty","make","add","get","getOrElse","unsafeGet","getOption","merge","mergeAll","pick","omit","Tag","Reference"],"sources":["../../src/Context.ts"],"sourcesContent":[null],"mappings":"AAaA,OAAO,KAAKA,QAAQ,MAAM,uBAAuB;AAMjD;;;;AAIA,OAAO,MAAMC,SAAS,GAAkBD,QAAQ,CAACC,SAAS;AA6C1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AAE3C;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,OAAO,MAAMC,IAAI,GAE8EpB,QAAQ,CAACoB,IAAI;AAE5G;;;AAGA,OAAO,MAAMC,IAAI,GAEsFrB,QAAQ,CAACqB,IAAI;AAEpH;;;;;;;;;;;;;;;;;AAiBA,OAAO,MAAMC,GAAG,GAAsFtB,QAAQ,CAACsB,GAAG;AAElH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDA,OAAO,MAAMC,SAAS,GAGmBvB,QAAQ,CAACuB,SAAS","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Data.js b/backend/node_modules/effect/dist/esm/Data.js new file mode 100644 index 0000000000000000000000000000000000000000..3b56b2070708d2402e0a606baf608657136ab5a5 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Data.js @@ -0,0 +1,305 @@ +import * as core from "./internal/core.js"; +import * as internal from "./internal/data.js"; +import { StructuralPrototype } from "./internal/effectable.js"; +import * as Predicate from "./Predicate.js"; +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { Data, Equal } from "effect" + * + * const alice = Data.struct({ name: "Alice", age: 30 }) + * + * const bob = Data.struct({ name: "Bob", age: 40 }) + * + * assert.deepStrictEqual(Equal.equals(alice, alice), true) + * assert.deepStrictEqual(Equal.equals(alice, Data.struct({ name: "Alice", age: 30 })), true) + * + * assert.deepStrictEqual(Equal.equals(alice, { name: "Alice", age: 30 }), false) + * assert.deepStrictEqual(Equal.equals(alice, bob), false) + * ``` + * + * @category constructors + * @since 2.0.0 + */ +export const struct = internal.struct; +/** + * @category constructors + * @since 2.0.0 + */ +export const unsafeStruct = as => Object.setPrototypeOf(as, StructuralPrototype); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { Data, Equal } from "effect" + * + * const alice = Data.tuple("Alice", 30) + * + * const bob = Data.tuple("Bob", 40) + * + * assert.deepStrictEqual(Equal.equals(alice, alice), true) + * assert.deepStrictEqual(Equal.equals(alice, Data.tuple("Alice", 30)), true) + * + * assert.deepStrictEqual(Equal.equals(alice, ["Alice", 30]), false) + * assert.deepStrictEqual(Equal.equals(alice, bob), false) + * ``` + * + * @category constructors + * @since 2.0.0 + */ +export const tuple = (...as) => unsafeArray(as); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { Data, Equal } from "effect" + * + * const alice = Data.struct({ name: "Alice", age: 30 }) + * const bob = Data.struct({ name: "Bob", age: 40 }) + * + * const persons = Data.array([alice, bob]) + * + * assert.deepStrictEqual( + * Equal.equals( + * persons, + * Data.array([ + * Data.struct({ name: "Alice", age: 30 }), + * Data.struct({ name: "Bob", age: 40 }) + * ]) + * ), + * true + * ) + * ``` + * + * @category constructors + * @since 2.0.0 + */ +export const array = as => unsafeArray(as.slice(0)); +/** + * @category constructors + * @since 2.0.0 + */ +export const unsafeArray = as => Object.setPrototypeOf(as, internal.ArrayProto); +const _case = () => args => args === undefined ? Object.create(StructuralPrototype) : struct(args); +export { +/** + * Provides a constructor for the specified `Case`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Data, Equal } from "effect" + * + * interface Person { + * readonly name: string + * } + * + * // Creating a constructor for the specified Case + * const Person = Data.case() + * + * // Creating instances of Person + * const mike1 = Person({ name: "Mike" }) + * const mike2 = Person({ name: "Mike" }) + * const john = Person({ name: "John" }) + * + * // Checking equality + * assert.deepStrictEqual(Equal.equals(mike1, mike2), true) + * assert.deepStrictEqual(Equal.equals(mike1, john), false) + * + * ``` + * @since 2.0.0 + * @category constructors + */ +_case as case }; +/** + * Provides a tagged constructor for the specified `Case`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Data } from "effect" + * + * interface Person { + * readonly _tag: "Person" // the tag + * readonly name: string + * } + * + * const Person = Data.tagged("Person") + * + * const mike = Person({ name: "Mike" }) + * + * assert.deepEqual(mike, { _tag: "Person", name: "Mike" }) + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const tagged = tag => args => { + const value = args === undefined ? Object.create(StructuralPrototype) : struct(args); + value._tag = tag; + return value; +}; +/** + * Provides a constructor for a Case Class. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Data, Equal } from "effect" + * + * class Person extends Data.Class<{ readonly name: string }> {} + * + * // Creating instances of Person + * const mike1 = new Person({ name: "Mike" }) + * const mike2 = new Person({ name: "Mike" }) + * const john = new Person({ name: "John" }) + * + * // Checking equality + * assert.deepStrictEqual(Equal.equals(mike1, mike2), true) + * assert.deepStrictEqual(Equal.equals(mike1, john), false) + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const Class = internal.Structural; +/** + * Provides a Tagged constructor for a Case Class. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Data, Equal } from "effect" + * + * class Person extends Data.TaggedClass("Person")<{ readonly name: string }> {} + * + * // Creating instances of Person + * const mike1 = new Person({ name: "Mike" }) + * const mike2 = new Person({ name: "Mike" }) + * const john = new Person({ name: "John" }) + * + * // Checking equality + * assert.deepStrictEqual(Equal.equals(mike1, mike2), true) + * assert.deepStrictEqual(Equal.equals(mike1, john), false) + * + * assert.deepStrictEqual(mike1._tag, "Person") + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const TaggedClass = tag => { + class Base extends Class { + _tag = tag; + } + return Base; +}; +/** + * @since 2.0.0 + * @category constructors + */ +export const Structural = internal.Structural; +/** + * Create a constructor for a tagged union of `Data` structs. + * + * You can also pass a `TaggedEnum.WithGenerics` if you want to add generics to + * the constructor. + * + * @example + * ```ts + * import { Data } from "effect" + * + * const { BadRequest, NotFound } = Data.taggedEnum< + * | { readonly _tag: "BadRequest"; readonly status: 400; readonly message: string } + * | { readonly _tag: "NotFound"; readonly status: 404; readonly message: string } + * >() + * + * const notFound = NotFound({ status: 404, message: "Not Found" }) + * ``` + * + * @example + * import { Data } from "effect" + * + * type MyResult = Data.TaggedEnum<{ + * Failure: { readonly error: E } + * Success: { readonly value: A } + * }> + * interface MyResultDefinition extends Data.TaggedEnum.WithGenerics<2> { + * readonly taggedEnum: MyResult + * } + * const { Failure, Success } = Data.taggedEnum() + * + * const success = Success({ value: 1 }) + * + * @category constructors + * @since 2.0.0 + */ +export const taggedEnum = () => new Proxy({}, { + get(_target, tag, _receiver) { + if (tag === "$is") { + return Predicate.isTagged; + } else if (tag === "$match") { + return taggedMatch; + } + return tagged(tag); + } +}); +function taggedMatch() { + if (arguments.length === 1) { + const cases = arguments[0]; + return function (value) { + return cases[value._tag](value); + }; + } + const value = arguments[0]; + const cases = arguments[1]; + return cases[value._tag](value); +} +/** + * Provides a constructor for a Case Class. + * + * @since 2.0.0 + * @category constructors + */ +export const Error = /*#__PURE__*/function () { + const plainArgsSymbol = /*#__PURE__*/Symbol.for("effect/Data/Error/plainArgs"); + const O = { + BaseEffectError: class extends core.YieldableError { + constructor(args) { + super(args?.message, args?.cause ? { + cause: args.cause + } : undefined); + if (args) { + Object.assign(this, args); + // @effect-diagnostics-next-line floatingEffect:off + Object.defineProperty(this, plainArgsSymbol, { + value: args, + enumerable: false + }); + } + } + toJSON() { + return { + ...this[plainArgsSymbol], + ...this + }; + } + } + }; + return O.BaseEffectError; +}(); +/** + * @since 2.0.0 + * @category constructors + */ +export const TaggedError = tag => { + const O = { + BaseEffectError: class extends Error { + _tag = tag; + } + }; + O.BaseEffectError.prototype.name = tag; + return O.BaseEffectError; +}; +//# sourceMappingURL=Data.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/DefaultServices.js b/backend/node_modules/effect/dist/esm/DefaultServices.js new file mode 100644 index 0000000000000000000000000000000000000000..7fae308bc914dddc2a834a881704dadf4a063e2c --- /dev/null +++ b/backend/node_modules/effect/dist/esm/DefaultServices.js @@ -0,0 +1,12 @@ +import * as internal from "./internal/defaultServices.js"; +/** + * @since 2.0.0 + * @category constructors + */ +export const liveServices = internal.liveServices; +/** + * @since 2.0.0 + * @category fiberRefs + */ +export const currentServices = internal.currentServices; +//# sourceMappingURL=DefaultServices.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/DefaultServices.js.map b/backend/node_modules/effect/dist/esm/DefaultServices.js.map new file mode 100644 index 0000000000000000000000000000000000000000..bb1fac2a3fd620ebdd1d14dc2daffa05890bcb52 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/DefaultServices.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DefaultServices.js","names":["internal","liveServices","currentServices"],"sources":["../../src/DefaultServices.ts"],"sourcesContent":[null],"mappings":"AAQA,OAAO,KAAKA,QAAQ,MAAM,+BAA+B;AAezD;;;;AAIA,OAAO,MAAMC,YAAY,GAAqCD,QAAQ,CAACC,YAAY;AAEnF;;;;AAIA,OAAO,MAAMC,eAAe,GAAwDF,QAAQ,CAACE,eAAe","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Deferred.js b/backend/node_modules/effect/dist/esm/Deferred.js new file mode 100644 index 0000000000000000000000000000000000000000..97b25cb0e577a9e4544bc6d6c66897a89dbea3b7 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Deferred.js @@ -0,0 +1,169 @@ +import * as core from "./internal/core.js"; +import * as internal from "./internal/deferred.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const DeferredTypeId = internal.DeferredTypeId; +/** + * Creates a new `Deferred`. + * + * @since 2.0.0 + * @category constructors + */ +export const make = core.deferredMake; +/** + * Creates a new `Deferred` from the specified `FiberId`. + * + * @since 2.0.0 + * @category constructors + */ +export const makeAs = core.deferredMakeAs; +const _await = core.deferredAwait; +export { +/** + * Retrieves the value of the `Deferred`, suspending the fiber running the + * workflow until the result is available. + * + * @since 2.0.0 + * @category getters + */ +_await as await }; +/** + * Completes the deferred with the result of the specified effect. If the + * deferred has already been completed, the method will produce false. + * + * Note that `Deferred.completeWith` will be much faster, so consider using + * that if you do not need to memoize the result of the specified effect. + * + * @since 2.0.0 + * @category utils + */ +export const complete = core.deferredComplete; +/** + * Completes the deferred with the result of the specified effect. If the + * deferred has already been completed, the method will produce false. + * + * @since 2.0.0 + * @category utils + */ +export const completeWith = core.deferredCompleteWith; +/** + * Exits the `Deferred` with the specified `Exit` value, which will be + * propagated to all fibers waiting on the value of the `Deferred`. + * + * @since 2.0.0 + * @category utils + */ +export const done = core.deferredDone; +/** + * Fails the `Deferred` with the specified error, which will be propagated to + * all fibers waiting on the value of the `Deferred`. + * + * @since 2.0.0 + * @category utils + */ +export const fail = core.deferredFail; +/** + * Fails the `Deferred` with the specified error, which will be propagated to + * all fibers waiting on the value of the `Deferred`. + * + * @since 2.0.0 + * @category utils + */ +export const failSync = core.deferredFailSync; +/** + * Fails the `Deferred` with the specified `Cause`, which will be propagated to + * all fibers waiting on the value of the `Deferred`. + * + * @since 2.0.0 + * @category utils + */ +export const failCause = core.deferredFailCause; +/** + * Fails the `Deferred` with the specified `Cause`, which will be propagated to + * all fibers waiting on the value of the `Deferred`. + * + * @since 2.0.0 + * @category utils + */ +export const failCauseSync = core.deferredFailCauseSync; +/** + * Kills the `Deferred` with the specified defect, which will be propagated to + * all fibers waiting on the value of the `Deferred`. + * + * @since 2.0.0 + * @category utils + */ +export const die = core.deferredDie; +/** + * Kills the `Deferred` with the specified defect, which will be propagated to + * all fibers waiting on the value of the `Deferred`. + * + * @since 2.0.0 + * @category utils + */ +export const dieSync = core.deferredDieSync; +/** + * Completes the `Deferred` with interruption. This will interrupt all fibers + * waiting on the value of the `Deferred` with the `FiberId` of the fiber + * calling this method. + * + * @since 2.0.0 + * @category utils + */ +export const interrupt = core.deferredInterrupt; +/** + * Completes the `Deferred` with interruption. This will interrupt all fibers + * waiting on the value of the `Deferred` with the specified `FiberId`. + * + * @since 2.0.0 + * @category utils + */ +export const interruptWith = core.deferredInterruptWith; +/** + * Returns `true` if this `Deferred` has already been completed with a value or + * an error, `false` otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const isDone = core.deferredIsDone; +/** + * Returns a `Some>` from the `Deferred` if this `Deferred` has + * already been completed, `None` otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const poll = core.deferredPoll; +/** + * Completes the `Deferred` with the specified value. + * + * @since 2.0.0 + * @category utils + */ +export const succeed = core.deferredSucceed; +/** + * Completes the `Deferred` with the specified lazily evaluated value. + * + * @since 2.0.0 + * @category utils + */ +export const sync = core.deferredSync; +/** + * Unsafely creates a new `Deferred` from the specified `FiberId`. + * + * @since 2.0.0 + * @category unsafe + */ +export const unsafeMake = core.deferredUnsafeMake; +/** + * Unsafely exits the `Deferred` with the specified `Exit` value, which will be + * propagated to all fibers waiting on the value of the `Deferred`. + * + * @since 2.0.0 + * @category unsafe + */ +export const unsafeDone = core.deferredUnsafeDone; +//# sourceMappingURL=Deferred.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Differ.js.map b/backend/node_modules/effect/dist/esm/Differ.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ff701da006fc40f53e09733753bce4801b438d68 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Differ.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Differ.js","names":["Dual","internal","ChunkPatch","ContextPatch","HashMapPatch","HashSetPatch","OrPatch","ReadonlyArrayPatch","TypeId","DifferTypeId","ChunkPatchTypeId","ContextPatchTypeId","HashMapPatchTypeId","HashSetPatchTypeId","OrPatchTypeId","ReadonlyArrayPatchTypeId","empty","self","diff","dual","oldValue","newValue","combine","first","second","patch","make","environment","chunk","hashMap","hashSet","orElseEither","readonlyArray","transform","update","updateWith","zip"],"sources":["../../src/Differ.ts"],"sourcesContent":[null],"mappings":"AAOA,OAAO,KAAKA,IAAI,MAAM,eAAe;AAGrC,OAAO,KAAKC,QAAQ,MAAM,sBAAsB;AAChD,OAAO,KAAKC,UAAU,MAAM,iCAAiC;AAC7D,OAAO,KAAKC,YAAY,MAAM,mCAAmC;AACjE,OAAO,KAAKC,YAAY,MAAM,mCAAmC;AACjE,OAAO,KAAKC,YAAY,MAAM,mCAAmC;AACjE,OAAO,KAAKC,OAAO,MAAM,8BAA8B;AACvD,OAAO,KAAKC,kBAAkB,MA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AK;AAE5E;;;;;;;AAOA,OAAO,MAAMC,OAAO,GAEwD5B,QAAQ,CAAC4B,OAAO;AAE5F;;;;;;AAMA,OAAO,MAAMC,OAAO,GAGhB7B,QAAQ,CAAC6B,OAAO;AAEpB;;;;;;AAMA,OAAO,MAAMC,YAAY,GAuBrB9B,QAAQ,CAAC8B,YAAY;AAEzB;;;;;;AAMA,OAAO,MAAMC,aAAa,GAEoD/B,QAAQ,CAAC+B,aAAa;AAEpG;;;;;;AAMA,OAAO,MAAMC,SAAS,GA0BlBhC,QAAQ,CAACgC,SAAS;AAEtB;;;;;;;;AAQA,OAAO,MAAMC,MAAM,GAAoCjC,QAAQ,CAACiC,MAAM;AAEtE;;;;;;AAMA,OAAO,MAAMC,UAAU,GAAwDlC,QAAQ,CAACkC,UAAU;AAElG;;;;;;AAMA,OAAO,MAAMC,GAAG,GAuBZnC,QAAQ,CAACmC,GAAG","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Effect.js b/backend/node_modules/effect/dist/esm/Effect.js new file mode 100644 index 0000000000000000000000000000000000000000..89cf1381299d3fc99b9361e5927b4571fbfd9103 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Effect.js @@ -0,0 +1,10888 @@ +import { dual } from "./Function.js"; +import * as internalCause from "./internal/cause.js"; +import * as console_ from "./internal/console.js"; +import { TagProto } from "./internal/context.js"; +import * as effect from "./internal/core-effect.js"; +import * as core from "./internal/core.js"; +import * as defaultServices from "./internal/defaultServices.js"; +import * as circular from "./internal/effect/circular.js"; +import * as internalExecutionPlan from "./internal/executionPlan.js"; +import * as fiberRuntime from "./internal/fiberRuntime.js"; +import * as layer from "./internal/layer.js"; +import * as option_ from "./internal/option.js"; +import * as query from "./internal/query.js"; +import * as runtime_ from "./internal/runtime.js"; +import * as schedule_ from "./internal/schedule.js"; +import * as internalTracer from "./internal/tracer.js"; +import * as Random from "./Random.js"; +import * as Request from "./Request.js"; +import * as Scheduler from "./Scheduler.js"; +import { isGeneratorFunction } from "./Utils.js"; +/** + * @since 2.0.0 + * @category Symbols + */ +export const EffectTypeId = core.EffectTypeId; +/** + * Checks if a given value is an `Effect` value. + * + * **When to Use** + * + * This function can be useful for checking the type of a value before + * attempting to operate on it as an `Effect` value. For example, you could use + * `Effect.isEffect` to check the type of a value before using it as an argument + * to a function that expects an `Effect` value. + * + * @since 2.0.0 + * @category Guards + */ +export const isEffect = core.isEffect; +/** + * Returns an effect that caches its result for a specified `Duration`, + * known as "timeToLive" (TTL). + * + * **Details** + * + * This function is used to cache the result of an effect for a specified amount + * of time. This means that the first time the effect is evaluated, its result + * is computed and stored. + * + * If the effect is evaluated again within the specified `timeToLive`, the + * cached result will be used, avoiding recomputation. + * + * After the specified duration has passed, the cache expires, and the effect + * will be recomputed upon the next evaluation. + * + * **When to Use** + * + * Use this function when you have an effect that involves costly operations or + * computations, and you want to avoid repeating them within a short time frame. + * + * It's ideal for scenarios where the result of an effect doesn't change + * frequently and can be reused for a specified duration. + * + * By caching the result, you can improve efficiency and reduce unnecessary + * computations, especially in performance-critical applications. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * let i = 1 + * const expensiveTask = Effect.promise(() => { + * console.log("expensive task...") + * return new Promise((resolve) => { + * setTimeout(() => { + * resolve(`result ${i++}`) + * }, 100) + * }) + * }) + * + * const program = Effect.gen(function* () { + * const cached = yield* Effect.cachedWithTTL(expensiveTask, "150 millis") + * yield* cached.pipe(Effect.andThen(Console.log)) + * yield* cached.pipe(Effect.andThen(Console.log)) + * yield* Effect.sleep("100 millis") + * yield* cached.pipe(Effect.andThen(Console.log)) + * }) + * + * Effect.runFork(program) + * // Output: + * // expensive task... + * // result 1 + * // result 1 + * // expensive task... + * // result 2 + * ``` + * + * @see {@link cached} for a similar function that caches the result + * indefinitely. + * @see {@link cachedInvalidateWithTTL} for a similar function that includes an + * additional effect for manually invalidating the cached value. + * + * @since 2.0.0 + * @category Caching + */ +export const cachedWithTTL = circular.cached; +/** + * Caches an effect's result for a specified duration and allows manual + * invalidation before expiration. + * + * **Details** + * + * This function behaves similarly to {@link cachedWithTTL} by caching the + * result of an effect for a specified period of time. However, it introduces an + * additional feature: it provides an effect that allows you to manually + * invalidate the cached result before it naturally expires. + * + * This gives you more control over the cache, allowing you to refresh the + * result when needed, even if the original cache has not yet expired. + * + * Once the cache is invalidated, the next time the effect is evaluated, the + * result will be recomputed, and the cache will be refreshed. + * + * **When to Use** + * + * Use this function when you have an effect whose result needs to be cached for + * a certain period, but you also want the option to refresh the cache manually + * before the expiration time. + * + * This is useful when you need to ensure that the cached data remains valid for + * a certain period but still want to invalidate it if the underlying data + * changes or if you want to force a recomputation. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * let i = 1 + * const expensiveTask = Effect.promise(() => { + * console.log("expensive task...") + * return new Promise((resolve) => { + * setTimeout(() => { + * resolve(`result ${i++}`) + * }, 100) + * }) + * }) + * + * const program = Effect.gen(function* () { + * const [cached, invalidate] = yield* Effect.cachedInvalidateWithTTL( + * expensiveTask, + * "1 hour" + * ) + * yield* cached.pipe(Effect.andThen(Console.log)) + * yield* cached.pipe(Effect.andThen(Console.log)) + * yield* invalidate + * yield* cached.pipe(Effect.andThen(Console.log)) + * }) + * + * Effect.runFork(program) + * // Output: + * // expensive task... + * // result 1 + * // result 1 + * // expensive task... + * // result 2 + * ``` + * + * @see {@link cached} for a similar function that caches the result + * indefinitely. + * @see {@link cachedWithTTL} for a similar function that caches the result for + * a specified duration but does not include an effect for manual invalidation. + * + * @since 2.0.0 + * @category Caching + */ +export const cachedInvalidateWithTTL = circular.cachedInvalidateWithTTL; +/** + * Returns an effect that lazily computes a result and caches it for subsequent + * evaluations. + * + * **Details** + * + * This function wraps an effect and ensures that its result is computed only + * once. Once the result is computed, it is cached, meaning that subsequent + * evaluations of the same effect will return the cached result without + * re-executing the logic. + * + * **When to Use** + * + * Use this function when you have an expensive or time-consuming operation that + * you want to avoid repeating. The first evaluation will compute the result, + * and all following evaluations will immediately return the cached value, + * improving performance and reducing unnecessary work. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * let i = 1 + * const expensiveTask = Effect.promise(() => { + * console.log("expensive task...") + * return new Promise((resolve) => { + * setTimeout(() => { + * resolve(`result ${i++}`) + * }, 100) + * }) + * }) + * + * const program = Effect.gen(function* () { + * console.log("non-cached version:") + * yield* expensiveTask.pipe(Effect.andThen(Console.log)) + * yield* expensiveTask.pipe(Effect.andThen(Console.log)) + * console.log("cached version:") + * const cached = yield* Effect.cached(expensiveTask) + * yield* cached.pipe(Effect.andThen(Console.log)) + * yield* cached.pipe(Effect.andThen(Console.log)) + * }) + * + * Effect.runFork(program) + * // Output: + * // non-cached version: + * // expensive task... + * // result 1 + * // expensive task... + * // result 2 + * // cached version: + * // expensive task... + * // result 3 + * // result 3 + * ``` + * + * @see {@link cachedWithTTL} for a similar function that includes a + * time-to-live duration for the cached value. + * @see {@link cachedInvalidateWithTTL} for a similar function that includes an + * additional effect for manually invalidating the cached value. + * + * @since 2.0.0 + * @category Caching + */ +export const cached = effect.memoize; +/** + * Returns a memoized version of a function with effects, reusing results for + * the same inputs. + * + * **Details** + * + * This function creates a memoized version of a given function that performs an + * effect. Memoization ensures that once a result is computed for a specific + * input, it is stored and reused for subsequent calls with the same input, + * reducing the need to recompute the result. + * + * The function can optionally take an `Equivalence` parameter to + * determine how inputs are compared for caching purposes. + * + * **When to Use** + * + * Use this function when you have a function that performs an effect and you + * want to avoid recomputing the result for the same input multiple times. + * + * It's ideal for functions that produce deterministic results based on their + * inputs, and you want to improve performance by caching the output. + * + * This is particularly useful in scenarios where the function involves + * expensive calculations or operations that should be avoided after the first + * execution with the same parameters. + * + * **Example** + * + * ```ts + * import { Effect, Random } from "effect" + * + * const program = Effect.gen(function* () { + * const randomNumber = (n: number) => Random.nextIntBetween(1, n) + * console.log("non-memoized version:") + * console.log(yield* randomNumber(10)) + * console.log(yield* randomNumber(10)) + * + * console.log("memoized version:") + * const memoized = yield* Effect.cachedFunction(randomNumber) + * console.log(yield* memoized(10)) + * console.log(yield* memoized(10)) + * }) + * + * Effect.runFork(program) + * // Example Output: + * // non-memoized version: + * // 2 + * // 8 + * // memoized version: + * // 5 + * // 5 + * ``` + * + * @since 2.0.0 + * @category Caching + */ +export const cachedFunction = circular.cachedFunction; +/** + * Returns an effect that executes only once, regardless of how many times it's + * called. + * + * **Details** + * + * This function ensures that a specific effect is executed only a single time, + * no matter how many times it is invoked. The result of the effect will be + * cached, and subsequent calls to the effect will immediately return the cached + * result without re-executing the original logic. + * + * **When to Use** + * + * Use this function when you need to perform a task only once, regardless of + * how many times the effect is triggered. It's particularly useful when you + * have initialization tasks, logging, or other one-time actions that should not + * be repeated. This can help optimize performance and avoid redundant actions. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * const program = Effect.gen(function* () { + * const task1 = Console.log("task1") + * yield* Effect.repeatN(task1, 2) + * const task2 = yield* Effect.once(Console.log("task2")) + * yield* Effect.repeatN(task2, 2) + * }) + * + * Effect.runFork(program) + * // Output: + * // task1 + * // task1 + * // task1 + * // task2 + * ``` + * + * @since 2.0.0 + * @category Caching + */ +export const once = effect.once; +/** + * Combines multiple effects into one, returning results based on the input + * structure. + * + * **Details** + * + * Use this function when you need to run multiple effects and combine their + * results into a single output. It supports tuples, iterables, structs, and + * records, making it flexible for different input types. + * + * For instance, if the input is a tuple: + * + * ```ts skip-type-checking + * // ┌─── a tuple of effects + * // ▼ + * Effect.all([effect1, effect2, ...]) + * ``` + * + * the effects are executed sequentially, and the result is a new effect + * containing the results as a tuple. The results in the tuple match the order + * of the effects passed to `Effect.all`. + * + * **Concurrency** + * + * You can control the execution order (e.g., sequential vs. concurrent) using + * the `concurrency` option. + * + * **Short-Circuiting Behavior** + * + * This function stops execution on the first error it encounters, this is + * called "short-circuiting". If any effect in the collection fails, the + * remaining effects will not run, and the error will be propagated. To change + * this behavior, you can use the `mode` option, which allows all effects to run + * and collect results as `Either` or `Option`. + * + * **The `mode` option** + * + * The `{ mode: "either" }` option changes the behavior of `Effect.all` to + * ensure all effects run, even if some fail. Instead of stopping on the first + * failure, this mode collects both successes and failures, returning an array + * of `Either` instances where each result is either a `Right` (success) or a + * `Left` (failure). + * + * Similarly, the `{ mode: "validate" }` option uses `Option` to indicate + * success or failure. Each effect returns `None` for success and `Some` with + * the error for failure. + * + * **Example** (Combining Effects in Tuples) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const tupleOfEffects = [ + * Effect.succeed(42).pipe(Effect.tap(Console.log)), + * Effect.succeed("Hello").pipe(Effect.tap(Console.log)) + * ] as const + * + * // ┌─── Effect<[number, string], never, never> + * // ▼ + * const resultsAsTuple = Effect.all(tupleOfEffects) + * + * Effect.runPromise(resultsAsTuple).then(console.log) + * // Output: + * // 42 + * // Hello + * // [ 42, 'Hello' ] + * ``` + * + * **Example** (Combining Effects in Iterables) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const iterableOfEffects: Iterable> = [1, 2, 3].map( + * (n) => Effect.succeed(n).pipe(Effect.tap(Console.log)) + * ) + * + * // ┌─── Effect + * // ▼ + * const resultsAsArray = Effect.all(iterableOfEffects) + * + * Effect.runPromise(resultsAsArray).then(console.log) + * // Output: + * // 1 + * // 2 + * // 3 + * // [ 1, 2, 3 ] + * ``` + * + * **Example** (Combining Effects in Structs) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const structOfEffects = { + * a: Effect.succeed(42).pipe(Effect.tap(Console.log)), + * b: Effect.succeed("Hello").pipe(Effect.tap(Console.log)) + * } + * + * // ┌─── Effect<{ a: number; b: string; }, never, never> + * // ▼ + * const resultsAsStruct = Effect.all(structOfEffects) + * + * Effect.runPromise(resultsAsStruct).then(console.log) + * // Output: + * // 42 + * // Hello + * // { a: 42, b: 'Hello' } + * ``` + * + * **Example** (Combining Effects in Records) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const recordOfEffects: Record> = { + * key1: Effect.succeed(1).pipe(Effect.tap(Console.log)), + * key2: Effect.succeed(2).pipe(Effect.tap(Console.log)) + * } + * + * // ┌─── Effect<{ [x: string]: number; }, never, never> + * // ▼ + * const resultsAsRecord = Effect.all(recordOfEffects) + * + * Effect.runPromise(resultsAsRecord).then(console.log) + * // Output: + * // 1 + * // 2 + * // { key1: 1, key2: 2 } + * ``` + * + * **Example** (Short-Circuiting Behavior) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const program = Effect.all([ + * Effect.succeed("Task1").pipe(Effect.tap(Console.log)), + * Effect.fail("Task2: Oh no!").pipe(Effect.tap(Console.log)), + * // Won't execute due to earlier failure + * Effect.succeed("Task3").pipe(Effect.tap(Console.log)) + * ]) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // Task1 + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { _id: 'Cause', _tag: 'Fail', failure: 'Task2: Oh no!' } + * // } + * ``` + * + * **Example** (Collecting Results with `mode: "either"`) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const effects = [ + * Effect.succeed("Task1").pipe(Effect.tap(Console.log)), + * Effect.fail("Task2: Oh no!").pipe(Effect.tap(Console.log)), + * Effect.succeed("Task3").pipe(Effect.tap(Console.log)) + * ] + * + * const program = Effect.all(effects, { mode: "either" }) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // Task1 + * // Task3 + * // { + * // _id: 'Exit', + * // _tag: 'Success', + * // value: [ + * // { _id: 'Either', _tag: 'Right', right: 'Task1' }, + * // { _id: 'Either', _tag: 'Left', left: 'Task2: Oh no!' }, + * // { _id: 'Either', _tag: 'Right', right: 'Task3' } + * // ] + * // } + * ``` + * + * **Example** (Collecting Results with `mode: "validate"`) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const effects = [ + * Effect.succeed("Task1").pipe(Effect.tap(Console.log)), + * Effect.fail("Task2: Oh no!").pipe(Effect.tap(Console.log)), + * Effect.succeed("Task3").pipe(Effect.tap(Console.log)) + * ] + * + * const program = Effect.all(effects, { mode: "validate" }) + * + * Effect.runPromiseExit(program).then((result) => console.log("%o", result)) + * // Output: + * // Task1 + * // Task3 + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { + * // _id: 'Cause', + * // _tag: 'Fail', + * // failure: [ + * // { _id: 'Option', _tag: 'None' }, + * // { _id: 'Option', _tag: 'Some', value: 'Task2: Oh no!' }, + * // { _id: 'Option', _tag: 'None' } + * // ] + * // } + * // } + * ``` + * + * @see {@link forEach} for iterating over elements and applying an effect. + * @see {@link allWith} for a data-last version of this function. + * + * @since 2.0.0 + * @category Collecting + */ +export const all = fiberRuntime.all; +/** + * A data-last version of {@link all}, designed for use in pipelines. + * + * **When to Use** + * + * This function enables you to combine multiple effects and customize execution + * options such as concurrency levels. This version is useful in functional + * pipelines where you first define your data and then apply operations to it. + * + * **Example** + * + * ```ts + * import { Effect, pipe } from "effect" + * + * const task1 = Effect.succeed(1).pipe( + * Effect.delay("200 millis"), + * Effect.tap(Effect.log("task1 done")) + * ) + * + * const task2 = Effect.succeed("hello").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Effect.log("task2 done")) + * ) + * + * const program = pipe( + * [task1, task2], + * // Run both effects concurrently using the concurrent option + * Effect.allWith({ concurrency: 2 }) + * ) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // timestamp=... level=INFO fiber=#3 message="task2 done" + * // timestamp=... level=INFO fiber=#2 message="task1 done" + * // [ 1, 'hello' ] + * ``` + * + * @since 2.0.0 + * @category Collecting + */ +export const allWith = fiberRuntime.allWith; +/** + * Evaluates and runs each effect in the iterable, collecting only the + * successful results while discarding failures. + * + * **Details** + * + * This function function processes an iterable of effects and runs each one. If + * an effect is successful, its result is collected; if it fails, the result is + * discarded. This ensures that only successful outcomes are kept. + * + * **Options** + * + * The function also allows you to customize how the effects are handled by + * specifying options such as concurrency, batching, and how finalizers behave. + * These options provide flexibility in running the effects concurrently or + * adjusting other execution details. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const tasks = [ + * Effect.succeed(1), + * Effect.fail("Error 1"), + * Effect.succeed(2), + * Effect.fail("Error 2") + * ] + * + * const program = Effect.gen(function*() { + * const successfulResults = yield* Effect.allSuccesses(tasks) + * console.log(successfulResults) + * }) + * + * Effect.runFork(program) + * // Output: [1, 2] + * + * ``` + * + * @since 2.0.0 + * @category Collecting + */ +export const allSuccesses = fiberRuntime.allSuccesses; +/** + * Drops elements until the effectful predicate returns `true`. + * + * **Details** + * + * This function processes a collection of elements and uses an effectful + * predicate to determine when to stop dropping elements. It drops elements from + * the beginning of the collection until the predicate returns `true`. + * + * The predicate is a function that takes an element and its index in the + * collection and returns an effect that evaluates to a boolean. + * + * Once the predicate returns `true`, the remaining elements of the collection + * are returned. + * + * **Note**: The first element for which the predicate returns `true` is also + * dropped. + * + * **When to Use** + * + * This function allows you to conditionally skip over a part of the collection + * based on some criteria defined in the predicate. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const numbers = [1, 2, 3, 4, 5, 6] + * const predicate = (n: number, i: number) => Effect.succeed(n > 3) + * + * const program = Effect.gen(function*() { + * const result = yield* Effect.dropUntil(numbers, predicate) + * console.log(result) + * }) + * + * Effect.runFork(program) + * // Output: [5, 6] + * ``` + * + * @see {@link dropWhile} for a similar function that drops elements while the + * predicate returns `true`. + * + * @since 2.0.0 + * @category Collecting + */ +export const dropUntil = effect.dropUntil; +/** + * Drops elements as long as the predicate returns `true`. + * + * **Details** + * + * This function processes a collection of elements and uses a predicate to + * decide whether to drop an element. + * + * The predicate is a function that takes an element and its index, and it + * returns an effect that evaluates to a boolean. + * + * As long as the predicate returns `true`, elements will continue to be dropped + * from the collection. + * + * Once the predicate returns `false`, the remaining elements are kept. + * + * **When to Use** + * + * This function allows you to discard elements from the start of a collection + * based on a condition, and only keep the rest when the condition no longer + * holds. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const numbers = [1, 2, 3, 4, 5, 6] + * const predicate = (n: number, i: number) => Effect.succeed(n <= 3) + * + * const program = Effect.gen(function*() { + * const result = yield* Effect.dropWhile(numbers, predicate) + * console.log(result) + * }) + * + * Effect.runFork(program) + * // Output: [4, 5, 6] + * ``` + * + * @see {@link dropUntil} for a similar function that drops elements until the + * predicate returns `true`. + * + * @since 2.0.0 + * @category Collecting + */ +export const dropWhile = effect.dropWhile; +/** + * Takes elements from a collection until the effectful predicate returns + * `true`. + * + * **Details** + * + * This function processes a collection of elements and uses an effectful + * predicate to decide when to stop taking elements. The elements are taken from + * the beginning of the collection until the predicate returns `true`. + * + * The predicate is a function that takes an element and its index in the + * collection, and returns an effect that resolves to a boolean. + * + * Once the predicate returns `true`, the remaining elements of the collection + * are discarded, and the function stops taking more elements. + * + * **Note**: The first element for which the predicate returns `true` is also + * included in the result. + * + * **When to Use** + * + * Use this function when you want to conditionally take elements from a + * collection based on a dynamic condition. For example, you may want to collect + * numbers from a list until a certain threshold is reached, or gather items + * until a specific condition is met. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const numbers = [1, 2, 3, 4, 5, 6] + * const predicate = (n: number, i: number) => Effect.succeed(n > 3) + * + * const program = Effect.gen(function*() { + * const result = yield* Effect.takeUntil(numbers, predicate) + * console.log(result) + * }) + * + * Effect.runFork(program) + * // Output: [ 1, 2, 3, 4 ] + * ``` + * + * @see {@link takeWhile} for a similar function that takes elements while the + * predicate returns `true`. + * + * @since 2.0.0 + * @category Collecting + */ +export const takeUntil = effect.takeUntil; +/** + * Takes elements as long as the predicate returns `true`. + * + * **Details** + * + * This function processes a collection of elements and uses a predicate to + * decide whether to take an element. + * + * The predicate is a function that takes an element and its index, and it + * returns an effect that evaluates to a boolean. + * + * As long as the predicate returns `true`, elements will continue to be taken + * from the collection. + * + * Once the predicate returns `false`, the remaining elements are discarded. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const numbers = [1, 2, 3, 4, 5, 6] + * const predicate = (n: number, i: number) => Effect.succeed(n <= 3) + * + * const program = Effect.gen(function*() { + * const result = yield* Effect.takeWhile(numbers, predicate) + * console.log(result) + * }) + * + * Effect.runFork(program) + * // Output: [1, 2, 3] + * ``` + * + * @see {@link takeUntil} for a similar function that takes elements until the predicate returns `true`. + * + * @since 2.0.0 + * @category Collecting + */ +export const takeWhile = effect.takeWhile; +/** + * Determines whether all elements of the iterable satisfy the effectful + * predicate. + * + * **Details** + * + * This function checks whether every element in a given collection (an + * iterable) satisfies a condition defined by an effectful predicate. + * + * The predicate is a function that takes an element and its index, and it + * returns an effect that evaluates to a boolean. + * + * The function will process each element and return `true` if all elements + * satisfy the predicate; otherwise, it returns `false`. + * + * **When to Use** + * + * This function is useful when you need to verify that all items in a + * collection meet certain criteria, even when the evaluation of each item + * involves effects, such as asynchronous checks or complex computations. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const numbers = [2, 4, 6, 8] + * const predicate = (n: number, i: number) => Effect.succeed(n % 2 === 0) + * + * const program = Effect.gen(function*() { + * const allEven = yield* Effect.every(numbers, predicate) + * console.log(allEven) + * }) + * + * Effect.runFork(program) + * // Output: true + * ``` + * + * @see {@link exists} for a similar function that returns a boolean indicating + * whether **any** element satisfies the predicate. + * + * @since 2.0.0 + * @category Condition Checking + */ +export const every = effect.every; +/** + * Determines whether any element of the iterable satisfies the effectual + * predicate. + * + * **Details** + * + * This function checks whether any element in a given collection (an iterable) + * satisfies a condition defined by an effectful predicate. + * + * The predicate is a function that takes an element and its index, and it + * returns an effect that evaluates to a boolean. + * + * The function will process each element, and if any element satisfies the + * predicate (returns `true`), the function will immediately return `true`. + * + * If none of the elements satisfy the condition, it will return `false`. + * + * **When to Use** + * + * This function allows you to quickly check for a condition in a collection + * without having to manually iterate over it. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const numbers = [1, 2, 3, 4] + * const predicate = (n: number, i: number) => Effect.succeed(n > 2) + * + * const program = Effect.gen(function*() { + * const hasLargeNumber = yield* Effect.exists(numbers, predicate) + * console.log(hasLargeNumber) + * }) + * + * Effect.runFork(program) + * // Output: true + * ``` + * + * @see {@link every} for a similar function that checks if **all** elements + * satisfy the predicate. + * + * @since 2.0.0 + * @category Condition Checking + */ +export const exists = fiberRuntime.exists; +/** + * Filters an iterable using the specified effectful predicate. + * + * **Details** + * + * This function filters a collection (an iterable) by applying an effectful + * predicate. + * + * The predicate is a function that takes an element and its index, and it + * returns an effect that evaluates to a boolean. + * + * The function processes each element in the collection and keeps only those + * that satisfy the condition defined by the predicate. + * + * **Options** + * + * You can also adjust the behavior with options such as concurrency, batching, + * or whether to negate the condition. + * + * **When to Use** + * + * This function allows you to selectively keep or remove elements based on a + * condition that may involve asynchronous or side-effect-causing operations. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const numbers = [1, 2, 3, 4, 5] + * const predicate = (n: number, i: number) => Effect.succeed(n % 2 === 0) + * + * const program = Effect.gen(function*() { + * const result = yield* Effect.filter(numbers, predicate) + * console.log(result) + * }) + * + * Effect.runFork(program) + * // Output: [2, 4] + * ``` + * + * @since 2.0.0 + * @category Filtering + */ +export const filter = fiberRuntime.filter; +/** + * Filters and maps elements sequentially in one operation. + * + * This function processes each element one by one. It applies a function that + * returns an `Option` to each element. If the function returns `Some`, the + * element is kept; if it returns `None`, the element is removed. The operation + * is done sequentially for each element. + * + * **Example** + * + * ```ts + * import { Console, Effect, Option } from "effect" + * + * const task = (n: number) => + * Effect.succeed(n).pipe( + * Effect.delay(1000 - (n * 100)), + * Effect.tap(Console.log(`task${n} done`)) + * ) + * + * const program = Effect.filterMap( + * [task(1), task(2), task(3), task(4)], + * (n) => n % 2 === 0 ? Option.some(n) : Option.none() + * ) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // task1 done + * // task2 done + * // task3 done + * // task4 done + * // [ 2, 4 ] + * ``` + * + * @since 2.0.0 + * @category Filtering + */ +export const filterMap = effect.filterMap; +/** + * Returns the first element that satisfies the effectful predicate. + * + * **Details** + * + * This function processes a collection of elements and applies an effectful + * predicate to each element. + * + * The predicate is a function that takes an element and its index in the + * collection, and it returns an effect that evaluates to a boolean. + * + * The function stops as soon as it finds the first element for which the + * predicate returns `true` and returns that element wrapped in an `Option`. + * + * If no element satisfies the predicate, the result will be `None`. + * + * **When to Use** + * + * This function allows you to efficiently find an element that meets a specific + * condition, even when the evaluation involves effects like asynchronous + * operations or side effects. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const numbers = [1, 2, 3, 4, 5] + * const predicate = (n: number, i: number) => Effect.succeed(n > 3) + * + * const program = Effect.gen(function*() { + * const result = yield* Effect.findFirst(numbers, predicate) + * console.log(result) + * }) + * + * Effect.runFork(program) + * // Output: { _id: 'Option', _tag: 'Some', value: 4 } + * ``` + * + * @since 2.0.0 + * @category Collecting + */ +export const findFirst = effect.findFirst; +/** + * Executes an effectful operation for each element in an `Iterable`. + * + * **Details** + * + * This function applies a provided operation to each element in the iterable, + * producing a new effect that returns an array of results. + * + * If any effect fails, the iteration stops immediately (short-circuiting), and + * the error is propagated. + * + * **Concurrency** + * + * The `concurrency` option controls how many operations are performed + * concurrently. By default, the operations are performed sequentially. + * + * **Discarding Results** + * + * If the `discard` option is set to `true`, the intermediate results are not + * collected, and the final result of the operation is `void`. + * + * **Example** (Applying Effects to Iterable Elements) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const result = Effect.forEach([1, 2, 3, 4, 5], (n, index) => + * Console.log(`Currently at index ${index}`).pipe(Effect.as(n * 2)) + * ) + * + * Effect.runPromise(result).then(console.log) + * // Output: + * // Currently at index 0 + * // Currently at index 1 + * // Currently at index 2 + * // Currently at index 3 + * // Currently at index 4 + * // [ 2, 4, 6, 8, 10 ] + * ``` + * + * **Example** (Discarding Results) + * + * ```ts + * import { Effect, Console } from "effect" + * + * // Apply effects but discard the results + * const result = Effect.forEach( + * [1, 2, 3, 4, 5], + * (n, index) => + * Console.log(`Currently at index ${index}`).pipe(Effect.as(n * 2)), + * { discard: true } + * ) + * + * Effect.runPromise(result).then(console.log) + * // Output: + * // Currently at index 0 + * // Currently at index 1 + * // Currently at index 2 + * // Currently at index 3 + * // Currently at index 4 + * // undefined + * ``` + * + * @see {@link all} for combining multiple effects into one. + * + * @since 2.0.0 + * @category Looping + */ +export const forEach = fiberRuntime.forEach; +/** + * Returns the first element of the iterable if the collection is non-empty, or + * fails with the error `NoSuchElementException` if the collection is empty. + * + * **When to Use** + * + * This function is useful when you need to retrieve the first item from a + * collection and want to handle the case where the collection might be empty + * without causing an unhandled exception. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * // Simulate an async operation + * const fetchNumbers = Effect.succeed([1, 2, 3]).pipe(Effect.delay("100 millis")) + * + * const program = Effect.gen(function*() { + * const firstElement = yield* Effect.head(fetchNumbers) + * console.log(firstElement) + * }) + * + * Effect.runFork(program) + * // Output: 1 + * ``` + * + * @since 2.0.0 + * @category Collecting + */ +export const head = effect.head; +/** + * Merges an `Iterable>` to a single effect. + * + * **Details** + * + * This function takes an iterable of effects and combines them into a single + * effect. It does this by iterating over each effect in the collection and + * applying a function that accumulates results into a "zero" value, which + * starts with an initial value and is updated with each effect's success. + * + * The provided function `f` is called for each element in the iterable, + * allowing you to specify how to combine the results. + * + * **Options** + * + * The function also allows you to customize how the effects are handled by + * specifying options such as concurrency, batching, and how finalizers behave. + * These options provide flexibility in running the effects concurrently or + * adjusting other execution details. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const numbers = [Effect.succeed(1), Effect.succeed(2), Effect.succeed(3)] + * const add = (sum: number, value: number, i: number) => sum + value + * const zero = 0 + * + * const program = Effect.gen(function*() { + * const total = yield* Effect.mergeAll(numbers, zero, add) + * console.log(total) + * }) + * + * Effect.runFork(program) + * // Output: 6 + * ``` + * + * @since 2.0.0 + * @category Collecting + */ +export const mergeAll = fiberRuntime.mergeAll; +/** + * Processes an iterable and applies an effectful function to each element, + * categorizing the results into successes and failures. + * + * **Details** + * + * This function processes each element in the provided iterable by applying an + * effectful function to it. The results are then categorized into two separate + * lists: one for failures and another for successes. This separation allows you + * to handle the two categories differently. Failures are collected in a list + * without interrupting the processing of the remaining elements, so the + * operation continues even if some elements fail. This is particularly useful + * when you need to handle both successful and failed results separately, + * without stopping the entire process on encountering a failure. + * + * **When to Use** + * + * Use this function when you want to process a collection of items and handle + * errors or failures without interrupting the processing of other items. It's + * useful when you need to distinguish between successful and failed results and + * process them separately, for example, when logging errors while continuing to + * work with valid data. The function ensures that failures are captured, while + * successes are processed normally. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * // ┌─── Effect<[string[], number[]], never, never> + * // ▼ + * const program = Effect.partition([0, 1, 2, 3, 4], (n) => { + * if (n % 2 === 0) { + * return Effect.succeed(n) + * } else { + * return Effect.fail(`${n} is not even`) + * } + * }) + * + * Effect.runPromise(program).then(console.log, console.error) + * // Output: + * // [ [ '1 is not even', '3 is not even' ], [ 0, 2, 4 ] ] + * ``` + * + * @see {@link validateAll} for a function that either collects all failures or all successes. + * @see {@link validateFirst} for a function that stops at the first success. + * + * @since 2.0.0 + * @category Error Accumulation + */ +export const partition = fiberRuntime.partition; +/** + * Reduces an `Iterable` using an effectual function `f`, working + * sequentially from left to right. + * + * **Details** + * + * This function takes an iterable and applies a function `f` to each element in + * the iterable. The function works sequentially, starting with an initial value + * `zero` and then combining it with each element in the collection. The + * provided function `f` is called for each element in the iterable, allowing + * you to accumulate a result based on the current value and the element being + * processed. + * + * **When to Use** + * + * The function is often used for operations like summing a collection of + * numbers or combining results from multiple tasks. It ensures that operations + * are performed one after the other, maintaining the order of the elements. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * const processOrder = (id: number) => + * Effect.succeed({ id, price: 100 * id }) + * .pipe(Effect.tap(() => Console.log(`Order ${id} processed`)), Effect.delay(500 - (id * 100))) + * + * const program = Effect.reduce( + * [1, 2, 3, 4], + * 0, + * (acc, id, i) => + * processOrder(id) + * .pipe(Effect.map((order) => acc + order.price)) + * ) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // Order 1 processed + * // Order 2 processed + * // Order 3 processed + * // Order 4 processed + * // 1000 + * ``` + * + * @see {@link reduceWhile} for a similar function that stops the process based on a predicate. + * @see {@link reduceRight} for a similar function that works from right to left. + * + * @since 2.0.0 + * @category Collecting + */ +export const reduce = effect.reduce; +/** + * Reduces an `Iterable` using an effectual function `body`, working + * sequentially from left to right, stopping the process early when the + * predicate `while` is not satisfied. + * + * **Details** + * + * This function processes a collection of elements, applying a function `body` + * to reduce them to a single value, starting from the first element. It checks + * the value of the accumulator against a predicate (`while`). If at any point + * the predicate returns `false`, the reduction stops, and the accumulated + * result is returned. + * + * **When to Use** + * + * Use this function when you need to reduce a collection of elements, but only + * continue the process as long as a certain condition holds true. For example, + * if you want to sum values in a list but stop as soon as the sum exceeds a + * certain threshold, you can use this function. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * const processOrder = (id: number) => + * Effect.succeed({ id, price: 100 * id }) + * .pipe(Effect.tap(() => Console.log(`Order ${id} processed`)), Effect.delay(500 - (id * 100))) + * + * const program = Effect.reduceWhile( + * [1, 2, 3, 4], + * 0, + * { + * body: (acc, id, i) => + * processOrder(id) + * .pipe(Effect.map((order) => acc + order.price)), + * while: (acc) => acc < 500 + * } + * ) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // Order 1 processed + * // Order 2 processed + * // Order 3 processed + * // 600 + * ``` + * + * @since 2.0.0 + * @category Collecting + */ +export const reduceWhile = effect.reduceWhile; +/** + * Reduces an `Iterable` using an effectual function `f`, working + * sequentially from right to left. + * + * **Details** + * + * This function takes an iterable and applies a function `f` to each element in + * the iterable. The function works sequentially, starting with an initial value + * `zero` and then combining it with each element in the collection. The + * provided function `f` is called for each element in the iterable, allowing + * you to accumulate a result based on the current value and the element being + * processed. + * + * **When to Use** + * + * The function is often used for operations like summing a collection of + * numbers or combining results from multiple tasks. It ensures that operations + * are performed one after the other, maintaining the order of the elements. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * const processOrder = (id: number) => + * Effect.succeed({ id, price: 100 * id }) + * .pipe(Effect.tap(() => Console.log(`Order ${id} processed`)), Effect.delay(500 - (id * 100))) + * + * const program = Effect.reduceRight( + * [1, 2, 3, 4], + * 0, + * (id, acc, i) => + * processOrder(id) + * .pipe(Effect.map((order) => acc + order.price)) + * ) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // Order 4 processed + * // Order 3 processed + * // Order 2 processed + * // Order 1 processed + * // 1000 + * ``` + * + * @see {@link reduce} for a similar function that works from left to right. + * + * @since 2.0.0 + * @category Collecting + */ +export const reduceRight = effect.reduceRight; +/** + * Reduces an `Iterable>` to a single effect. + * + * **Details** + * + * This function processes a collection of effects and combines them into one + * single effect. It starts with an initial effect (`zero`) and applies a + * function `f` to each element in the collection. + * + * **Options** + * + * The function also allows you to customize how the effects are handled by + * specifying options such as concurrency, batching, and how finalizers behave. + * These options provide flexibility in running the effects concurrently or + * adjusting other execution details. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * const processOrder = (id: number) => + * Effect.succeed({ id, price: 100 * id }) + * .pipe(Effect.tap(() => Console.log(`Order ${id} processed`)), Effect.delay(500 - (id * 100))) + * + * const program = Effect.reduceEffect( + * [processOrder(1), processOrder(2), processOrder(3), processOrder(4)], + * Effect.succeed(0), + * (acc, order, i) => acc + order.price + * ) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // Order 1 processed + * // Order 2 processed + * // Order 3 processed + * // Order 4 processed + * // 1000 + * ``` + * + * @since 2.0.0 + * @category Collecting + */ +export const reduceEffect = fiberRuntime.reduceEffect; +/** + * Replicates the given effect `n` times. + * + * **Details** + * + * This function takes an effect and replicates it a specified number of times + * (`n`). The result is an array of `n` effects, each of which is identical to + * the original effect. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * const task = Effect.succeed("Hello, World!").pipe( + * Effect.tap(Console.log) + * ) + * + * const program = Effect.gen(function*() { + * // Replicate the task 3 times + * const tasks = Effect.replicate(task, 3) + * for (const t of tasks) { + * // Run each task + * yield* t + * } + * }) + * + * Effect.runFork(program) + * // Output: + * // Hello, World! + * // Hello, World! + * // Hello, World! + * ``` + * + * @since 2.0.0 + */ +export const replicate = fiberRuntime.replicate; +/** + * Performs this effect the specified number of times and collects the results. + * + * **Details** + * + * This function repeats an effect multiple times and collects the results into + * an array. You specify how many times to execute the effect, and it runs that + * many times, either in sequence or concurrently depending on the provided + * options. + * + * **Options** + * + * If the `discard` option is set to `true`, the intermediate results are not + * collected, and the final result of the operation is `void`. + * + * The function also allows you to customize how the effects are handled by + * specifying options such as concurrency, batching, and how finalizers behave. + * These options provide flexibility in running the effects concurrently or + * adjusting other execution details. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * let counter = 0 + * + * const task = Effect.sync(() => ++counter).pipe( + * Effect.tap(() => Console.log(`Task completed`)) + * ) + * + * const program = Effect.gen(function*() { + * // Replicate the task 3 times and collect the results + * const results = yield* Effect.replicateEffect(task, 3) + * yield* Console.log(`Results: ${results.join(", ")}`) + * }) + * + * Effect.runFork(program) + * // Output: + * // Task completed + * // Task completed + * // Task completed + * // Results: 1, 2, 3 + * ``` + * + * @since 2.0.0 + * @category Collecting + */ +export const replicateEffect = fiberRuntime.replicateEffect; +/** + * Applies an effectful operation to each element in a collection while + * collecting both successes and failures. + * + * **Details** + * + * This function allows you to apply an effectful operation to every item in a + * collection. + * + * Unlike {@link forEach}, which would stop at the first error, this function + * continues processing all elements, accumulating both successes and failures. + * + * **When to Use** + * + * Use this function when you want to process every item in a collection, even + * if some items fail. This is particularly useful when you need to perform + * operations on all elements without halting due to an error. + * + * Keep in mind that if there are any failures, **all successes will be lost**, + * so this function is not suitable when you need to keep the successful results + * in case of errors. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * // ┌─── Effect + * // ▼ + * const program = Effect.validateAll([1, 2, 3, 4, 5], (n) => { + * if (n < 4) { + * return Console.log(`item ${n}`).pipe(Effect.as(n)) + * } else { + * return Effect.fail(`${n} is not less that 4`) + * } + * }) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // item 1 + * // item 2 + * // item 3 + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { + * // _id: 'Cause', + * // _tag: 'Fail', + * // failure: [ '4 is not less that 4', '5 is not less that 4' ] + * // } + * // } + * ``` + * + * @see {@link forEach} for a similar function that stops at the first error. + * @see {@link partition} when you need to separate successes and failures + * instead of losing successes with errors. + * + * @since 2.0.0 + * @category Error Accumulation + */ +export const validateAll = fiberRuntime.validateAll; +/** + * This function is similar to {@link validateAll} but with a key difference: it + * returns the first successful result or all errors if none of the operations + * succeed. + * + * **Details** + * + * This function processes a collection of elements and applies an effectful + * operation to each. Unlike {@link validateAll}, which accumulates both + * successes and failures, `Effect.validateFirst` stops and returns the first + * success it encounters. If no success occurs, it returns all accumulated + * errors. This can be useful when you are interested in the first successful + * result and want to avoid processing further once a valid result is found. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * // ┌─── Effect + * // ▼ + * const program = Effect.validateFirst([1, 2, 3, 4, 5], (n) => { + * if (n < 4) { + * return Effect.fail(`${n} is not less that 4`) + * } else { + * return Console.log(`item ${n}`).pipe(Effect.as(n)) + * } + * }) + * + * Effect.runPromise(program).then(console.log, console.error) + * // Output: + * // item 4 + * // 4 + * ``` + * + * @see {@link validateAll} for a similar function that accumulates all results. + * @see {@link firstSuccessOf} for a similar function that processes multiple + * effects and returns the first successful one or the last error. + * + * @since 2.0.0 + * @category Error Accumulation + */ +export const validateFirst = fiberRuntime.validateFirst; +/** + * Creates an `Effect` from a callback-based asynchronous function. + * + * **Details** + * + * The `resume` function: + * - Must be called exactly once. Any additional calls will be ignored. + * - Can return an optional `Effect` that will be run if the `Fiber` executing + * this `Effect` is interrupted. This can be useful in scenarios where you + * need to handle resource cleanup if the operation is interrupted. + * - Can receive an `AbortSignal` to handle interruption if needed. + * + * The `FiberId` of the fiber that may complete the async callback may also be + * specified using the `blockingOn` argument. This is called the "blocking + * fiber" because it suspends the fiber executing the `async` effect (i.e. + * semantically blocks the fiber from making progress). Specifying this fiber id + * in cases where it is known will improve diagnostics, but not affect the + * behavior of the returned effect. + * + * **When to Use** + * + * Use `Effect.async` when dealing with APIs that use callback-style instead of + * `async/await` or `Promise`. + * + * **Example** (Wrapping a Callback API) + * + * ```ts + * import { Effect } from "effect" + * import * as NodeFS from "node:fs" + * + * const readFile = (filename: string) => + * Effect.async((resume) => { + * NodeFS.readFile(filename, (error, data) => { + * if (error) { + * // Resume with a failed Effect if an error occurs + * resume(Effect.fail(error)) + * } else { + * // Resume with a succeeded Effect if successful + * resume(Effect.succeed(data)) + * } + * }) + * }) + * + * // ┌─── Effect + * // ▼ + * const program = readFile("example.txt") + * ``` + * + * **Example** (Handling Interruption with Cleanup) + * + * ```ts + * import { Effect, Fiber } from "effect" + * import * as NodeFS from "node:fs" + * + * // Simulates a long-running operation to write to a file + * const writeFileWithCleanup = (filename: string, data: string) => + * Effect.async((resume) => { + * const writeStream = NodeFS.createWriteStream(filename) + * + * // Start writing data to the file + * writeStream.write(data) + * + * // When the stream is finished, resume with success + * writeStream.on("finish", () => resume(Effect.void)) + * + * // In case of an error during writing, resume with failure + * writeStream.on("error", (err) => resume(Effect.fail(err))) + * + * // Handle interruption by returning a cleanup effect + * return Effect.sync(() => { + * console.log(`Cleaning up ${filename}`) + * NodeFS.unlinkSync(filename) + * }) + * }) + * + * const program = Effect.gen(function* () { + * const fiber = yield* Effect.fork( + * writeFileWithCleanup("example.txt", "Some long data...") + * ) + * // Simulate interrupting the fiber after 1 second + * yield* Effect.sleep("1 second") + * yield* Fiber.interrupt(fiber) // This will trigger the cleanup + * }) + * + * // Run the program + * Effect.runPromise(program) + * // Output: + * // Cleaning up example.txt + * ``` + * + * **Example** (Handling Interruption with AbortSignal) + * + * ```ts + * import { Effect, Fiber } from "effect" + * + * // A task that supports interruption using AbortSignal + * const interruptibleTask = Effect.async((resume, signal) => { + * // Handle interruption + * signal.addEventListener("abort", () => { + * console.log("Abort signal received") + * clearTimeout(timeoutId) + * }) + * + * // Simulate a long-running task + * const timeoutId = setTimeout(() => { + * console.log("Operation completed") + * resume(Effect.void) + * }, 2000) + * }) + * + * const program = Effect.gen(function* () { + * const fiber = yield* Effect.fork(interruptibleTask) + * // Simulate interrupting the fiber after 1 second + * yield* Effect.sleep("1 second") + * yield* Fiber.interrupt(fiber) + * }) + * + * // Run the program + * Effect.runPromise(program) + * // Output: + * // Abort signal received + * ``` + * + * @since 2.0.0 + * @category Creating Effects + */ +export const async = core.async; +/** + * A variant of {@link async} where the registration function may return an `Effect`. + * + * @since 2.0.0 + * @category Creating Effects + */ +export const asyncEffect = runtime_.asyncEffect; +/** + * Low level constructor that enables for custom stack tracing cutpoints. + * + * It is meant to be called with a bag of instructions that become available in + * the "this" of the effect. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const throwingFunction = () => { throw new Error() } + * const blowUp = Effect.custom(throwingFunction, function() { + * return Effect.succeed(this.effect_instruction_i0()) + * }) + * ``` + * + * @since 2.0.0 + * @category Creating Effects + */ +export const custom = core.custom; +/** + * @since 2.0.0 + * @category Creating Effects + */ +export const withFiberRuntime = core.withFiberRuntime; +/** + * Creates an `Effect` that represents a recoverable error. + * + * **When to Use** + * + * Use this function to explicitly signal an error in an `Effect`. The error + * will keep propagating unless it is handled. You can handle the error with + * functions like {@link catchAll} or {@link catchTag}. + * + * **Example** (Creating a Failed Effect) + * + * ```ts + * import { Effect } from "effect" + * + * // ┌─── Effect + * // ▼ + * const failure = Effect.fail( + * new Error("Operation failed due to network error") + * ) + * ``` + * + * @see {@link succeed} to create an effect that represents a successful value. + * + * @since 2.0.0 + * @category Creating Effects + */ +export const fail = core.fail; +/** + * Creates an `Effect` that fails with the specified error, evaluated lazily. + * + * @since 2.0.0 + * @category Creating Effects + */ +export const failSync = core.failSync; +/** + * Creates an `Effect` that fails with the specified `Cause`. + * + * @since 2.0.0 + * @category Creating Effects + */ +export const failCause = core.failCause; +/** + * Creates an `Effect` that fails with the specified `Cause`, evaluated lazily. + * + * @since 2.0.0 + * @category Creating Effects + */ +export const failCauseSync = core.failCauseSync; +/** + * Creates an effect that terminates a fiber with a specified error. + * + * **Details** + * + * This function is used to signal a defect, which represents a critical and + * unexpected error in the code. When invoked, it produces an effect that does + * not handle the error and instead terminates the fiber. + * + * The error channel of the resulting effect is of type `never`, indicating that + * it cannot recover from this failure. + * + * **When to Use** + * + * Use this function when encountering unexpected conditions in your code that + * should not be handled as regular errors but instead represent unrecoverable + * defects. + * + * **Example** (Terminating on Division by Zero with a Specified Error) + * + * ```ts + * import { Effect } from "effect" + * + * const divide = (a: number, b: number) => + * b === 0 + * ? Effect.die(new Error("Cannot divide by zero")) + * : Effect.succeed(a / b) + * + * // ┌─── Effect + * // ▼ + * const program = divide(1, 0) + * + * Effect.runPromise(program).catch(console.error) + * // Output: + * // (FiberFailure) Error: Cannot divide by zero + * // ...stack trace... + * ``` + * + * @see {@link dieSync} for a variant that throws a specified error, evaluated + * lazily. + * @see {@link dieMessage} for a variant that throws a `RuntimeException` with a + * message. + * + * @since 2.0.0 + * @category Creating Effects + */ +export const die = core.die; +/** + * Creates an effect that terminates a fiber with a `RuntimeException` + * containing the specified message. + * + * **Details** + * + * This function is used to signal a defect, representing a critical and + * unexpected error in the code. When invoked, it produces an effect that + * terminates the fiber with a `RuntimeException` carrying the given message. + * + * The resulting effect has an error channel of type `never`, indicating it does + * not handle or recover from the error. + * + * **When to Use** + * + * Use this function when you want to terminate a fiber due to an unrecoverable + * defect and include a clear explanation in the message. + * + * **Example** (Terminating on Division by Zero with a Specified Message) + * + * ```ts + * import { Effect } from "effect" + * + * const divide = (a: number, b: number) => + * b === 0 + * ? Effect.dieMessage("Cannot divide by zero") + * : Effect.succeed(a / b) + * + * // ┌─── Effect + * // ▼ + * const program = divide(1, 0) + * + * Effect.runPromise(program).catch(console.error) + * // Output: + * // (FiberFailure) RuntimeException: Cannot divide by zero + * // ...stack trace... + * ``` + * + * @see {@link die} for a variant that throws a specified error. + * @see {@link dieSync} for a variant that throws a specified error, evaluated + * lazily. + * + * @since 2.0.0 + * @category Creating Effects + */ +export const dieMessage = core.dieMessage; +/** + * Creates an effect that dies with the specified error, evaluated lazily. + * + * **Details** + * + * This function allows you to create an effect that will terminate with a fatal error. + * The error is provided as a lazy argument, meaning it will only be evaluated when the effect runs. + * + * @see {@link die} if you don't need to evaluate the error lazily. + * + * @since 2.0.0 + * @category Creating Effects + */ +export const dieSync = core.dieSync; +/** + * Provides a way to write effectful code using generator functions, simplifying + * control flow and error handling. + * + * **When to Use** + * + * `Effect.gen` allows you to write code that looks and behaves like synchronous + * code, but it can handle asynchronous tasks, errors, and complex control flow + * (like loops and conditions). It helps make asynchronous code more readable + * and easier to manage. + * + * The generator functions work similarly to `async/await` but with more + * explicit control over the execution of effects. You can `yield*` values from + * effects and return the final result at the end. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const addServiceCharge = (amount: number) => amount + 1 + * + * const applyDiscount = ( + * total: number, + * discountRate: number + * ): Effect.Effect => + * discountRate === 0 + * ? Effect.fail(new Error("Discount rate cannot be zero")) + * : Effect.succeed(total - (total * discountRate) / 100) + * + * const fetchTransactionAmount = Effect.promise(() => Promise.resolve(100)) + * + * const fetchDiscountRate = Effect.promise(() => Promise.resolve(5)) + * + * export const program = Effect.gen(function* () { + * const transactionAmount = yield* fetchTransactionAmount + * const discountRate = yield* fetchDiscountRate + * const discountedAmount = yield* applyDiscount( + * transactionAmount, + * discountRate + * ) + * const finalAmount = addServiceCharge(discountedAmount) + * return `Final amount to charge: ${finalAmount}` + * }) + * ``` + * + * @since 2.0.0 + * @category Creating Effects + */ +export const gen = core.gen; +/** + * An effect that that runs indefinitely and never produces any result. The + * moral equivalent of `while(true) {}`, only without the wasted CPU cycles. + * + * **When to Use** + * + * It could be useful for long-running background tasks or to simulate waiting + * behavior without actually consuming resources. This effect is ideal for cases + * where you want to keep the program alive or in a certain state without + * performing any active work. + * + * @since 2.0.0 + * @category Creating Effects + */ +export const never = core.never; +/** + * Ensures the `Option` is `None`, returning `void`. Otherwise, raises a + * `NoSuchElementException`. + * + * **Details** + * + * This function checks if the provided `Option` is `None`. If it is, it returns + * an effect that produces no result (i.e., `void`). If the `Option` is not + * `None` (i.e., it contains a value), the function will raise a + * `NoSuchElementException` error. + * + * **When to Use** + * + * This is useful when you want to ensure that a certain value is absent (i.e., + * `None`) before continuing execution, and to handle cases where the value is + * unexpectedly present. + * + * @since 2.0.0 + */ +export const none = effect.none; +/** + * Creates an `Effect` that represents an asynchronous computation guaranteed to + * succeed. + * + * **Details** + * + * The provided function (`thunk`) returns a `Promise` that should never reject; if it does, the error + * will be treated as a "defect". + * + * This defect is not a standard error but indicates a flaw in the logic that + * was expected to be error-free. You can think of it similar to an unexpected + * crash in the program, which can be further managed or logged using tools like + * {@link catchAllDefect}. + * + * **Interruptions** + * + * An optional `AbortSignal` can be provided to allow for interruption of the + * wrapped `Promise` API. + * + * **When to Use** + * + * Use this function when you are sure the operation will not reject. + * + * **Example** (Delayed Message) + * + * ```ts + * import { Effect } from "effect" + * + * const delay = (message: string) => + * Effect.promise( + * () => + * new Promise((resolve) => { + * setTimeout(() => { + * resolve(message) + * }, 2000) + * }) + * ) + * + * // ┌─── Effect + * // ▼ + * const program = delay("Async operation completed successfully!") + * ``` + * + * @see {@link tryPromise} for a version that can handle failures. + * + * @since 2.0.0 + * @category Creating Effects + */ +export const promise = effect.promise; +/** + * Creates an `Effect` that always succeeds with a given value. + * + * **When to Use** + * + * Use this function when you need an effect that completes successfully with a + * specific value without any errors or external dependencies. + * + * **Example** (Creating a Successful Effect) + * + * ```ts + * import { Effect } from "effect" + * + * // Creating an effect that represents a successful scenario + * // + * // ┌─── Effect + * // ▼ + * const success = Effect.succeed(42) + * ``` + * + * @see {@link fail} to create an effect that represents a failure. + * + * @since 2.0.0 + * @category Creating Effects + */ +export const succeed = core.succeed; +/** + * Returns an effect which succeeds with `None`. + * + * **When to Use** + * + * Use this function when you need to represent the absence of a value in your + * code, especially when working with optional data. This can be helpful when + * you want to indicate that no result is available without throwing an error or + * performing additional logic. + * + * @see {@link succeedSome} to create an effect that succeeds with a `Some` value. + * + * @since 2.0.0 + * @category Creating Effects + */ +export const succeedNone = effect.succeedNone; +/** + * Returns an effect which succeeds with the value wrapped in a `Some`. + * + * @see {@link succeedNone} for a similar function that returns `None` when the value is absent. + * + * @since 2.0.0 + * @category Creating Effects + */ +export const succeedSome = effect.succeedSome; +/** + * Delays the creation of an `Effect` until it is actually needed. + * + * **Details** + * + * The `Effect.suspend` function takes a thunk that represents the effect and + * wraps it in a suspended effect. This means the effect will not be created + * until it is explicitly needed, which is helpful in various scenarios: + * - **Lazy Evaluation**: Helps optimize performance by deferring computations, + * especially when the effect might not be needed, or when its computation is + * expensive. This also ensures that any side effects or scoped captures are + * re-executed on each invocation. + * - **Handling Circular Dependencies**: Useful in managing circular + * dependencies, such as recursive functions that need to avoid eager + * evaluation to prevent stack overflow. + * - **Unifying Return Types**: Can help TypeScript unify return types in + * situations where multiple branches of logic return different effects, + * simplifying type inference. + * + * **When to Use** + * + * Use this function when you need to defer the evaluation of an effect until it + * is required. This is particularly useful for optimizing expensive + * computations, managing circular dependencies, or resolving type inference + * issues. + * + * **Example** (Lazy Evaluation with Side Effects) + * + * ```ts + * import { Effect } from "effect" + * + * let i = 0 + * + * const bad = Effect.succeed(i++) + * + * const good = Effect.suspend(() => Effect.succeed(i++)) + * + * console.log(Effect.runSync(bad)) // Output: 0 + * console.log(Effect.runSync(bad)) // Output: 0 + * + * console.log(Effect.runSync(good)) // Output: 1 + * console.log(Effect.runSync(good)) // Output: 2 + * ``` + * + * **Example** (Recursive Fibonacci) + * + * ```ts + * import { Effect } from "effect" + * + * const blowsUp = (n: number): Effect.Effect => + * n < 2 + * ? Effect.succeed(1) + * : Effect.zipWith(blowsUp(n - 1), blowsUp(n - 2), (a, b) => a + b) + * + * console.log(Effect.runSync(blowsUp(32))) + * // crash: JavaScript heap out of memory + * + * const allGood = (n: number): Effect.Effect => + * n < 2 + * ? Effect.succeed(1) + * : Effect.zipWith( + * Effect.suspend(() => allGood(n - 1)), + * Effect.suspend(() => allGood(n - 2)), + * (a, b) => a + b + * ) + * + * console.log(Effect.runSync(allGood(32))) + * // Output: 3524578 + * ``` + * + * **Example** (Using Effect.suspend to Help TypeScript Infer Types) + * + * ```ts + * import { Effect } from "effect" + * + * // Without suspend, TypeScript may struggle with type inference. + * // Inferred type: + * // (a: number, b: number) => + * // Effect | Effect + * const withoutSuspend = (a: number, b: number) => + * b === 0 + * ? Effect.fail(new Error("Cannot divide by zero")) + * : Effect.succeed(a / b) + * + * // Using suspend to unify return types. + * // Inferred type: + * // (a: number, b: number) => Effect + * const withSuspend = (a: number, b: number) => + * Effect.suspend(() => + * b === 0 + * ? Effect.fail(new Error("Cannot divide by zero")) + * : Effect.succeed(a / b) + * ) + * ``` + * + * @since 2.0.0 + * @category Creating Effects + */ +export const suspend = core.suspend; +/** + * Creates an `Effect` that represents a synchronous side-effectful computation. + * + * **Details** + * + * The provided function (`thunk`) must not throw errors; if it does, the error + * will be treated as a "defect". + * + * This defect is not a standard error but indicates a flaw in the logic that + * was expected to be error-free. You can think of it similar to an unexpected + * crash in the program, which can be further managed or logged using tools like + * {@link catchAllDefect}. + * + * **When to Use** + * + * Use this function when you are sure the operation will not fail. + * + * **Example** (Logging a Message) + * + * ```ts + * import { Effect } from "effect" + * + * const log = (message: string) => + * Effect.sync(() => { + * console.log(message) // side effect + * }) + * + * // ┌─── Effect + * // ▼ + * const program = log("Hello, World!") + * ``` + * + * @see {@link try_ | try} for a version that can handle failures. + * + * @since 2.0.0 + * @category Creating Effects + */ +export const sync = core.sync; +const _void = core.void; +export { +/** + * Represents an effect that does nothing and produces no value. + * + * **When to Use** + * + * Use this effect when you need to represent an effect that does nothing. + * This is useful in scenarios where you need to satisfy an effect-based + * interface or control program flow without performing any operations. For + * example, it can be used in situations where you want to return an effect + * from a function but do not need to compute or return any result. + * + * @since 2.0.0 + * @category Creating Effects + */ +_void as void }; +/** + * @since 2.0.0 + * @category Creating Effects + */ +export const yieldNow = core.yieldNow; +const _catch = effect._catch; +export { +/** + * Recovers from a specified error by catching it and handling it with a provided function. + * + * **Details** + * + * This function allows you to recover from specific errors that occur during + * the execution of an effect. It works by catching a specific type of error + * (identified by a discriminator) and then handling it using a provided + * handler function. The handler can return a new effect that helps recover + * from the error, allowing the program to continue. If the error doesn't + * match the specified type, the function allows the original effect to + * continue as it was. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * class NetworkError { + * readonly _tag = "NetworkError" + * } + * class ValidationError { + * readonly _tag = "ValidationError" + * } + * + * // Simulate an effect that may fail + * const task: Effect.Effect = Effect.fail(new NetworkError()) + * + * const program = Effect.gen(function*() { + * const result = yield* Effect.catch(task, "_tag", { + * failure: "NetworkError", + * onFailure: (error) => Effect.succeed(`recovered from error: ${error._tag}`) + * }) + * console.log(`Result: ${result}`) + * }) + * + * Effect.runFork(program) + * // Output: Result: recovered from error: NetworkError + * ``` + * + * @see {@link catchTag} for a version that can recover from errors based on a `_tag` discriminator. + * + * @since 2.0.0 + * @category Error handling + */ +_catch as catch }; +/** + * Handles all errors in an effect by providing a fallback effect. + * + * **Details** + * + * This function catches any errors that may occur during the execution of an + * effect and allows you to handle them by specifying a fallback effect. This + * ensures that the program continues without failing by recovering from errors + * using the provided fallback logic. + * + * **Note**: This function only handles recoverable errors. It will not recover + * from unrecoverable defects. + * + * **Example** (Providing Recovery Logic for Recoverable Errors) + * + * ```ts + * import { Effect, Random } from "effect" + * + * class HttpError { + * readonly _tag = "HttpError" + * } + * + * class ValidationError { + * readonly _tag = "ValidationError" + * } + * + * // ┌─── Effect + * // ▼ + * const program = Effect.gen(function* () { + * const n1 = yield* Random.next + * const n2 = yield* Random.next + * if (n1 < 0.5) { + * yield* Effect.fail(new HttpError()) + * } + * if (n2 < 0.5) { + * yield* Effect.fail(new ValidationError()) + * } + * return "some result" + * }) + * + * // ┌─── Effect + * // ▼ + * const recovered = program.pipe( + * Effect.catchAll((error) => + * Effect.succeed(`Recovering from ${error._tag}`) + * ) + * ) + * ``` + * + * @see {@link catchAllCause} for a version that can recover from both + * recoverable and unrecoverable errors. + * + * @since 2.0.0 + * @category Error handling + */ +export const catchAll = core.catchAll; +/** + * Handles both recoverable and unrecoverable errors by providing a recovery + * effect. + * + * **When to Use** + * + * The `catchAllCause` function allows you to handle all errors, including + * unrecoverable defects, by providing a recovery effect. The recovery logic is + * based on the `Cause` of the error, which provides detailed information about + * the failure. + * + * **When to Recover from Defects** + * + * Defects are unexpected errors that typically shouldn't be recovered from, as + * they often indicate serious issues. However, in some cases, such as + * dynamically loaded plugins, controlled recovery might be needed. + * + * **Example** (Recovering from All Errors) + * + * ```ts + * import { Cause, Effect } from "effect" + * + * // Define an effect that may fail with a recoverable or unrecoverable error + * const program = Effect.fail("Something went wrong!") + * + * // Recover from all errors by examining the cause + * const recovered = program.pipe( + * Effect.catchAllCause((cause) => + * Cause.isFailure(cause) + * ? Effect.succeed("Recovered from a regular error") + * : Effect.succeed("Recovered from a defect") + * ) + * ) + * + * Effect.runPromise(recovered).then(console.log) + * // Output: "Recovered from a regular error" + * ``` + * + * @since 2.0.0 + * @category Error handling + */ +export const catchAllCause = core.catchAllCause; +/** + * Recovers from all defects using a provided recovery function. + * + * **When to Use** + * + * There is no sensible way to recover from defects. This method should be used + * only at the boundary between Effect and an external system, to transmit + * information on a defect for diagnostic or explanatory purposes. + * + * **Details** + * + * `catchAllDefect` allows you to handle defects, which are unexpected errors + * that usually cause the program to terminate. This function lets you recover + * from these defects by providing a function that handles the error. However, + * it does not handle expected errors (like those from {@link fail}) or + * execution interruptions (like those from {@link interrupt}). + * + * **When to Recover from Defects** + * + * Defects are unexpected errors that typically shouldn't be recovered from, as + * they often indicate serious issues. However, in some cases, such as + * dynamically loaded plugins, controlled recovery might be needed. + * + * **Example** (Handling All Defects) + * + * ```ts + * import { Effect, Cause, Console } from "effect" + * + * // Simulating a runtime error + * const task = Effect.dieMessage("Boom!") + * + * const program = Effect.catchAllDefect(task, (defect) => { + * if (Cause.isRuntimeException(defect)) { + * return Console.log( + * `RuntimeException defect caught: ${defect.message}` + * ) + * } + * return Console.log("Unknown defect caught.") + * }) + * + * // We get an Exit.Success because we caught all defects + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // RuntimeException defect caught: Boom! + * // { + * // _id: "Exit", + * // _tag: "Success", + * // value: undefined + * // } + * ``` + * + * @since 2.0.0 + * @category Error handling + */ +export const catchAllDefect = effect.catchAllDefect; +/** + * Recovers from specific errors based on a predicate. + * + * **When to Use** + * + * `catchIf` works similarly to {@link catchSome}, but it allows you to + * recover from errors by providing a predicate function. If the predicate + * matches the error, the recovery effect is applied. This function doesn't + * alter the error type, so the resulting effect still carries the original + * error type unless a user-defined type guard is used to narrow the type. + * + * **Example** (Catching Specific Errors with a Predicate) + * + * ```ts + * import { Effect, Random } from "effect" + * + * class HttpError { + * readonly _tag = "HttpError" + * } + * + * class ValidationError { + * readonly _tag = "ValidationError" + * } + * + * // ┌─── Effect + * // ▼ + * const program = Effect.gen(function* () { + * const n1 = yield* Random.next + * const n2 = yield* Random.next + * if (n1 < 0.5) { + * yield* Effect.fail(new HttpError()) + * } + * if (n2 < 0.5) { + * yield* Effect.fail(new ValidationError()) + * } + * return "some result" + * }) + * + * // ┌─── Effect + * // ▼ + * const recovered = program.pipe( + * Effect.catchIf( + * // Only handle HttpError errors + * (error) => error._tag === "HttpError", + * () => Effect.succeed("Recovering from HttpError") + * ) + * ) + * ``` + * + * @since 2.0.0 + * @category Error handling + */ +export const catchIf = core.catchIf; +/** + * Catches and recovers from specific types of errors, allowing you to attempt + * recovery only for certain errors. + * + * **Details** + * + * `catchSome` lets you selectively catch and handle errors of certain + * types by providing a recovery effect for specific errors. If the error + * matches a condition, recovery is attempted; if not, it doesn't affect the + * program. This function doesn't alter the error type, meaning the error type + * remains the same as in the original effect. + * + * **Example** (Handling Specific Errors with Effect.catchSome) + * + * ```ts + * import { Effect, Random, Option } from "effect" + * + * class HttpError { + * readonly _tag = "HttpError" + * } + * + * class ValidationError { + * readonly _tag = "ValidationError" + * } + * + * // ┌─── Effect + * // ▼ + * const program = Effect.gen(function* () { + * const n1 = yield* Random.next + * const n2 = yield* Random.next + * if (n1 < 0.5) { + * yield* Effect.fail(new HttpError()) + * } + * if (n2 < 0.5) { + * yield* Effect.fail(new ValidationError()) + * } + * return "some result" + * }) + * + * // ┌─── Effect + * // ▼ + * const recovered = program.pipe( + * Effect.catchSome((error) => { + * // Only handle HttpError errors + * if (error._tag === "HttpError") { + * return Option.some(Effect.succeed("Recovering from HttpError")) + * } else { + * return Option.none() + * } + * }) + * ) + * ``` + * + * @see {@link catchIf} for a version that allows you to recover from errors based on a predicate. + * + * @since 2.0.0 + * @category Error handling + */ +export const catchSome = core.catchSome; +/** + * Recovers from specific causes using a provided partial function. + * + * @see {@link catchSome} for a version that allows you to recover from errors. + * @see {@link catchSomeDefect} for a version that allows you to recover from defects. + * + * @since 2.0.0 + * @category Error handling + */ +export const catchSomeCause = effect.catchSomeCause; +/** + * Recovers from specific defects using a provided partial function. + * + * **Details** + * + * `catchSomeDefect` allows you to handle specific defects, which are + * unexpected errors that can cause the program to stop. It uses a partial + * function to catch only certain defects and ignores others. The function does + * not handle expected errors (such as those caused by {@link fail}) or + * interruptions in execution (like those caused by {@link interrupt}). + * + * This function provides a way to handle certain types of defects while + * allowing others to propagate and cause failure in the program. + * + * **Note**: There is no sensible way to recover from defects. This method + * should be used only at the boundary between Effect and an external system, to + * transmit information on a defect for diagnostic or explanatory purposes. + * + * **How the Partial Function Works** + * + * The function provided to `catchSomeDefect` acts as a filter and a handler for defects: + * - It receives the defect as an input. + * - If the defect matches a specific condition (e.g., a certain error type), the function returns + * an `Option.some` containing the recovery logic. + * - If the defect does not match, the function returns `Option.none`, allowing the defect to propagate. + * + * **Example** (Handling Specific Defects) + * + * ```ts + * import { Effect, Cause, Option, Console } from "effect" + * + * // Simulating a runtime error + * const task = Effect.dieMessage("Boom!") + * + * const program = Effect.catchSomeDefect(task, (defect) => { + * if (Cause.isIllegalArgumentException(defect)) { + * return Option.some( + * Console.log( + * `Caught an IllegalArgumentException defect: ${defect.message}` + * ) + * ) + * } + * return Option.none() + * }) + * + * // Since we are only catching IllegalArgumentException + * // we will get an Exit.Failure because we simulated a runtime error. + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { + * // _id: 'Cause', + * // _tag: 'Die', + * // defect: { _tag: 'RuntimeException' } + * // } + * // } + * ``` + * + * @since 2.0.0 + * @category Error handling + */ +export const catchSomeDefect = effect.catchSomeDefect; +/** + * Catches and handles specific errors by their `_tag` field, which is used as a + * discriminator. + * + * **When to Use** + * + * `catchTag` is useful when your errors are tagged with a readonly `_tag` field + * that identifies the error type. You can use this function to handle specific + * error types by matching the `_tag` value. This allows for precise error + * handling, ensuring that only specific errors are caught and handled. + * + * The error type must have a readonly `_tag` field to use `catchTag`. This + * field is used to identify and match errors. + * + * **Example** (Handling Errors by Tag) + * + * ```ts + * import { Effect, Random } from "effect" + * + * class HttpError { + * readonly _tag = "HttpError" + * } + * + * class ValidationError { + * readonly _tag = "ValidationError" + * } + * + * // ┌─── Effect + * // ▼ + * const program = Effect.gen(function* () { + * const n1 = yield* Random.next + * const n2 = yield* Random.next + * if (n1 < 0.5) { + * yield* Effect.fail(new HttpError()) + * } + * if (n2 < 0.5) { + * yield* Effect.fail(new ValidationError()) + * } + * return "some result" + * }) + * + * // ┌─── Effect + * // ▼ + * const recovered = program.pipe( + * // Only handle HttpError errors + * Effect.catchTag("HttpError", (_HttpError) => + * Effect.succeed("Recovering from HttpError") + * ) + * ) + * ``` + * + * @see {@link catchTags} for a version that allows you to handle multiple error + * types at once. + * + * @since 2.0.0 + * @category Error handling + */ +export const catchTag = effect.catchTag; +/** + * Handles multiple errors in a single block of code using their `_tag` field. + * + * **When to Use** + * + * `catchTags` is a convenient way to handle multiple error types at + * once. Instead of using {@link catchTag} multiple times, you can pass an + * object where each key is an error type's `_tag`, and the value is the handler + * for that specific error. This allows you to catch and recover from multiple + * error types in a single call. + * + * The error type must have a readonly `_tag` field to use `catchTag`. This + * field is used to identify and match errors. + * + * **Example** (Handling Multiple Tagged Error Types at Once) + * + * ```ts + * import { Effect, Random } from "effect" + * + * class HttpError { + * readonly _tag = "HttpError" + * } + * + * class ValidationError { + * readonly _tag = "ValidationError" + * } + * + * // ┌─── Effect + * // ▼ + * const program = Effect.gen(function* () { + * const n1 = yield* Random.next + * const n2 = yield* Random.next + * if (n1 < 0.5) { + * yield* Effect.fail(new HttpError()) + * } + * if (n2 < 0.5) { + * yield* Effect.fail(new ValidationError()) + * } + * return "some result" + * }) + * + * // ┌─── Effect + * // ▼ + * const recovered = program.pipe( + * Effect.catchTags({ + * HttpError: (_HttpError) => + * Effect.succeed(`Recovering from HttpError`), + * ValidationError: (_ValidationError) => + * Effect.succeed(`Recovering from ValidationError`) + * }) + * ) + * ``` + * + * @since 2.0.0 + * @category Error handling + */ +export const catchTags = effect.catchTags; +/** + * Retrieves the cause of a failure in an effect. + * + * **Details** + * + * This function allows you to expose the detailed cause of an effect, which + * includes a more precise representation of failures, such as error messages + * and defects. + * + * **When to Use** + * + * This function is helpful when you need to inspect the cause of a failure in + * an effect, giving you more information than just the error message. It can be + * used to log, handle, or analyze failures in more detail, including + * distinguishing between different types of defects (e.g., runtime exceptions, + * interruptions, etc.). + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * // ┌─── Effect + * // ▼ + * const program = Effect.fail("Oh uh!").pipe(Effect.as(2)) + * + * // ┌─── Effect + * // ▼ + * const recovered = Effect.gen(function* () { + * const cause = yield* Effect.cause(program) + * yield* Console.log(cause) + * }) + * ``` + * + * @since 2.0.0 + * @category Error handling + */ +export const cause = effect.cause; +/** + * Runs an effect repeatedly until it succeeds, ignoring errors. + * + * **Details** + * + * This function takes an effect and runs it repeatedly until the effect + * successfully completes. If the effect fails, it will ignore the error and + * retry the operation. This is useful when you need to perform a task that may + * fail occasionally, but you want to keep trying until it eventually succeeds. + * It works by repeatedly executing the effect until it no longer throws an + * error. + * + * **When to Use** + * + * Use this function when you want to retry an operation multiple times until it + * succeeds. It is helpful in cases where the operation may fail temporarily + * (e.g., a network request), and you want to keep trying without handling or + * worrying about the errors. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * let counter = 0 + * + * const effect = Effect.try(() => { + * counter++ + * if (counter < 3) { + * console.log("running effect") + * throw new Error("error") + * } else { + * console.log("effect done") + * return "some result" + * } + * }) + * + * const program = Effect.eventually(effect) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // running effect + * // running effect + * // effect done + * // some result + * ``` + * + * @since 2.0.0 + * @category Error handling + */ +export const eventually = effect.eventually; +/** + * Discards both the success and failure values of an effect. + * + * **When to Use** + * + * `ignore` allows you to run an effect without caring about its result, whether + * it succeeds or fails. This is useful when you only care about the side + * effects of the effect and do not need to handle or process its outcome. + * + * **Example** (Using Effect.ignore to Discard Values) + * + * ```ts + * import { Effect } from "effect" + * + * // ┌─── Effect + * // ▼ + * const task = Effect.fail("Uh oh!").pipe(Effect.as(5)) + * + * // ┌─── Effect + * // ▼ + * const program = Effect.ignore(task) + * ``` + * + * @see {@link ignoreLogged} to log failures while ignoring them. + * + * @since 2.0.0 + * @category Error handling + */ +export const ignore = effect.ignore; +/** + * Ignores the result of an effect but logs any failures. + * + * **Details** + * + * This function takes an effect and returns a new effect that ignores whether + * the original effect succeeds or fails. However, if the effect fails, it will + * log the failure at the Debug level, so you can keep track of any issues that + * arise. + * + * **When to Use** + * + * This is useful in scenarios where you want to continue with your program + * regardless of the result of the effect, but you still want to be aware of + * potential failures that may need attention later. + * + * @since 2.0.0 + * @category Error handling + */ +export const ignoreLogged = effect.ignoreLogged; +/** + * Combines all errors from concurrent operations into a single error. + * + * **Details** + * + * This function is used when you have multiple operations running at the same + * time, and you want to capture all the errors that occur across those + * operations. Instead of handling each error separately, it combines all the + * errors into one unified error. + * + * **When to Use** + * + * When using this function, any errors that occur in the concurrently running + * operations will be grouped together into a single error. This helps simplify + * error handling in cases where you don't need to differentiate between each + * failure, but simply want to know that multiple failures occurred. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const fail1 = Effect.fail("Oh uh!") + * const fail2 = Effect.fail("Oh no!") + * const die = Effect.dieMessage("Boom!") + * + * // Run all effects concurrently and capture all errors + * const program = Effect.all([fail1, fail2, die], { + * concurrency: "unbounded" + * }).pipe(Effect.asVoid, Effect.parallelErrors) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { _id: 'Cause', _tag: 'Fail', failure: [ 'Oh uh!', 'Oh no!' ] } + * // } + * ``` + * + * @since 2.0.0 + * @category Error handling + */ +export const parallelErrors = effect.parallelErrors; +/** + * Transforms an effect to expose detailed error causes. + * + * **Details** + * + * This function enhances an effect by providing detailed information about any + * error, defect, or interruption that may occur during its execution. It + * modifies the error channel of the effect so that it includes a full cause of + * the failure, wrapped in a `Cause` type. + * + * After applying this function, you can use operators like {@link catchAll} and + * {@link catchTags} to handle specific types of errors. + * + * If you no longer need the detailed cause information, you can revert the + * changes using {@link unsandbox} to return to the original error-handling + * behavior. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * // ┌─── Effect + * // ▼ + * const task = Effect.fail(new Error("Oh uh!")).pipe( + * Effect.as("primary result") + * ) + * + * // ┌─── Effect, never> + * // ▼ + * const sandboxed = Effect.sandbox(task) + * + * const program = Effect.catchTags(sandboxed, { + * Die: (cause) => + * Console.log(`Caught a defect: ${cause.defect}`).pipe( + * Effect.as("fallback result on defect") + * ), + * Interrupt: (cause) => + * Console.log(`Caught a defect: ${cause.fiberId}`).pipe( + * Effect.as("fallback result on fiber interruption") + * ), + * Fail: (cause) => + * Console.log(`Caught a defect: ${cause.error}`).pipe( + * Effect.as("fallback result on failure") + * ) + * }) + * + * // Restore the original error handling with unsandbox + * const main = Effect.unsandbox(program) + * + * Effect.runPromise(main).then(console.log) + * // Output: + * // Caught a defect: Oh uh! + * // fallback result on failure + * ``` + * + * @see {@link unsandbox} to restore the original error handling. + * + * @since 2.0.0 + * @category Error handling + */ +export const sandbox = effect.sandbox; +/** + * Retries a failing effect based on a defined retry policy. + * + * **Details** + * + * The `Effect.retry` function takes an effect and a {@link Schedule} policy, + * and will automatically retry the effect if it fails, following the rules of + * the policy. + * + * If the effect ultimately succeeds, the result will be returned. + * + * If the maximum retries are exhausted and the effect still fails, the failure + * is propagated. + * + * **When to Use** + * + * This can be useful when dealing with intermittent failures, such as network + * issues or temporary resource unavailability. By defining a retry policy, you + * can control the number of retries, the delay between them, and when to stop + * retrying. + * + * **Example** (Retrying with a Fixed Delay) + * + * ```ts + * import { Effect, Schedule } from "effect" + * + * let count = 0 + * + * // Simulates an effect with possible failures + * const task = Effect.async((resume) => { + * if (count <= 2) { + * count++ + * console.log("failure") + * resume(Effect.fail(new Error())) + * } else { + * console.log("success") + * resume(Effect.succeed("yay!")) + * } + * }) + * + * // Define a repetition policy using a fixed delay between retries + * const policy = Schedule.fixed("100 millis") + * + * const repeated = Effect.retry(task, policy) + * + * Effect.runPromise(repeated).then(console.log) + * // Output: + * // failure + * // failure + * // failure + * // success + * // yay! + * ``` + * + * **Example** (Retrying a Task up to 5 times) + * + * ```ts + * import { Effect } from "effect" + * + * let count = 0 + * + * // Simulates an effect with possible failures + * const task = Effect.async((resume) => { + * if (count <= 2) { + * count++ + * console.log("failure") + * resume(Effect.fail(new Error())) + * } else { + * console.log("success") + * resume(Effect.succeed("yay!")) + * } + * }) + * + * // Retry the task up to 5 times + * Effect.runPromise(Effect.retry(task, { times: 5 })).then(console.log) + * // Output: + * // failure + * // failure + * // failure + * // success + * ``` + * + * **Example** (Retrying Until a Specific Condition is Met) + * + * ```ts + * import { Effect } from "effect" + * + * let count = 0 + * + * // Define an effect that simulates varying error on each invocation + * const action = Effect.failSync(() => { + * console.log(`Action called ${++count} time(s)`) + * return `Error ${count}` + * }) + * + * // Retry the action until a specific condition is met + * const program = Effect.retry(action, { + * until: (err) => err === "Error 3" + * }) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // Action called 1 time(s) + * // Action called 2 time(s) + * // Action called 3 time(s) + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { _id: 'Cause', _tag: 'Fail', failure: 'Error 3' } + * // } + * ``` + * + * @see {@link retryOrElse} for a version that allows you to run a fallback. + * @see {@link repeat} if your retry condition is based on successful outcomes rather than errors. + * + * @since 2.0.0 + * @category Error handling + */ +export const retry = schedule_.retry_combined; +/** + * Apply an `ExecutionPlan` to the effect, which allows you to fallback to + * different resources in case of failure. + * + * @since 3.16.0 + * @category Error handling + * @experimental + */ +export const withExecutionPlan = internalExecutionPlan.withExecutionPlan; +/** + * Retries a failing effect and runs a fallback effect if retries are exhausted. + * + * **Details** + * + * The `Effect.retryOrElse` function attempts to retry a failing effect multiple + * times according to a defined {@link Schedule} policy. + * + * If the retries are exhausted and the effect still fails, it runs a fallback + * effect instead. + * + * **When to Use** + * + * This function is useful when you want to handle failures gracefully by + * specifying an alternative action after repeated failures. + * + * **Example** (Retrying with Fallback) + * + * ```ts + * import { Effect, Schedule, Console } from "effect" + * + * let count = 0 + * + * // Simulates an effect with possible failures + * const task = Effect.async((resume) => { + * if (count <= 2) { + * count++ + * console.log("failure") + * resume(Effect.fail(new Error())) + * } else { + * console.log("success") + * resume(Effect.succeed("yay!")) + * } + * }) + * + * // Retry the task with a delay between retries and a maximum of 2 retries + * const policy = Schedule.addDelay(Schedule.recurs(2), () => "100 millis") + * + * // If all retries fail, run the fallback effect + * const repeated = Effect.retryOrElse( + * task, + * policy, + * // fallback + * () => Console.log("orElse").pipe(Effect.as("default value")) + * ) + * + * Effect.runPromise(repeated).then(console.log) + * // Output: + * // failure + * // failure + * // failure + * // orElse + * // default value + * ``` + * + * @see {@link retry} for a version that does not run a fallback effect. + * + * @since 2.0.0 + * @category Error handling + */ +export const retryOrElse = schedule_.retryOrElse_Effect; +const try_ = effect.try_; +export { +/** + * Creates an `Effect` that represents a synchronous computation that might + * fail. + * + * **When to Use** + * + * In situations where you need to perform synchronous operations that might + * fail, such as parsing JSON, you can use the `try` constructor. This + * constructor is designed to handle operations that could throw exceptions by + * capturing those exceptions and transforming them into manageable errors. + * + * **Error Handling** + * + * There are two ways to handle errors with `try`: + * + * 1. If you don't provide a `catch` function, the error is caught and the + * effect fails with an `UnknownException`. + * 2. If you provide a `catch` function, the error is caught and the `catch` + * function maps it to an error of type `E`. + * + * **Example** (Safe JSON Parsing) + * + * ```ts + * import { Effect } from "effect" + * + * const parse = (input: string) => + * // This might throw an error if input is not valid JSON + * Effect.try(() => JSON.parse(input)) + * + * // ┌─── Effect + * // ▼ + * const program = parse("") + * + * ``` + * + * **Example** (Custom Error Handling) + * + * ```ts + * import { Effect } from "effect" + * + * const parse = (input: string) => + * Effect.try({ + * // JSON.parse may throw for bad input + * try: () => JSON.parse(input), + * // remap the error + * catch: (unknown) => new Error(`something went wrong ${unknown}`) + * }) + * + * // ┌─── Effect + * // ▼ + * const program = parse("") + * ``` + * + * @see {@link sync} if the effectful computation is synchronous and does not + * throw errors. + * + * @since 2.0.0 + * @category Creating Effects + */ +try_ as try }; +/** + * Returns an effect that maps its success using the specified side-effecting + * `try` function, converting any errors into typed failed effects using the + * `catch` function. + * + * @see {@link tryPromise} for a version that works with asynchronous computations. + * + * @since 2.0.0 + * @category Error handling + */ +export const tryMap = effect.tryMap; +/** + * Returns an effect that maps its success using the specified side-effecting + * `try` function, converting any promise rejections into typed failed effects + * using the `catch` function. + * + * An optional `AbortSignal` can be provided to allow for interruption of the + * wrapped `Promise` API. + * + * @see {@link tryMap} for a version that works with synchronous computations. + * + * @since 2.0.0 + * @category Error handling + */ +export const tryMapPromise = effect.tryMapPromise; +/** + * Creates an `Effect` that represents an asynchronous computation that might + * fail. + * + * **When to Use** + * + * In situations where you need to perform asynchronous operations that might + * fail, such as fetching data from an API, you can use the `tryPromise` + * constructor. This constructor is designed to handle operations that could + * throw exceptions by capturing those exceptions and transforming them into + * manageable errors. + * + * **Error Handling** + * + * There are two ways to handle errors with `tryPromise`: + * + * 1. If you don't provide a `catch` function, the error is caught and the + * effect fails with an `UnknownException`. + * 2. If you provide a `catch` function, the error is caught and the `catch` + * function maps it to an error of type `E`. + * + * **Interruptions** + * + * An optional `AbortSignal` can be provided to allow for interruption of the + * wrapped `Promise` API. + * + * **Example** (Fetching a TODO Item) + * + * ```ts + * import { Effect } from "effect" + * + * const getTodo = (id: number) => + * // Will catch any errors and propagate them as UnknownException + * Effect.tryPromise(() => + * fetch(`https://jsonplaceholder.typicode.com/todos/${id}`) + * ) + * + * // ┌─── Effect + * // ▼ + * const program = getTodo(1) + * ``` + * + * **Example** (Custom Error Handling) + * + * ```ts + * import { Effect } from "effect" + * + * const getTodo = (id: number) => + * Effect.tryPromise({ + * try: () => fetch(`https://jsonplaceholder.typicode.com/todos/${id}`), + * // remap the error + * catch: (unknown) => new Error(`something went wrong ${unknown}`) + * }) + * + * // ┌─── Effect + * // ▼ + * const program = getTodo(1) + * ``` + * + * @see {@link promise} if the effectful computation is asynchronous and does not throw errors. + * + * @since 2.0.0 + * @category Creating Effects + */ +export const tryPromise = effect.tryPromise; +/** + * The `unsandbox` function is used to revert an effect that has been + * sandboxed by {@link sandbox}. When you apply `unsandbox`, the + * effect's error channel is restored to its original state, without the + * detailed `Cause` information. This means that any underlying causes of + * errors, defects, or fiber interruptions are no longer exposed in the error + * channel. + * + * This function is useful when you want to remove the detailed error tracking + * provided by `sandbox` and return to the standard error handling for + * your effect. Once unsandboxed, the effect behaves as if `sandbox` was + * never applied. + * + * @see {@link sandbox} to expose the full cause of failures, defects, or interruptions. + * + * @since 2.0.0 + * @category Error handling + */ +export const unsandbox = effect.unsandbox; +/** + * Allows interruption of the current fiber, even in uninterruptible regions. + * + * **Details** + * + * This effect checks whether any other fibers are attempting to interrupt the + * current fiber. If so, it allows the current fiber to perform a + * self-interruption. + * + * **When to Use** + * + * This is useful in situations where you want to allow interruption to happen + * even in regions of the code that are normally uninterruptible. + * + * @since 2.0.0 + * @category Interruption + */ +export const allowInterrupt = effect.allowInterrupt; +/** + * Checks if interruption is allowed and executes a callback accordingly. + * + * **Details** + * + * This function checks the current interrupt status of the running fiber. It + * then calls the provided callback, passing a boolean indicating whether + * interruption is allowed. + * + * **When to Use** + * + * This is useful for handling specific logic based on whether the current + * operation can be interrupted, such as when performing asynchronous operations + * or handling cancellation. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * const program = Effect.gen(function*() { + * yield* Effect.checkInterruptible((isInterruptible) => { + * if (isInterruptible) { + * return Console.log("You can interrupt this operation.") + * } else { + * return Console.log("This operation cannot be interrupted.") + * } + * }) + * }) + * + * Effect.runPromise(program) + * // Output: You can interrupt this operation. + * + * Effect.runPromise(program.pipe(Effect.uninterruptible)) + * // Output: This operation cannot be interrupted. + * + * ``` + * + * @since 2.0.0 + * @category Interruption + */ +export const checkInterruptible = core.checkInterruptible; +/** + * Provides a way to handle timeouts in uninterruptible effects, allowing them + * to continue in the background while the main control flow proceeds with the + * timeout error. + * + * **Details** + * + * The `disconnect` function allows an uninterruptible effect to continue + * running in the background, while enabling the main control flow to + * immediately recognize a timeout condition. This is useful when you want to + * avoid blocking the program due to long-running tasks, especially when those + * tasks do not need to affect the flow of the rest of the program. + * + * Without `disconnect`, an uninterruptible effect will ignore the + * timeout and continue executing until it completes. The timeout error will + * only be assessed after the effect finishes, which can cause delays in + * recognizing a timeout. + * + * With `disconnect`, the uninterruptible effect proceeds in the + * background while the main program flow can immediately handle the timeout + * error or trigger alternative logic. This enables faster timeout handling + * without waiting for the completion of the long-running task. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const longRunningTask = Effect.gen(function* () { + * console.log("Start heavy processing...") + * yield* Effect.sleep("5 seconds") // Simulate a long process + * console.log("Heavy processing done.") + * return "Data processed" + * }) + * + * const timedEffect = longRunningTask.pipe( + * Effect.uninterruptible, + * // Allows the task to finish in the background if it times out + * Effect.disconnect, + * Effect.timeout("1 second") + * ) + * + * Effect.runPromiseExit(timedEffect).then(console.log) + * // Output: + * // Start heavy processing... + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { + * // _id: 'Cause', + * // _tag: 'Fail', + * // failure: { _tag: 'TimeoutException' } + * // } + * // } + * // Heavy processing done. + * ``` + * + * @see {@link timeout} for a version that interrupts the effect. + * @see {@link uninterruptible} for creating an uninterruptible effect. + * + * @since 2.0.0 + * @category Interruption + */ +export const disconnect = fiberRuntime.disconnect; +/** + * Represents an effect that interrupts the current fiber. + * + * **Details** + * + * This effect models the explicit interruption of the fiber in which it runs. + * When executed, it causes the fiber to stop its operation immediately, + * capturing the interruption details such as the fiber's ID and its start time. + * The resulting interruption can be observed in the `Exit` type if the effect + * is run with functions like {@link runPromiseExit}. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const program = Effect.gen(function* () { + * console.log("start") + * yield* Effect.sleep("2 seconds") + * yield* Effect.interrupt + * console.log("done") + * return "some result" + * }) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // start + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { + * // _id: 'Cause', + * // _tag: 'Interrupt', + * // fiberId: { + * // _id: 'FiberId', + * // _tag: 'Runtime', + * // id: 0, + * // startTimeMillis: ... + * // } + * // } + * // } + * ``` + * + * @since 2.0.0 + * @category Interruption + */ +export const interrupt = core.interrupt; +/** + * @since 2.0.0 + * @category Interruption + */ +export const interruptWith = core.interruptWith; +/** + * Marks an effect as interruptible. + * + * @since 2.0.0 + * @category Interruption + */ +export const interruptible = core.interruptible; +/** + * This function behaves like {@link interruptible}, but it also provides a + * `restore` function. This function can be used to restore the interruptibility + * of any specific region of code. + * + * @since 2.0.0 + * @category Interruption + */ +export const interruptibleMask = core.interruptibleMask; +/** + * Registers a cleanup effect to run when an effect is interrupted. + * + * **Details** + * + * This function allows you to specify an effect to run when the fiber is + * interrupted. This effect will be executed when the fiber is interrupted, + * allowing you to perform cleanup or other actions. + * + * **Example** (Running a Cleanup Action on Interruption) + * + * ```ts + * import { Console, Effect } from "effect" + * + * // This handler is executed when the fiber is interrupted + * const handler = Effect.onInterrupt((_fibers) => Console.log("Cleanup completed")) + * + * const success = Console.log("Task completed").pipe(Effect.as("some result"), handler) + * + * Effect.runFork(success) + * // Output: + * // Task completed + * + * const failure = Console.log("Task failed").pipe(Effect.andThen(Effect.fail("some error")), handler) + * + * Effect.runFork(failure) + * // Output: + * // Task failed + * + * const interruption = Console.log("Task interrupted").pipe(Effect.andThen(Effect.interrupt), handler) + * + * Effect.runFork(interruption) + * // Output: + * // Task interrupted + * // Cleanup completed + * ``` + * + * @since 2.0.0 + * @category Interruption + */ +export const onInterrupt = core.onInterrupt; +/** + * Marks an effect as uninterruptible. + * + * @since 2.0.0 + * @category Interruption + */ +export const uninterruptible = core.uninterruptible; +/** + * This function behaves like {@link uninterruptible}, but it also provides a + * `restore` function. This function can be used to restore the interruptibility + * of any specific region of code. + * + * @since 2.0.0 + * @category Interruption + */ +export const uninterruptibleMask = core.uninterruptibleMask; +/** + * Transforms a `Predicate` function into an `Effect` returning the input value if the predicate returns `true` + * or failing with specified error if the predicate fails + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const isPositive = (n: number): boolean => n > 0 + * + * // succeeds with `1` + * Effect.liftPredicate(1, isPositive, n => `${n} is not positive`) + * + * // fails with `"0 is not positive"` + * Effect.liftPredicate(0, isPositive, n => `${n} is not positive`) + * ``` + * + * @category Condition Checking + * @since 3.4.0 + */ +export const liftPredicate = effect.liftPredicate; +/** + * Replaces the value inside an effect with a constant value. + * + * **Details** + * + * This function allows you to ignore the original value inside an effect and + * replace it with a constant value. + * + * **When to Use** + * + * It is useful when you no longer need the value produced by an effect but want + * to ensure that the effect completes successfully with a specific constant + * result instead. For instance, you can replace the value produced by a + * computation with a predefined value, ignoring what was calculated before. + * + * **Example** (Replacing a Value) + * + * ```ts + * import { pipe, Effect } from "effect" + * + * // Replaces the value 5 with the constant "new value" + * const program = pipe(Effect.succeed(5), Effect.as("new value")) + * + * Effect.runPromise(program).then(console.log) + * // Output: "new value" + * ``` + * + * @since 2.0.0 + * @category Mapping + */ +export const as = core.as; +/** + * This function maps the success value of an `Effect` value to a `Some` value + * in an `Option` value. If the original `Effect` value fails, the returned + * `Effect` value will also fail. + * + * @category Mapping + * @since 2.0.0 + */ +export const asSome = effect.asSome; +/** + * This function maps the error value of an `Effect` value to a `Some` value + * in an `Option` value. If the original `Effect` value succeeds, the returned + * `Effect` value will also succeed. + * + * @category Mapping + * @since 2.0.0 + */ +export const asSomeError = effect.asSomeError; +/** + * This function maps the success value of an `Effect` value to `void`. If the + * original `Effect` value succeeds, the returned `Effect` value will also + * succeed. If the original `Effect` value fails, the returned `Effect` value + * will fail with the same error. + * + * @since 2.0.0 + * @category Mapping + */ +export const asVoid = core.asVoid; +/** + * Swaps the success and error channels of an effect. + * + * **Details** + * + * This function reverses the flow of an effect by swapping its success and + * error channels. The success value becomes an error, and the error value + * becomes a success. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * // ┌─── Effect + * // ▼ + * const program = Effect.fail("Oh uh!").pipe(Effect.as(2)) + * + * // ┌─── Effect + * // ▼ + * const flipped = Effect.flip(program) + * ``` + * + * @since 2.0.0 + * @category Mapping + */ +export const flip = core.flip; +/** + * Swaps the error/value parameters, applies the function `f` and flips the + * parameters back + * + * @since 2.0.0 + * @category Mapping + */ +export const flipWith = effect.flipWith; +/** + * Transforms the value inside an effect by applying a function to it. + * + * **Syntax** + * + * ```ts skip-type-checking + * const mappedEffect = pipe(myEffect, Effect.map(transformation)) + * // or + * const mappedEffect = Effect.map(myEffect, transformation) + * // or + * const mappedEffect = myEffect.pipe(Effect.map(transformation)) + * ``` + * + * **Details** + * + * `map` takes a function and applies it to the value contained within an + * effect, creating a new effect with the transformed value. + * + * It's important to note that effects are immutable, meaning that the original + * effect is not modified. Instead, a new effect is returned with the updated + * value. + * + * **Example** (Adding a Service Charge) + * + * ```ts + * import { pipe, Effect } from "effect" + * + * const addServiceCharge = (amount: number) => amount + 1 + * + * const fetchTransactionAmount = Effect.promise(() => Promise.resolve(100)) + * + * const finalAmount = pipe( + * fetchTransactionAmount, + * Effect.map(addServiceCharge) + * ) + * + * Effect.runPromise(finalAmount).then(console.log) + * // Output: 101 + * ``` + * + * @see {@link mapError} for a version that operates on the error channel. + * @see {@link mapBoth} for a version that operates on both channels. + * @see {@link flatMap} or {@link andThen} for a version that can return a new effect. + * + * @since 2.0.0 + * @category Mapping + */ +export const map = core.map; +/** + * Applies a stateful transformation to each element of a collection, producing + * new elements along with an updated state. + * + * **When to Use** + * + * Use `mapAccum` when you need to process each element of a collection while + * keeping track of some state across iterations. + * + * **Details** + * + * `mapAccum` takes an initial state (`initial`) and a function (`f`) that is + * applied to each element. This function returns a new state and a transformed + * element. The final effect produces both the accumulated state and the + * transformed collection. + * + * If the input collection is a non-empty array, the return type will match the + * input collection type. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * // Define an initial state and a transformation function + * const initialState = 0 + * + * const transformation = (state: number, element: string) => + * Effect.succeed<[number, string]>([state + element.length, element.toUpperCase()]) + * + * // Apply mapAccum to transform an array of strings + * const program = Effect.mapAccum(["a", "bb", "ccc"], initialState, transformation) + * + * Effect.runPromise(program).then(([finalState, transformedCollection]) => { + * console.log(finalState) + * console.log(transformedCollection) + * }) + * // Output: + * // 6 + * // [ 'A', 'BB', 'CCC' ] + * ``` + * + * @since 2.0.0 + * @category Mapping + */ +export const mapAccum = effect.mapAccum; +/** + * Applies transformations to both the success and error channels of an effect. + * + * **Details** + * + * This function takes two map functions as arguments: one for the error channel + * and one for the success channel. You can use it when you want to modify both + * the error and the success values without altering the overall success or + * failure status of the effect. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * // ┌─── Effect + * // ▼ + * const simulatedTask = Effect.fail("Oh no!").pipe(Effect.as(1)) + * + * // ┌─── Effect + * // ▼ + * const modified = Effect.mapBoth(simulatedTask, { + * onFailure: (message) => new Error(message), + * onSuccess: (n) => n > 0 + * }) + * ``` + * + * @see {@link map} for a version that operates on the success channel. + * @see {@link mapError} for a version that operates on the error channel. + * + * @since 2.0.0 + * @category Mapping + */ +export const mapBoth = core.mapBoth; +/** + * Transforms or modifies the error produced by an effect without affecting its + * success value. + * + * **When to Use** + * + * This function is helpful when you want to enhance the error with additional + * information, change the error type, or apply custom error handling while + * keeping the original behavior of the effect's success values intact. It only + * operates on the error channel and leaves the success channel unchanged. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * // ┌─── Effect + * // ▼ + * const simulatedTask = Effect.fail("Oh no!").pipe(Effect.as(1)) + * + * // ┌─── Effect + * // ▼ + * const mapped = Effect.mapError( + * simulatedTask, + * (message) => new Error(message) + * ) + * ``` + * + * @see {@link map} for a version that operates on the success channel. + * @see {@link mapBoth} for a version that operates on both channels. + * @see {@link orElseFail} if you want to replace the error with a new one. + * + * @since 2.0.0 + * @category Mapping + */ +export const mapError = core.mapError; +/** + * Maps the cause of failure of an effect using a specified function. + * + * @see {@link sandbox} for a version that exposes the full cause of failures, defects, or interruptions. + * @see {@link catchAllCause} for a version that can recover from all types of defects. + * + * @since 2.0.0 + * @category Mapping + */ +export const mapErrorCause = effect.mapErrorCause; +/** + * Combines both success and error channels of an effect into a single outcome. + * + * **Details** + * + * This function transforms an effect that may fail into one that always returns + * a value, where both success and failure outcomes are handled as values in the + * success channel. + * + * **When to Use** + * + * This can be useful when you want to continue execution regardless of the + * error type and still capture both successful results and errors as part of + * the outcome. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * // ┌─── Effect + * // ▼ + * const program = Effect.fail("Oh uh!").pipe(Effect.as(2)) + * + * // ┌─── Effect + * // ▼ + * const recovered = Effect.merge(program) + * ``` + * + * @since 2.0.0 + * @category Mapping + */ +export const merge = effect.merge; +/** + * Returns a new effect with the boolean value of this effect negated. + * + * @since 2.0.0 + * @category Mapping + */ +export const negate = effect.negate; +/** + * Creates a scoped resource using an `acquire` and `release` effect. + * + * **Details** + * + * This function helps manage resources by combining two `Effect` values: one + * for acquiring the resource and one for releasing it. + * + * `acquireRelease` does the following: + * + * 1. Ensures that the effect that acquires the resource will not be + * interrupted. Note that acquisition may still fail due to internal + * reasons (such as an uncaught exception). + * 2. Ensures that the `release` effect will not be interrupted, and will be + * executed as long as the acquisition effect successfully acquires the + * resource. + * + * If the `acquire` function succeeds, the `release` function is added to the + * list of finalizers for the scope. This ensures that the release will happen + * automatically when the scope is closed. + * + * Both `acquire` and `release` run uninterruptibly, meaning they cannot be + * interrupted while they are executing. + * + * Additionally, the `release` function can be influenced by the exit value when + * the scope closes, allowing for custom handling of how the resource is + * released based on the execution outcome. + * + * **When to Use** + * + * This function is used to ensure that an effect that represents the + * acquisition of a resource (for example, opening a file, launching a thread, + * etc.) will not be interrupted, and that the resource will always be released + * when the `Effect` completes execution. + * + * **Example** (Defining a Simple Resource) + * + * ```ts + * import { Effect } from "effect" + * + * // Define an interface for a resource + * interface MyResource { + * readonly contents: string + * readonly close: () => Promise + * } + * + * // Simulate resource acquisition + * const getMyResource = (): Promise => + * Promise.resolve({ + * contents: "lorem ipsum", + * close: () => + * new Promise((resolve) => { + * console.log("Resource released") + * resolve() + * }) + * }) + * + * // Define how the resource is acquired + * const acquire = Effect.tryPromise({ + * try: () => + * getMyResource().then((res) => { + * console.log("Resource acquired") + * return res + * }), + * catch: () => new Error("getMyResourceError") + * }) + * + * // Define how the resource is released + * const release = (res: MyResource) => Effect.promise(() => res.close()) + * + * // Create the resource management workflow + * // + * // ┌─── Effect + * // ▼ + * const resource = Effect.acquireRelease(acquire, release) + * ``` + * + * @see {@link acquireUseRelease} for a version that automatically handles the scoping of resources. + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +export const acquireRelease = fiberRuntime.acquireRelease; +/** + * Creates a scoped resource with an interruptible acquire action. + * + * **Details** + * + * This function is similar to {@link acquireRelease}, but it allows the + * acquisition of the resource to be interrupted. The `acquire` effect, which + * represents the process of obtaining the resource, can be interrupted if + * necessary. + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +export const acquireReleaseInterruptible = fiberRuntime.acquireReleaseInterruptible; +/** + * Many real-world operations involve working with resources that must be released when no longer needed, such as: + * + * - Database connections + * - File handles + * - Network requests + * + * This function ensures that a resource is: + * + * 1. **Acquired** properly. + * 2. **Used** for its intended purpose. + * 3. **Released** even if an error occurs. + * + * **Example** (Automatically Managing Resource Lifetime) + * + * ```ts + * import { Effect, Console } from "effect" + * + * // Define an interface for a resource + * interface MyResource { + * readonly contents: string + * readonly close: () => Promise + * } + * + * // Simulate resource acquisition + * const getMyResource = (): Promise => + * Promise.resolve({ + * contents: "lorem ipsum", + * close: () => + * new Promise((resolve) => { + * console.log("Resource released") + * resolve() + * }) + * }) + * + * // Define how the resource is acquired + * const acquire = Effect.tryPromise({ + * try: () => + * getMyResource().then((res) => { + * console.log("Resource acquired") + * return res + * }), + * catch: () => new Error("getMyResourceError") + * }) + * + * // Define how the resource is released + * const release = (res: MyResource) => Effect.promise(() => res.close()) + * + * const use = (res: MyResource) => Console.log(`content is ${res.contents}`) + * + * // ┌─── Effect + * // ▼ + * const program = Effect.acquireUseRelease(acquire, use, release) + * + * Effect.runPromise(program) + * // Output: + * // Resource acquired + * // content is lorem ipsum + * // Resource released + * ``` + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +export const acquireUseRelease = core.acquireUseRelease; +/** + * Ensures a finalizer is added to the scope of the calling effect, guaranteeing + * it runs when the scope is closed. + * + * **Details** + * + * This function adds a finalizer that will execute whenever the scope of the + * effect is closed, regardless of whether the effect succeeds, fails, or is + * interrupted. The finalizer receives the `Exit` value of the effect's scope, + * allowing it to react differently depending on how the effect concludes. + * + * Finalizers are a reliable way to manage resource cleanup, ensuring that + * resources such as file handles, network connections, or database transactions + * are properly closed even in the event of an unexpected interruption or error. + * + * Finalizers operate in conjunction with Effect's scoped resources. If an + * effect with a finalizer is wrapped in a scope, the finalizer will execute + * automatically when the scope ends. + * + * **Example** (Adding a Finalizer on Success) + * + * ```ts + * import { Effect, Console } from "effect" + * + * // ┌─── Effect + * // ▼ + * const program = Effect.gen(function* () { + * yield* Effect.addFinalizer((exit) => + * Console.log(`Finalizer executed. Exit status: ${exit._tag}`) + * ) + * return "some result" + * }) + * + * // Wrapping the effect in a scope + * // + * // ┌─── Effect + * // ▼ + * const runnable = Effect.scoped(program) + * + * Effect.runPromiseExit(runnable).then(console.log) + * // Output: + * // Finalizer executed. Exit status: Success + * // { _id: 'Exit', _tag: 'Success', value: 'some result' } + * ``` + * + * **Example** (Adding a Finalizer on Failure) + * + * ```ts + * import { Effect, Console } from "effect" + * + * // ┌─── Effect + * // ▼ + * const program = Effect.gen(function* () { + * yield* Effect.addFinalizer((exit) => + * Console.log(`Finalizer executed. Exit status: ${exit._tag}`) + * ) + * return yield* Effect.fail("Uh oh!") + * }) + * + * // Wrapping the effect in a scope + * // + * // ┌─── Effect + * // ▼ + * const runnable = Effect.scoped(program) + * + * Effect.runPromiseExit(runnable).then(console.log) + * // Output: + * // Finalizer executed. Exit status: Failure + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { _id: 'Cause', _tag: 'Fail', failure: 'Uh oh!' } + * // } + * ``` + * + * **Example** (Adding a Finalizer on Interruption) + * + * ```ts + * import { Effect, Console } from "effect" + * + * // ┌─── Effect + * // ▼ + * const program = Effect.gen(function* () { + * yield* Effect.addFinalizer((exit) => + * Console.log(`Finalizer executed. Exit status: ${exit._tag}`) + * ) + * return yield* Effect.interrupt + * }) + * + * // Wrapping the effect in a scope + * // + * // ┌─── Effect + * // ▼ + * const runnable = Effect.scoped(program) + * + * Effect.runPromiseExit(runnable).then(console.log) + * // Output: + * // Finalizer executed. Exit status: Failure + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { + * // _id: 'Cause', + * // _tag: 'Interrupt', + * // fiberId: { + * // _id: 'FiberId', + * // _tag: 'Runtime', + * // id: 0, + * // startTimeMillis: ... + * // } + * // } + * // } + * ``` + * + * @see {@link onExit} for attaching a finalizer directly to an effect. + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +export const addFinalizer = fiberRuntime.addFinalizer; +/** + * Guarantees the execution of a finalizer when an effect starts execution. + * + * **Details** + * + * This function allows you to specify a `finalizer` effect that will always be + * run once the effect starts execution, regardless of whether the effect + * succeeds, fails, or is interrupted. + * + * **When to Use** + * + * This is useful when you need to ensure that certain cleanup or final steps + * are executed in all cases, such as releasing resources or performing + * necessary logging. + * + * While this function provides strong guarantees about executing the finalizer, + * it is considered a low-level tool, which may not be ideal for more complex + * resource management. For higher-level resource management with automatic + * acquisition and release, see the {@link acquireRelease} family of functions. + * For use cases where you need access to the result of an effect, consider + * using {@link onExit}. + * + * **Example** (Running a Finalizer in All Outcomes) + * + * ```ts + * import { Console, Effect } from "effect" + * + * // Define a cleanup effect + * const handler = Effect.ensuring(Console.log("Cleanup completed")) + * + * // Define a successful effect + * const success = Console.log("Task completed").pipe( + * Effect.as("some result"), + * handler + * ) + * + * Effect.runFork(success) + * // Output: + * // Task completed + * // Cleanup completed + * + * // Define a failing effect + * const failure = Console.log("Task failed").pipe( + * Effect.andThen(Effect.fail("some error")), + * handler + * ) + * + * Effect.runFork(failure) + * // Output: + * // Task failed + * // Cleanup completed + * + * // Define an interrupted effect + * const interruption = Console.log("Task interrupted").pipe( + * Effect.andThen(Effect.interrupt), + * handler + * ) + * + * Effect.runFork(interruption) + * // Output: + * // Task interrupted + * // Cleanup completed + * ``` + * + * @see {@link onExit} for a version that provides access to the result of an + * effect. + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +export const ensuring = fiberRuntime.ensuring; +/** + * Ensures a cleanup effect runs whenever the calling effect fails, providing + * the failure cause to the cleanup effect. + * + * **Details** + * + * This function allows you to attach a cleanup effect that runs whenever the + * calling effect fails. The cleanup effect receives the cause of the failure, + * allowing you to perform actions such as logging, releasing resources, or + * executing additional recovery logic based on the error. The cleanup effect + * will execute even if the failure is due to interruption. + * + * Importantly, the cleanup effect itself is uninterruptible, ensuring that it + * completes regardless of external interruptions. + * + * **Example** (Running Cleanup Only on Failure) + * + * ```ts + * import { Console, Effect } from "effect" + * + * // This handler logs the failure cause when the effect fails + * const handler = Effect.onError((cause) => + * Console.log(`Cleanup completed: ${cause}`) + * ) + * + * // Define a successful effect + * const success = Console.log("Task completed").pipe( + * Effect.as("some result"), + * handler + * ) + * + * Effect.runFork(success) + * // Output: + * // Task completed + * + * // Define a failing effect + * const failure = Console.log("Task failed").pipe( + * Effect.andThen(Effect.fail("some error")), + * handler + * ) + * + * Effect.runFork(failure) + * // Output: + * // Task failed + * // Cleanup completed: Error: some error + * + * // Define a failing effect + * const defect = Console.log("Task failed with defect").pipe( + * Effect.andThen(Effect.die("Boom!")), + * handler + * ) + * + * Effect.runFork(defect) + * // Output: + * // Task failed with defect + * // Cleanup completed: Error: Boom! + * + * // Define an interrupted effect + * const interruption = Console.log("Task interrupted").pipe( + * Effect.andThen(Effect.interrupt), + * handler + * ) + * + * Effect.runFork(interruption) + * // Output: + * // Task interrupted + * // Cleanup completed: All fibers interrupted without errors. + * ``` + * + * @see {@link ensuring} for attaching a cleanup effect that runs on both success and failure. + * @see {@link onExit} for attaching a cleanup effect that runs on all possible exits. + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +export const onError = core.onError; +/** + * Guarantees that a cleanup function runs regardless of whether the effect + * succeeds, fails, or is interrupted. + * + * **Details** + * + * This function ensures that a provided cleanup function is executed after the + * effect completes, regardless of the outcome. The cleanup function is given + * the `Exit` value of the effect, which provides detailed information about the + * result: + * - If the effect succeeds, the `Exit` contains the success value. + * - If the effect fails, the `Exit` contains the error or failure cause. + * - If the effect is interrupted, the `Exit` reflects the interruption. + * + * The cleanup function is guaranteed to run uninterruptibly, ensuring reliable + * resource management even in complex or high-concurrency scenarios. + * + * **Example** (Running a Cleanup Function with the Effect’s Result) + * + * ```ts + * import { Console, Effect, Exit } from "effect" + * + * // Define a cleanup effect that logs the result + * const handler = Effect.onExit((exit) => + * Console.log(`Cleanup completed: ${Exit.getOrElse(exit, String)}`) + * ) + * + * // Define a successful effect + * const success = Console.log("Task completed").pipe( + * Effect.as("some result"), + * handler + * ) + * + * Effect.runFork(success) + * // Output: + * // Task completed + * // Cleanup completed: some result + * + * // Define a failing effect + * const failure = Console.log("Task failed").pipe( + * Effect.andThen(Effect.fail("some error")), + * handler + * ) + * + * Effect.runFork(failure) + * // Output: + * // Task failed + * // Cleanup completed: Error: some error + * + * // Define an interrupted effect + * const interruption = Console.log("Task interrupted").pipe( + * Effect.andThen(Effect.interrupt), + * handler + * ) + * + * Effect.runFork(interruption) + * // Output: + * // Task interrupted + * // Cleanup completed: All fibers interrupted without errors. + * ``` + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +export const onExit = core.onExit; +/** + * Ensures that finalizers are run concurrently when the scope of an effect is + * closed. + * + * **Details** + * + * This function modifies the behavior of finalizers within a scoped workflow to + * allow them to run concurrently when the scope is closed. + * + * By default, finalizers are executed sequentially in reverse order of their + * addition, but this function changes that behavior to execute all finalizers + * concurrently. + * + * **When to Use** + * + * Running finalizers concurrently can improve performance when multiple + * independent cleanup tasks need to be performed. However, it requires that + * these tasks do not depend on the order of execution or introduce race + * conditions. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * // Define a program that adds multiple finalizers + * const program = Effect.gen(function*() { + * yield* Effect.addFinalizer(() => Console.log("Finalizer 1 executed").pipe(Effect.delay("300 millis"))) + * yield* Effect.addFinalizer(() => Console.log("Finalizer 2 executed").pipe(Effect.delay("100 millis"))) + * yield* Effect.addFinalizer(() => Console.log("Finalizer 3 executed").pipe(Effect.delay("200 millis"))) + * return "some result" + * }) + * + * // Modify the program to ensure finalizers run in parallel + * const modified = program.pipe(Effect.parallelFinalizers) + * + * const runnable = Effect.scoped(modified) + * + * Effect.runFork(runnable) + * // Output: + * // Finalizer 2 executed + * // Finalizer 3 executed + * // Finalizer 1 executed + * ``` + * + * @see {@link sequentialFinalizers} for a version that ensures finalizers are run sequentially. + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +export const parallelFinalizers = fiberRuntime.parallelFinalizers; +/** + * Ensures that finalizers are run sequentially in reverse order of their + * addition. + * + * **Details** + * + * This function modifies the behavior of finalizers within a scoped workflow to + * ensure they are run sequentially in reverse order when the scope is closed. + * + * By default, finalizers are executed sequentially, so this only changes the + * behavior if the scope is configured to run finalizers concurrently. + * + * @see {@link parallelFinalizers} for a version that ensures finalizers are run concurrently. + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +export const sequentialFinalizers = fiberRuntime.sequentialFinalizers; +/** + * Applies a custom execution strategy to finalizers within a scoped workflow. + * + * **Details** + * + * This function allows you to control how finalizers are executed in a scope by + * applying a specified `ExecutionStrategy`. The `strategy` can dictate whether + * finalizers run (e.g., sequentially or in parallel). + * + * Additionally, the function provides a `restore` operation, which ensures that + * the effect passed to it is executed under the default execution strategy. + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +export const finalizersMask = fiberRuntime.finalizersMask; +/** + * Provides access to the current scope in a scoped workflow. + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +export const scope = fiberRuntime.scope; +/** + * Accesses the current scope and uses it to perform the specified effect. + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +export const scopeWith = fiberRuntime.scopeWith; +/** + * Creates a `Scope`, passes it to the specified effectful function, and closes + * the scope when the effect completes (whether through success, failure, or + * interruption). + * + * @since 3.11.0 + * @category Scoping, Resources & Finalization + */ +export const scopedWith = fiberRuntime.scopedWith; +/** + * Scopes all resources used in an effect to the lifetime of the effect. + * + * **Details** + * + * This function ensures that all resources used within an effect are tied to + * its lifetime. Finalizers for these resources are executed automatically when + * the effect completes, whether through success, failure, or interruption. This + * guarantees proper resource cleanup without requiring explicit management. + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +export const scoped = fiberRuntime.scopedEffect; +/** + * Scopes all resources acquired by one effect to the lifetime of another + * effect. + * + * **Details** + * + * This function allows you to scope the resources acquired by one effect + * (`self`) to the lifetime of another effect (`use`). This ensures that the + * resources are cleaned up as soon as the `use` effect completes, regardless of + * how the `use` effect ends (success, failure, or interruption). + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * const acquire = Console.log("Acquiring resource").pipe( + * Effect.as(1), + * Effect.tap(Effect.addFinalizer(() => Console.log("Releasing resource"))) + * ) + * const use = (resource: number) => Console.log(`Using resource: ${resource}`) + * + * const program = acquire.pipe(Effect.using(use)) + * + * Effect.runFork(program) + * // Output: + * // Acquiring resource + * // Using resource: 1 + * // Releasing resource + * ``` + * + * @see {@link scopedWith} Manage scoped operations with a temporary scope. + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +export const using = fiberRuntime.using; +/** + * Returns the result of the effect and a finalizer to close its scope. + * + * **Details** + * + * This function allows you to retrieve both the result of an effect and a + * finalizer that can be used to manually close its scope. This is useful for + * workflows where you need early access to the result while retaining control + * over the resource cleanup process. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * const acquire = Console.log("Acquiring resource").pipe( + * Effect.as(1), + * Effect.tap(Effect.addFinalizer(() => Console.log("Releasing resource"))) + * ) + * const program = Effect.gen(function*() { + * const [finalizer, resource] = yield* Effect.withEarlyRelease(acquire) + * console.log(`Using resource: ${resource}`) + * yield* Effect.sleep("1 second") + * yield* finalizer + * }) + * + * Effect.runFork(program.pipe(Effect.scoped)) + * // Output: + * // Acquiring resource + * // Using resource: 1 + * // Releasing resource + * ``` + * + * @since 2.0.0 + * @category Scoping, Resources & Finalization + */ +export const withEarlyRelease = fiberRuntime.withEarlyRelease; +/** + * Returns a new effect that will not succeed with its value before first + * waiting for the end of all child fibers forked by the effect. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +export const awaitAllChildren = circular.awaitAllChildren; +/** + * Returns a new workflow that will not supervise any fibers forked by this + * workflow. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +export const daemonChildren = fiberRuntime.daemonChildren; +/** + * Constructs an effect with information about the current `Fiber`. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +export const descriptor = effect.descriptor; +/** + * Constructs an effect based on information about the current `Fiber`. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +export const descriptorWith = effect.descriptorWith; +/** + * Returns a new workflow that executes this one and captures the changes in + * `FiberRef` values. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +export const diffFiberRefs = effect.diffFiberRefs; +/** + * Acts on the children of this fiber (collected into a single fiber), + * guaranteeing the specified callback will be invoked, whether or not this + * effect succeeds. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +export const ensuringChild = circular.ensuringChild; +/** + * Acts on the children of this fiber, guaranteeing the specified callback + * will be invoked, whether or not this effect succeeds. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +export const ensuringChildren = circular.ensuringChildren; +/** + * @since 2.0.0 + * @category Supervision & Fibers + */ +export const fiberId = core.fiberId; +/** + * @since 2.0.0 + * @category Supervision & Fibers + */ +export const fiberIdWith = core.fiberIdWith; +/** + * Creates a new fiber to run an effect concurrently. + * + * **Details** + * + * This function takes an effect and forks it into a separate fiber, allowing it + * to run concurrently without blocking the original effect. The new fiber + * starts execution immediately after being created, and the fiber object is + * returned immediately without waiting for the effect to begin. This is useful + * when you want to run tasks concurrently while continuing other tasks in the + * parent fiber. + * + * The forked fiber is attached to the parent fiber's scope. This means that + * when the parent fiber terminates, the child fiber will also be terminated + * automatically. This feature, known as "auto supervision," ensures that no + * fibers are left running unintentionally. If you prefer not to have this auto + * supervision behavior, you can use {@link forkDaemon} or {@link forkIn}. + * + * **When to Use** + * + * Use this function when you need to run an effect concurrently without + * blocking the current execution flow. For example, you might use it to launch + * background tasks or concurrent computations. However, working with fibers can + * be complex, so before using this function directly, you might want to explore + * higher-level functions like {@link raceWith}, {@link zip}, or others that can + * manage concurrency for you. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const fib = (n: number): Effect.Effect => + * n < 2 + * ? Effect.succeed(n) + * : Effect.zipWith(fib(n - 1), fib(n - 2), (a, b) => a + b) + * + * // ┌─── Effect, never, never> + * // ▼ + * const fib10Fiber = Effect.fork(fib(10)) + * ``` + * + * @see {@link forkWithErrorHandler} for a version that allows you to handle errors. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +export const fork = fiberRuntime.fork; +/** + * Creates a long-running background fiber that is independent of its parent. + * + * **Details** + * + * This function creates a "daemon" fiber that runs in the background and is not + * tied to the lifecycle of its parent fiber. Unlike normal fibers that stop + * when the parent fiber terminates, a daemon fiber will continue running until + * the global scope closes or the fiber completes naturally. This makes it + * useful for tasks that need to run in the background independently, such as + * periodic logging, monitoring, or background data processing. + * + * **Example** (Creating a Daemon Fiber) + * + * ```ts + * import { Effect, Console, Schedule } from "effect" + * + * // Daemon fiber that logs a message repeatedly every second + * const daemon = Effect.repeat( + * Console.log("daemon: still running!"), + * Schedule.fixed("1 second") + * ) + * + * const parent = Effect.gen(function* () { + * console.log("parent: started!") + * // Daemon fiber running independently + * yield* Effect.forkDaemon(daemon) + * yield* Effect.sleep("3 seconds") + * console.log("parent: finished!") + * }) + * + * Effect.runFork(parent) + * // Output: + * // parent: started! + * // daemon: still running! + * // daemon: still running! + * // daemon: still running! + * // parent: finished! + * // daemon: still running! + * // daemon: still running! + * // daemon: still running! + * // daemon: still running! + * // daemon: still running! + * // ...etc... + * ``` + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +export const forkDaemon = fiberRuntime.forkDaemon; +/** + * Returns an effect that forks all of the specified values, and returns a + * composite fiber that produces a list of their results, in order. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +export const forkAll = circular.forkAll; +/** + * Forks an effect in a specific scope, allowing finer control over its + * execution. + * + * **Details** + * + * There are some cases where we need more fine-grained control, so we want to + * fork a fiber in a specific scope. We can use the `Effect.forkIn` operator + * which takes the target scope as an argument. + * + * The fiber will be interrupted when the scope is closed. + * + * **Example** (Forking a Fiber in a Specific Scope) + * + * In this example, the child fiber is forked into the outerScope, + * allowing it to outlive the inner scope but still be terminated + * when the outerScope is closed. + * + * ```ts + * import { Console, Effect, Schedule } from "effect" + * + * // Child fiber that logs a message repeatedly every second + * const child = Effect.repeat( + * Console.log("child: still running!"), + * Schedule.fixed("1 second") + * ) + * + * const program = Effect.scoped( + * Effect.gen(function* () { + * yield* Effect.addFinalizer(() => + * Console.log("The outer scope is about to be closed!") + * ) + * + * // Capture the outer scope + * const outerScope = yield* Effect.scope + * + * // Create an inner scope + * yield* Effect.scoped( + * Effect.gen(function* () { + * yield* Effect.addFinalizer(() => + * Console.log("The inner scope is about to be closed!") + * ) + * // Fork the child fiber in the outer scope + * yield* Effect.forkIn(child, outerScope) + * yield* Effect.sleep("3 seconds") + * }) + * ) + * + * yield* Effect.sleep("5 seconds") + * }) + * ) + * + * Effect.runFork(program) + * // Output: + * // child: still running! + * // child: still running! + * // child: still running! + * // The inner scope is about to be closed! + * // child: still running! + * // child: still running! + * // child: still running! + * // child: still running! + * // child: still running! + * // child: still running! + * // The outer scope is about to be closed! + * ``` + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +export const forkIn = circular.forkIn; +/** + * Forks a fiber in a local scope, ensuring it outlives its parent. + * + * **Details** + * + * This function is used to create fibers that are tied to a local scope, + * meaning they are not dependent on their parent fiber's lifecycle. Instead, + * they will continue running until the scope they were created in is closed. + * This is particularly useful when you need a fiber to run independently of the + * parent fiber, but still want it to be terminated when the scope ends. + * + * Fibers created with this function are isolated from the parent fiber’s + * termination, so they can run for a longer period. This behavior is different + * from fibers created with {@link fork}, which are terminated when the parent fiber + * terminates. With `forkScoped`, the child fiber will keep running until the + * local scope ends, regardless of the state of the parent fiber. + * + * **Example** (Forking a Fiber in a Local Scope) + * + * In this example, the child fiber continues to run beyond the lifetime of the parent fiber. + * The child fiber is tied to the local scope and will be terminated only when the scope ends. + * + * ```ts + * import { Effect, Console, Schedule } from "effect" + * + * // Child fiber that logs a message repeatedly every second + * const child = Effect.repeat( + * Console.log("child: still running!"), + * Schedule.fixed("1 second") + * ) + * + * // ┌─── Effect + * // ▼ + * const parent = Effect.gen(function* () { + * console.log("parent: started!") + * // Child fiber attached to local scope + * yield* Effect.forkScoped(child) + * yield* Effect.sleep("3 seconds") + * console.log("parent: finished!") + * }) + * + * // Program runs within a local scope + * const program = Effect.scoped( + * Effect.gen(function* () { + * console.log("Local scope started!") + * yield* Effect.fork(parent) + * // Scope lasts for 5 seconds + * yield* Effect.sleep("5 seconds") + * console.log("Leaving the local scope!") + * }) + * ) + * + * Effect.runFork(program) + * // Output: + * // Local scope started! + * // parent: started! + * // child: still running! + * // child: still running! + * // child: still running! + * // parent: finished! + * // child: still running! + * // child: still running! + * // Leaving the local scope! + * ``` + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +export const forkScoped = circular.forkScoped; +/** + * Like {@link fork} but handles an error with the provided handler. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +export const forkWithErrorHandler = fiberRuntime.forkWithErrorHandler; +/** + * Creates an `Effect` value that represents the exit value of the specified + * fiber. + * + * @see {@link fromFiberEffect} for creating an effect from a fiber obtained from an effect. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +export const fromFiber = circular.fromFiber; +/** + * Creates an `Effect` value that represents the exit value of a fiber obtained + * from an effect. + * + * @see {@link fromFiber} for creating an effect from a fiber. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +export const fromFiberEffect = circular.fromFiberEffect; +/** + * Supervises child fibers by reporting them to a specified supervisor. + * + * **Details** + * + * This function takes a supervisor as an argument and returns an effect where + * all child fibers forked within it are supervised by the provided supervisor. + * This enables you to capture detailed information about these child fibers, + * such as their status, through the supervisor. + * + * **Example** (Monitoring Fiber Count) + * + * ```ts + * import { Effect, Supervisor, Schedule, Fiber, FiberStatus } from "effect" + * + * // Main program that monitors fibers while calculating a Fibonacci number + * const program = Effect.gen(function* () { + * // Create a supervisor to track child fibers + * const supervisor = yield* Supervisor.track + * + * // Start a Fibonacci calculation, supervised by the supervisor + * const fibFiber = yield* fib(20).pipe( + * Effect.supervised(supervisor), + * // Fork the Fibonacci effect into a fiber + * Effect.fork + * ) + * + * // Define a schedule to periodically monitor the fiber count every 500ms + * const policy = Schedule.spaced("500 millis").pipe( + * Schedule.whileInputEffect((_) => + * Fiber.status(fibFiber).pipe( + * // Continue while the Fibonacci fiber is not done + * Effect.andThen((status) => status !== FiberStatus.done) + * ) + * ) + * ) + * + * // Start monitoring the fibers, using the supervisor to track the count + * const monitorFiber = yield* monitorFibers(supervisor).pipe( + * // Repeat the monitoring according to the schedule + * Effect.repeat(policy), + * // Fork the monitoring into its own fiber + * Effect.fork + * ) + * + * // Join the monitor and Fibonacci fibers to ensure they complete + * yield* Fiber.join(monitorFiber) + * const result = yield* Fiber.join(fibFiber) + * + * console.log(`fibonacci result: ${result}`) + * }) + * + * // Function to monitor and log the number of active fibers + * const monitorFibers = ( + * supervisor: Supervisor.Supervisor>> + * ): Effect.Effect => + * Effect.gen(function* () { + * const fibers = yield* supervisor.value // Get the current set of fibers + * console.log(`number of fibers: ${fibers.length}`) + * }) + * + * // Recursive Fibonacci calculation, spawning fibers for each recursive step + * const fib = (n: number): Effect.Effect => + * Effect.gen(function* () { + * if (n <= 1) { + * return 1 + * } + * yield* Effect.sleep("500 millis") // Simulate work by delaying + * + * // Fork two fibers for the recursive Fibonacci calls + * const fiber1 = yield* Effect.fork(fib(n - 2)) + * const fiber2 = yield* Effect.fork(fib(n - 1)) + * + * // Join the fibers to retrieve their results + * const v1 = yield* Fiber.join(fiber1) + * const v2 = yield* Fiber.join(fiber2) + * + * return v1 + v2 // Combine the results + * }) + * + * Effect.runPromise(program) + * // Output: + * // number of fibers: 0 + * // number of fibers: 2 + * // number of fibers: 6 + * // number of fibers: 14 + * // number of fibers: 30 + * // number of fibers: 62 + * // number of fibers: 126 + * // number of fibers: 254 + * // number of fibers: 510 + * // number of fibers: 1022 + * // number of fibers: 2034 + * // number of fibers: 3795 + * // number of fibers: 5810 + * // number of fibers: 6474 + * // number of fibers: 4942 + * // number of fibers: 2515 + * // number of fibers: 832 + * // number of fibers: 170 + * // number of fibers: 18 + * // number of fibers: 0 + * // fibonacci result: 10946 + * ``` + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +export const supervised = circular.supervised; +/** + * Transplants specified effects so that when those effects fork other + * effects, the forked effects will be governed by the scope of the fiber that + * executes this effect. + * + * This can be used to "graft" deep grandchildren onto a higher-level scope, + * effectively extending their lifespans into the parent scope. + * + * @since 2.0.0 + * @category Supervision & Fibers + */ +export const transplant = core.transplant; +/** + * @since 2.0.0 + * @category Supervision & Fibers + */ +export const withConcurrency = core.withConcurrency; +/** + * Sets the provided scheduler for usage in the wrapped effect + * + * @since 2.0.0 + * @category Scheduler + */ +export const withScheduler = Scheduler.withScheduler; +/** + * Sets the scheduling priority used when yielding + * + * @since 2.0.0 + * @category Scheduler + */ +export const withSchedulingPriority = core.withSchedulingPriority; +/** + * Sets the maximum number of operations before yield by the default schedulers + * + * @since 2.0.0 + * @category Scheduler + */ +export const withMaxOpsBeforeYield = core.withMaxOpsBeforeYield; +/** + * Retrieves the `Clock` service from the context. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const program = Effect.gen(function*() { + * const clock = yield* Effect.clock + * const currentTime = yield* clock.currentTimeMillis + * console.log(`Current time in milliseconds: ${currentTime}`) + * }) + * + * Effect.runFork(program) + * // Example Output: + * // Current time in milliseconds: 1735484796134 + * ``` + * + * @since 2.0.0 + * @category Clock + */ +export const clock = effect.clock; +/** + * Retrieves the `Clock` service from the context and provides it to the + * specified effectful function. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * const program = Effect.clockWith((clock) => + * clock.currentTimeMillis.pipe( + * Effect.map((currentTime) => `Current time is: ${currentTime}`), + * Effect.tap(Console.log) + * ) + * ) + * + * Effect.runFork(program) + * // Example Output: + * // Current time is: 1735484929744 + * ``` + * + * @since 2.0.0 + * @category Clock + */ +export const clockWith = effect.clockWith; +/** + * Sets the implementation of the `Clock` service to the specified value and + * restores it to its original value when the scope is closed. + * + * @since 2.0.0 + * @category Clock + */ +export const withClockScoped = fiberRuntime.withClockScoped; +/** + * Executes the specified workflow with the specified implementation of the + * `Clock` service. + * + * @since 2.0.0 + * @category Clock + */ +export const withClock = defaultServices.withClock; +/** + * Retreives the `Console` service from the context + * + * @since 2.0.0 + * @category Console + */ +export const console = console_.console; +/** + * Retreives the `Console` service from the context and provides it to the + * specified effectful function. + * + * @since 2.0.0 + * @category Console + */ +export const consoleWith = console_.consoleWith; +/** + * Sets the implementation of the console service to the specified value and + * restores it to its original value when the scope is closed. + * + * @since 2.0.0 + * @category Creating Effects + */ +export const withConsoleScoped = console_.withConsoleScoped; +/** + * Executes the specified workflow with the specified implementation of the + * console service. + * + * @since 2.0.0 + * @category Console + */ +export const withConsole = console_.withConsole; +/** + * Delays the execution of an effect by a specified `Duration`. + * + * **Details + * + * This function postpones the execution of the provided effect by the specified + * duration. The duration can be provided in various formats supported by the + * `Duration` module. + * + * Internally, this function does not block the thread; instead, it uses an + * efficient, non-blocking mechanism to introduce the delay. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * const task = Console.log("Task executed") + * + * const program = Console.log("start").pipe( + * Effect.andThen( + * // Delays the log message by 2 seconds + * task.pipe(Effect.delay("2 seconds")) + * ) + * ) + * + * Effect.runFork(program) + * // Output: + * // start + * // Task executed + * ``` + * + * @since 2.0.0 + * @category Delays & Timeouts + */ +export const delay = effect.delay; +/** + * Suspends the execution of an effect for a specified `Duration`. + * + * **Details** + * + * This function pauses the execution of an effect for a given duration. It is + * asynchronous, meaning that it does not block the fiber executing the effect. + * Instead, the fiber is suspended during the delay period and can resume once + * the specified time has passed. + * + * The duration can be specified using various formats supported by the + * `Duration` module, such as a string (`"2 seconds"`) or numeric value + * representing milliseconds. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const program = Effect.gen(function*() { + * console.log("Starting task...") + * yield* Effect.sleep("3 seconds") // Waits for 3 seconds + * console.log("Task completed!") + * }) + * + * Effect.runFork(program) + * // Output: + * // Starting task... + * // Task completed! + * ``` + * + * @since 2.0.0 + * @category Delays & Timeouts + */ +export const sleep = effect.sleep; +/** + * Executes an effect and measures the time it takes to complete. + * + * **Details** + * + * This function wraps the provided effect and returns a new effect that, when + * executed, performs the original effect and calculates its execution duration. + * + * The result of the new effect includes both the execution time (as a + * `Duration`) and the original effect's result. This is useful for monitoring + * performance or gaining insights into the time taken by specific operations. + * + * The original effect's behavior (success, failure, or interruption) remains + * unchanged, and the timing information is provided alongside the result in a + * tuple. + * + * **Example** + * + * ```ts + * import { Duration, Effect } from "effect" + * + * const task = Effect.gen(function*() { + * yield* Effect.sleep("2 seconds") // Simulates some work + * return "some result" + * }) + * + * const timedTask = task.pipe(Effect.timed) + * + * const program = Effect.gen(function*() { + * const [duration, result] = yield* timedTask + * console.log(`Task completed in ${Duration.toMillis(duration)} ms with result: ${result}`) + * }) + * + * Effect.runFork(program) + * // Output: Task completed in 2003.749125 ms with result: some result + * ``` + * + * @since 2.0.0 + * @category Delays & Timeouts + */ +export const timed = effect.timed; +/** + * Executes an effect and measures its execution time using a custom clock. + * + * **Details** + * + * This function extends the functionality of {@link timed} by allowing you to + * specify a custom clock for measuring the execution duration. The provided + * effect (`nanoseconds`) represents the clock and should return the current + * time in nanoseconds. The timing information is computed using this custom + * clock instead of the default system clock. + * + * @since 2.0.0 + * @category Delays & Timeouts + */ +export const timedWith = effect.timedWith; +/** + * Adds a time limit to an effect, triggering a timeout if the effect exceeds + * the duration. + * + * **Details** + * + * This function allows you to enforce a time limit on the execution of an + * effect. If the effect does not complete within the given duration, it fails + * with a `TimeoutException`. This is useful for preventing tasks from hanging + * indefinitely, especially in scenarios where responsiveness or resource limits + * are critical. + * + * The returned effect will either: + * - Succeed with the original effect's result if it completes within the + * specified duration. + * - Fail with a `TimeoutException` if the time limit is exceeded. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const task = Effect.gen(function* () { + * console.log("Start processing...") + * yield* Effect.sleep("2 seconds") // Simulates a delay in processing + * console.log("Processing complete.") + * return "Result" + * }) + * + * // Output will show a TimeoutException as the task takes longer + * // than the specified timeout duration + * const timedEffect = task.pipe(Effect.timeout("1 second")) + * + * Effect.runPromiseExit(timedEffect).then(console.log) + * // Output: + * // Start processing... + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { + * // _id: 'Cause', + * // _tag: 'Fail', + * // failure: { _tag: 'TimeoutException' } + * // } + * // } + * ``` + * + * @see {@link timeoutFail} for a version that raises a custom error. + * @see {@link timeoutFailCause} for a version that raises a custom defect. + * @see {@link timeoutTo} for a version that allows specifying both success and + * timeout handlers. + * + * @since 2.0.0 + * @category Delays & Timeouts + */ +export const timeout = circular.timeout; +/** + * Gracefully handles timeouts by returning an `Option` that represents either + * the result or a timeout. + * + * **Details** + * + * This function wraps the outcome of an effect in an `Option` type. If the + * effect completes within the specified duration, it returns a `Some` + * containing the result. If the effect times out, it returns a `None`. Unlike + * other timeout methods, this approach does not raise errors or exceptions; + * instead, it allows you to treat timeouts as a regular outcome, simplifying + * the logic for handling delays. + * + * **When to Use** + * + * This is useful when you want to handle timeouts without causing the program + * to fail, making it easier to manage situations where you expect tasks might + * take too long but want to continue executing other tasks. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const task = Effect.gen(function* () { + * console.log("Start processing...") + * yield* Effect.sleep("2 seconds") // Simulates a delay in processing + * console.log("Processing complete.") + * return "Result" + * }) + * + * const timedOutEffect = Effect.all([ + * task.pipe(Effect.timeoutOption("3 seconds")), + * task.pipe(Effect.timeoutOption("1 second")) + * ]) + * + * Effect.runPromise(timedOutEffect).then(console.log) + * // Output: + * // Start processing... + * // Processing complete. + * // Start processing... + * // [ + * // { _id: 'Option', _tag: 'Some', value: 'Result' }, + * // { _id: 'Option', _tag: 'None' } + * // ] + * ``` + * + * @see {@link timeout} for a version that raises a `TimeoutException`. + * @see {@link timeoutFail} for a version that raises a custom error. + * @see {@link timeoutFailCause} for a version that raises a custom defect. + * @see {@link timeoutTo} for a version that allows specifying both success and + * timeout handlers. + * + * @since 3.1.0 + * @category Delays & Timeouts + */ +export const timeoutOption = circular.timeoutOption; +/** + * Specifies a custom error to be produced when a timeout occurs. + * + * **Details** + * + * This function allows you to handle timeouts in a customized way by defining a + * specific error to be raised when an effect exceeds the given duration. Unlike + * default timeout behaviors that use generic exceptions, this function gives + * you the flexibility to specify a meaningful error type that aligns with your + * application's needs. + * + * When you apply this function, you provide: + * - A `duration`: The time limit for the effect. + * - An `onTimeout` function: A lazy evaluation function that generates the + * custom error if the timeout occurs. + * + * If the effect completes within the time limit, its result is returned + * normally. Otherwise, the `onTimeout` function is triggered, and its output is + * used as the error for the effect. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const task = Effect.gen(function* () { + * console.log("Start processing...") + * yield* Effect.sleep("2 seconds") // Simulates a delay in processing + * console.log("Processing complete.") + * return "Result" + * }) + * + * class MyTimeoutError { + * readonly _tag = "MyTimeoutError" + * } + * + * const program = task.pipe( + * Effect.timeoutFail({ + * duration: "1 second", + * onTimeout: () => new MyTimeoutError() // Custom timeout error + * }) + * ) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // Start processing... + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { + * // _id: 'Cause', + * // _tag: 'Fail', + * // failure: MyTimeoutError { _tag: 'MyTimeoutError' } + * // } + * // } + * ``` + * + * @see {@link timeout} for a version that raises a `TimeoutException`. + * @see {@link timeoutFailCause} for a version that raises a custom defect. + * @see {@link timeoutTo} for a version that allows specifying both success and + * timeout handlers. + * + * @since 2.0.0 + * @category Delays & Timeouts + */ +export const timeoutFail = circular.timeoutFail; +/** + * Specifies a custom defect to be thrown when a timeout occurs. + * + * **Details** + * + * This function allows you to handle timeouts as exceptional cases by + * generating a custom defect when an effect exceeds the specified duration. You + * provide: + * - A `duration`: The time limit for the effect. + * - An `onTimeout` function: A lazy evaluation function that generates the + * custom defect (typically created using `Cause.die`). + * + * If the effect completes within the time limit, its result is returned + * normally. Otherwise, the custom defect is triggered, and the effect fails + * with that defect. + * + * **When to Use** + * + * This is especially useful when you need to treat timeouts as critical + * failures in your application and wish to include meaningful information in + * the defect. + * + * **Example** + * + * ```ts + * import { Effect, Cause } from "effect" + * + * const task = Effect.gen(function* () { + * console.log("Start processing...") + * yield* Effect.sleep("2 seconds") // Simulates a delay in processing + * console.log("Processing complete.") + * return "Result" + * }) + * + * const program = task.pipe( + * Effect.timeoutFailCause({ + * duration: "1 second", + * onTimeout: () => Cause.die("Timed out!") // Custom defect for timeout + * }) + * ) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // Start processing... + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { _id: 'Cause', _tag: 'Die', defect: 'Timed out!' } + * // } + * ``` + * + * @see {@link timeout} for a version that raises a `TimeoutException`. + * @see {@link timeoutFail} for a version that raises a custom error. + * @see {@link timeoutTo} for a version that allows specifying both success and + * timeout handlers. + * + * @since 2.0.0 + * @category Delays & Timeouts + */ +export const timeoutFailCause = circular.timeoutFailCause; +/** + * Provides custom behavior for successful and timed-out operations. + * + * **Details** + * + * This function allows you to define distinct outcomes for an effect depending + * on whether it completes within a specified time frame or exceeds the timeout + * duration. You can provide: + * - `onSuccess`: A handler for processing the result of the effect if it + * completes successfully within the time limit. + * - `onTimeout`: A handler for generating a result when the effect times out. + * - `duration`: The maximum allowed time for the effect to complete. + * + * **When to Use** + * + * Unlike {@link timeout}, which raises an exception for timeouts, this function + * gives you full control over the behavior for both success and timeout + * scenarios. It is particularly useful when you want to encapsulate timeouts + * and successes into a specific data structure, like an `Either` type, to + * represent these outcomes in a meaningful way. + * + * **Example** + * + * ```ts + * import { Effect, Either } from "effect" + * + * const task = Effect.gen(function* () { + * console.log("Start processing...") + * yield* Effect.sleep("2 seconds") // Simulates a delay in processing + * console.log("Processing complete.") + * return "Result" + * }) + * + * const program = task.pipe( + * Effect.timeoutTo({ + * duration: "1 second", + * onSuccess: (result): Either.Either => + * Either.right(result), + * onTimeout: (): Either.Either => + * Either.left("Timed out!") + * }) + * ) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // Start processing... + * // { + * // _id: "Either", + * // _tag: "Left", + * // left: "Timed out!" + * // } + * ``` + * + * @see {@link timeout} for a version that raises a `TimeoutException`. + * @see {@link timeoutFail} for a version that raises a custom error. + * @see {@link timeoutFailCause} for a version that raises a custom defect. + * + * @since 2.0.0 + * @category Delays & Timeouts + */ +export const timeoutTo = circular.timeoutTo; +/** + * Allows working with the default configuration provider. + * + * **Details** + * + * This function retrieves the default configuration provider and passes it to + * the provided function, which can use it to perform computations or retrieve + * configuration values. The function can return an effect that leverages the + * configuration provider for its operations. + * + * @since 2.0.0 + * @category Config + */ +export const configProviderWith = defaultServices.configProviderWith; +/** + * Executes an effect using a specific configuration provider. + * + * **Details** + * + * This function lets you run an effect with a specified configuration provider. + * The custom provider will override the default configuration provider for the + * duration of the effect's execution. + * + * **When to Use** + * + * This is particularly useful when you need to use a different set of + * configuration values or sources for specific parts of your application. + * + * **Example** + * + * ```ts + * import { Config, ConfigProvider, Effect } from "effect" + * + * const customProvider: ConfigProvider.ConfigProvider = ConfigProvider.fromMap( + * new Map([["custom-key", "custom-value"]]) + * ) + * + * const program = Effect.withConfigProvider(customProvider)( + * Effect.gen(function*() { + * const value = yield* Config.string("custom-key") + * console.log(`Config value: ${value}`) + * }) + * ) + * + * Effect.runPromise(program) + * // Output: + * // Config value: custom-value + * ``` + * + * @since 2.0.0 + * @category Config + */ +export const withConfigProvider = defaultServices.withConfigProvider; +/** + * Sets a configuration provider within a scope. + * + * **Details** + * + * This function sets the configuration provider to a specified value and + * ensures that it is restored to its original value when the scope is closed. + * + * @since 2.0.0 + * @category Config + */ +export const withConfigProviderScoped = fiberRuntime.withConfigProviderScoped; +/** + * Accesses the full context of the effect. + * + * **Details** + * + * This function provides the ability to access the entire context required by + * an effect. The context is a container that holds dependencies or environment + * values needed by an effect to run. By using this function, you can retrieve + * and work with the context directly within an effect. + * + * @since 2.0.0 + * @category Context + */ +export const context = core.context; +/** + * Accesses the context and applies a transformation function. + * + * **Details** + * + * This function retrieves the context of the effect and applies a pure + * transformation function to it. The result of the transformation is then + * returned within the effect. + * + * @see {@link contextWithEffect} for a version that allows effectful transformations. + * + * @since 2.0.0 + * @category Context + */ +export const contextWith = effect.contextWith; +/** + * Accesses the context and performs an effectful transformation. + * + * **Details** + * + * This function retrieves the context and allows you to transform it + * effectually using another effect. It is useful when the transformation + * involves asynchronous or effectful operations. + * + * @see {@link contextWith} for a version that allows pure transformations. + * + * @since 2.0.0 + * @category Context + */ +export const contextWithEffect = core.contextWithEffect; +/** + * Provides part of the required context while leaving the rest unchanged. + * + * **Details** + * + * This function allows you to transform the context required by an effect, + * providing part of the context and leaving the rest to be fulfilled later. + * + * **Example** + * + * ```ts + * import { Context, Effect } from "effect" + * + * class Service1 extends Context.Tag("Service1")() {} + * class Service2 extends Context.Tag("Service2")() {} + * + * const program = Effect.gen(function*() { + * const service1 = yield* Service1 + * console.log(service1.port) + * const service2 = yield* Service2 + * console.log(service2.connection) + * return "some result" + * }) + * + * // ┌─── Effect + * // ▼ + * const programWithService1 = Effect.mapInputContext( + * program, + * (ctx: Context.Context) => Context.add(ctx, Service1, { port: 3000 }) + * ) + * + * const runnable = programWithService1.pipe( + * Effect.provideService(Service2, { connection: "localhost" }), + * Effect.provideService(Service1, { port: 3001 }) + * ) + * + * Effect.runPromise(runnable) + * // Output: + * // 3000 + * // localhost + * ``` + * + * @since 2.0.0 + * @category Context + */ +export const mapInputContext = core.mapInputContext; +/** + * Provides necessary dependencies to an effect, removing its environmental + * requirements. + * + * **Details** + * + * This function allows you to supply the required environment for an effect. + * The environment can be provided in the form of one or more `Layer`s, a + * `Context`, a `Runtime`, or a `ManagedRuntime`. Once the environment is + * provided, the effect can run without requiring external dependencies. + * + * You can compose layers to create a modular and reusable way of setting up the + * environment for effects. For example, layers can be used to configure + * databases, logging services, or any other required dependencies. + * + * **Example** + * + * ```ts + * import { Context, Effect, Layer } from "effect" + * + * class Database extends Context.Tag("Database")< + * Database, + * { readonly query: (sql: string) => Effect.Effect> } + * >() {} + * + * const DatabaseLive = Layer.succeed( + * Database, + * { + * // Simulate a database query + * query: (sql: string) => Effect.log(`Executing query: ${sql}`).pipe(Effect.as([])) + * } + * ) + * + * // ┌─── Effect + * // ▼ + * const program = Effect.gen(function*() { + * const database = yield* Database + * const result = yield* database.query("SELECT * FROM users") + * return result + * }) + * + * // ┌─── Effect + * // ▼ + * const runnable = Effect.provide(program, DatabaseLive) + * + * Effect.runPromise(runnable).then(console.log) + * // Output: + * // timestamp=... level=INFO fiber=#0 message="Executing query: SELECT * FROM users" + * // [] + * ``` + * + * @see {@link provideService} for providing a service to an effect. + * + * @since 2.0.0 + * @category Context + */ +export const provide = layer.effect_provide; +/** + * Provides an implementation for a service in the context of an effect. + * + * **Details** + * + * This function allows you to supply a specific implementation for a service + * required by an effect. Services are typically defined using `Context.Tag`, + * which acts as a unique identifier for the service. By using this function, + * you link the service to its concrete implementation, enabling the effect to + * execute successfully without additional requirements. + * + * For example, you can use this function to provide a random number generator, + * a logger, or any other service your effect depends on. Once the service is + * provided, all parts of the effect that rely on the service will automatically + * use the implementation you supplied. + * + * **Example** + * + * ```ts + * import { Effect, Context } from "effect" + * + * // Declaring a tag for a service that generates random numbers + * class Random extends Context.Tag("MyRandomService")< + * Random, + * { readonly next: Effect.Effect } + * >() {} + * + * // Using the service + * const program = Effect.gen(function* () { + * const random = yield* Random + * const randomNumber = yield* random.next + * console.log(`random number: ${randomNumber}`) + * }) + * + * // Providing the implementation + * // + * // ┌─── Effect + * // ▼ + * const runnable = Effect.provideService(program, Random, { + * next: Effect.sync(() => Math.random()) + * }) + * + * // Run successfully + * Effect.runPromise(runnable) + * // Example Output: + * // random number: 0.8241872233134417 + * ``` + * + * @see {@link provide} for providing multiple layers to an effect. + * + * @since 2.0.0 + * @category Context + */ +export const provideService = effect.provideService; +/** + * Dynamically provides an implementation for a service using an effect. + * + * **Details** + * + * This function allows you to provide an implementation for a service + * dynamically by using another effect. The provided effect is executed to + * produce the service implementation, which is then made available to the + * consuming effect. This is particularly useful when the service implementation + * itself requires asynchronous or resource-intensive initialization. + * + * For example, you can use this function to lazily initialize a database + * connection or fetch configuration values from an external source before + * making the service available to your effect. + * + * @since 2.0.0 + * @category Context + */ +export const provideServiceEffect = effect.provideServiceEffect; +/** + * Creates a function that uses a service from the context to produce a value. + * + * @see {@link serviceFunctionEffect} for a version that returns an effect. + * + * @since 2.0.0 + * @category Context + */ +export const serviceFunction = effect.serviceFunction; +/** + * Creates a function that uses a service from the context to produce an effect. + * + * @see {@link serviceFunction} for a version that returns a value. + * + * @since 2.0.0 + * @category Context + */ +export const serviceFunctionEffect = effect.serviceFunctionEffect; +/** + * @since 2.0.0 + * @category Context + */ +export const serviceFunctions = effect.serviceFunctions; +/** + * @since 2.0.0 + * @category Context + */ +export const serviceConstants = effect.serviceConstants; +/** + * @since 2.0.0 + * @category Context + */ +export const serviceMembers = effect.serviceMembers; +/** + * Retrieves an optional service from the context as an `Option`. + * + * **Details** + * + * This function retrieves a service from the context and wraps it in an + * `Option`. If the service is available, it returns a `Some` containing the + * service. If the service is not found, it returns a `None`. This approach is + * useful when you want to handle the absence of a service gracefully without + * causing an error. + * + * **When to Use** + * + * Use this function when: + * - You need to access a service that may or may not be present in the context. + * - You want to handle the absence of a service using the `Option` type instead + * of throwing an error. + * + * @see {@link serviceOptional} for a version that throws an error if the service is missing. + * + * @since 2.0.0 + * @category Context + */ +export const serviceOption = effect.serviceOption; +/** + * Retrieves a service from the context, throwing an error if it is missing. + * + * **Details** + * + * This function retrieves a required service from the context. If the service + * is available, it returns the service. If the service is missing, it throws a + * `NoSuchElementException`, which can be handled using Effect's error-handling + * mechanisms. This is useful for services that are critical to the execution of + * your effect. + * + * @see {@link serviceOption} for a version that returns an `Option` instead of throwing an error. + * + * @since 2.0.0 + * @category Context + */ +export const serviceOptional = effect.serviceOptional; +/** + * Updates a service in the context with a new implementation. + * + * **Details** + * + * This function modifies the existing implementation of a service in the + * context. It retrieves the current service, applies the provided + * transformation function `f`, and replaces the old service with the + * transformed one. + * + * **When to Use** + * + * This is useful for adapting or extending a service's behavior during the + * execution of an effect. + * + * @since 2.0.0 + * @category Context + */ +export const updateService = effect.updateService; +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Effect` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * + * **Example** + * + * ```ts + * import * as assert from "node:assert" + * import { Effect, pipe } from "effect" + * + * const result = pipe( + * Effect.Do, + * Effect.bind("x", () => Effect.succeed(2)), + * Effect.bind("y", () => Effect.succeed(3)), + * Effect.let("sum", ({ x, y }) => x + y) + * ) + * assert.deepStrictEqual(Effect.runSync(result), { x: 2, y: 3, sum: 5 }) + * ``` + * + * @see {@link bind} + * @see {@link bindTo} + * @see {@link let_ let} + * + * @category Do notation + * @since 2.0.0 + */ +export const Do = effect.Do; +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Effect` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * + * **Example** + * + * ```ts + * import * as assert from "node:assert" + * import { Effect, pipe } from "effect" + * + * const result = pipe( + * Effect.Do, + * Effect.bind("x", () => Effect.succeed(2)), + * Effect.bind("y", () => Effect.succeed(3)), + * Effect.let("sum", ({ x, y }) => x + y) + * ) + * assert.deepStrictEqual(Effect.runSync(result), { x: 2, y: 3, sum: 5 }) + * ``` + * + * @see {@link Do} + * @see {@link bindTo} + * @see {@link let_ let} + * + * @category Do notation + * @since 2.0.0 + */ +export const bind = effect.bind; +/** + * `bindAll` combines `all` with `bind`. It is useful + * when you want to concurrently run multiple effects and then combine their + * results in a Do notation pipeline. + * + * **Example** + * + * ```ts + * import * as assert from "node:assert" + * import { Effect, Either, pipe } from "effect" + * + * const result = pipe( + * Effect.Do, + * Effect.bind("x", () => Effect.succeed(2)), + * Effect.bindAll(({ x }) => ({ + * a: Effect.succeed(x), + * b: Effect.fail("oops"), + * }), { concurrency: 2, mode: "either" }) + * ) + * assert.deepStrictEqual(Effect.runSync(result), { x: 2, a: Either.right(2), b: Either.left("oops") }) + * ``` + * + * @category Do notation + * @since 3.7.0 + */ +export const bindAll = circular.bindAll; +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Effect` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * + * **Example** + * + * ```ts + * import * as assert from "node:assert" + * import { Effect, pipe } from "effect" + * + * const result = pipe( + * Effect.Do, + * Effect.bind("x", () => Effect.succeed(2)), + * Effect.bind("y", () => Effect.succeed(3)), + * Effect.let("sum", ({ x, y }) => x + y) + * ) + * assert.deepStrictEqual(Effect.runSync(result), { x: 2, y: 3, sum: 5 }) + * ``` + * + * @see {@link Do} + * @see {@link bind} + * @see {@link let_ let} + * + * @category Do notation + * @since 2.0.0 + */ +export const bindTo = effect.bindTo; +const let_ = effect.let_; +export { +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Effect` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * + * **Example** + * + * ```ts + * import * as assert from "node:assert" + * import { Effect, pipe } from "effect" + * + * const result = pipe( + * Effect.Do, + * Effect.bind("x", () => Effect.succeed(2)), + * Effect.bind("y", () => Effect.succeed(3)), + * Effect.let("sum", ({ x, y }) => x + y) + * ) + * assert.deepStrictEqual(Effect.runSync(result), { x: 2, y: 3, sum: 5 }) + * + * ``` + * + * @see {@link Do} + * @see {@link bind} + * @see {@link bindTo} + * + * @category Do notation + * @since 2.0.0 + */ +let_ as let }; +/** + * Encapsulates the result of an effect in an `Option`. + * + * **Details** + * + * This function wraps the outcome of an effect in an `Option` type. If the + * original effect succeeds, the success value is wrapped in `Option.some`. If + * the effect fails, the failure is converted to `Option.none`. + * + * This is particularly useful for scenarios where you want to represent the + * absence of a value explicitly, without causing the resulting effect to fail. + * The resulting effect has an error type of `never`, meaning it cannot fail + * directly. However, unrecoverable errors, also referred to as defects, are + * not captured and will still result in failure. + * + * **Example** (Using Effect.option to Handle Errors) + * + * ```ts + * import { Effect } from "effect" + * + * const maybe1 = Effect.option(Effect.succeed(1)) + * + * Effect.runPromiseExit(maybe1).then(console.log) + * // Output: + * // { + * // _id: 'Exit', + * // _tag: 'Success', + * // value: { _id: 'Option', _tag: 'Some', value: 1 } + * // } + * + * const maybe2 = Effect.option(Effect.fail("Uh oh!")) + * + * Effect.runPromiseExit(maybe2).then(console.log) + * // Output: + * // { + * // _id: 'Exit', + * // _tag: 'Success', + * // value: { _id: 'Option', _tag: 'None' } + * // } + * + * const maybe3 = Effect.option(Effect.die("Boom!")) + * + * Effect.runPromiseExit(maybe3).then(console.log) + * // Output: + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { _id: 'Cause', _tag: 'Die', defect: 'Boom!' } + * // } + * ``` + * + * @see {@link either} for a version that uses `Either` instead. + * @see {@link exit} for a version that encapsulates both recoverable errors and defects in an `Exit`. + * + * @since 2.0.0 + * @category Outcome Encapsulation + */ +export const option = effect.option; +/** + * Encapsulates both success and failure of an `Effect` into an `Either` type. + * + * **Details** + * + * This function converts an effect that may fail into an effect that always + * succeeds, wrapping the outcome in an `Either` type. The result will be + * `Either.Left` if the effect fails, containing the recoverable error, or + * `Either.Right` if it succeeds, containing the result. + * + * Using this function, you can handle recoverable errors explicitly without + * causing the effect to fail. This is particularly useful in scenarios where + * you want to chain effects and manage both success and failure in the same + * logical flow. + * + * It's important to note that unrecoverable errors, often referred to as + * "defects," are still thrown and not captured within the `Either` type. Only + * failures that are explicitly represented as recoverable errors in the effect + * are encapsulated. + * + * The resulting effect cannot fail directly because all recoverable failures + * are represented inside the `Either` type. + * + * **Example** + * + * ```ts + * import { Effect, Either, Random } from "effect" + * + * class HttpError { + * readonly _tag = "HttpError" + * } + * + * class ValidationError { + * readonly _tag = "ValidationError" + * } + * + * // ┌─── Effect + * // ▼ + * const program = Effect.gen(function* () { + * const n1 = yield* Random.next + * const n2 = yield* Random.next + * if (n1 < 0.5) { + * yield* Effect.fail(new HttpError()) + * } + * if (n2 < 0.5) { + * yield* Effect.fail(new ValidationError()) + * } + * return "some result" + * }) + * + * // ┌─── Effect + * // ▼ + * const recovered = Effect.gen(function* () { + * // ┌─── Either + * // ▼ + * const failureOrSuccess = yield* Effect.either(program) + * return Either.match(failureOrSuccess, { + * onLeft: (error) => `Recovering from ${error._tag}`, + * onRight: (value) => value // Do nothing in case of success + * }) + * }) + * ``` + * + * @see {@link option} for a version that uses `Option` instead. + * @see {@link exit} for a version that encapsulates both recoverable errors and defects in an `Exit`. + * + * @since 2.0.0 + * @category Outcome Encapsulation + */ +export const either = core.either; +/** + * Encapsulates both success and failure of an `Effect` using the `Exit` type. + * + * **Details** + * + * This function converts an effect into one that always succeeds, wrapping its + * outcome in the `Exit` type. The `Exit` type provides explicit handling of + * both success (`Exit.Success`) and failure (`Exit.Failure`) cases, including + * defects (unrecoverable errors). + * + * Unlike {@link either} or {@link option}, this function also encapsulates + * defects, which are typically unrecoverable and would otherwise terminate the + * effect. With the `Exit` type, defects are represented in `Exit.Failure`, + * allowing for detailed introspection and structured error handling. + * + * This makes the resulting effect robust and incapable of direct failure (its + * error type is `never`). It is particularly useful for workflows where all + * outcomes, including unexpected defects, must be managed and analyzed. + * + * **Example** + * + * ```ts + * import { Effect, Cause, Console, Exit } from "effect" + * + * // Simulating a runtime error + * const task = Effect.dieMessage("Boom!") + * + * const program = Effect.gen(function* () { + * const exit = yield* Effect.exit(task) + * if (Exit.isFailure(exit)) { + * const cause = exit.cause + * if ( + * Cause.isDieType(cause) && + * Cause.isRuntimeException(cause.defect) + * ) { + * yield* Console.log( + * `RuntimeException defect caught: ${cause.defect.message}` + * ) + * } else { + * yield* Console.log("Unknown failure caught.") + * } + * } + * }) + * + * // We get an Exit.Success because we caught all failures + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // RuntimeException defect caught: Boom! + * // { + * // _id: "Exit", + * // _tag: "Success", + * // value: undefined + * // } + * ``` + * + * @see {@link option} for a version that uses `Option` instead. + * @see {@link either} for a version that uses `Either` instead. + * + * @since 2.0.0 + * @category Outcome Encapsulation + */ +export const exit = core.exit; +/** + * Converts an `Effect` into an operation that completes a `Deferred` with its result. + * + * **Details** + * + * The `intoDeferred` function takes an effect and a `Deferred` and ensures that the `Deferred` + * is completed based on the outcome of the effect. If the effect succeeds, the `Deferred` is + * completed with the success value. If the effect fails, the `Deferred` is completed with the + * failure. Additionally, if the effect is interrupted, the `Deferred` will also be interrupted. + * + * **Example** + * + * ```ts + * import { Deferred, Effect } from "effect" + * + * // Define an effect that succeeds + * const successEffect = Effect.succeed(42) + * + * const program = Effect.gen(function*() { + * // Create a deferred + * const deferred = yield* Deferred.make() + * + * // Complete the deferred using the successEffect + * const isCompleted = yield* Effect.intoDeferred(successEffect, deferred) + * + * // Access the value of the deferred + * const value = yield* Deferred.await(deferred) + * console.log(value) + * + * return isCompleted + * }) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // 42 + * // true + * ``` + * + * @since 2.0.0 + * @category Synchronization Utilities + */ +export const intoDeferred = core.intoDeferred; +const if_ = core.if_; +export { +/** + * Executes one of two effects based on a condition evaluated by an effectful predicate. + * + * Use `if` to run one of two effects depending on whether the predicate effect + * evaluates to `true` or `false`. If the predicate is `true`, the `onTrue` effect + * is executed. If it is `false`, the `onFalse` effect is executed instead. + * + * **Example** (Simulating a Coin Flip) + * + * ```ts + * import { Effect, Random, Console } from "effect" + * + * const flipTheCoin = Effect.if(Random.nextBoolean, { + * onTrue: () => Console.log("Head"), // Runs if the predicate is true + * onFalse: () => Console.log("Tail") // Runs if the predicate is false + * }) + * + * Effect.runFork(flipTheCoin) + * ``` + * + * @since 2.0.0 + * @category Conditional Operators + */ +if_ as if }; +/** + * Filters an effect, dying with a custom defect if the predicate fails. + * + * **Details** + * + * This function applies a predicate to the result of an effect. If the + * predicate evaluates to `false`, the effect dies with a custom defect + * generated by the `orDieWith` function. + * + * **When to Use** + * + * This is useful for enforcing constraints on values and treating violations as + * fatal program errors. + * + * @since 2.0.0 + * @category Filtering + */ +export const filterOrDie = effect.filterOrDie; +/** + * Filters an effect, dying with a custom message if the predicate fails. + * + * **Details** + * + * This function works like {@link filterOrDie} but allows you to specify a + * custom error message to describe the reason for the failure. The message is + * included in the defect when the predicate evaluates to `false`. + * + * @since 2.0.0 + * @category Filtering + */ +export const filterOrDieMessage = effect.filterOrDieMessage; +/** + * Filters an effect, providing an alternative effect if the predicate fails. + * + * **Details** + * + * This function applies a predicate to the result of an effect. If the + * predicate evaluates to `false`, it executes the `orElse` effect instead. The + * `orElse` effect can produce an alternative value or perform additional + * computations. + * + * @since 2.0.0 + * @category Filtering + */ +export const filterOrElse = effect.filterOrElse; +/** + * Filters an effect, failing with a custom error if the predicate fails. + * + * **Details** + * + * This function applies a predicate to the result of an effect. If the + * predicate evaluates to `false`, the effect fails with a custom error + * generated by the `orFailWith` function. + * + * **When to Use** + * + * This is useful for enforcing constraints and treating violations as + * recoverable errors. + * + * **Providing a Guard** + * + * In addition to the filtering capabilities discussed earlier, you have the + * option to further refine and narrow down the type of the success channel by + * providing a [user-defined type + * guard](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates). + * Let's explore this concept through an example: + * + * **Example** + * + * ```ts + * import { Effect, pipe } from "effect" + * + * // Define a user interface + * interface User { + * readonly name: string + * } + * + * // Simulate an asynchronous authentication function + * declare const auth: () => Promise + * + * const program = pipe( + * Effect.promise(() => auth()), + * // Use filterOrFail with a custom type guard to ensure user is not null + * Effect.filterOrFail( + * (user): user is User => user !== null, // Type guard + * () => new Error("Unauthorized") + * ), + * // 'user' now has the type `User` (not `User | null`) + * Effect.andThen((user) => user.name) + * ) + * ``` + * + * @since 2.0.0 + * @category Filtering + */ +export const filterOrFail = effect.filterOrFail; +/** + * Filters an effect with an effectful predicate, falling back to an alternative + * effect if the predicate fails. + * + * **Details** + * + * This function applies a predicate to the result of an effect. If the + * predicate evaluates to `false`, the effect falls back to the `orElse` + * effect. The `orElse` effect can produce an alternative value or perform + * additional computations. + * + * **Example** + * + * ```ts + * import { Effect, pipe } from "effect" + * + * // Define a user interface + * interface User { + * readonly name: string + * } + * + * // Simulate an asynchronous authentication function + * declare const auth: () => Promise + * + * const program = pipe( + * Effect.promise(() => auth()), + * // Use filterEffectOrElse with an effectful predicate + * Effect.filterEffectOrElse({ + * predicate: (user) => Effect.succeed(user !== null), + * orElse: (user) => Effect.fail(new Error(`Unauthorized user: ${user}`)) + * }), + * ) + * ``` + * + * @since 3.13.0 + * @category Filtering + */ +export const filterEffectOrElse = core.filterEffectOrElse; +/** + * Filters an effect with an effectful predicate, failing with a custom error if the predicate fails. + * + * **Details** + * + * This function applies a predicate to the result of an effect. If the + * predicate evaluates to `false`, the effect fails with a custom error + * generated by the `orFailWith` function. + * + * **When to Use** + * + * This is useful for enforcing constraints and treating violations as + * recoverable errors. + * + * **Example** + * + * ```ts + * import { Effect, pipe } from "effect" + * + * // Define a user interface + * interface User { + * readonly name: string + * } + * + * // Simulate an asynchronous authentication function + * declare const auth: () => Promise + * + * const program = pipe( + * Effect.promise(() => auth()), + * // Use filterEffectOrFail with an effectful predicate + * Effect.filterEffectOrFail({ + * predicate: (user) => Effect.succeed(user !== null), + * orFailWith: () => new Error("Unauthorized") + * }), + * ) + * ``` + * + * @since 3.13.0 + * @category Filtering + */ +export const filterEffectOrFail = core.filterEffectOrFail; +/** + * Executes an effect only if the condition is `false`. + * + * @see {@link unlessEffect} for a version that allows the condition to be an effect. + * @see {@link when} for a version that executes the effect when the condition is `true`. + * + * @since 2.0.0 + * @category Conditional Operators + */ +export const unless = effect.unless; +/** + * Conditionally execute an effect based on the result of another effect. + * + * @see {@link unless} for a version that allows the condition to be a boolean. + * @see {@link whenEffect} for a version that executes the effect when the condition is `true`. + * + * @since 2.0.0 + * @category Conditional Operators + */ +export const unlessEffect = effect.unlessEffect; +/** + * Conditionally executes an effect based on a boolean condition. + * + * **Details** + * + * This function allows you to run an effect only if a given condition evaluates + * to `true`. If the condition is `true`, the effect is executed, and its result + * is wrapped in an `Option.some`. If the condition is `false`, the effect is + * skipped, and the result is `Option.none`. + * + * **When to Use** + * + * This function is useful for scenarios where you need to dynamically decide + * whether to execute an effect based on runtime logic, while also representing + * the skipped case explicitly. + * + * **Example** (Conditional Effect Execution) + * + * ```ts + * import { Effect, Option } from "effect" + * + * const validateWeightOption = ( + * weight: number + * ): Effect.Effect> => + * // Conditionally execute the effect if the weight is non-negative + * Effect.succeed(weight).pipe(Effect.when(() => weight >= 0)) + * + * // Run with a valid weight + * Effect.runPromise(validateWeightOption(100)).then(console.log) + * // Output: + * // { + * // _id: "Option", + * // _tag: "Some", + * // value: 100 + * // } + * + * // Run with an invalid weight + * Effect.runPromise(validateWeightOption(-5)).then(console.log) + * // Output: + * // { + * // _id: "Option", + * // _tag: "None" + * // } + * ``` + * + * @see {@link whenEffect} for a version that allows the condition to be an effect. + * @see {@link unless} for a version that executes the effect when the condition is `false`. + * + * @since 2.0.0 + * @category Conditional Operators + */ +export const when = effect.when; +/** + * Conditionally executes an effect based on the result of another effect. + * + * **Details** + * + * This function allows you to run an effect only if a conditional effect + * evaluating to a boolean resolves to `true`. If the conditional effect + * evaluates to `true`, the specified effect is executed, and its result is + * wrapped in `Option.some`. If the conditional effect evaluates to `false`, the + * effect is skipped, and the result is `Option.none`. + * + * **When to Use** + * + * This function is particularly useful when the decision to execute an effect + * depends on the result of another effect, such as a random value, a + * user-provided input, or a network request result. + * + * **Example** (Using an Effect as a Condition) + * + * ```ts + * import { Effect, Random } from "effect" + * + * const randomIntOption = Random.nextInt.pipe( + * Effect.whenEffect(Random.nextBoolean) + * ) + * + * console.log(Effect.runSync(randomIntOption)) + * // Example Output: + * // { _id: 'Option', _tag: 'Some', value: 8609104974198840 } + * ``` + * + * @see {@link when} for a version that allows the condition to be a boolean. + * @see {@link unlessEffect} for a version that executes the effect when the condition is `false`. + * + * @since 2.0.0 + * @category Conditional Operators + */ +export const whenEffect = core.whenEffect; +/** + * Executes an effect conditionally based on the value of a `FiberRef` that + * satisfies a predicate. + * + * **Details** + * + * This function enables you to execute an effect only when the value of a + * specified `FiberRef` meets a certain condition defined by a predicate. If the + * value satisfies the predicate, the effect is executed, and the result is + * wrapped in an `Option.some`. If the predicate is not satisfied, the effect is + * skipped, and the result is `Option.none`. In both cases, the current value of + * the `FiberRef` is included in the result. + * + * @since 2.0.0 + * @category Conditional Operators + */ +export const whenFiberRef = effect.whenFiberRef; +/** + * Executes an effect conditionally based on the value of a `Ref` that satisfies + * a predicate. + * + * **Details** + * + * This function allows you to execute an effect only when the value of a + * specified `Ref` meets a condition defined by a predicate. If the value + * satisfies the predicate, the effect is executed, and the result is wrapped in + * an `Option.some`. If the predicate is not satisfied, the effect is skipped, + * and the result is `Option.none`. In both cases, the current value of the + * `Ref` is included in the result. + * + * @since 2.0.0 + * @category Conditional Operators + */ +export const whenRef = effect.whenRef; +/** + * Chains effects to produce new `Effect` instances, useful for combining + * operations that depend on previous results. + * + * **Syntax** + * + * ```ts skip-type-checking + * const flatMappedEffect = pipe(myEffect, Effect.flatMap(transformation)) + * // or + * const flatMappedEffect = Effect.flatMap(myEffect, transformation) + * // or + * const flatMappedEffect = myEffect.pipe(Effect.flatMap(transformation)) + * ``` + * + * **Details** + * + * `flatMap` lets you sequence effects so that the result of one effect can be + * used in the next step. It is similar to `flatMap` used with arrays but works + * specifically with `Effect` instances, allowing you to avoid deeply nested + * effect structures. + * + * Since effects are immutable, `flatMap` always returns a new effect instead of + * changing the original one. + * + * **When to Use** + * + * Use `flatMap` when you need to chain multiple effects, ensuring that each + * step produces a new `Effect` while flattening any nested effects that may + * occur. + * + * **Example** + * + * ```ts + * import { pipe, Effect } from "effect" + * + * // Function to apply a discount safely to a transaction amount + * const applyDiscount = ( + * total: number, + * discountRate: number + * ): Effect.Effect => + * discountRate === 0 + * ? Effect.fail(new Error("Discount rate cannot be zero")) + * : Effect.succeed(total - (total * discountRate) / 100) + * + * // Simulated asynchronous task to fetch a transaction amount from database + * const fetchTransactionAmount = Effect.promise(() => Promise.resolve(100)) + * + * // Chaining the fetch and discount application using `flatMap` + * const finalAmount = pipe( + * fetchTransactionAmount, + * Effect.flatMap((amount) => applyDiscount(amount, 5)) + * ) + * + * Effect.runPromise(finalAmount).then(console.log) + * // Output: 95 + * ``` + * + * @see {@link tap} for a version that ignores the result of the effect. + * + * @since 2.0.0 + * @category Sequencing + */ +export const flatMap = core.flatMap; +/** + * Chains two actions, where the second action can depend on the result of the + * first. + * + * **Syntax** + * + * ```ts skip-type-checking + * const transformedEffect = pipe(myEffect, Effect.andThen(anotherEffect)) + * // or + * const transformedEffect = Effect.andThen(myEffect, anotherEffect) + * // or + * const transformedEffect = myEffect.pipe(Effect.andThen(anotherEffect)) + * ``` + * + * **When to Use** + * + * Use `andThen` when you need to run multiple actions in sequence, with the + * second action depending on the result of the first. This is useful for + * combining effects or handling computations that must happen in order. + * + * **Details** + * + * The second action can be: + * + * - A constant value (similar to {@link as}) + * - A function returning a value (similar to {@link map}) + * - A `Promise` + * - A function returning a `Promise` + * - An `Effect` + * - A function returning an `Effect` (similar to {@link flatMap}) + * + * **Note:** `andThen` works well with both `Option` and `Either` types, + * treating them as effects. + * + * **Example** (Applying a Discount Based on Fetched Amount) + * + * ```ts + * import { pipe, Effect } from "effect" + * + * // Function to apply a discount safely to a transaction amount + * const applyDiscount = ( + * total: number, + * discountRate: number + * ): Effect.Effect => + * discountRate === 0 + * ? Effect.fail(new Error("Discount rate cannot be zero")) + * : Effect.succeed(total - (total * discountRate) / 100) + * + * // Simulated asynchronous task to fetch a transaction amount from database + * const fetchTransactionAmount = Effect.promise(() => Promise.resolve(100)) + * + * // Using Effect.map and Effect.flatMap + * const result1 = pipe( + * fetchTransactionAmount, + * Effect.map((amount) => amount * 2), + * Effect.flatMap((amount) => applyDiscount(amount, 5)) + * ) + * + * Effect.runPromise(result1).then(console.log) + * // Output: 190 + * + * // Using Effect.andThen + * const result2 = pipe( + * fetchTransactionAmount, + * Effect.andThen((amount) => amount * 2), + * Effect.andThen((amount) => applyDiscount(amount, 5)) + * ) + * + * Effect.runPromise(result2).then(console.log) + * // Output: 190 + * ``` + * + * @since 2.0.0 + * @category Sequencing + */ +export const andThen = core.andThen; +/** + * @since 2.0.0 + * @category Sequencing + */ +export const flatten = core.flatten; +/** + * Races two effects and returns the result of the first successful one. + * + * **Details** + * + * This function takes two effects and runs them concurrently. The first effect + * that successfully completes will determine the result of the race, and the + * other effect will be interrupted. + * + * If neither effect succeeds, the function will fail with a `Cause` + * containing all the errors. + * + * **When to Use** + * + * This is useful when you want to run two effects concurrently, but only care + * about the first one to succeed. It is commonly used in cases like timeouts, + * retries, or when you want to optimize for the faster response without + * worrying about the other effect. + * + * **Handling Success or Failure with Either** + * + * If you want to handle the result of whichever task completes first, whether + * it succeeds or fails, you can use the `Effect.either` function. This function + * wraps the result in an `Either` type, allowing you to see if the result + * was a success (`Right`) or a failure (`Left`). + * + * **Example** (Both Tasks Succeed) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task1 = Effect.succeed("task1").pipe( + * Effect.delay("200 millis"), + * Effect.tap(Console.log("task1 done")), + * Effect.onInterrupt(() => Console.log("task1 interrupted")) + * ) + * const task2 = Effect.succeed("task2").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Console.log("task2 done")), + * Effect.onInterrupt(() => Console.log("task2 interrupted")) + * ) + * + * const program = Effect.race(task1, task2) + * + * Effect.runFork(program) + * // Output: + * // task1 done + * // task2 interrupted + * ``` + * + * **Example** (One Task Fails, One Succeeds) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task1 = Effect.fail("task1").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Console.log("task1 done")), + * Effect.onInterrupt(() => Console.log("task1 interrupted")) + * ) + * const task2 = Effect.succeed("task2").pipe( + * Effect.delay("200 millis"), + * Effect.tap(Console.log("task2 done")), + * Effect.onInterrupt(() => Console.log("task2 interrupted")) + * ) + * + * const program = Effect.race(task1, task2) + * + * Effect.runFork(program) + * // Output: + * // task2 done + * ``` + * + * **Example** (Both Tasks Fail) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task1 = Effect.fail("task1").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Console.log("task1 done")), + * Effect.onInterrupt(() => Console.log("task1 interrupted")) + * ) + * const task2 = Effect.fail("task2").pipe( + * Effect.delay("200 millis"), + * Effect.tap(Console.log("task2 done")), + * Effect.onInterrupt(() => Console.log("task2 interrupted")) + * ) + * + * const program = Effect.race(task1, task2) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { + * // _id: 'Cause', + * // _tag: 'Parallel', + * // left: { _id: 'Cause', _tag: 'Fail', failure: 'task1' }, + * // right: { _id: 'Cause', _tag: 'Fail', failure: 'task2' } + * // } + * // } + * ``` + * + * **Example** (Handling Success or Failure with Either) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task1 = Effect.fail("task1").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Console.log("task1 done")), + * Effect.onInterrupt(() => Console.log("task1 interrupted")) + * ) + * const task2 = Effect.succeed("task2").pipe( + * Effect.delay("200 millis"), + * Effect.tap(Console.log("task2 done")), + * Effect.onInterrupt(() => Console.log("task2 interrupted")) + * ) + * + * // Run both tasks concurrently, wrapping the result + * // in Either to capture success or failure + * const program = Effect.race(Effect.either(task1), Effect.either(task2)) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // task2 interrupted + * // { _id: 'Either', _tag: 'Left', left: 'task1' } + * ``` + * + * @see {@link raceAll} for a version that handles multiple effects. + * @see {@link raceFirst} for a version that returns the result of the first effect to complete. + * + * @since 2.0.0 + * @category Racing + */ +export const race = fiberRuntime.race; +/** + * Races multiple effects and returns the first successful result. + * + * **Details** + * + * This function runs multiple effects concurrently and returns the result of + * the first one to succeed. If one effect succeeds, the others will be + * interrupted. + * + * If none of the effects succeed, the function will fail with the last error + * encountered. + * + * **When to Use** + * + * This is useful when you want to race multiple effects, but only care about + * the first one to succeed. It is commonly used in cases like timeouts, + * retries, or when you want to optimize for the faster response without + * worrying about the other effects. + * + * **Example** (All Tasks Succeed) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task1 = Effect.succeed("task1").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Console.log("task1 done")), + * Effect.onInterrupt(() => Console.log("task1 interrupted")) + * ) + * const task2 = Effect.succeed("task2").pipe( + * Effect.delay("200 millis"), + * Effect.tap(Console.log("task2 done")), + * Effect.onInterrupt(() => Console.log("task2 interrupted")) + * ) + * + * const task3 = Effect.succeed("task3").pipe( + * Effect.delay("150 millis"), + * Effect.tap(Console.log("task3 done")), + * Effect.onInterrupt(() => Console.log("task3 interrupted")) + * ) + * + * const program = Effect.raceAll([task1, task2, task3]) + * + * Effect.runFork(program) + * // Output: + * // task1 done + * // task2 interrupted + * // task3 interrupted + * ``` + * + * **Example** (One Task Fails, Two Tasks Succeed) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task1 = Effect.fail("task1").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Console.log("task1 done")), + * Effect.onInterrupt(() => Console.log("task1 interrupted")) + * ) + * const task2 = Effect.succeed("task2").pipe( + * Effect.delay("200 millis"), + * Effect.tap(Console.log("task2 done")), + * Effect.onInterrupt(() => Console.log("task2 interrupted")) + * ) + * + * const task3 = Effect.succeed("task3").pipe( + * Effect.delay("150 millis"), + * Effect.tap(Console.log("task3 done")), + * Effect.onInterrupt(() => Console.log("task3 interrupted")) + * ) + * + * const program = Effect.raceAll([task1, task2, task3]) + * + * Effect.runFork(program) + * // Output: + * // task3 done + * // task2 interrupted + * ``` + * + * **Example** (All Tasks Fail) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task1 = Effect.fail("task1").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Console.log("task1 done")), + * Effect.onInterrupt(() => Console.log("task1 interrupted")) + * ) + * const task2 = Effect.fail("task2").pipe( + * Effect.delay("200 millis"), + * Effect.tap(Console.log("task2 done")), + * Effect.onInterrupt(() => Console.log("task2 interrupted")) + * ) + * + * const task3 = Effect.fail("task3").pipe( + * Effect.delay("150 millis"), + * Effect.tap(Console.log("task3 done")), + * Effect.onInterrupt(() => Console.log("task3 interrupted")) + * ) + * + * const program = Effect.raceAll([task1, task2, task3]) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { _id: 'Cause', _tag: 'Fail', failure: 'task2' } + * // } + * ``` + * + * @see {@link race} for a version that handles only two effects. + * + * @since 2.0.0 + * @category Racing + */ +export const raceAll = fiberRuntime.raceAll; +/** + * Races two effects and returns the result of the first one to complete. + * + * **Details** + * + * This function takes two effects and runs them concurrently, returning the + * result of the first one that completes, regardless of whether it succeeds or + * fails. + * + * **When to Use** + * + * This function is useful when you want to race two operations, and you want to + * proceed with whichever one finishes first, regardless of whether it succeeds + * or fails. + * + * **Disconnecting Effects** + * + * The `Effect.raceFirst` function safely interrupts the “loser” effect once the other completes, but it will not resume until the loser is cleanly terminated. + * + * If you want a quicker return, you can disconnect the interrupt signal for both effects. Instead of calling: + * + * ```ts skip-type-checking + * Effect.raceFirst(task1, task2) + * ``` + * + * You can use: + * + * ```ts skip-type-checking + * Effect.raceFirst(Effect.disconnect(task1), Effect.disconnect(task2)) + * ``` + * + * This allows both effects to complete independently while still terminating the losing effect in the background. + * + * **Example** (Both Tasks Succeed) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task1 = Effect.succeed("task1").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Console.log("task1 done")), + * Effect.onInterrupt(() => + * Console.log("task1 interrupted").pipe(Effect.delay("100 millis")) + * ) + * ) + * const task2 = Effect.succeed("task2").pipe( + * Effect.delay("200 millis"), + * Effect.tap(Console.log("task2 done")), + * Effect.onInterrupt(() => + * Console.log("task2 interrupted").pipe(Effect.delay("100 millis")) + * ) + * ) + * + * const program = Effect.raceFirst(task1, task2).pipe( + * Effect.tap(Console.log("more work...")) + * ) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // task1 done + * // task2 interrupted + * // more work... + * // { _id: 'Exit', _tag: 'Success', value: 'task1' } + * ``` + * + * **Example** (One Task Fails, One Succeeds) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task1 = Effect.fail("task1").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Console.log("task1 done")), + * Effect.onInterrupt(() => + * Console.log("task1 interrupted").pipe(Effect.delay("100 millis")) + * ) + * ) + * const task2 = Effect.succeed("task2").pipe( + * Effect.delay("200 millis"), + * Effect.tap(Console.log("task2 done")), + * Effect.onInterrupt(() => + * Console.log("task2 interrupted").pipe(Effect.delay("100 millis")) + * ) + * ) + * + * const program = Effect.raceFirst(task1, task2).pipe( + * Effect.tap(Console.log("more work...")) + * ) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // task2 interrupted + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { _id: 'Cause', _tag: 'Fail', failure: 'task1' } + * // } + * ``` + * + * **Example** (Using Effect.disconnect for Quicker Return) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task1 = Effect.succeed("task1").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Console.log("task1 done")), + * Effect.onInterrupt(() => + * Console.log("task1 interrupted").pipe(Effect.delay("100 millis")) + * ) + * ) + * const task2 = Effect.succeed("task2").pipe( + * Effect.delay("200 millis"), + * Effect.tap(Console.log("task2 done")), + * Effect.onInterrupt(() => + * Console.log("task2 interrupted").pipe(Effect.delay("100 millis")) + * ) + * ) + * + * // Race the two tasks with disconnect to allow quicker return + * const program = Effect.raceFirst( + * Effect.disconnect(task1), + * Effect.disconnect(task2) + * ).pipe(Effect.tap(Console.log("more work..."))) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // task1 done + * // more work... + * // { _id: 'Exit', _tag: 'Success', value: 'task1' } + * // task2 interrupted + * ``` + * + * @since 2.0.0 + * @category Racing + */ +export const raceFirst = circular.raceFirst; +/** + * Races two effects and calls a finisher when the first one completes. + * + * **Details** + * + * This function runs two effects concurrently and calls a specified “finisher” + * function once one of the effects completes, regardless of whether it succeeds + * or fails. + * + * The finisher functions for each effect allow you to handle the results of + * each effect as soon as they complete. + * + * The function takes two finisher callbacks, one for each effect, and allows + * you to specify how to handle the result of the race. + * + * **When to Use** + * + * This function is useful when you need to react to the completion of either + * effect without waiting for both to finish. It can be used whenever you want + * to take action based on the first available result. + * + * **Example** (Handling Results of Concurrent Tasks) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task1 = Effect.succeed("task1").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Console.log("task1 done")), + * Effect.onInterrupt(() => + * Console.log("task1 interrupted").pipe(Effect.delay("100 millis")) + * ) + * ) + * const task2 = Effect.succeed("task2").pipe( + * Effect.delay("200 millis"), + * Effect.tap(Console.log("task2 done")), + * Effect.onInterrupt(() => + * Console.log("task2 interrupted").pipe(Effect.delay("100 millis")) + * ) + * ) + * + * const program = Effect.raceWith(task1, task2, { + * onSelfDone: (exit) => Console.log(`task1 exited with ${exit}`), + * onOtherDone: (exit) => Console.log(`task2 exited with ${exit}`) + * }) + * + * Effect.runFork(program) + * // Output: + * // task1 done + * // task1 exited with { + * // "_id": "Exit", + * // "_tag": "Success", + * // "value": "task1" + * // } + * // task2 interrupted + * ``` + * + * @since 2.0.0 + * @category Racing + */ +export const raceWith = fiberRuntime.raceWith; +/** + * Summarizes a effect by computing some value before and after execution, and + * then combining the values to produce a summary, together with the result of + * execution. + * + * @since 2.0.0 + * @category Sequencing + */ +export const summarized = effect.summarized; +/** + * Runs a side effect with the result of an effect without changing the original + * value. + * + * **Details** + * + * This function works similarly to `flatMap`, but it ignores the result of the + * function passed to it. The value from the previous effect remains available + * for the next part of the chain. Note that if the side effect fails, the + * entire chain will fail too. + * + * **When to Use** + * + * Use this function when you want to perform a side effect, like logging or + * tracking, without modifying the main value. This is useful when you need to + * observe or record an action but want the original value to be passed to the + * next step. + * + * **Example** (Logging a step in a pipeline) + * + * ```ts + * import { Console, Effect, pipe } from "effect" + * + * // Function to apply a discount safely to a transaction amount + * const applyDiscount = ( + * total: number, + * discountRate: number + * ): Effect.Effect => + * discountRate === 0 + * ? Effect.fail(new Error("Discount rate cannot be zero")) + * : Effect.succeed(total - (total * discountRate) / 100) + * + * // Simulated asynchronous task to fetch a transaction amount from database + * const fetchTransactionAmount = Effect.promise(() => Promise.resolve(100)) + * + * const finalAmount = pipe( + * fetchTransactionAmount, + * // Log the fetched transaction amount + * Effect.tap((amount) => Console.log(`Apply a discount to: ${amount}`)), + * // `amount` is still available! + * Effect.flatMap((amount) => applyDiscount(amount, 5)) + * ) + * + * Effect.runPromise(finalAmount).then(console.log) + * // Output: + * // Apply a discount to: 100 + * // 95 + * ``` + * + * @see {@link flatMap} for a version that allows you to change the value. + * + * @since 2.0.0 + * @category Sequencing + */ +export const tap = core.tap; +/** + * Allows you to inspect both success and failure outcomes of an effect and + * perform side effects for each. + * + * **Details** + * + * This function enables you to handle both success and failure cases + * separately, without modifying the main effect's result. It is particularly + * useful for scenarios where you need to log, monitor, or perform additional + * actions depending on whether the effect succeeded or failed. + * + * When the effect succeeds, the `onSuccess` handler is executed with the + * success value. When the effect fails, the `onFailure` handler is executed + * with the failure value. Both handlers can include side effects such as + * logging or analytics, and neither modifies the original effect's output. + * + * If either the success or failure handler fails, the overall effect will also + * fail. + * + * **Example** + * + * ```ts + * import { Effect, Random, Console } from "effect" + * + * // Simulate a task that might fail + * const task = Effect.filterOrFail( + * Random.nextRange(-1, 1), + * (n) => n >= 0, + * () => "random number is negative" + * ) + * + * // Use tapBoth to log both success and failure outcomes + * const tapping = Effect.tapBoth(task, { + * onFailure: (error) => Console.log(`failure: ${error}`), + * onSuccess: (randomNumber) => + * Console.log(`random number: ${randomNumber}`) + * }) + * + * Effect.runFork(tapping) + * // Example Output: + * // failure: random number is negative + * ``` + * + * @since 2.0.0 + * @category Sequencing + */ +export const tapBoth = effect.tapBoth; +/** + * Inspect severe errors or defects (non-recoverable failures) in an effect. + * + * **Details** + * + * This function is specifically designed to handle and inspect defects, which + * are critical failures in your program, such as unexpected runtime exceptions + * or system-level errors. Unlike normal recoverable errors, defects typically + * indicate serious issues that cannot be addressed through standard error + * handling. + * + * When a defect occurs in an effect, the function you provide to this function + * will be executed, allowing you to log, monitor, or handle the defect in some + * way. Importantly, this does not alter the main result of the effect. If no + * defect occurs, the effect behaves as if this function was not used. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * // Simulate a task that fails with a recoverable error + * const task1: Effect.Effect = Effect.fail("NetworkError") + * + * // tapDefect won't log anything because NetworkError is not a defect + * const tapping1 = Effect.tapDefect(task1, (cause) => + * Console.log(`defect: ${cause}`) + * ) + * + * Effect.runFork(tapping1) + * // No Output + * + * // Simulate a severe failure in the system + * const task2: Effect.Effect = Effect.dieMessage( + * "Something went wrong" + * ) + * + * // Log the defect using tapDefect + * const tapping2 = Effect.tapDefect(task2, (cause) => + * Console.log(`defect: ${cause}`) + * ) + * + * Effect.runFork(tapping2) + * // Output: + * // defect: RuntimeException: Something went wrong + * // ... stack trace ... + * ``` + * + * @since 2.0.0 + * @category Sequencing + */ +export const tapDefect = effect.tapDefect; +/** + * Execute a side effect on failure without modifying the original effect. + * + * **Details** + * + * This function allows you to inspect and react to the failure of an effect by + * executing an additional effect. The failure value is passed to the provided + * function, enabling you to log it, track it, or perform any other operation. + * Importantly, the original failure remains intact and is re-propagated, so the + * effect's behavior is unchanged. + * + * The side effect you provide is only executed when the effect fails. If the + * effect succeeds, the function is ignored, and the success value is propagated + * as usual. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * // Simulate a task that fails with an error + * const task: Effect.Effect = Effect.fail("NetworkError") + * + * // Use tapError to log the error message when the task fails + * const tapping = Effect.tapError(task, (error) => + * Console.log(`expected error: ${error}`) + * ) + * + * Effect.runFork(tapping) + * // Output: + * // expected error: NetworkError + * ``` + * + * @since 2.0.0 + * @category Sequencing + */ +export const tapError = effect.tapError; +/** + * Inspect errors matching a specific tag without altering the original effect. + * + * **Details** + * + * This function allows you to inspect and handle specific error types based on + * their `_tag` property. It is particularly useful in applications where errors + * are modeled with tagged types (e.g., union types with discriminating tags). + * By targeting errors with a specific `_tag`, you can log or perform actions on + * them while leaving the error channel and overall effect unchanged. + * + * If the error doesn't match the specified tag, this function does nothing, and + * the effect proceeds as usual. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * class NetworkError { + * readonly _tag = "NetworkError" + * constructor(readonly statusCode: number) {} + * } + * + * class ValidationError { + * readonly _tag = "ValidationError" + * constructor(readonly field: string) {} + * } + * + * // Create a task that fails with a NetworkError + * const task: Effect.Effect = + * Effect.fail(new NetworkError(504)) + * + * // Use tapErrorTag to inspect only NetworkError types and log the status code + * const tapping = Effect.tapErrorTag(task, "NetworkError", (error) => + * Console.log(`expected error: ${error.statusCode}`) + * ) + * + * Effect.runFork(tapping) + * // Output: + * // expected error: 504 + * ``` + * + * @since 2.0.0 + * @category Sequencing + */ +export const tapErrorTag = effect.tapErrorTag; +/** + * Inspect the complete cause of an error, including failures and defects. + * + * **Details** + * + * This function provides access to the full cause of an error, including both + * recoverable failures and irrecoverable defects. It allows you to handle, log, + * or monitor specific error causes without modifying the result of the effect. + * The full `Cause` object encapsulates the error and its contextual + * information, making it useful for debugging and understanding failure + * scenarios in complex workflows. + * + * The effect itself is not modified, and any errors or defects remain in the + * error channel of the original effect. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * // Create a task that fails with a NetworkError + * const task1: Effect.Effect = Effect.fail("NetworkError") + * + * const tapping1 = Effect.tapErrorCause(task1, (cause) => + * Console.log(`error cause: ${cause}`) + * ) + * + * Effect.runFork(tapping1) + * // Output: + * // error cause: Error: NetworkError + * + * // Simulate a severe failure in the system + * const task2: Effect.Effect = Effect.dieMessage( + * "Something went wrong" + * ) + * + * const tapping2 = Effect.tapErrorCause(task2, (cause) => + * Console.log(`error cause: ${cause}`) + * ) + * + * Effect.runFork(tapping2) + * // Output: + * // error cause: RuntimeException: Something went wrong + * // ... stack trace ... + * ``` + * + * @since 2.0.0 + * @category Sequencing + */ +export const tapErrorCause = effect.tapErrorCause; +/** + * Repeats an effect indefinitely until an error occurs. + * + * **Details** + * + * This function executes an effect repeatedly in an infinite loop. Each + * iteration is executed sequentially, and the loop continues until the first + * error occurs. If the effect succeeds, it starts over from the beginning. If + * the effect fails, the error is propagated, and the loop stops. + * + * Be cautious when using this function, as it will run indefinitely unless an + * error interrupts it. This makes it suitable for long-running processes or + * continuous polling tasks, but you should ensure proper error handling or + * combine it with other operators like `timeout` or `schedule` to prevent + * unintentional infinite loops. + * + * @since 2.0.0 + * @category Repetition / Recursion + */ +export const forever = effect.forever; +/** + * Repeatedly updates a state through an effectful operation until a condition + * is no longer met. + * + * **Details** + * + * This function provides a way to implement effectful loops, similar to a + * `while` loop in JavaScript. + * + * ```ts skip-type-checking + * let result = initial + * + * while (options.while(result)) { + * result = options.body(result) + * } + * + * return result + * ``` + * + * It starts with an initial state, checks a + * condition (`while`), and executes a body operation to update the state if the + * condition evaluates to `true`. The process repeats until the condition + * returns `false`. + * + * The state is passed between iterations, allowing the body operation to modify + * it dynamically. The final state after the loop ends is returned as the result + * of the effect. + * + * **When to Use** + * + * This is particularly useful for scenarios where looping logic involves + * asynchronous or side-effectful operations, such as polling or iterative + * computations that depend on external factors. + * + * **Example** (Effectful Iteration) + * + * ```ts + * import { Effect } from "effect" + * + * const result = Effect.iterate( + * // Initial result + * 1, + * { + * // Condition to continue iterating + * while: (result) => result <= 5, + * // Operation to change the result + * body: (result) => Effect.succeed(result + 1) + * } + * ) + * + * Effect.runPromise(result).then(console.log) + * // Output: 6 + * ``` + * + * @since 2.0.0 + * @category Looping + */ +export const iterate = effect.iterate; +/** + * Repeatedly executes a loop with a state, collecting results or discarding + * them based on configuration. + * + * **Details** + * + * This function performs an effectful loop, starting with an initial state and + * iterating as long as the `while` condition evaluates to `true`, similar to a + * `while` loop in JavaScript. + * + * ```ts skip-type-checking + * let state = initial + * const result = [] + * + * while (options.while(state)) { + * result.push(options.body(state)) // Perform the effectful operation + * state = options.step(state) // Update the state + * } + * + * return result + * ``` + * + * During each iteration, the `step` function updates the state, and the `body` + * effect is executed. + * + * The results of the body effect can be collected in an array or discarded + * based on the `discard` option. + * + * **Discarding Intermediate Results** + * + * - If `discard` is `false` or not provided, the intermediate results are + * collected into an array and returned as the final result. + * - If `discard` is `true`, the intermediate results are ignored, and the + * effect returns `void`. + * + * **When to Use** + * + * This is useful for implementing loops where you need to perform effectful + * computations repeatedly, such as processing items in a list, generating + * values, or performing iterative updates. + * + * **Example** (Looping with Collected Results) + * + * ```ts + * import { Effect } from "effect" + * + * // A loop that runs 5 times, collecting each iteration's result + * const result = Effect.loop( + * // Initial state + * 1, + * { + * // Condition to continue looping + * while: (state) => state <= 5, + * // State update function + * step: (state) => state + 1, + * // Effect to be performed on each iteration + * body: (state) => Effect.succeed(state) + * } + * ) + * + * Effect.runPromise(result).then(console.log) + * // Output: [1, 2, 3, 4, 5] + * ``` + * + * **Example** (Loop with Discarded Results) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const result = Effect.loop( + * // Initial state + * 1, + * { + * // Condition to continue looping + * while: (state) => state <= 5, + * // State update function + * step: (state) => state + 1, + * // Effect to be performed on each iteration + * body: (state) => Console.log(`Currently at state ${state}`), + * // Discard intermediate results + * discard: true + * } + * ) + * + * Effect.runPromise(result).then(console.log) + * // Output: + * // Currently at state 1 + * // Currently at state 2 + * // Currently at state 3 + * // Currently at state 4 + * // Currently at state 5 + * // undefined + * ``` + * + * @since 2.0.0 + * @category Looping + */ +export const loop = effect.loop; +/** + * Repeats an effect based on a specified schedule or until the first failure. + * + * **Details** + * + * This function executes an effect repeatedly according to the given schedule. + * Each repetition occurs after the initial execution of the effect, meaning + * that the schedule determines the number of additional repetitions. For + * example, using `Schedule.once` will result in the effect being executed twice + * (once initially and once as part of the repetition). + * + * If the effect succeeds, it is repeated according to the schedule. If it + * fails, the repetition stops immediately, and the failure is returned. + * + * The schedule can also specify delays between repetitions, making it useful + * for tasks like retrying operations with backoff, periodic execution, or + * performing a series of dependent actions. + * + * You can combine schedules for more advanced repetition logic, such as adding + * delays, limiting recursions, or dynamically adjusting based on the outcome of + * each execution. + * + * **Example** (Success Example) + * + * ```ts + * import { Effect, Schedule, Console } from "effect" + * + * const action = Console.log("success") + * const policy = Schedule.addDelay(Schedule.recurs(2), () => "100 millis") + * const program = Effect.repeat(action, policy) + * + * Effect.runPromise(program).then((n) => console.log(`repetitions: ${n}`)) + * ``` + * + * **Example** (Failure Example) + * + * ```ts + * import { Effect, Schedule } from "effect" + * + * let count = 0 + * + * // Define an async effect that simulates an action with possible failures + * const action = Effect.async((resume) => { + * if (count > 1) { + * console.log("failure") + * resume(Effect.fail("Uh oh!")) + * } else { + * count++ + * console.log("success") + * resume(Effect.succeed("yay!")) + * } + * }) + * + * const policy = Schedule.addDelay(Schedule.recurs(2), () => "100 millis") + * const program = Effect.repeat(action, policy) + * + * Effect.runPromiseExit(program).then(console.log) + * ``` + * + * @since 2.0.0 + * @category Repetition / Recursion + */ +export const repeat = schedule_.repeat_combined; +/** + * Repeats an effect a specified number of times or until the first failure. + * + * **Details** + * + * This function executes an effect initially and then repeats it the specified + * number of times, as long as it succeeds. For example, calling + * `repeatN(action, 2)` will execute `action` once initially and then repeat it + * two additional times if there are no failures. + * + * If the effect fails during any repetition, the failure is returned, and no + * further repetitions are attempted. + * + * **When to Use** + * + * This function is useful for tasks that need to be retried a fixed number of + * times or for performing repeated actions without requiring a schedule. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * const action = Console.log("success") + * const program = Effect.repeatN(action, 2) + * + * Effect.runPromise(program) + * ``` + * + * @since 2.0.0 + * @category Repetition / Recursion + */ +export const repeatN = effect.repeatN; +/** + * Repeats an effect with a schedule, handling failures using a custom handler. + * + * **Details** + * + * This function allows you to execute an effect repeatedly based on a specified + * schedule. If the effect fails at any point, a custom failure handler is + * invoked. The handler is provided with both the failure value and the output + * of the schedule at the time of failure. This enables advanced error recovery + * or alternative fallback logic while maintaining flexibility in how + * repetitions are handled. + * + * For example, using a schedule with `recurs(2)` will allow for two additional + * repetitions after the initial execution, provided the effect succeeds. If a + * failure occurs during any iteration, the failure handler is invoked to handle + * the situation. + * + * **Example** + * + * ```ts + * import { Effect, Schedule } from "effect" + * + * let count = 0 + * + * // Define an async effect that simulates an action with possible failures + * const action = Effect.async((resume) => { + * if (count > 1) { + * console.log("failure") + * resume(Effect.fail("Uh oh!")) + * } else { + * count++ + * console.log("success") + * resume(Effect.succeed("yay!")) + * } + * }) + * + * const policy = Schedule.addDelay( + * Schedule.recurs(2), // Repeat for a maximum of 2 times + * () => "100 millis" // Add a delay of 100 milliseconds between repetitions + * ) + * + * const program = Effect.repeatOrElse(action, policy, () => + * Effect.sync(() => { + * console.log("orElse") + * return count - 1 + * }) + * ) + * + * Effect.runPromise(program).then((n) => console.log(`repetitions: ${n}`)) + * ``` + * + * @since 2.0.0 + * @category Repetition / Recursion + */ +export const repeatOrElse = schedule_.repeatOrElse_Effect; +/** + * Repeats an effect based on a specified schedule. + * + * **Details** + * + * This function allows you to execute an effect repeatedly according to a given + * schedule. The schedule determines the timing and number of repetitions. Each + * repetition can also depend on the decision of the schedule, providing + * flexibility for complex workflows. This function does not modify the effect's + * success or failure; it only controls its repetition. + * + * For example, you can use a schedule that recurs a specific number of times, + * adds delays between repetitions, or customizes repetition behavior based on + * external inputs. The effect runs initially and is repeated according to the + * schedule. + * + * @see {@link scheduleFrom} for a variant that allows the schedule's decision + * to depend on the result of this effect. + * + * @since 2.0.0 + * @category Repetition / Recursion + */ +export const schedule = schedule_.schedule_Effect; +/** + * Runs an effect repeatedly on a new fiber according to a given schedule. + * + * **Details** + * + * This function starts the provided effect on a new fiber and runs it + * repeatedly based on the specified schedule. The repetitions are managed by + * the schedule's rules, which define the timing and number of iterations. The + * fiber is attached to the current scope, meaning it is automatically managed + * and cleaned up when the scope is closed. + * + * The function returns a `RuntimeFiber` that allows you to monitor or interact + * with the running fiber. + * + * **When to Use** + * + * This is particularly useful for concurrent execution of scheduled tasks or + * when you want to continue processing without waiting for the repetitions to + * complete. + * + * @since 2.0.0 + * @category Repetition / Recursion + */ +export const scheduleForked = schedule_.scheduleForked; +/** + * Runs an effect repeatedly according to a schedule, starting from a specified + * input value. + * + * **Details** + * + * This function allows you to repeatedly execute an effect based on a schedule. + * The schedule starts with the given `initial` input value, which is passed to + * the first execution. Subsequent executions of the effect are controlled by + * the schedule's rules, using the output of the previous iteration as the input + * for the next one. + * + * The returned effect will complete when the schedule ends or the effect fails, + * propagating the error. + * + * @since 2.0.0 + * @category Repetition / Recursion + */ +export const scheduleFrom = schedule_.scheduleFrom_Effect; +/** + * @since 2.0.0 + * @category Repetition / Recursion + */ +export const whileLoop = core.whileLoop; +/** + * Returns a collection of all `FiberRef` values for the fiber running this + * effect. + * + * @since 2.0.0 + * @category Fiber Refs + */ +export const getFiberRefs = effect.fiberRefs; +/** + * Inherits values from all `FiberRef` instances into current fiber. + * + * @since 2.0.0 + * @category Fiber Refs + */ +export const inheritFiberRefs = effect.inheritFiberRefs; +/** + * @since 2.0.0 + * @category Fiber Refs + */ +export const locally = core.fiberRefLocally; +/** + * @since 2.0.0 + * @category Fiber Refs + */ +export const locallyWith = core.fiberRefLocallyWith; +/** + * @since 2.0.0 + * @category Fiber Refs + */ +export const locallyScoped = fiberRuntime.fiberRefLocallyScoped; +/** + * @since 2.0.0 + * @category Fiber Refs + */ +export const locallyScopedWith = fiberRuntime.fiberRefLocallyScopedWith; +/** + * Applies the specified changes to the `FiberRef` values for the fiber + * running this workflow. + * + * @since 2.0.0 + * @category Fiber Refs + */ +export const patchFiberRefs = effect.patchFiberRefs; +/** + * Sets the `FiberRef` values for the fiber running this effect to the values + * in the specified collection of `FiberRef` values. + * + * @since 2.0.0 + * @category Fiber Refs + */ +export const setFiberRefs = effect.setFiberRefs; +/** + * Updates the `FiberRef` values for the fiber running this effect using the + * specified function. + * + * @since 2.0.0 + * @category Fiber Refs + */ +export const updateFiberRefs = effect.updateFiberRefs; +/** + * Checks if an effect has failed. + * + * **Details** + * + * This function evaluates whether an effect has resulted in a failure. It + * returns a boolean value wrapped in an effect, with `true` indicating the + * effect failed and `false` otherwise. + * + * The resulting effect cannot fail (`never` in the error channel) but retains + * the context of the original effect. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const failure = Effect.fail("Uh oh!") + * + * console.log(Effect.runSync(Effect.isFailure(failure))) + * // Output: true + * + * const defect = Effect.dieMessage("BOOM!") + * + * Effect.runSync(Effect.isFailure(defect)) + * // throws: BOOM! + * ``` + * + * @since 2.0.0 + * @category Condition Checking + */ +export const isFailure = effect.isFailure; +/** + * Checks if an effect has succeeded. + * + * **Details** + * + * This function evaluates whether an effect has resulted in a success. It + * returns a boolean value wrapped in an effect, with `true` indicating the + * effect succeeded and `false` otherwise. + * + * The resulting effect cannot fail (`never` in the error channel) but retains + * the context of the original effect. + * + * @since 2.0.0 + * @category Condition Checking + */ +export const isSuccess = effect.isSuccess; +/** + * Handles both success and failure cases of an effect without performing side + * effects. + * + * **Details** + * + * `match` lets you define custom handlers for both success and failure + * scenarios. You provide separate functions to handle each case, allowing you + * to process the result if the effect succeeds, or handle the error if the + * effect fails. + * + * **When to Use** + * + * This is useful for structuring your code to respond differently to success or + * failure without triggering side effects. + * + * **Example** (Handling Both Success and Failure Cases) + * + * ```ts + * import { Effect } from "effect" + * + * const success: Effect.Effect = Effect.succeed(42) + * + * const program1 = Effect.match(success, { + * onFailure: (error) => `failure: ${error.message}`, + * onSuccess: (value) => `success: ${value}` + * }) + * + * // Run and log the result of the successful effect + * Effect.runPromise(program1).then(console.log) + * // Output: "success: 42" + * + * const failure: Effect.Effect = Effect.fail( + * new Error("Uh oh!") + * ) + * + * const program2 = Effect.match(failure, { + * onFailure: (error) => `failure: ${error.message}`, + * onSuccess: (value) => `success: ${value}` + * }) + * + * // Run and log the result of the failed effect + * Effect.runPromise(program2).then(console.log) + * // Output: "failure: Uh oh!" + * ``` + * + * @see {@link matchEffect} if you need to perform side effects in the handlers. + * + * @since 2.0.0 + * @category Matching + */ +export const match = effect.match; +/** + * Handles failures by matching the cause of failure. + * + * **Details** + * + * The `matchCause` function allows you to handle failures with access to the + * full cause of the failure within a fiber. + * + * **When to Use** + * + * This is useful for differentiating between different types of errors, such as + * regular failures, defects, or interruptions. You can provide specific + * handling logic for each failure type based on the cause. + * + * **Example** (Handling Different Failure Causes) + * + * ```ts + * import { Effect } from "effect" + * + * const task: Effect.Effect = Effect.die("Uh oh!") + * + * const program = Effect.matchCause(task, { + * onFailure: (cause) => { + * switch (cause._tag) { + * case "Fail": + * // Handle standard failure + * return `Fail: ${cause.error.message}` + * case "Die": + * // Handle defects (unexpected errors) + * return `Die: ${cause.defect}` + * case "Interrupt": + * // Handle interruption + * return `${cause.fiberId} interrupted!` + * } + * // Fallback for other causes + * return "failed due to other causes" + * }, + * onSuccess: (value) => + * // task completes successfully + * `succeeded with ${value} value` + * }) + * + * Effect.runPromise(program).then(console.log) + * // Output: "Die: Uh oh!" + * ``` + * + * @see {@link matchCauseEffect} if you need to perform side effects in the + * handlers. + * @see {@link match} if you don't need to handle the cause of the failure. + * + * @since 2.0.0 + * @category Matching + */ +export const matchCause = core.matchCause; +/** + * Handles failures with access to the cause and allows performing side effects. + * + * **Details** + * + * The `matchCauseEffect` function works similarly to {@link matchCause}, but it + * also allows you to perform additional side effects based on the failure + * cause. This function provides access to the complete cause of the failure, + * making it possible to differentiate between various failure types, and allows + * you to respond accordingly while performing side effects (like logging or + * other operations). + * + * **Example** (Handling Different Failure Causes with Side Effects) + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task: Effect.Effect = Effect.die("Uh oh!") + * + * const program = Effect.matchCauseEffect(task, { + * onFailure: (cause) => { + * switch (cause._tag) { + * case "Fail": + * // Handle standard failure with a logged message + * return Console.log(`Fail: ${cause.error.message}`) + * case "Die": + * // Handle defects (unexpected errors) by logging the defect + * return Console.log(`Die: ${cause.defect}`) + * case "Interrupt": + * // Handle interruption and log the fiberId that was interrupted + * return Console.log(`${cause.fiberId} interrupted!`) + * } + * // Fallback for other causes + * return Console.log("failed due to other causes") + * }, + * onSuccess: (value) => + * // Log success if the task completes successfully + * Console.log(`succeeded with ${value} value`) + * }) + * + * Effect.runPromise(program) + * // Output: "Die: Uh oh!" + * ``` + * + * @see {@link matchCause} if you don't need side effects and only want to handle the result or failure. + * @see {@link matchEffect} if you don't need to handle the cause of the failure. + * + * @since 2.0.0 + * @category Matching + */ +export const matchCauseEffect = core.matchCauseEffect; +/** + * Handles both success and failure cases of an effect, allowing for additional + * side effects. + * + * **Details** + * + * The `matchEffect` function is similar to {@link match}, but it enables you to + * perform side effects in the handlers for both success and failure outcomes. + * + * **When to Use** + * + * This is useful when you need to execute additional actions, like logging or + * notifying users, based on whether an effect succeeds or fails. + * + * **Example** (Handling Both Success and Failure Cases with Side Effects) + * + * ```ts + * import { Effect } from "effect" + * + * const success: Effect.Effect = Effect.succeed(42) + * const failure: Effect.Effect = Effect.fail( + * new Error("Uh oh!") + * ) + * + * const program1 = Effect.matchEffect(success, { + * onFailure: (error) => + * Effect.succeed(`failure: ${error.message}`).pipe( + * Effect.tap(Effect.log) + * ), + * onSuccess: (value) => + * Effect.succeed(`success: ${value}`).pipe(Effect.tap(Effect.log)) + * }) + * + * console.log(Effect.runSync(program1)) + * // Output: + * // timestamp=... level=INFO fiber=#0 message="success: 42" + * // success: 42 + * + * const program2 = Effect.matchEffect(failure, { + * onFailure: (error) => + * Effect.succeed(`failure: ${error.message}`).pipe( + * Effect.tap(Effect.log) + * ), + * onSuccess: (value) => + * Effect.succeed(`success: ${value}`).pipe(Effect.tap(Effect.log)) + * }) + * + * console.log(Effect.runSync(program2)) + * // Output: + * // timestamp=... level=INFO fiber=#1 message="failure: Uh oh!" + * // failure: Uh oh! + * ``` + * + * @see {@link match} if you don't need side effects and only want to handle the + * result or failure. + * + * @since 2.0.0 + * @category Matching + */ +export const matchEffect = core.matchEffect; +/** + * Logs one or more messages or error causes at the current log level. + * + * **Details** + * + * This function provides a simple way to log messages or error causes during + * the execution of your effects. By default, logs are recorded at the `INFO` + * level, but this can be adjusted using other logging utilities + * (`Logger.withMinimumLogLevel`). Multiple items, including `Cause` instances, + * can be logged in a single call. When logging `Cause` instances, detailed + * error information is included in the log output. + * + * The log output includes useful metadata like the current timestamp, log + * level, and fiber ID, making it suitable for debugging and tracking purposes. + * This function does not interrupt or alter the effect's execution flow. + * + * **Example** + * + * ```ts + * import { Cause, Effect } from "effect" + * + * const program = Effect.log( + * "message1", + * "message2", + * Cause.die("Oh no!"), + * Cause.die("Oh uh!") + * ) + * + * Effect.runFork(program) + * // Output: + * // timestamp=... level=INFO fiber=#0 message=message1 message=message2 cause="Error: Oh no! + * // Error: Oh uh!" + * ``` + * + * @since 2.0.0 + * @category Logging + */ +export const log = effect.log; +/** + * Logs messages or error causes at a specified log level. + * + * **Details** + * + * This function allows you to log one or more messages or error causes while + * specifying the desired log level (e.g., DEBUG, INFO, ERROR). It provides + * flexibility in categorizing logs based on their importance or severity, + * making it easier to filter logs during debugging or production monitoring. + * + * **Example** + * + * ```ts + * import { Cause, Effect, LogLevel } from "effect" + * + * const program = Effect.logWithLevel( + * LogLevel.Error, + * "Critical error encountered", + * Cause.die("System failure!") + * ) + * + * Effect.runFork(program) + * // Output: + * // timestamp=... level=ERROR fiber=#0 message=Critical error encountered cause="Error: System failure!" + * ``` + * + * @since 2.0.0 + * @category Logging + */ +export const logWithLevel = (level, ...message) => effect.logWithLevel(level)(...message); +/** + * Logs messages at the TRACE log level. + * + * **Details** + * + * This function logs the specified messages at the TRACE level. TRACE logs are + * typically used for very detailed diagnostic information. These messages are + * not displayed by default. To view them, you must adjust the logging + * configuration by setting the minimum log level to `LogLevel.Trace` using + * `Logger.withMinimumLogLevel`. + * + * **Example** + * + * ```ts + * import { Effect, Logger, LogLevel } from "effect" + * + * const program = Effect.logTrace("message1").pipe(Logger.withMinimumLogLevel(LogLevel.Trace)) + * + * Effect.runFork(program) + * // timestamp=... level=TRACE fiber=#0 message=message1 + * ``` + * + * @since 2.0.0 + * @category Logging + */ +export const logTrace = effect.logTrace; +/** + * Logs messages at the DEBUG log level. + * + * **Details** + * + * This function logs messages at the DEBUG level, which is typically used for + * diagnosing application behavior during development. DEBUG messages provide + * less detailed information than TRACE logs but are still not shown by default. + * To view these logs, adjust the log level using `Logger.withMinimumLogLevel`. + * + * **Example** + * + * ```ts + * import { Effect, Logger, LogLevel } from "effect" + * + * const program = Effect.logDebug("message1").pipe(Logger.withMinimumLogLevel(LogLevel.Debug)) + * + * Effect.runFork(program) + * // timestamp=... level=DEBUG fiber=#0 message=message1 + * ``` + * + * @since 2.0.0 + * @category Logging + */ +export const logDebug = effect.logDebug; +/** + * Logs messages at the INFO log level. + * + * **Details** + * + * This function logs messages at the INFO level, suitable for general + * application events or operational messages. INFO logs are shown by default + * and are commonly used for highlighting normal, non-error operations. + * + * @since 2.0.0 + * @category Logging + */ +export const logInfo = effect.logInfo; +/** + * Logs messages at the WARNING log level. + * + * **Details** + * + * This function logs messages at the WARNING level, suitable for highlighting + * potential issues that are not errors but may require attention. These + * messages indicate that something unexpected occurred or might lead to errors + * in the future. + * + * @since 2.0.0 + * @category Logging + */ +export const logWarning = effect.logWarning; +/** + * Logs messages at the ERROR log level. + * + * **Details** + * + * This function logs messages at the ERROR level, suitable for reporting + * application errors or failures. These logs are typically used for unexpected + * issues that need immediate attention. + * + * @since 2.0.0 + * @category Logging + */ +export const logError = effect.logError; +/** + * Logs messages at the FATAL log level. + * + * **Details** + * + * This function logs messages at the FATAL level, suitable for reporting + * critical errors that cause the application to terminate or stop functioning. + * These logs are typically used for unrecoverable errors that require immediate + * attention. + * + * @since 2.0.0 + * @category Logging + */ +export const logFatal = effect.logFatal; +/** + * Adds a log span to an effect for tracking and logging its execution duration. + * + * **Details** + * + * This function wraps an effect with a log span, providing performance + * monitoring and debugging capabilities. The log span tracks the duration of + * the wrapped effect and logs it with the specified label. This is particularly + * useful when analyzing time-sensitive operations or understanding the + * execution time of specific tasks in your application. + * + * The logged output will include the label and the total time taken for the + * operation. The span information is included in the log metadata, making it + * easy to trace performance metrics in logs. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const program = Effect.gen(function*() { + * yield* Effect.sleep("1 second") + * yield* Effect.log("The job is finished!") + * }).pipe(Effect.withLogSpan("myspan")) + * + * Effect.runFork(program) + * // timestamp=... level=INFO fiber=#0 message="The job is finished!" myspan=1011ms + * ``` + * + * @since 2.0.0 + * @category Logging + */ +export const withLogSpan = effect.withLogSpan; +/** + * Adds custom annotations to log entries generated within an effect. + * + * **Details** + * + * This function allows you to enhance log messages by appending additional + * context in the form of key-value pairs. These annotations are included in + * every log message created during the execution of the effect, making the logs + * more informative and easier to trace. + * + * The annotations can be specified as a single key-value pair or as a record of + * multiple key-value pairs. This is particularly useful for tracking + * operations, debugging, or associating specific metadata with logs for better + * observability. + * + * The annotated key-value pairs will appear alongside the log message in the + * output. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const program = Effect.gen(function*() { + * yield* Effect.log("message1") + * yield* Effect.log("message2") + * }).pipe(Effect.annotateLogs("taskId", "1234")) // Annotation as key/value pair + * + * Effect.runFork(program) + * // timestamp=... level=INFO fiber=#0 message=message1 taskId=1234 + * // timestamp=... level=INFO fiber=#0 message=message2 taskId=1234 + * ``` + * + * @see {@link annotateLogsScoped} to add log annotations with a limited scope. + * + * @since 2.0.0 + * @category Logging + */ +export const annotateLogs = effect.annotateLogs; +/** + * Adds log annotations with a limited scope to enhance contextual logging. + * + * **Details** + * + * This function allows you to apply key-value annotations to log entries + * generated within a specific scope of your effect computations. The + * annotations are restricted to the defined `Scope`, ensuring that they are + * only applied to logs produced during that scope. Once the scope ends, the + * annotations are automatically removed, making it easier to manage + * context-specific logging without affecting other parts of your application. + * + * The annotations can be provided as a single key-value pair or as a record of + * multiple key-value pairs. This flexibility enables fine-grained control over + * the additional metadata included in logs for specific tasks or operations. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const program = Effect.gen(function*() { + * yield* Effect.log("no annotations") + * yield* Effect.annotateLogsScoped({ key: "value" }) + * yield* Effect.log("message1") // Annotation is applied to this log + * yield* Effect.log("message2") // Annotation is applied to this log + * }).pipe(Effect.scoped, Effect.andThen(Effect.log("no annotations again"))) + * + * Effect.runFork(program) + * // timestamp=... level=INFO fiber=#0 message="no annotations" + * // timestamp=... level=INFO fiber=#0 message=message1 key=value + * // timestamp=... level=INFO fiber=#0 message=message2 key=value + * // timestamp=... level=INFO fiber=#0 message="no annotations again" + * ``` + * + * @see {@link annotateLogs} to add custom annotations to log entries generated within an effect. + * + * @since 3.1.0 + * @category Logging + */ +export const annotateLogsScoped = fiberRuntime.annotateLogsScoped; +/** + * Retrieves the current log annotations for the current scope. + * + * **Details** + * + * This function provides access to the log annotations associated with the + * current scope. Log annotations are key-value pairs that provide additional + * context to log entries. They are often used to add metadata such as tags, + * identifiers, or extra debugging information to logs. + * + * By using this function, you can inspect or utilize the annotations applied to + * the current scope, making it easier to trace and debug specific sections of + * your application. + * + * @see {@link annotateLogs} to add custom annotations to log entries generated within an effect. + * @see {@link annotateLogsScoped} to add log annotations with a limited scope. + * + * @since 2.0.0 + * @category Logging + */ +export const logAnnotations = effect.logAnnotations; +/** + * Configures whether child fibers will log unhandled errors and at what log + * level. + * + * **Details** + * + * This function allows you to control whether unhandled errors from child + * fibers are logged and to specify the log level for these errors. By default, + * unhandled errors are reported via the logger. However, using this function, + * you can choose to suppress these logs by passing `Option.none` or adjust the + * log level to a specific severity, such as `Error`, `Warning`, or `Info`. + * + * This configuration is scoped to the effect it is applied to, meaning the + * changes only apply to the child fibers created within that effect's context. + * It is especially useful when you want to reduce noise in logs or prioritize + * certain types of errors. + * + * **Example** + * + * ```ts + * import { Effect, Fiber, LogLevel, Option } from "effect" + * + * const program = Effect.gen(function*() { + * const fiber = yield* Effect.fork(Effect.fail("Unhandled error!")) + * yield* Fiber.join(fiber) + * }) + * + * Effect.runFork(program.pipe(Effect.withUnhandledErrorLogLevel(Option.some(LogLevel.Error)))) + * // Output: + * // timestamp=... level=ERROR fiber=#1 message="Fiber terminated with an unhandled error" cause="Error: Unhandled error!" + * ``` + * + * @since 2.0.0 + * @category Logging + */ +export const withUnhandledErrorLogLevel = core.withUnhandledErrorLogLevel; +/** + * Conditionally executes an effect based on the specified log level and currently enabled log level. + * + * **Details** + * + * This function runs the provided effect only if the specified log level is + * enabled. If the log level is enabled, the effect is executed and its result + * is wrapped in `Some`. If the log level is not enabled, the effect is not + * executed and `None` is returned. + * + * This function is useful for conditionally executing logging-related effects + * or other operations that depend on the current log level configuration. + * + * **Example** + * + * ```ts + * import { Effect, Logger, LogLevel } from "effect" + * + * const program = Effect.gen(function* () { + * yield* Effect.whenLogLevel(Effect.logTrace("message1"), LogLevel.Trace); // returns `None` + * yield* Effect.whenLogLevel(Effect.logDebug("message2"), LogLevel.Debug); // returns `Some` + * }).pipe(Logger.withMinimumLogLevel(LogLevel.Debug)); + * + * Effect.runFork(program) + * // timestamp=... level=DEBUG fiber=#0 message=message2 + * ``` + * + * @see {@link FiberRef.currentMinimumLogLevel} to retrieve the current minimum log level. + * + * @since 3.13.0 + * @category Logging + */ +export const whenLogLevel = fiberRuntime.whenLogLevel; +/** + * Converts an effect's failure into a fiber termination, removing the error + * from the effect's type. + * + * **Details** + * + * The `orDie` function is used when you encounter errors that you do not want + * to handle or recover from. It removes the error type from the effect and + * ensures that any failure will terminate the fiber. This is useful for + * propagating failures as defects, signaling that they should not be handled + * within the effect. + * + * **When to Use* + * + * Use `orDie` when failures should be treated as unrecoverable defects and no + * error handling is required. + * + * **Example** (Propagating an Error as a Defect) + * + * ```ts + * import { Effect } from "effect" + * + * const divide = (a: number, b: number) => + * b === 0 + * ? Effect.fail(new Error("Cannot divide by zero")) + * : Effect.succeed(a / b) + * + * // ┌─── Effect + * // ▼ + * const program = Effect.orDie(divide(1, 0)) + * + * Effect.runPromise(program).catch(console.error) + * // Output: + * // (FiberFailure) Error: Cannot divide by zero + * // ...stack trace... + * ``` + * + * @see {@link orDieWith} if you need to customize the error. + * + * @since 2.0.0 + * @category Converting Failures to Defects + */ +export const orDie = core.orDie; +/** + * Converts an effect's failure into a fiber termination with a custom error. + * + * **Details** + * + * The `orDieWith` function behaves like {@link orDie}, but it allows you to provide a mapping + * function to transform the error before terminating the fiber. This is useful for cases where + * you want to include a more detailed or user-friendly error when the failure is propagated + * as a defect. + * + * **When to Use** + * + * Use `orDieWith` when failures should terminate the fiber as defects, and you want to customize + * the error for clarity or debugging purposes. + * + * **Example** (Customizing Defect) + * + * ```ts + * import { Effect } from "effect" + * + * const divide = (a: number, b: number) => + * b === 0 + * ? Effect.fail(new Error("Cannot divide by zero")) + * : Effect.succeed(a / b) + * + * // ┌─── Effect + * // ▼ + * const program = Effect.orDieWith( + * divide(1, 0), + * (error) => new Error(`defect: ${error.message}`) + * ) + * + * Effect.runPromise(program).catch(console.error) + * // Output: + * // (FiberFailure) Error: defect: Cannot divide by zero + * // ...stack trace... + * ``` + * + * @see {@link orDie} if you don't need to customize the error. + * + * @since 2.0.0 + * @category Converting Failures to Defects + */ +export const orDieWith = core.orDieWith; +/** + * Attempts one effect, and if it fails, falls back to another effect. + * + * **Details** + * + * This function allows you to try executing an effect, and if it fails + * (produces an error), a fallback effect is executed instead. The fallback + * effect is defined as a lazy argument, meaning it will only be evaluated if + * the first effect fails. This provides a way to recover from errors by + * specifying an alternative path of execution. + * + * The error type of the resulting effect will be that of the fallback effect, + * as the first effect's error is replaced when the fallback is executed. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const success = Effect.succeed("success") + * const failure = Effect.fail("failure") + * const fallback = Effect.succeed("fallback") + * + * // Try the success effect first, fallback is not used + * const program1 = Effect.orElse(success, () => fallback) + * console.log(Effect.runSync(program1)) + * // Output: "success" + * + * // Try the failure effect first, fallback is used + * const program2 = Effect.orElse(failure, () => fallback) + * console.log(Effect.runSync(program2)) + * // Output: "fallback" + * ``` + * + * @see {@link catchAll} if you need to access the error in the fallback effect. + * + * @since 2.0.0 + * @category Fallback + */ +export const orElse = core.orElse; +/** + * Replaces the failure of an effect with a custom failure value. + * + * **Details** + * + * This function allows you to handle the failure of an effect by replacing it + * with a predefined failure value. If the effect fails, the new failure value + * provided by the `evaluate` function will be returned instead of the original + * failure. If the effect succeeds, the original success value is returned + * unchanged. + * + * **When to Use** + * + * This is particularly useful when you want to standardize error handling or + * provide a consistent failure value for specific operations. It simplifies + * error management by ensuring that all failures are replaced with a controlled + * alternative. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const validate = (age: number): Effect.Effect => { + * if (age < 0) { + * return Effect.fail("NegativeAgeError") + * } else if (age < 18) { + * return Effect.fail("IllegalAgeError") + * } else { + * return Effect.succeed(age) + * } + * } + * + * const program = Effect.orElseFail(validate(-1), () => "invalid age") + * + * console.log(Effect.runSyncExit(program)) + * // Output: + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { _id: 'Cause', _tag: 'Fail', failure: 'invalid age' } + * // } + * ``` + * + * @see {@link mapError} if you need to access the error to transform it. + * + * @since 2.0.0 + * @category Fallback + */ +export const orElseFail = effect.orElseFail; +/** + * Ensures the effect always succeeds by replacing failures with a default + * success value. + * + * **Details** + * + * This function transforms an effect that may fail into one that cannot fail by + * replacing any failure with a provided success value. If the original effect + * fails, the failure is "swallowed," and the specified success value is + * returned instead. If the original effect succeeds, its value remains + * unchanged. + * + * **When to Use** + * + * This is especially useful for providing default values in case of failure, + * ensuring that an effect always completes successfully. By using this + * function, you can avoid the need for complex error handling and guarantee a + * fallback result. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const validate = (age: number): Effect.Effect => { + * if (age < 0) { + * return Effect.fail("NegativeAgeError") + * } else if (age < 18) { + * return Effect.fail("IllegalAgeError") + * } else { + * return Effect.succeed(age) + * } + * } + * + * const program = Effect.orElseSucceed(validate(-1), () => 18) + * + * console.log(Effect.runSyncExit(program)) + * // Output: + * // { _id: 'Exit', _tag: 'Success', value: 18 } + * ``` + * + * @since 2.0.0 + * @category Fallback + */ +export const orElseSucceed = effect.orElseSucceed; +/** + * Runs a sequence of effects and returns the result of the first successful + * one. + * + * **Details** + * + * This function allows you to execute a collection of effects in sequence, + * stopping at the first success. If an effect succeeds, its result is + * immediately returned, and no further effects in the sequence are executed. + * However, if all the effects fail, the function will return the error of the + * last effect. + * + * The execution is sequential, meaning that effects are evaluated one at a time + * in the order they are provided. This ensures predictable behavior and avoids + * unnecessary computations. + * + * If the collection of effects is empty, an `IllegalArgumentException` is + * thrown, indicating that the operation is invalid without any effects to try. + * + * **When to Use** + * + * This is particularly useful when you have multiple fallback strategies or + * alternative sources to obtain a result, such as attempting multiple APIs, + * retrieving configurations, or accessing resources in a prioritized manner. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * interface Config { + * host: string + * port: number + * apiKey: string + * } + * + * // Create a configuration object with sample values + * const makeConfig = (name: string): Config => ({ + * host: `${name}.example.com`, + * port: 8080, + * apiKey: "12345-abcde" + * }) + * + * // Simulate retrieving configuration from a remote node + * const remoteConfig = (name: string): Effect.Effect => + * Effect.gen(function* () { + * // Simulate node3 being the only one with available config + * if (name === "node3") { + * yield* Console.log(`Config for ${name} found`) + * return makeConfig(name) + * } else { + * yield* Console.log(`Unavailable config for ${name}`) + * return yield* Effect.fail(new Error(`Config not found for ${name}`)) + * } + * }) + * + * // Define the master configuration and potential fallback nodes + * const masterConfig = remoteConfig("master") + * const nodeConfigs = ["node1", "node2", "node3", "node4"].map(remoteConfig) + * + * // Attempt to find a working configuration, + * // starting with the master and then falling back to other nodes + * const config = Effect.firstSuccessOf([masterConfig, ...nodeConfigs]) + * + * // Run the effect to retrieve the configuration + * const result = Effect.runSync(config) + * + * console.log(result) + * // Output: + * // Unavailable config for master + * // Unavailable config for node1 + * // Unavailable config for node2 + * // Config for node3 found + * // { host: 'node3.example.com', port: 8080, apiKey: '12345-abcde' } + * ``` + * + * @since 2.0.0 + * @category Fallback + */ +export const firstSuccessOf = effect.firstSuccessOf; +/** + * Retrieves the `Random` service from the context. + * + * @since 2.0.0 + * @category Random + */ +export const random = effect.random; +/** + * Retrieves the `Random` service from the context and uses it to run the + * specified effect. + * + * @since 2.0.0 + * @category Random + */ +export const randomWith = defaultServices.randomWith; +/** + * Executes the specified effect with the specified implementation of the + * `Random` service. + * + * @since 2.0.0 + * @category Random + */ +export const withRandom = defaultServices.withRandom; +/** + * Executes the specified effect with a `Random` service that cycles through + * a provided array of values. + * + * @example + * ```ts + * import { Effect, Random } from "effect" + * + * Effect.gen(function*() { + * console.log(yield* Random.next) // 0.2 + * console.log(yield* Random.next) // 0.5 + * console.log(yield* Random.next) // 0.8 + * }).pipe(Effect.withRandomFixed([0.2, 0.5, 0.8])) + * ``` + * + * @since 3.11.0 + * @category Random + */ +export const withRandomFixed = /*#__PURE__*/dual(2, (effect, values) => withRandom(effect, Random.fixed(values))); +/** + * Sets the implementation of the `Random` service to the specified value and + * restores it to its original value when the scope is closed. + * + * @since 2.0.0 + * @category Random + */ +export const withRandomScoped = fiberRuntime.withRandomScoped; +/** + * Returns an effect that accesses the runtime, which can be used to (unsafely) + * execute tasks. + * + * **When to Use** + * + * This is useful for integration with legacy code that must call back into + * Effect code. + * + * @since 2.0.0 + * @category Runtime + */ +export const runtime = runtime_.runtime; +/** + * Retrieves an effect that succeeds with the current runtime flags, which + * govern behavior and features of the runtime system. + * + * @since 2.0.0 + * @category Runtime + */ +export const getRuntimeFlags = core.runtimeFlags; +/** + * @since 2.0.0 + * @category Runtime + */ +export const patchRuntimeFlags = core.updateRuntimeFlags; +/** + * @since 2.0.0 + * @category Runtime + */ +export const withRuntimeFlagsPatch = core.withRuntimeFlags; +/** + * @since 2.0.0 + * @category Runtime + */ +export const withRuntimeFlagsPatchScoped = fiberRuntime.withRuntimeFlagsScoped; +/** + * Tags each metric in an effect with specific key-value pairs. + * + * **Details** + * + * This function allows you to tag all metrics in an effect with a set of + * key-value pairs or a single key-value pair. Tags help you add metadata to + * metrics, making it easier to filter and categorize them in monitoring + * systems. The provided tags will apply to all metrics generated within the + * effect's scope. + * + * @since 2.0.0 + * @category Metrics + */ +export const tagMetrics = effect.tagMetrics; +/** + * Adds labels to metrics within an effect using `MetricLabel` objects. + * + * **Details** + * + * This function allows you to label metrics using `MetricLabel` objects. Labels + * help add structured metadata to metrics for categorization and filtering in + * monitoring systems. The provided labels will apply to all metrics within the + * effect's execution. + * + * @since 2.0.0 + * @category Metrics + */ +export const labelMetrics = effect.labelMetrics; +/** + * Tags metrics within a scope with a specific key-value pair. + * + * **Details** + * + * This function tags all metrics within a scope with the provided key-value + * pair. Once the scope is closed, the tag is automatically removed. This is + * useful for applying temporary context-specific tags to metrics during scoped + * operations. + * + * @since 2.0.0 + * @category Metrics + */ +export const tagMetricsScoped = fiberRuntime.tagMetricsScoped; +/** + * Adds labels to metrics within a scope using `MetricLabel` objects. + * + * **Details** + * + * This function allows you to apply labels to all metrics generated within a + * specific scope using an array of `MetricLabel` objects. These labels provide + * additional metadata to metrics, which can be used for categorization, + * filtering, or monitoring purposes. The labels are scoped and will be removed + * automatically once the scope is closed, ensuring they are only applied + * temporarily within the defined context. + * + * @since 2.0.0 + * @category Metrics + */ +export const labelMetricsScoped = fiberRuntime.labelMetricsScoped; +/** + * Retrieves the metric labels associated with the current scope. + * + * @since 2.0.0 + * @category Metrics + */ +export const metricLabels = core.metricLabels; +/** + * Associates a metric with the current effect, updating it as the effect progresses. + * + * @since 2.0.0 + * @category Metrics + */ +export const withMetric = effect.withMetric; +/** + * Unsafely creates a new Semaphore. + * + * @since 2.0.0 + * @category Semaphore + */ +export const unsafeMakeSemaphore = circular.unsafeMakeSemaphore; +/** + * Creates a new semaphore with the specified number of permits. + * + * **Details** + * + * This function initializes a semaphore that controls concurrent access to a + * shared resource. The number of permits determines how many tasks can access + * the resource concurrently. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * // Create a semaphore with 3 permits + * const mutex = Effect.makeSemaphore(3) + * ``` + * + * @since 2.0.0 + * @category Semaphore + */ +export const makeSemaphore = circular.makeSemaphore; +/** + * @category Latch + * @since 3.8.0 + */ +export const unsafeMakeLatch = circular.unsafeMakeLatch; +/** + * Creates a new `Latch`, starting in the specified state. + * + * **Details** + * + * This function initializes a `Latch` safely, ensuring proper runtime + * guarantees. By default, the latch starts in the closed state. + * + * **Example** + * + * ```ts + * import { Console, Effect } from "effect" + * + * const program = Effect.gen(function*() { + * // Create a latch, starting in the closed state + * const latch = yield* Effect.makeLatch(false) + * + * // Fork a fiber that logs "open sesame" when the latch is opened + * const fiber = yield* Console.log("open sesame").pipe( + * latch.whenOpen, + * Effect.fork + * ) + * + * yield* Effect.sleep("1 second") + * + * // Open the latch + * yield* latch.open + * yield* fiber.await + * }) + * + * Effect.runFork(program) + * // Output: open sesame (after 1 second) + * ``` + * + * @category Latch + * @since 3.8.0 + */ +export const makeLatch = circular.makeLatch; +/** + * Runs an effect in the background, returning a fiber that can be observed or + * interrupted. + * + * Unless you specifically need a `Promise` or synchronous operation, `runFork` + * is a good default choice. + * + * **Details** + * + * This function is the foundational way to execute an effect in the background. + * It creates a "fiber," a lightweight, cooperative thread of execution that can + * be observed (to access its result), interrupted, or joined. Fibers are useful + * for concurrent programming and allow effects to run independently of the main + * program flow. + * + * Once the effect is running in a fiber, you can monitor its progress, cancel + * it if necessary, or retrieve its result when it completes. If the effect + * fails, the fiber will propagate the failure, which you can observe and + * handle. + * + * **When to Use** + * + * Use this function when you need to run an effect in the background, + * especially if the effect is long-running or performs periodic tasks. It's + * suitable for tasks that need to run independently but might still need + * observation or management, like logging, monitoring, or scheduled tasks. + * + * This function is ideal if you don't need the result immediately or if the + * effect is part of a larger concurrent workflow. + * + * **Example** (Running an Effect in the Background) + * + * ```ts + * import { Effect, Console, Schedule, Fiber } from "effect" + * + * // ┌─── Effect + * // ▼ + * const program = Effect.repeat( + * Console.log("running..."), + * Schedule.spaced("200 millis") + * ) + * + * // ┌─── RuntimeFiber + * // ▼ + * const fiber = Effect.runFork(program) + * + * setTimeout(() => { + * Effect.runFork(Fiber.interrupt(fiber)) + * }, 500) + * ``` + * + * @since 2.0.0 + * @category Running Effects + */ +export const runFork = runtime_.unsafeForkEffect; +/** + * Executes an effect asynchronously and handles the result using a callback. + * + * **Details** + * + * This function runs an effect asynchronously and passes the result (`Exit`) to + * a specified callback. The callback is invoked with the outcome of the effect: + * - On success, the callback receives the successful result. + * - On failure, the callback receives the failure information. + * + * **When to Use** + * + * This function is effectful and should only be invoked at the edges of your + * program. + * + * @since 2.0.0 + * @category Running Effects + */ +export const runCallback = runtime_.unsafeRunEffect; +/** + * Executes an effect and returns the result as a `Promise`. + * + * **Details** + * + * This function runs an effect and converts its result into a `Promise`. If the + * effect succeeds, the `Promise` will resolve with the successful result. If + * the effect fails, the `Promise` will reject with an error, which includes the + * failure details of the effect. + * + * The optional `options` parameter allows you to pass an `AbortSignal` for + * cancellation, enabling more fine-grained control over asynchronous tasks. + * + * **When to Use** + * + * Use this function when you need to execute an effect and work with its result + * in a promise-based system, such as when integrating with third-party + * libraries that expect `Promise` results. + * + * **Example** (Running a Successful Effect as a Promise) + * + * ```ts + * import { Effect } from "effect" + * + * Effect.runPromise(Effect.succeed(1)).then(console.log) + * // Output: 1 + * ``` + * + * **Example** (Handling a Failing Effect as a Rejected Promise) + * + * ```ts + * import { Effect } from "effect" + * + * Effect.runPromise(Effect.fail("my error")).catch(console.error) + * // Output: + * // (FiberFailure) Error: my error + * ``` + * + * @see {@link runPromiseExit} for a version that returns an `Exit` type instead + * of rejecting. + * + * @since 2.0.0 + * @category Running Effects + */ +export const runPromise = runtime_.unsafeRunPromiseEffect; +/** + * Runs an effect and returns a `Promise` that resolves to an `Exit`, + * representing the outcome. + * + * **Details** + * + * This function executes an effect and resolves to an `Exit` object. The `Exit` + * type provides detailed information about the result of the effect: + * - If the effect succeeds, the `Exit` will be of type `Success` and include + * the value produced by the effect. + * - If the effect fails, the `Exit` will be of type `Failure` and contain a + * `Cause` object, detailing the failure. + * + * Using this function allows you to examine both successful results and failure + * cases in a unified way, while still leveraging `Promise` for handling the + * asynchronous behavior of the effect. + * + * **When to Use** + * + * Use this function when you need to understand the outcome of an effect, + * whether it succeeded or failed, and want to work with this result using + * `Promise` syntax. This is particularly useful when integrating with systems + * that rely on promises but need more detailed error handling than a simple + * rejection. + * + * **Example** (Handling Results as Exit) + * + * ```ts + * import { Effect } from "effect" + * + * // Execute a successful effect and get the Exit result as a Promise + * Effect.runPromiseExit(Effect.succeed(1)).then(console.log) + * // Output: + * // { + * // _id: "Exit", + * // _tag: "Success", + * // value: 1 + * // } + * + * // Execute a failing effect and get the Exit result as a Promise + * Effect.runPromiseExit(Effect.fail("my error")).then(console.log) + * // Output: + * // { + * // _id: "Exit", + * // _tag: "Failure", + * // cause: { + * // _id: "Cause", + * // _tag: "Fail", + * // failure: "my error" + * // } + * // } + * ``` + * + * @since 2.0.0 + * @category Running Effects + */ +export const runPromiseExit = runtime_.unsafeRunPromiseExitEffect; +/** + * Executes an effect synchronously, running it immediately and returning the + * result. + * + * **Details** + * + * This function evaluates the provided effect synchronously, returning its + * result directly. It is ideal for effects that do not fail or include + * asynchronous operations. If the effect does fail or involves async tasks, it + * will throw an error. Execution stops at the point of failure or asynchronous + * operation, making it unsuitable for effects that require asynchronous + * handling. + * + * **Important**: Attempting to run effects that involve asynchronous operations + * or failures will result in exceptions being thrown, so use this function with + * care for purely synchronous and error-free effects. + * + * **When to Use** + * + * Use this function when: + * - You are sure that the effect will not fail or involve asynchronous + * operations. + * - You need a direct, synchronous result from the effect. + * - You are working within a context where asynchronous effects are not + * allowed. + * + * Avoid using this function for effects that can fail or require asynchronous + * handling. For such cases, consider using {@link runPromise} or + * {@link runSyncExit}. + * + * **Example** (Synchronous Logging) + * + * ```ts + * import { Effect } from "effect" + * + * const program = Effect.sync(() => { + * console.log("Hello, World!") + * return 1 + * }) + * + * const result = Effect.runSync(program) + * // Output: Hello, World! + * + * console.log(result) + * // Output: 1 + * ``` + * + * **Example** (Incorrect Usage with Failing or Async Effects) + * + * ```ts + * import { Effect } from "effect" + * + * try { + * // Attempt to run an effect that fails + * Effect.runSync(Effect.fail("my error")) + * } catch (e) { + * console.error(e) + * } + * // Output: + * // (FiberFailure) Error: my error + * + * try { + * // Attempt to run an effect that involves async work + * Effect.runSync(Effect.promise(() => Promise.resolve(1))) + * } catch (e) { + * console.error(e) + * } + * // Output: + * // (FiberFailure) AsyncFiberException: Fiber #0 cannot be resolved synchronously. This is caused by using runSync on an effect that performs async work + * ``` + * + * @see {@link runSyncExit} for a version that returns an `Exit` type instead of + * throwing an error. + * + * @since 2.0.0 + * @category Running Effects + */ +export const runSync = runtime_.unsafeRunSyncEffect; +/** + * Runs an effect synchronously and returns the result as an `Exit` type. + * + * **Details** + * + * This function executes the provided effect synchronously and returns an `Exit` + * type that encapsulates the outcome of the effect: + * - If the effect succeeds, the result is wrapped in a `Success`. + * - If the effect fails, it returns a `Failure` containing a `Cause` that explains + * the failure. + * + * If the effect involves asynchronous operations, this function will return a `Failure` + * with a `Die` cause, indicating that it cannot resolve the effect synchronously. + * This makes the function suitable for use only with effects that are synchronous + * in nature. + * + * **When to Use** + * + * Use this function when: + * - You want to handle both success and failure outcomes in a structured way using the `Exit` type. + * - You are working with effects that are purely synchronous and do not involve asynchronous operations. + * - You need to debug or inspect failures, including their causes, in a detailed manner. + * + * Avoid using this function for effects that involve asynchronous operations, as it will fail with a `Die` cause. + * + * **Example** (Handling Results as Exit) + * + * ```ts + * import { Effect } from "effect" + * + * console.log(Effect.runSyncExit(Effect.succeed(1))) + * // Output: + * // { + * // _id: "Exit", + * // _tag: "Success", + * // value: 1 + * // } + * + * console.log(Effect.runSyncExit(Effect.fail("my error"))) + * // Output: + * // { + * // _id: "Exit", + * // _tag: "Failure", + * // cause: { + * // _id: "Cause", + * // _tag: "Fail", + * // failure: "my error" + * // } + * // } + * ``` + * + * **Example** (Asynchronous Operation Resulting in Die) + * + * ```ts + * import { Effect } from "effect" + * + * console.log(Effect.runSyncExit(Effect.promise(() => Promise.resolve(1)))) + * // Output: + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { + * // _id: 'Cause', + * // _tag: 'Die', + * // defect: [Fiber #0 cannot be resolved synchronously. This is caused by using runSync on an effect that performs async work] { + * // fiber: [FiberRuntime], + * // _tag: 'AsyncFiberException', + * // name: 'AsyncFiberException' + * // } + * // } + * // } + * ``` + * + * @since 2.0.0 + * @category Running Effects + */ +export const runSyncExit = runtime_.unsafeRunSyncExitEffect; +/** + * Combines multiple effects and accumulates both successes and failures. + * + * **Details** + * + * This function allows you to combine multiple effects, continuing through all + * effects even if some of them fail. Unlike other functions that stop execution + * upon encountering an error, this function collects all errors into a `Cause`. + * The final result includes all successes and the accumulated failures. + * + * By default, effects are executed sequentially, but you can control + * concurrency and batching behavior using the `options` parameter. This + * provides flexibility in scenarios where you want to maximize performance or + * ensure specific ordering. + * + * **Example** + * + * ```ts + * import { Effect, Console } from "effect" + * + * const task1 = Console.log("task1").pipe(Effect.as(1)) + * const task2 = Effect.fail("Oh uh!").pipe(Effect.as(2)) + * const task3 = Console.log("task2").pipe(Effect.as(3)) + * const task4 = Effect.fail("Oh no!").pipe(Effect.as(4)) + * + * const program = task1.pipe( + * Effect.validate(task2), + * Effect.validate(task3), + * Effect.validate(task4) + * ) + * + * Effect.runPromiseExit(program).then(console.log) + * // Output: + * // task1 + * // task2 + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { + * // _id: 'Cause', + * // _tag: 'Sequential', + * // left: { _id: 'Cause', _tag: 'Fail', failure: 'Oh uh!' }, + * // right: { _id: 'Cause', _tag: 'Fail', failure: 'Oh no!' } + * // } + * // } + * ``` + * + * @see {@link zip} for a version that stops at the first error. + * + * @since 2.0.0 + * @category Error Accumulation + */ +export const validate = fiberRuntime.validate; +/** + * Sequentially combines two effects using a specified combiner function while + * accumulating errors. + * + * **Details** + * + * This function combines two effects, `self` and `that`, into a single effect + * by applying the provided combiner function to their results. If both effects + * succeed, the combiner function is applied to their results to produce the + * final value. If either effect fails, the failures are accumulated into a + * combined `Cause`. + * + * By default, effects are executed sequentially. However, the execution mode + * can be controlled using the `options` parameter to enable concurrency, + * batching, or customized finalizer behavior. + * + * @since 2.0.0 + * @category Error Accumulation + */ +export const validateWith = fiberRuntime.validateWith; +/** + * Combines two effects into a single effect, producing a tuple of their + * results. + * + * **Details** + * + * This function combines two effects, `self` and `that`, into one. It executes + * the first effect (`self`) and then the second effect (`that`), collecting + * their results into a tuple. Both effects must succeed for the resulting + * effect to succeed. If either effect fails, the entire operation fails. + * + * By default, the effects are executed sequentially. If the `concurrent` option + * is set to `true`, the effects will run concurrently, potentially improving + * performance for independent operations. + * + * **Example** (Combining Two Effects Sequentially) + * + * ```ts + * import { Effect } from "effect" + * + * const task1 = Effect.succeed(1).pipe( + * Effect.delay("200 millis"), + * Effect.tap(Effect.log("task1 done")) + * ) + * const task2 = Effect.succeed("hello").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Effect.log("task2 done")) + * ) + * + * // Combine the two effects together + * // + * // ┌─── Effect<[number, string], never, never> + * // ▼ + * const program = Effect.zip(task1, task2) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // timestamp=... level=INFO fiber=#0 message="task1 done" + * // timestamp=... level=INFO fiber=#0 message="task2 done" + * // [ 1, 'hello' ] + * ``` + * + * **Example** (Combining Two Effects Concurrently) + * + * ```ts + * import { Effect } from "effect" + * + * const task1 = Effect.succeed(1).pipe( + * Effect.delay("200 millis"), + * Effect.tap(Effect.log("task1 done")) + * ) + * const task2 = Effect.succeed("hello").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Effect.log("task2 done")) + * ) + * + * // Run both effects concurrently using the concurrent option + * const program = Effect.zip(task1, task2, { concurrent: true }) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // timestamp=... level=INFO fiber=#0 message="task2 done" + * // timestamp=... level=INFO fiber=#0 message="task1 done" + * // [ 1, 'hello' ] + * ``` + * + * @see {@link zipWith} for a version that combines the results with a custom + * function. + * @see {@link validate} for a version that accumulates errors. + * + * @since 2.0.0 + * @category Zipping + */ +export const zip = fiberRuntime.zipOptions; +/** + * Executes two effects sequentially, returning the result of the first effect + * and ignoring the result of the second. + * + * **Details** + * + * This function allows you to run two effects in sequence, where the result of + * the first effect is preserved, and the result of the second effect is + * discarded. By default, the two effects are executed sequentially. If you need + * them to run concurrently, you can pass the `{ concurrent: true }` option. + * + * The second effect will always be executed, even though its result is ignored. + * This makes it useful for cases where you want to execute an effect for its + * side effects while keeping the result of another effect. + * + * **When to Use** + * + * Use this function when you are only interested in the result of the first + * effect but still need to run the second effect for its side effects, such as + * logging or performing a cleanup action. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const task1 = Effect.succeed(1).pipe( + * Effect.delay("200 millis"), + * Effect.tap(Effect.log("task1 done")) + * ) + * const task2 = Effect.succeed("hello").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Effect.log("task2 done")) + * ) + * + * const program = Effect.zipLeft(task1, task2) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // timestamp=... level=INFO fiber=#0 message="task1 done" + * // timestamp=... level=INFO fiber=#0 message="task2 done" + * // 1 + * ``` + * + * @see {@link zipRight} for a version that returns the result of the second + * effect. + * + * @since 2.0.0 + * @category Zipping + */ +export const zipLeft = fiberRuntime.zipLeftOptions; +/** + * Executes two effects sequentially, returning the result of the second effect + * while ignoring the result of the first. + * + * **Details** + * + * This function allows you to run two effects in sequence, keeping the result + * of the second effect and discarding the result of the first. By default, the + * two effects are executed sequentially. If you need them to run concurrently, + * you can pass the `{ concurrent: true }` option. + * + * The first effect will always be executed, even though its result is ignored. + * This makes it useful for scenarios where the first effect is needed for its + * side effects, but only the result of the second effect is important. + * + * **When to Use** + * + * Use this function when you are only interested in the result of the second + * effect but still need to run the first effect for its side effects, such as + * initialization or setup tasks. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const task1 = Effect.succeed(1).pipe( + * Effect.delay("200 millis"), + * Effect.tap(Effect.log("task1 done")) + * ) + * const task2 = Effect.succeed("hello").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Effect.log("task2 done")) + * ) + * + * const program = Effect.zipRight(task1, task2) + * + * Effect.runPromise(program).then(console.log) + * // Output: + * // timestamp=... level=INFO fiber=#0 message="task1 done" + * // timestamp=... level=INFO fiber=#0 message="task2 done" + * // hello + * ``` + * + * @see {@link zipLeft} for a version that returns the result of the first + * effect. + * + * @since 2.0.0 + * @category Zipping + */ +export const zipRight = fiberRuntime.zipRightOptions; +/** + * Combines two effects sequentially and applies a function to their results to + * produce a single value. + * + * **Details** + * + * This function runs two effects in sequence (or concurrently, if the `{ + * concurrent: true }` option is provided) and combines their results using a + * provided function. Unlike {@link zip}, which returns a tuple of the results, + * this function processes the results with a custom function to produce a + * single output. + * + * **Example** (Combining Effects with a Custom Function) + * + * ```ts + * import { Effect } from "effect" + * + * const task1 = Effect.succeed(1).pipe( + * Effect.delay("200 millis"), + * Effect.tap(Effect.log("task1 done")) + * ) + * const task2 = Effect.succeed("hello").pipe( + * Effect.delay("100 millis"), + * Effect.tap(Effect.log("task2 done")) + * ) + * + * const task3 = Effect.zipWith( + * task1, + * task2, + * // Combines results into a single value + * (number, string) => number + string.length + * ) + * + * Effect.runPromise(task3).then(console.log) + * // Output: + * // timestamp=... level=INFO fiber=#3 message="task1 done" + * // timestamp=... level=INFO fiber=#2 message="task2 done" + * // 6 + * ``` + * + * @since 2.0.0 + * @category Zipping + */ +export const zipWith = fiberRuntime.zipWithOptions; +/** + * Applies the function produced by one effect to the value produced by another effect. + * + * **Details** + * + * This function combines two effects: + * - The first effect produces a function of type `(a: A) => B`. + * - The second effect produces a value of type `A`. + * + * Once both effects complete successfully, the function is applied to the value, resulting in an effect that produces a value of type `B`. + * + * @since 2.0.0 + */ +export const ap = /*#__PURE__*/dual(2, (self, that) => zipWith(self, that, (f, a) => f(a))); +/** + * @category Requests & Batching + * @since 2.0.0 + */ +export const blocked = core.blocked; +/** + * @category Requests & Batching + * @since 2.0.0 + */ +export const runRequestBlock = core.runRequestBlock; +/** + * @category Requests & Batching + * @since 2.0.0 + */ +export const step = core.step; +/** + * @since 2.0.0 + * @category Requests & Batching + */ +export const request = /*#__PURE__*/dual(args => Request.isRequest(args[0]), query.fromRequest); +/** + * @since 2.0.0 + * @category Requests & Batching + */ +export const cacheRequestResult = query.cacheRequest; +/** + * @since 2.0.0 + * @category Requests & Batching + */ +export const withRequestBatching = core.withRequestBatching; +/** + * @since 2.0.0 + * @category Requests & Batching + */ +export const withRequestCaching = query.withRequestCaching; +/** + * @since 2.0.0 + * @category Requests & Batching + */ +export const withRequestCache = query.withRequestCache; +/** + * @since 2.0.0 + * @category Tracing + */ +export const tracer = effect.tracer; +/** + * @since 2.0.0 + * @category Tracing + */ +export const tracerWith = defaultServices.tracerWith; +/** + * @since 2.0.0 + * @category Tracing + */ +export const withTracer = defaultServices.withTracer; +/** + * @since 2.0.0 + * @category Tracing + */ +export const withTracerScoped = fiberRuntime.withTracerScoped; +/** + * Disable the tracer for the given Effect. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * Effect.succeed(42).pipe( + * Effect.withSpan("my-span"), + * // the span will not be registered with the tracer + * Effect.withTracerEnabled(false) + * ) + * ``` + * + * @since 2.0.0 + * @category Tracing + */ +export const withTracerEnabled = core.withTracerEnabled; +/** + * @since 2.0.0 + * @category Tracing + */ +export const withTracerTiming = core.withTracerTiming; +/** + * Adds annotations to each span in the effect for enhanced traceability. + * + * **Details** + * + * This function lets you attach key-value annotations to all spans generated + * during the execution of an effect. Annotations provide additional context, + * such as metadata or labels, which can help you understand and debug + * asynchronous workflows more effectively. + * + * You can either pass a single key-value pair or a record of key-value pairs to + * annotate the spans. These annotations can then be visualized in tracing tools + * that support span annotations. + * + * @since 2.0.0 + * @category Tracing + */ +export const annotateSpans = effect.annotateSpans; +/** + * Adds annotations to the currently active span for traceability. + * + * **Details** + * + * This function adds key-value annotations to the currently active span in the + * effect's trace. These annotations help provide more context about the + * operation being executed at a specific point in time. Unlike + * {@link annotateSpans}, which applies to all spans in an effect, this function + * focuses solely on the active span. + * + * You can either pass a single key-value pair or a record of key-value pairs to + * annotate the span. These annotations are useful for adding metadata to + * operations, especially in systems with detailed observability requirements. + * + * @since 2.0.0 + * @category Tracing + */ +export const annotateCurrentSpan = effect.annotateCurrentSpan; +/** + * @since 2.0.0 + * @category Tracing + */ +export const currentSpan = effect.currentSpan; +/** + * @since 3.20.0 + * @category Tracing + */ +export const currentPropagatedSpan = effect.currentPropagatedSpan; +/** + * @since 2.0.0 + * @category Tracing + */ +export const currentParentSpan = effect.currentParentSpan; +/** + * @since 2.0.0 + * @category Tracing + */ +export const spanAnnotations = effect.spanAnnotations; +/** + * @since 2.0.0 + * @category Tracing + */ +export const spanLinks = effect.spanLinks; +/** + * For all spans in this effect, add a link with the provided span. + * + * @since 2.0.0 + * @category Tracing + */ +export const linkSpans = effect.linkSpans; +/** + * Add span links to the current span. + * + * @since 3.14.0 + * @category Tracing + */ +export const linkSpanCurrent = effect.linkSpanCurrent; +/** + * Create a new span for tracing. + * + * @since 2.0.0 + * @category Tracing + */ +export const makeSpan = effect.makeSpan; +/** + * Create a new span for tracing, and automatically close it when the Scope + * finalizes. + * + * The span is not added to the current span stack, so no child spans will be + * created for it. + * + * @since 2.0.0 + * @category Tracing + */ +export const makeSpanScoped = fiberRuntime.makeSpanScoped; +/** + * Create a new span for tracing, and automatically close it when the effect + * completes. + * + * The span is not added to the current span stack, so no child spans will be + * created for it. + * + * @since 2.0.0 + * @category Tracing + */ +export const useSpan = effect.useSpan; +/** + * Wraps the effect with a new span for tracing. + * + * @since 2.0.0 + * @category Tracing + */ +export const withSpan = effect.withSpan; +/** + * Wraps a function that returns an effect with a new span for tracing. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * const getTodo = Effect.functionWithSpan({ + * body: (id: number) => Effect.succeed(`Got todo ${id}!`), + * options: (id) => ({ + * name: `getTodo-${id}`, + * attributes: { id } + * }) + * }) + * ``` + * + * @since 3.2.0 + * @category Tracing + */ +export const functionWithSpan = effect.functionWithSpan; +/** + * Wraps the effect with a new span for tracing. + * + * The span is ended when the Scope is finalized. + * + * @since 2.0.0 + * @category Tracing + */ +export const withSpanScoped = fiberRuntime.withSpanScoped; +/** + * Adds the provided span to the current span stack. + * + * @since 2.0.0 + * @category Tracing + */ +export const withParentSpan = effect.withParentSpan; +/** + * Safely handles nullable values by creating an effect that fails for `null` or + * `undefined`. + * + * **Details** + * + * This function ensures that an input value is non-null and non-undefined + * before processing it. If the value is valid, the effect succeeds with the + * value. If the value is `null` or `undefined`, the effect fails with a + * `NoSuchElementException`. This is particularly useful for avoiding + * null-related errors by clearly separating valid values from invalid ones in + * effectful computations. + * + * The failure with `NoSuchElementException` allows you to explicitly handle + * cases where a value is expected but not provided, leading to safer and more + * predictable code. + * + * **When to Use** + * + * Use this function when working with values that may be `null` or `undefined` + * and you want to ensure that only non-null values are processed. It helps + * enforce null-safety and makes error handling more explicit. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * // ┌─── Effect + * // ▼ + * const maybe1 = Effect.fromNullable(1) + * + * Effect.runPromiseExit(maybe1).then(console.log) + * // Output: + * // { _id: 'Exit', _tag: 'Success', value: 1 } + * + * // ┌─── Effect + * // ▼ + * const maybe2 = Effect.fromNullable(null as number | null) + * + * Effect.runPromiseExit(maybe2).then(console.log) + * // Output: + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { + * // _id: 'Cause', + * // _tag: 'Fail', + * // failure: { _tag: 'NoSuchElementException' } + * // } + * // } + * ``` + * + * @since 2.0.0 + * @category Optional Wrapping & Unwrapping + */ +export const fromNullable = effect.fromNullable; +/** + * Converts an effect that may fail with a `NoSuchElementException` into an + * effect that succeeds with an `Option`. + * + * **Details** + * + * This function transforms an effect that might fail with + * `Cause.NoSuchElementException` into an effect that succeeds with an `Option` + * type. If the original effect succeeds, its value is wrapped in `Option.some`. + * If it fails specifically due to a `NoSuchElementException`, the failure is + * mapped to `Option.none`. Other types of failures remain unchanged and are + * passed through as they are. + * + * This is useful when working with effects where you want to gracefully handle + * the absence of a value while preserving other potential failures. + * + * **When to Use** + * + * Use this function when you need to handle missing values as `Option.none` + * rather than throwing or propagating errors like `NoSuchElementException`. + * It’s ideal for scenarios where you want to explicitly represent optionality + * in a type-safe way while retaining other failure information. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * // ┌─── Effect + * // ▼ + * const maybe1 = Effect.fromNullable(1) + * + * // ┌─── Effect, never, never> + * // ▼ + * const option1 = Effect.optionFromOptional(maybe1) + * + * Effect.runPromise(option1).then(console.log) + * // Output: { _id: 'Option', _tag: 'Some', value: 1 } + * + * // ┌─── Effect + * // ▼ + * const maybe2 = Effect.fromNullable(null as number | null) + * + * // ┌─── Effect, never, never> + * // ▼ + * const option2 = Effect.optionFromOptional(maybe2) + * + * Effect.runPromise(option2).then(console.log) + * // Output: { _tag: 'None' } + * ``` + * + * @since 2.0.0 + * @category Optional Wrapping & Unwrapping + */ +export const optionFromOptional = effect.optionFromOptional; +/** + * Converts an `Option` of an `Effect` into an `Effect` of an `Option`. + * + * **Details** + * + * This function transforms an `Option>` into an + * `Effect, E, R>`. If the `Option` is `None`, the resulting `Effect` + * will immediately succeed with a `None` value. If the `Option` is `Some`, the + * inner `Effect` will be executed, and its result wrapped in a `Some`. + * + * **Example** + * + * ```ts + * import { Effect, Option } from "effect" + * + * // ┌─── Option> + * // ▼ + * const maybe = Option.some(Effect.succeed(42)) + * + * // ┌─── Effect, never, never> + * // ▼ + * const result = Effect.transposeOption(maybe) + * + * console.log(Effect.runSync(result)) + * // Output: { _id: 'Option', _tag: 'Some', value: 42 } + * ``` + * + * @since 3.13.0 + * @category Optional Wrapping & Unwrapping + */ +export const transposeOption = self => { + return option_.isNone(self) ? succeedNone : map(self.value, option_.some); +}; +/** + * Applies an `Effect` on an `Option` and transposes the result. + * + * **Details** + * + * If the `Option` is `None`, the resulting `Effect` will immediately succeed with a `None` value. + * If the `Option` is `Some`, the effectful operation will be executed on the inner value, and its result wrapped in a `Some`. + * + * @example + * ```ts + * import { Effect, Option, pipe } from "effect" + * + * // ┌─── Effect, never, never>> + * // ▼ + * const noneResult = pipe( + * Option.none(), + * Effect.transposeMapOption(() => Effect.succeed(42)) // will not be executed + * ) + * console.log(Effect.runSync(noneResult)) + * // Output: { _id: 'Option', _tag: 'None' } + * + * // ┌─── Effect, never, never>> + * // ▼ + * const someSuccessResult = pipe( + * Option.some(42), + * Effect.transposeMapOption((value) => Effect.succeed(value * 2)) + * ) + * console.log(Effect.runSync(someSuccessResult)) + * // Output: { _id: 'Option', _tag: 'Some', value: 84 } + * ``` + * + * @since 3.14.0 + * @category Optional Wrapping & Unwrapping + */ +export const transposeMapOption = /*#__PURE__*/dual(2, (self, f) => option_.isNone(self) ? succeedNone : map(f(self.value), option_.some)); +const makeTagProxy = TagClass => { + const cache = new Map(); + return new Proxy(TagClass, { + get(target, prop, receiver) { + if (prop in target) { + return Reflect.get(target, prop, receiver); + } + if (cache.has(prop)) { + return cache.get(prop); + } + const fn = (...args) => core.andThen(target, s => { + if (typeof s[prop] === "function") { + cache.set(prop, (...args) => core.andThen(target, s => s[prop](...args))); + return s[prop](...args); + } + cache.set(prop, core.andThen(target, s => s[prop])); + return s[prop]; + }); + const cn = core.andThen(target, s => s[prop]); + // @effect-diagnostics-next-line floatingEffect:off + Object.assign(fn, cn); + const apply = fn.apply; + const bind = fn.bind; + const call = fn.call; + const proto = Object.setPrototypeOf({}, Object.getPrototypeOf(cn)); + proto.apply = apply; + proto.bind = bind; + proto.call = call; + Object.setPrototypeOf(fn, proto); + cache.set(prop, fn); + return fn; + } + }); +}; +/** + * Creates a unique tag for a dependency, embedding the service's methods as + * static properties. + * + * **Details** + * + * This function allows you to define a `Tag` for a service or dependency in + * your application. The `Tag` not only acts as an identifier but also provides + * direct access to the service's methods via static properties. This makes it + * easier to access and use the service in your code without manually managing + * contexts. + * + * In the example below, the fields of the service (in this case, the `notify` + * method) are turned into static properties of the Notifications class, making + * it easier to access them. + * + * **Example** + * + * ```ts + * import { Effect } from "effect" + * + * class Notifications extends Effect.Tag("Notifications")< + * Notifications, + * { readonly notify: (message: string) => Effect.Effect } + * >() {} + * + * // Create an effect that depends on the Notifications service + * const action = Notifications.notify("Hello, world!") + * ``` + * + * @since 2.0.0 + * @category Context + */ +export const Tag = id => () => { + const limit = Error.stackTraceLimit; + Error.stackTraceLimit = 2; + const creationError = new Error(); + Error.stackTraceLimit = limit; + function TagClass() {} + Object.setPrototypeOf(TagClass, TagProto); + TagClass.key = id; + Object.defineProperty(TagClass, "use", { + get() { + return body => core.andThen(this, body); + } + }); + Object.defineProperty(TagClass, "stack", { + get() { + return creationError.stack; + } + }); + return makeTagProxy(TagClass); +}; +/** + * Simplifies the creation and management of services in Effect by defining both + * a `Tag` and a `Layer`. + * + * **Details** + * + * This function allows you to streamline the creation of services by combining + * the definition of a `Context.Tag` and a `Layer` in a single step. It supports + * various ways of providing the service implementation: + * - Using an `effect` to define the service dynamically. + * - Using `sync` or `succeed` to define the service statically. + * - Using `scoped` to create services with lifecycle management. + * + * It also allows you to specify dependencies for the service, which will be + * provided automatically when the service is used. Accessors can be optionally + * generated for the service, making it more convenient to use. + * + * **Example** + * + * ```ts + * import { Effect } from 'effect'; + * + * class Prefix extends Effect.Service()("Prefix", { + * sync: () => ({ prefix: "PRE" }) + * }) {} + * + * class Logger extends Effect.Service()("Logger", { + * accessors: true, + * effect: Effect.gen(function* () { + * const { prefix } = yield* Prefix + * return { + * info: (message: string) => + * Effect.sync(() => { + * console.log(`[${prefix}][${message}]`) + * }) + * } + * }), + * dependencies: [Prefix.Default] + * }) {} + * ``` + * + * @since 3.9.0 + * @category Context + * @experimental might be up for breaking changes + */ +export const Service = function () { + return function () { + const [id, maker] = arguments; + const proxy = "accessors" in maker ? maker["accessors"] : false; + const limit = Error.stackTraceLimit; + Error.stackTraceLimit = 2; + const creationError = new Error(); + Error.stackTraceLimit = limit; + let patchState = "unchecked"; + const TagClass = function (service) { + if (patchState === "unchecked") { + const proto = Object.getPrototypeOf(service); + if (proto === Object.prototype || proto === null) { + patchState = "plain"; + } else { + const selfProto = Object.getPrototypeOf(this); + Object.setPrototypeOf(selfProto, proto); + patchState = "patched"; + } + } + if (patchState === "plain") { + Object.assign(this, service); + } else if (patchState === "patched") { + Object.setPrototypeOf(service, Object.getPrototypeOf(this)); + return service; + } + }; + TagClass.prototype._tag = id; + Object.defineProperty(TagClass, "make", { + get() { + return service => new this(service); + } + }); + Object.defineProperty(TagClass, "use", { + get() { + return body => core.andThen(this, body); + } + }); + TagClass.key = id; + Object.assign(TagClass, TagProto); + Object.defineProperty(TagClass, "stack", { + get() { + return creationError.stack; + } + }); + const hasDeps = "dependencies" in maker && maker.dependencies.length > 0; + const layerName = hasDeps ? "DefaultWithoutDependencies" : "Default"; + let layerCache; + let isFunction = false; + if ("effect" in maker) { + isFunction = typeof maker.effect === "function"; + Object.defineProperty(TagClass, layerName, { + get() { + if (isFunction) { + return function () { + return layer.fromEffect(TagClass, map(maker.effect.apply(null, arguments), _ => new this(_))); + }.bind(this); + } + return layerCache ??= layer.fromEffect(TagClass, map(maker.effect, _ => new this(_))); + } + }); + } else if ("scoped" in maker) { + isFunction = typeof maker.scoped === "function"; + Object.defineProperty(TagClass, layerName, { + get() { + if (isFunction) { + return function () { + return layer.scoped(TagClass, map(maker.scoped.apply(null, arguments), _ => new this(_))); + }.bind(this); + } + return layerCache ??= layer.scoped(TagClass, map(maker.scoped, _ => new this(_))); + } + }); + } else if ("sync" in maker) { + Object.defineProperty(TagClass, layerName, { + get() { + return layerCache ??= layer.sync(TagClass, () => new this(maker.sync())); + } + }); + } else { + Object.defineProperty(TagClass, layerName, { + get() { + return layerCache ??= layer.succeed(TagClass, new this(maker.succeed)); + } + }); + } + if (hasDeps) { + let layerWithDepsCache; + Object.defineProperty(TagClass, "Default", { + get() { + if (isFunction) { + return function () { + return layer.provide(this.DefaultWithoutDependencies.apply(null, arguments), maker.dependencies); + }; + } + return layerWithDepsCache ??= layer.provide(this.DefaultWithoutDependencies, maker.dependencies); + } + }); + } + return proxy === true ? makeTagProxy(TagClass) : TagClass; + }; +}; +/** + * The `Effect.fn` function allows you to create traced functions that return an + * effect. It provides two key features: + * + * - **Stack traces with location details** if an error occurs. + * - **Automatic span creation** for tracing when a span name is provided. + * + * If a span name is passed as the first argument, the function's execution is + * tracked using that name. If no name is provided, stack tracing still works, + * but spans are not created. + * + * A function can be defined using either: + * + * - A generator function, allowing the use of `yield*` for effect composition. + * - A regular function that returns an `Effect`. + * + * **Example** (Creating a Traced Function with a Span Name) + * + * ```ts + * import { Effect } from "effect" + * + * const myfunc = Effect.fn("myspan")(function* (n: N) { + * yield* Effect.annotateCurrentSpan("n", n) // Attach metadata to the span + * console.log(`got: ${n}`) + * yield* Effect.fail(new Error("Boom!")) // Simulate failure + * }) + * + * Effect.runFork(myfunc(100).pipe(Effect.catchAllCause(Effect.logError))) + * // Output: + * // got: 100 + * // timestamp=... level=ERROR fiber=#0 cause="Error: Boom! + * // at (/.../index.ts:6:22) <= Raise location + * // at myspan (/.../index.ts:3:23) <= Definition location + * // at myspan (/.../index.ts:9:16)" <= Call location + * ``` + * + * `Effect.fn` automatically creates spans. The spans capture information about + * the function execution, including metadata and error details. + * + * **Example** (Exporting Spans to the Console) + * + * ```ts skip-type-checking + * import { Effect } from "effect" + * import { NodeSdk } from "@effect/opentelemetry" + * import { + * ConsoleSpanExporter, + * BatchSpanProcessor + * } from "@opentelemetry/sdk-trace-base" + * + * const myfunc = Effect.fn("myspan")(function* (n: N) { + * yield* Effect.annotateCurrentSpan("n", n) + * console.log(`got: ${n}`) + * yield* Effect.fail(new Error("Boom!")) + * }) + * + * const program = myfunc(100) + * + * const NodeSdkLive = NodeSdk.layer(() => ({ + * resource: { serviceName: "example" }, + * // Export span data to the console + * spanProcessor: new BatchSpanProcessor(new ConsoleSpanExporter()) + * })) + * + * Effect.runFork(program.pipe(Effect.provide(NodeSdkLive))) + * // Output: + * // got: 100 + * // { + * // resource: { + * // attributes: { + * // 'service.name': 'example', + * // 'telemetry.sdk.language': 'nodejs', + * // 'telemetry.sdk.name': '@effect/opentelemetry', + * // 'telemetry.sdk.version': '1.30.1' + * // } + * // }, + * // instrumentationScope: { name: 'example', version: undefined, schemaUrl: undefined }, + * // traceId: '22801570119e57a6e2aacda3dec9665b', + * // parentId: undefined, + * // traceState: undefined, + * // name: 'myspan', + * // id: '7af530c1e01bc0cb', + * // kind: 0, + * // timestamp: 1741182277518402.2, + * // duration: 4300.416, + * // attributes: { + * // n: 100, + * // 'code.stacktrace': 'at (/.../index.ts:8:23)\n' + + * // 'at (/.../index.ts:14:17)' + * // }, + * // status: { code: 2, message: 'Boom!' }, + * // events: [ + * // { + * // name: 'exception', + * // attributes: { + * // 'exception.type': 'Error', + * // 'exception.message': 'Boom!', + * // 'exception.stacktrace': 'Error: Boom!\n' + + * // ' at (/.../index.ts:11:22)\n' + + * // ' at myspan (/.../index.ts:8:23)\n' + + * // ' at myspan (/.../index.ts:14:17)' + * // }, + * // time: [ 1741182277, 522702583 ], + * // droppedAttributesCount: 0 + * // } + * // ], + * // links: [] + * // } + * ``` + * + * `Effect.fn` also acts as a pipe function, allowing you to create a pipeline + * after the function definition using the effect returned by the generator + * function as the starting value of the pipeline. + * + * **Example** (Creating a Traced Function with a Delay) + * + * ```ts + * import { Effect } from "effect" + * + * const myfunc = Effect.fn( + * function* (n: number) { + * console.log(`got: ${n}`) + * yield* Effect.fail(new Error("Boom!")) + * }, + * // You can access both the created effect and the original arguments + * (effect, n) => Effect.delay(effect, `${n / 100} seconds`) + * ) + * + * Effect.runFork(myfunc(100).pipe(Effect.catchAllCause(Effect.logError))) + * // Output: + * // got: 100 + * // timestamp=... level=ERROR fiber=#0 cause="Error: Boom! (<= after 1 second) + * ``` + * + * @see {@link fnUntraced} for a version of this function that doesn't add a span. + * + * @since 3.11.0 + * @category Tracing + */ +export const fn = function (nameOrBody, ...pipeables) { + const limit = Error.stackTraceLimit; + Error.stackTraceLimit = 2; + const errorDef = new Error(); + Error.stackTraceLimit = limit; + if (typeof nameOrBody !== "string") { + return defineLength(nameOrBody.length, function (...args) { + const limit = Error.stackTraceLimit; + Error.stackTraceLimit = 2; + const errorCall = new Error(); + Error.stackTraceLimit = limit; + return fnApply({ + self: this, + body: nameOrBody, + args, + pipeables, + spanName: "", + spanOptions: { + context: internalTracer.DisablePropagation.context(true) + }, + errorDef, + errorCall + }); + }); + } + const name = nameOrBody; + const options = pipeables[0]; + return (body, ...pipeables) => defineLength(body.length, { + [name](...args) { + const limit = Error.stackTraceLimit; + Error.stackTraceLimit = 2; + const errorCall = new Error(); + Error.stackTraceLimit = limit; + return fnApply({ + self: this, + body, + args, + pipeables, + spanName: name, + spanOptions: options, + errorDef, + errorCall + }); + } + }[name]); +}; +function defineLength(length, fn) { + return Object.defineProperty(fn, "length", { + value: length, + configurable: true + }); +} +function fnApply(options) { + let effect; + let fnError = undefined; + if (isGeneratorFunction(options.body)) { + effect = core.fromIterator(() => options.body.apply(options.self, options.args)); + } else { + try { + effect = options.body.apply(options.self, options.args); + } catch (error) { + fnError = error; + effect = die(error); + } + } + if (options.pipeables.length > 0) { + try { + for (const x of options.pipeables) { + effect = x(effect, ...options.args); + } + } catch (error) { + effect = fnError ? failCause(internalCause.sequential(internalCause.die(fnError), internalCause.die(error))) : die(error); + } + } + let cache = false; + const captureStackTrace = () => { + if (cache !== false) { + return cache; + } + if (options.errorCall.stack) { + const stackDef = options.errorDef.stack.trim().split("\n"); + const stackCall = options.errorCall.stack.trim().split("\n"); + let endStackDef = stackDef.slice(2).join("\n").trim(); + if (!endStackDef.includes(`(`)) { + endStackDef = endStackDef.replace(/at (.*)/, "at ($1)"); + } + let endStackCall = stackCall.slice(2).join("\n").trim(); + if (!endStackCall.includes(`(`)) { + endStackCall = endStackCall.replace(/at (.*)/, "at ($1)"); + } + cache = `${endStackDef}\n${endStackCall}`; + return cache; + } + }; + const opts = options.spanOptions && "captureStackTrace" in options.spanOptions ? options.spanOptions : { + captureStackTrace, + ...options.spanOptions + }; + return withSpan(effect, options.spanName, opts); +} +/** + * Same as {@link fn}, but allows you to create a function that is not traced, for when performance is critical. + * + * @see {@link fn} for a version that includes tracing. + * + * @since 3.12.0 + * @category Tracing + */ +export const fnUntraced = core.fnUntraced; +// ----------------------------------------------------------------------------- +// Type constraints +// ----------------------------------------------------------------------------- +/** + * A no-op type constraint that enforces the success channel of an Effect conforms to + * the specified success type `A`. + * + * @example + * import { Effect } from "effect" + * + * // Ensure that the program does not expose any unhandled errors. + * const program = Effect.succeed(42).pipe(Effect.ensureSuccessType()) + * + * @since 3.17.0 + * @category Type constraints + */ +export const ensureSuccessType = () => effect => effect; +/** + * A no-op type constraint that enforces the error channel of an Effect conforms to + * the specified error type `E`. + * + * @example + * import { Effect } from "effect" + * + * // Ensure that the program does not expose any unhandled errors. + * const program = Effect.succeed(42).pipe(Effect.ensureErrorType()) + * + * @since 3.17.0 + * @category Type constraints + */ +export const ensureErrorType = () => effect => effect; +/** + * A no-op type constraint that enforces the requirements channel of an Effect conforms to + * the specified requirements type `R`. + * + * @example + * import { Effect } from "effect" + * + * // Ensure that the program does not have any requirements. + * const program = Effect.succeed(42).pipe(Effect.ensureRequirementsType()) + * + * @since 3.17.0 + * @category Type constraints + */ +export const ensureRequirementsType = () => effect => effect; +//# sourceMappingURL=Effect.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Either.js.map b/backend/node_modules/effect/dist/esm/Either.js.map new file mode 100644 index 0000000000000000000000000000000000000000..fd1d0e1729dfc9225bd1cfbc25e7a72f7e94b0e3 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Either.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Either.js","names":["Equivalence","constNull","constUndefined","dual","identity","doNotation","either","option_","isFunction","Gen","TypeId","right","void_","void","left","fromNullable","self","onNullable","fromOption","try_","evaluate","e","try","catch","isEither","isLeft","isRight","getRight","getLeft","getEquivalence","make","x","y","mapBoth","onLeft","onRight","mapLeft","f","map","match","liftPredicate","a","predicate","orLeftWith","filterOrLeft","flatMap","r","merge","getOrElse","getOrNull","getOrUndefined","getOrThrowWith","getOrThrow","Error","orElse","that","andThen","b","zipWith","r2","ap","all","input","Symbol","iterator","out","push","key","Object","keys","flip","adapter","gen","args","length","bind","state","next","done","current","isGenKind","value","yieldWrapGet","Do","bindTo","let_","let","transposeOption","isNone","none","some","transposeMapOption"],"sources":["../../src/Either.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAIA,OAAO,KAAKA,WAAW,MAAM,kBAAkB;AAE/C,SAASC,SAAS,EAAEC,cAAc,EAAEC,IAAI,EAA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AK,CAACJ,OAAO,CAACkF,IAAI,CAAC,GAAGnD,GAAG,CAACD,CAAC,CAACrB,IAAI,CAACiE,KAAK,CAAC,EAAE1E,OAAO,CAACmF,IAAI,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Equivalence.js.map b/backend/node_modules/effect/dist/esm/Equivalence.js.map new file mode 100644 index 0000000000000000000000000000000000000000..fdf66cf6261f0a2cd596231286341cc4a1295035 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Equivalence.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Equivalence.js","names":["dual","make","isEquivalent","self","that","isStrictEquivalent","x","y","strict","string","number","boolean","bigint","symbol","combine","combineMany","collection","equivalence","isAlwaysEquivalent","_x","_y","combineAll","mapInput","f","Date","date","getTime","product","xa","xb","ya","yb","all","len","Math","min","length","collectionLength","productMany","slice","tuple","elements","array","item","i","isEq","struct","fields","keys","Object","key"],"sources":["../../src/Equivalence.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;AAOA,SAASA,IAAI,QAAQ,eAAe;AAmBpC;;;;AAIA,OAAO,MAAMC,IAAI,GAAOC,YAA2C,IAAqB,CAACC,IAAO,EAAEC,IAAO,KACvGD,IAAI,KAAKC,IAAI,IAAIF,YAAY,CAACC,IAAI,EAAEC,IAAI,CAAC;AAE3C,MAAMC,kBAAkB,GAAGA,CAACC,CAAU,EAAEC,CAAU,KAAKD,CAAC,KAAKC,CAAC;AAE9D;;;;;;AAMA,OAAO,MAAMC,MAAM,GAA4BA,CAAA,KAAMH,kBAAkB;AAEvE;;;;AAIA,OAAO,MAAMI,MAAM,gBAAwBD,MAAM,EAAE;AAEnD;;;;AAIA,OAAO,MAAME,MAAM,gBAAwBF,MAAM,EAAE;AAEnD;;;;AAIA,OAAO,MAAMG,OAAO,gBAAyBH,MAAM,EAAE;AAErD;;;;AAIA,OAAO,MAAMI,MAAM,gBAAwBJ,MAAM,EAAE;AAEnD;;;;AAIA,OAA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AAC;AACxF,CAAC;AAED;;;;;;;;;;;;;AAaA,OAAO,MAAMC,KAAK,GAAGA,CACnB,GAAGC,QAAW,KACmFT,GAAG,CAACS,QAAQ,CAAQ;AAEvH;;;;;;AAMA,OAAO,MAAMC,KAAK,GAAOC,IAAoB,IAC3C1C,IAAI,CAAC,CAACE,IAAI,EAAEC,IAAI,KAAI;EAClB,IAAID,IAAI,CAACiC,MAAM,KAAKhC,IAAI,CAACgC,MAAM,EAAE;IAC/B,OAAO,KAAK;EACd;EAEA,KAAK,IAAIQ,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGzC,IAAI,CAACiC,MAAM,EAAEQ,CAAC,EAAE,EAAE;IACpC,MAAMC,IAAI,GAAGF,IAAI,CAACxC,IAAI,CAACyC,CAAC,CAAC,EAAExC,IAAI,CAACwC,CAAC,CAAC,CAAC;IACnC,IAAI,CAACC,IAAI,EAAE;MACT,OAAO,KAAK;IACd;EACF;EAEA,OAAO,IAAI;AACb,CAAC,CAAC;AAEJ;;;;;;;AAOA,OAAO,MAAMC,MAAM,GACjBC,MAAS,IACsF;EAC/F,MAAMC,IAAI,GAAGC,MAAM,CAACD,IAAI,CAACD,MAAM,CAAC;EAChC,OAAO9C,IAAI,CAAC,CAACE,IAAI,EAAEC,IAAI,KAAI;IACzB,KAAK,MAAM8C,GAAG,IAAIF,IAAI,EAAE;MACtB,IAAI,CAACD,MAAM,CAACG,GAAG,CAAC,CAAC/C,IAAI,CAAC+C,GAAG,CAAC,EAAE9C,IAAI,CAAC8C,GAAG,CAAC,CAAC,EAAE;QACtC,OAAO,KAAK;MACd;IACF;IACA,OAAO,IAAI;EACb,CAAC,CAAC;AACJ,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ExecutionPlan.js b/backend/node_modules/effect/dist/esm/ExecutionPlan.js new file mode 100644 index 0000000000000000000000000000000000000000..bd5727052b65ea111cfafe2ec7be32c5ca5e1ce8 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ExecutionPlan.js @@ -0,0 +1,99 @@ +import * as Effect from "./Effect.js"; +import * as internal from "./internal/executionPlan.js"; +import * as Layer from "./Layer.js"; +import { pipeArguments } from "./Pipeable.js"; +/** + * @since 3.16.0 + * @category Symbols + * @experimental + */ +export const TypeId = internal.TypeId; +/** + * @since 3.16.0 + * @category Guards + * @experimental + */ +export const isExecutionPlan = internal.isExecutionPlan; +/** + * Create an `ExecutionPlan`, which can be used with `Effect.withExecutionPlan` or `Stream.withExecutionPlan`, allowing you to provide different resources for each step of execution until the effect succeeds or the plan is exhausted. + * + * ```ts + * import type { LanguageModel } from "@effect/ai" + * import type { Layer } from "effect" + * import { Effect, ExecutionPlan, Schedule } from "effect" + * + * declare const layerBad: Layer.Layer + * declare const layerGood: Layer.Layer + * + * const ThePlan = ExecutionPlan.make( + * { + * // First try with the bad layer 2 times with a 3 second delay between attempts + * provide: layerBad, + * attempts: 2, + * schedule: Schedule.spaced(3000) + * }, + * // Then try with the bad layer 3 times with a 1 second delay between attempts + * { + * provide: layerBad, + * attempts: 3, + * schedule: Schedule.spaced(1000) + * }, + * // Finally try with the good layer. + * // + * // If `attempts` is omitted, the plan will only attempt once, unless a schedule is provided. + * { + * provide: layerGood + * } + * ) + * + * declare const effect: Effect.Effect< + * void, + * never, + * LanguageModel.LanguageModel + * > + * const withPlan: Effect.Effect = Effect.withExecutionPlan(effect, ThePlan) + * ``` + * + * @since 3.16.0 + * @category Constructors + * @experimental + */ +export const make = (...steps) => makeProto(steps.map((options, i) => { + if (options.attempts && options.attempts < 1) { + throw new Error(`ExecutionPlan.make: step[${i}].attempts must be greater than 0`); + } + return { + schedule: options.schedule, + attempts: options.attempts, + while: options.while ? input => Effect.suspend(() => { + const result = options.while(input); + return typeof result === "boolean" ? Effect.succeed(result) : result; + }) : undefined, + provide: options.provide + }; +})); +const Proto = { + [TypeId]: TypeId, + get withRequirements() { + const self = this; + return Effect.contextWith(context => makeProto(self.steps.map(step => ({ + ...step, + provide: Layer.isLayer(step.provide) ? Layer.provide(step.provide, Layer.succeedContext(context)) : step.provide + })))); + }, + pipe() { + return pipeArguments(this, arguments); + } +}; +const makeProto = steps => { + const self = Object.create(Proto); + self.steps = steps; + return self; +}; +/** + * @since 3.16.0 + * @category Combining + * @experimental + */ +export const merge = (...plans) => makeProto(plans.flatMap(plan => plan.steps)); +//# sourceMappingURL=ExecutionPlan.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ExecutionPlan.js.map b/backend/node_modules/effect/dist/esm/ExecutionPlan.js.map new file mode 100644 index 0000000000000000000000000000000000000000..91041211c43b5a7abc1fcae6129dadd7c3ad9097 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ExecutionPlan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ExecutionPlan.js","names":["Effect","internal","Layer","pipeArguments","TypeId","isExecutionPlan","make","steps","makeProto","map","options","i","attempts","Error","schedule","while","input","suspend","result","succeed","undefined","provide","Proto","withRequirements","self","contextWith","context","step","isLayer","succeedContext","pipe","arguments","Object","create","merge","plans","flatMap","plan"],"sources":["../../src/ExecutionPlan.ts"],"sourcesContent":[null],"mappings":"AAMA,OAAO,KAAKA,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,QAAQ,MAAM,6BAA6B;AACvD,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC,SAASC,aAAa,QAAQ,eAAe;AAG7C;;;;;AAKA,OAAO,MAAMC,MAAM,GAAkBH,QAAQ,CAACG,MAAM;AASpD;;;;;AAKA,OAAO,MAAMC,eAAe,GAA4CJ,QAAQ,CAACI,eAAe;AA6FhG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,OAAO,MAAMC,IAAI,GAAGA,CAClB,GAAGC,KAAgD,KAanDC,SAAS,CAACD,KAAK,CAACE,GAAG,CAAC,CAACC,OAAO,EAAEC,CAAC,KAAI;EACjC,IAAID,OAAO,CAACE,QAAQ,IAAIF,OAAO,CAACE,QAAQ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AK,GAAGA,KAAK;EAClB,OAAOiB,IAAI;AACb,CAAC;AAED;;;;;AAKA,OAAO,MAAMU,KAAK,GAAGA,CACnB,GAAGC,KAAY,KAMX3B,SAAS,CAAC2B,KAAK,CAACC,OAAO,CAAEC,IAAI,IAAKA,IAAI,CAAC9B,KAAK,CAAQ,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ExecutionStrategy.js.map b/backend/node_modules/effect/dist/esm/ExecutionStrategy.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c9e3ea98d221e656e08a053084a64f4f6653b327 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ExecutionStrategy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ExecutionStrategy.js","names":["internal","sequential","parallel","parallelN","isSequential","isParallel","isParallelN","match"],"sources":["../../src/ExecutionStrategy.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,QAAQ,MAAM,iCAAiC;AA6C3D;;;;;;AAMA,OAAO,MAAMC,UAAU,GAAsBD,QAAQ,CAACC,UAAU;AAEhE;;;;;;AAMA,OAAO,MAAMC,QAAQ,GAAsBF,QAAQ,CAACE,QAAQ;AAE5D;;;;;;AAMA,OAAO,MAAMC,SAAS,GAA+CH,QAAQ,CAACG,SAAS;AAEvF;;;;;;;AAOA,OAAO,MAAMC,YAAY,GAAoDJ,QAAQ,CAACI,YAAY;AAElG;;;;;;;AAOA,OAAO,MAAMC,UAAU,GAAkDL,QAAQ,CAACK,UAAU;AAE5F;;;;;;;AAOA,OAAO,MAAMC,WAAW,GAAmDN,QAAQ,CAACM,WAAW;AAE/F;;;;;;;AAOA,OAAO,MAAMC,KAAK,GA8BdP,QAAQ,CAACO,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Exit.js.map b/backend/node_modules/effect/dist/esm/Exit.js.map new file mode 100644 index 0000000000000000000000000000000000000000..8dabcb1d5ed2d3ecbcacb6078b83669b7d74377f --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Exit.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Exit.js","names":["core","isExit","exitIsExit","isFailure","exitIsFailure","isSuccess","exitIsSuccess","isInterrupted","exitIsInterrupted","as","exitAs","asVoid","exitAsVoid","causeOption","exitCauseOption","all","exitCollectAll","die","exitDie","exists","exitExists","fail","exitFail","failCause","exitFailCause","flatMap","exitFlatMap","flatMapEffect","exitFlatMapEffect","flatten","exitFlatten","forEachEffect","exitForEachEffect","fromEither","exitFromEither","fromOption","exitFromOption","getOrElse","exitGetOrElse","interrupt","exitInterrupt","map","exitMap","mapBoth","exitMapBoth","mapError","exitMapError","mapErrorCause","exitMapErrorCause","match","exitMatch","matchEffect","exitMatchEffect","succeed","exitSucceed","void_","exitVoid","void","zip","exitZip","zipLeft","exitZipLeft","zipRight","exitZipRight","zipPar","exitZipPar","zipParLeft","exitZipParLeft","zipParRight","exitZipParRight","zipWith","exitZipWith"],"sources":["../../src/Exit.ts"],"sourcesContent":[null],"mappings":"AAQA,OAAO,KAAKA,IAAI,MAAM,oBAAoB;AAuE1C;;;;;;AAMA,OAAO,MAAMC,MAAM,GAAgDD,IAAI,CAACE,UAAU;AAElF;;;;;;AAMA,OAAO,MAAMC,SAAS,GAAsDH,IAAI,CAACI,aAAa;AAE9F;;;;;;AAMA,OAAO,MAAMC,SAAS,GAAsDL,IAAI,CAACM,aAAa;AAE9F;;;;;;;AAOA,OAAO,MAAMC,aAAa,GAAwCP,IAAI,CAACQ,iBAAiB;AAExF;;;;;;;AAOA,OAAO,MAAMC,EAAE,GAiBXT,IAAI,CAACU,MAAM;AAEf;;;;;;AAMA,OAAO,MAAMC,MAAM,GAA8CX,IAAI,CAACY,UAAU;AAEhF;;;;;;;AAOA,OAAO,MAAMC,WAAW,GAA8Db,IAAI,CAACc,eAAe;AAE1G;;;;;;;AAOA,OAAO,MAAMC,GAAG,GAGwBf,IAAI,CAACgB,cAAc;AAE3D;;;;;;AAMA,OAAO,MAAM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O,GAA6BrD,IAAI,CAACsD,WAAW;AAEjE,MAAMC,KAAK,GAAevD,IAAI,CAACwD,QAAQ;AACvC;AACE;;;;;;AAMAD,KAAK,IAAIE,IAAI;AAGf;;;;;;;AAOA,OAAO,MAAMC,GAAG,GAiBZ1D,IAAI,CAAC2D,OAAO;AAEhB;;;;;;;AAOA,OAAO,MAAMC,OAAO,GAiBhB5D,IAAI,CAAC6D,WAAW;AAEpB;;;;;;;AAOA,OAAO,MAAMC,QAAQ,GAiBjB9D,IAAI,CAAC+D,YAAY;AAErB;;;;;;;AAOA,OAAO,MAAMC,MAAM,GAiBfhE,IAAI,CAACiE,UAAU;AAEnB;;;;;;;AAOA,OAAO,MAAMC,UAAU,GAiBnBlE,IAAI,CAACmE,cAAc;AAEvB;;;;;;;AAOA,OAAO,MAAMC,WAAW,GAiBpBpE,IAAI,CAACqE,eAAe;AAExB;;;;;;;AAOA,OAAO,MAAMC,OAAO,GA8BhBtE,IAAI,CAACuE,WAAW","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/FastCheck.js b/backend/node_modules/effect/dist/esm/FastCheck.js new file mode 100644 index 0000000000000000000000000000000000000000..b77db807179195044ad22965dd4abe3b6c9434c0 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/FastCheck.js @@ -0,0 +1,9 @@ +/** + * @since 3.10.0 + */ +/** + * @category re-exports + * @since 3.10.0 + */ +export * from "fast-check"; +//# sourceMappingURL=FastCheck.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Fiber.js b/backend/node_modules/effect/dist/esm/Fiber.js new file mode 100644 index 0000000000000000000000000000000000000000..9264f0c5373e91cce6e213d13a0981cebe9fec89 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Fiber.js @@ -0,0 +1,350 @@ +import * as core from "./internal/core.js"; +import * as circular from "./internal/effect/circular.js"; +import * as internal from "./internal/fiber.js"; +import * as fiberRuntime from "./internal/fiberRuntime.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const FiberTypeId = internal.FiberTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +export const RuntimeFiberTypeId = internal.RuntimeFiberTypeId; +/** + * @since 2.0.0 + * @category instances + */ +export const Order = internal.Order; +/** + * Returns `true` if the specified value is a `Fiber`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isFiber = internal.isFiber; +/** + * Returns `true` if the specified `Fiber` is a `RuntimeFiber`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isRuntimeFiber = internal.isRuntimeFiber; +/** + * The identity of the fiber. + * + * @since 2.0.0 + * @category getters + */ +export const id = internal.id; +const _await = internal._await; +export { +/** + * Awaits the fiber, which suspends the awaiting fiber until the result of the + * fiber has been determined. + * + * @since 2.0.0 + * @category getters + */ +_await as await }; +/** + * Awaits on all fibers to be completed, successfully or not. + * + * @since 2.0.0 + * @category destructors + */ +export const awaitAll = fiberRuntime.fiberAwaitAll; +/** + * Retrieves the immediate children of the fiber. + * + * @since 2.0.0 + * @category getters + */ +export const children = internal.children; +/** + * Collects all fibers into a single fiber producing an in-order list of the + * results. + * + * @since 2.0.0 + * @category constructors + */ +export const all = fiberRuntime.fiberAll; +/** + * A fiber that is done with the specified `Exit` value. + * + * @since 2.0.0 + * @category constructors + */ +export const done = internal.done; +/** + * @since 2.0.0 + * @category destructors + */ +export const dump = internal.dump; +/** + * @since 2.0.0 + * @category destructors + */ +export const dumpAll = internal.dumpAll; +/** + * A fiber that has already failed with the specified value. + * + * @since 2.0.0 + * @category constructors + */ +export const fail = internal.fail; +/** + * Creates a `Fiber` that has already failed with the specified cause. + * + * @since 2.0.0 + * @category constructors + */ +export const failCause = internal.failCause; +/** + * Lifts an `Effect` into a `Fiber`. + * + * @since 2.0.0 + * @category conversions + */ +export const fromEffect = internal.fromEffect; +/** + * Gets the current fiber if one is running. + * + * @since 2.0.0 + * @category utilities + */ +export const getCurrentFiber = internal.getCurrentFiber; +/** + * Inherits values from all `FiberRef` instances into current fiber. This + * will resume immediately. + * + * @since 2.0.0 + * @category destructors + */ +export const inheritAll = internal.inheritAll; +/** + * Interrupts the fiber from whichever fiber is calling this method. If the + * fiber has already exited, the returned effect will resume immediately. + * Otherwise, the effect will resume when the fiber exits. + * + * @since 2.0.0 + * @category interruption + */ +export const interrupt = core.interruptFiber; +/** + * Constructrs a `Fiber` that is already interrupted. + * + * @since 2.0.0 + * @category constructors + */ +export const interrupted = internal.interrupted; +/** + * Interrupts the fiber as if interrupted from the specified fiber. If the + * fiber has already exited, the returned effect will resume immediately. + * Otherwise, the effect will resume when the fiber exits. + * + * @since 2.0.0 + * @category interruption + */ +export const interruptAs = core.interruptAsFiber; +/** + * Interrupts the fiber as if interrupted from the specified fiber. If the + * fiber has already exited, the returned effect will resume immediately. + * Otherwise, the effect will resume when the fiber exits. + * + * @since 2.0.0 + * @category interruption + */ +export const interruptAsFork = internal.interruptAsFork; +/** + * Interrupts all fibers, awaiting their interruption. + * + * @since 2.0.0 + * @category interruption + */ +export const interruptAll = internal.interruptAll; +/** + * Interrupts all fibers as by the specified fiber, awaiting their + * interruption. + * + * @since 2.0.0 + * @category interruption + */ +export const interruptAllAs = internal.interruptAllAs; +/** + * Interrupts the fiber from whichever fiber is calling this method. The + * interruption will happen in a separate daemon fiber, and the returned + * effect will always resume immediately without waiting. + * + * @since 2.0.0 + * @category interruption + */ +export const interruptFork = fiberRuntime.fiberInterruptFork; +/** + * Joins the fiber, which suspends the joining fiber until the result of the + * fiber has been determined. Attempting to join a fiber that has erred will + * result in a catchable error. Joining an interrupted fiber will result in an + * "inner interruption" of this fiber, unlike interruption triggered by + * another fiber, "inner interruption" can be caught and recovered. + * + * @since 2.0.0 + * @category destructors + */ +export const join = internal.join; +/** + * Joins all fibers, awaiting their _successful_ completion. Attempting to + * join a fiber that has erred will result in a catchable error, _if_ that + * error does not result from interruption. + * + * @since 2.0.0 + * @category destructors + */ +export const joinAll = fiberRuntime.fiberJoinAll; +/** + * Maps over the value the Fiber computes. + * + * @since 2.0.0 + * @category mapping + */ +export const map = internal.map; +/** + * Effectually maps over the value the fiber computes. + * + * @since 2.0.0 + * @category mapping + */ +export const mapEffect = internal.mapEffect; +/** + * Passes the success of this fiber to the specified callback, and continues + * with the fiber that it returns. + * + * @since 2.0.0 + * @category mapping + */ +export const mapFiber = internal.mapFiber; +/** + * Folds over the `Fiber` or `RuntimeFiber`. + * + * @since 2.0.0 + * @category folding + */ +export const match = internal.match; +/** + * A fiber that never fails or succeeds. + * + * @since 2.0.0 + * @category constructors + */ +export const never = internal.never; +/** + * Returns a fiber that prefers `this` fiber, but falls back to the `that` one + * when `this` one fails. Interrupting the returned fiber will interrupt both + * fibers, sequentially, from left to right. + * + * @since 2.0.0 + * @category alternatives + */ +export const orElse = internal.orElse; +/** + * Returns a fiber that prefers `this` fiber, but falls back to the `that` one + * when `this` one fails. Interrupting the returned fiber will interrupt both + * fibers, sequentially, from left to right. + * + * @since 2.0.0 + * @category alternatives + */ +export const orElseEither = internal.orElseEither; +/** + * Tentatively observes the fiber, but returns immediately if it is not + * already done. + * + * @since 2.0.0 + * @category getters + */ +export const poll = internal.poll; +/** + * Pretty-prints a `RuntimeFiber`. + * + * @since 2.0.0 + * @category destructors + */ +export const pretty = internal.pretty; +/** + * Returns a chunk containing all root fibers. + * + * @since 2.0.0 + * @category constructors + */ +export const roots = internal.roots; +/** + * Returns a chunk containing all root fibers. + * + * @since 2.0.0 + * @category constructors + */ +export const unsafeRoots = internal.unsafeRoots; +/** + * Converts this fiber into a scoped effect. The fiber is interrupted when the + * scope is closed. + * + * @since 2.0.0 + * @category destructors + */ +export const scoped = fiberRuntime.fiberScoped; +/** + * Returns the `FiberStatus` of a `RuntimeFiber`. + * + * @since 2.0.0 + * @category getters + */ +export const status = internal.status; +/** + * Returns a fiber that has already succeeded with the specified value. + * + * @since 2.0.0 + * @category constructors + */ +export const succeed = internal.succeed; +const void_ = internal.void; +export { +/** + * A fiber that has already succeeded with unit. + * + * @since 2.0.0 + * @category constructors + */ +void_ as void }; +/** + * Zips this fiber and the specified fiber together, producing a tuple of + * their output. + * + * @since 2.0.0 + * @category zipping + */ +export const zip = circular.zipFiber; +/** + * Same as `zip` but discards the output of that `Fiber`. + * + * @since 2.0.0 + * @category zipping + */ +export const zipLeft = circular.zipLeftFiber; +/** + * Same as `zip` but discards the output of this `Fiber`. + * + * @since 2.0.0 + * @category zipping + */ +export const zipRight = circular.zipRightFiber; +/** + * Zips this fiber with the specified fiber, combining their results using the + * specified combiner function. Both joins and interruptions are performed in + * sequential order from left to right. + * + * @since 2.0.0 + * @category zipping + */ +export const zipWith = circular.zipWithFiber; +//# sourceMappingURL=Fiber.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Fiber.js.map b/backend/node_modules/effect/dist/esm/Fiber.js.map new file mode 100644 index 0000000000000000000000000000000000000000..355c247c03f7e7b5792ad01bf71b4eef6555d2e0 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Fiber.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Fiber.js","names":["core","circular","internal","fiberRuntime","FiberTypeId","RuntimeFiberTypeId","Order","isFiber","isRuntimeFiber","id","_await","await","awaitAll","fiberAwaitAll","children","all","fiberAll","done","dump","dumpAll","fail","failCause","fromEffect","getCurrentFiber","inheritAll","interrupt","interruptFiber","interrupted","interruptAs","interruptAsFiber","interruptAsFork","interruptAll","interruptAllAs","interruptFork","fiberInterruptFork","join","joinAll","fiberJoinAll","map","mapEffect","mapFiber","match","never","orElse","orElseEither","poll","pretty","roots","unsafeRoots","scoped","fiberScoped","status","succeed","void_","void","zip","zipFiber","zipLeft","zipLeftFiber","zipRight","zipRightFiber","zipWith","zipWithFiber"],"sources":["../../src/Fiber.ts"],"sourcesContent":[null],"mappings":"AAcA,OAAO,KAAKA,IAAI,MAAM,oBAAoB;AAC1C,OAAO,KAAKC,QAAQ,MAAM,+BAA+B;AACzD,OAAO,KAAKC,QAAQ,MAAM,qBAAqB;AAC/C,OAAO,KAAKC,YAAY,M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;;;AAMA,OAAO,MAAMC,MAAM,GAA8D5C,QAAQ,CAAC4C,MAAM;AAEhG;;;;;;AAMA,OAAO,MAAMC,KAAK,GAAiD7C,QAAQ,CAAC6C,KAAK;AAEjF;;;;;;AAMA,OAAO,MAAMC,WAAW,GAA+C9C,QAAQ,CAAC8C,WAAW;AAE3F;;;;;;;AAOA,OAAO,MAAMC,MAAM,GACjB9C,YAAY,CAAC+C,WAAW;AAE1B;;;;;;AAMA,OAAO,MAAMC,MAAM,GAA+EjD,QAAQ,CAACiD,MAAM;AAEjH;;;;;;AAMA,OAAO,MAAMC,OAAO,GAA8BlD,QAAQ,CAACkD,OAAO;AAElE,MAAMC,KAAK,GAAgBnD,QAAQ,CAACoD,IAAI;AACxC;AACE;;;;;;AAMAD,KAAK,IAAIC,IAAI;AAGf;;;;;;;AAOA,OAAO,MAAMC,GAAG,GAiBZtD,QAAQ,CAACuD,QAAQ;AAErB;;;;;;AAMA,OAAO,MAAMC,OAAO,GAehBxD,QAAQ,CAACyD,YAAY;AAEzB;;;;;;AAMA,OAAO,MAAMC,QAAQ,GAejB1D,QAAQ,CAAC2D,aAAa;AAE1B;;;;;;;;AAQA,OAAO,MAAMC,OAAO,GAmBhB5D,QAAQ,CAAC6D,YAAY","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/FiberHandle.js.map b/backend/node_modules/effect/dist/esm/FiberHandle.js.map new file mode 100644 index 0000000000000000000000000000000000000000..df2d49645749433f3467bf1308c3e7698651ba7b --- /dev/null +++ b/backend/node_modules/effect/dist/esm/FiberHandle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FiberHandle.js","names":["Cause","Deferred","Effect","Exit","Fiber","FiberId","constFalse","dual","HashSet","Inspectable","Option","pipeArguments","Predicate","Runtime","TypeId","Symbol","for","isFiberHandle","u","hasProperty","Proto","toString","format","toJSON","_id","state","NodeInspectSymbol","pipe","arguments","unsafeMake","deferred","self","Object","create","_tag","fiber","undefined","make","acquireRelease","map","handle","withFiberRuntime","parent","void","intoDeferred","asVoid","interruptAs","combine","id","internalFiberId","done","makeRuntime","flatMap","runtime","makeRuntimePromise","runtimePromise","internalFiberIdId","isInternalInterruption","reduceWithContext","emptyCase","failCase","dieCase","interruptCase","_","fiberId","has","ids","sequentialCase","left","right","parallelCase","unsafeSet","args","options","unsafeInterruptAsFork","none","onlyIfMissing","addObserver","exit","isFailure","propagateInterruption","cause","isInterruptedOnly","unsafeDone","set","fiberIdWith","sync","unsafeGet","fromNullable","get","suspend","clear","uninterruptibleMask","restore","zipRight","constInterruptedFiber","runFork","interrupt","run","isEffect","runImpl","effect","context","currentContext","fiberRefs","getFiberRefs","runtimeFlags","defaultRuntime","succeed","Promise","resolve","reject","isSuccess","value","squash","join","await","awaitEmpty"],"sources":["../../src/FiberHandle.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,SAASC,UAAU,EAAEC,IAAI,QAAQ,eAAe;AAChD,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAC/C,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,SAAwBC,aAAa,QAAQ,eAAe;AAC5D,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,OAAO,KAAKC,OAAO,MAAM,cAAc;AAGvC;;;;AAIA,OAAO,MAAMC,MAAM,gBAAkBC,MAAM,CAACC,GAAG,CAAC,oBAAoB,CAAC;AAwBrE;;;;AAIA,OAAO,MAAMC,aAAa,GAAIC,CAAU,IAAuBN,SAAS,CAACO,WAAW,CAACD,CAAC,EAAEJ,MAAM,CAAC;AAE/F,MAAMM,KA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AIH,IAAI,CAACN,KAAK,CAACU,KAAK,KAAKC,SAAS,EAAE;IAClE,OAAOlC,MAAM,CAACyC,IAAI;EACpB;EACA,OAAOvC,KAAK,CAACgH,KAAK,CAACrF,IAAI,CAACN,KAAK,CAACU,KAAK,CAAC;AACtC,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/FiberMap.js.map b/backend/node_modules/effect/dist/esm/FiberMap.js.map new file mode 100644 index 0000000000000000000000000000000000000000..82ad64b4827be9aa8d4e27de1245b897adc9b526 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/FiberMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FiberMap.js","names":["Cause","Deferred","Effect","Exit","Fiber","FiberId","constFalse","constVoid","dual","HashSet","Inspectable","Iterable","MutableHashMap","Option","pipeArguments","Predicate","Runtime","TypeId","Symbol","for","isFiberMap","u","hasProperty","Proto","iterator","state","_tag","empty","backing","toString","format","toJSON","_id","NodeInspectSymbol","pipe","arguments","unsafeMake","deferred","self","Object","create","make","acquireRelease","map","withFiberRuntime","parent","void","interruptAllAs","fiber","combine","id","internalFiberId","intoDeferred","makeRuntime","flatMap","runtime","makeRuntimePromise","runtimePromise","internalFiberIdId","isInternalInterruption","reduceWithContext","undefined","emptyCase","failCase","dieCase","interruptCase","_","fiberId","has","ids","sequentialCase","left","right","parallelCase","unsafeSet","args","key","options","unsafeInterruptAsFork","interruptAs","none","previous","get","onlyIfMissing","value","set","addObserver","exit","current","isSome","remove","isFailure","propagateInterruption","cause","isInterruptedOnly","unsafeDone","fiberIdWith","sync","unsafeGet","suspend","unsafeHas","removeFiber","clear","clearFiber","forEach","constInterruptedFiber","runFork","interrupt","run","isEffect","runImpl","effect","context","currentContext","fiberRefs","getFiberRefs","runtimeFlags","defaultRuntime","succeed","Promise","resolve","reject","isSuccess","squash","size","join","await","awaitEmpty","whileLoop","while","body","unsafeHead","step"],"sources":["../../src/FiberMap.ts"],"sourcesContent":[null],"mappings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,CAACD,QAAsC,CAAC;AAE7D;;;;;;AAMA,OAAO,MAAM0F,UAAU,GAAazF,IAAuB,IACzDpC,MAAM,CAAC8H,SAAS,CAAC;EACfC,KAAK,EAAEA,CAAA,KAAM3F,IAAI,CAACb,KAAK,CAACC,IAAI,KAAK,MAAM,IAAId,cAAc,CAACgH,IAAI,CAACtF,IAAI,CAACb,KAAK,CAACG,OAAO,CAAC,GAAG,CAAC;EACtFsG,IAAI,EAAEA,CAAA,KAAM9H,KAAK,CAAC0H,KAAK,CAACnH,QAAQ,CAACwH,UAAU,CAAC7F,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;EACrD8F,IAAI,EAAE7H;CACP,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/FiberRefs.js b/backend/node_modules/effect/dist/esm/FiberRefs.js new file mode 100644 index 0000000000000000000000000000000000000000..d4fed68217eb81f6f0a9eae4dc76216f2c6e3861 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/FiberRefs.js @@ -0,0 +1,92 @@ +import * as internal from "./internal/fiberRefs.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const FiberRefsSym = internal.FiberRefsSym; +const delete_ = internal.delete_; +export { +/** + * Deletes the specified `FiberRef` from the `FibterRefs`. + * + * @since 2.0.0 + * @category utils + */ +delete_ as delete }; +/** + * Returns a set of each `FiberRef` in this collection. + * + * @since 2.0.0 + * @category getters + */ +export const fiberRefs = internal.fiberRefs; +/** + * Forks this collection of fiber refs as the specified child fiber id. This + * will potentially modify the value of the fiber refs, as determined by the + * individual fiber refs that make up the collection. + * + * @since 2.0.0 + * @category utils + */ +export const forkAs = internal.forkAs; +/** + * Gets the value of the specified `FiberRef` in this collection of `FiberRef` + * values if it exists or `None` otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const get = internal.get; +/** + * Gets the value of the specified `FiberRef` in this collection of `FiberRef` + * values if it exists or the `initial` value of the `FiberRef` otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const getOrDefault = internal.getOrDefault; +/** + * Joins this collection of fiber refs to the specified collection, as the + * specified fiber id. This will perform diffing and merging to ensure + * preservation of maximum information from both child and parent refs. + * + * @since 2.0.0 + * @category utils + */ +export const joinAs = internal.joinAs; +/** + * Set each ref to either its value or its default. + * + * @since 2.0.0 + * @category utils + */ +export const setAll = internal.setAll; +/** + * Updates the value of the specified `FiberRef` using the provided `FiberId` + * + * @since 2.0.0 + * @category utils + */ +export const updateAs = internal.updateAs; +/** + * Updates the values of the specified `FiberRef` & value pairs using the provided `FiberId` + * + * @since 2.0.0 + * @category utils + */ +export const updateManyAs = internal.updateManyAs; +/** + * Note: it will not copy the provided Map, make sure to provide a fresh one. + * + * @since 2.0.0 + * @category unsafe + */ +export const unsafeMake = internal.unsafeMake; +/** + * The empty collection of `FiberRef` values. + * + * @category constructors + * @since 2.0.0 + */ +export const empty = internal.empty; +//# sourceMappingURL=FiberRefs.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/FiberRefs.js.map b/backend/node_modules/effect/dist/esm/FiberRefs.js.map new file mode 100644 index 0000000000000000000000000000000000000000..00514f01470acb55ac1f836609601ad43df2a05b --- /dev/null +++ b/backend/node_modules/effect/dist/esm/FiberRefs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FiberRefs.js","names":["internal","FiberRefsSym","delete_","delete","fiberRefs","forkAs","get","getOrDefault","joinAs","setAll","updateAs","updateManyAs","unsafeMake","empty"],"sources":["../../src/FiberRefs.ts"],"sourcesContent":[null],"mappings":"AAQA,OAAO,KAAKA,QAAQ,MAAM,yBAAyB;AAInD;;;;AAIA,OAAO,MAAMC,YAAY,GAAkBD,QAAQ,CAACC,YAAY;AAsBhE,MAAMC,OAAO,GAGTF,QAAQ,CAACE,OAAO;AAEpB;AACE;;;;;;AAMAA,OAAO,IAAIC,MAAM;AAGnB;;;;;;AAMA,OAAO,MAAMC,SAAS,GAAiEJ,QAAQ,CAACI,SAAS;AAEzG;;;;;;;;AAQA,OAAO,MAAMC,MAAM,GAmBfL,QAAQ,CAACK,MAAM;AAEnB;;;;;;;AAOA,OAAO,MAAMC,GAAG,GAiBZN,QAAQ,CAACM,GAAG;AAEhB;;;;;;;AAOA,OAAO,MAAMC,YAAY,GAiBrBP,QAAQ,CAACO,YAAY;AAEzB;;;;;;;;AAQA,OAAO,MAAMC,MAAM,GAmBfR,QAAQ,CAACQ,MAAM;AAEnB;;;;;;AAMA,OAAO,MAAMC,MAAM,GAA6CT,QAAQ,CAACS,MAAM;AAE/E;;;;;;AAMA,OAAO,MAAMC,QAAQ,GA4BjBV,QAAQ,CAACU,QAAQ;AAErB;;;;;;AAMA,OAAO,MAAMC,YAAY,GAgDrBX,QAAQ,CAACW,YAAY;AAEzB;;;;;;AAMA,OAAO,MAAMC,UAAU,GAENZ,QAAQ,CAACY,UAAU;AAEpC;;;;;;AAMA,OAAO,MAAMC,KAAK,GAAoBb,QAAQ,CAACa,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/FiberRefsPatch.js b/backend/node_modules/effect/dist/esm/FiberRefsPatch.js new file mode 100644 index 0000000000000000000000000000000000000000..2433dcd897b45f80a8cf2711e40f11f00359895a --- /dev/null +++ b/backend/node_modules/effect/dist/esm/FiberRefsPatch.js @@ -0,0 +1,32 @@ +import * as internal from "./internal/fiberRefs/patch.js"; +/** + * @since 2.0.0 + * @category constructors + */ +export const empty = internal.empty; +/** + * Constructs a patch that describes the changes between the specified + * collections of `FiberRef` + * + * @since 2.0.0 + * @category constructors + */ +export const diff = internal.diff; +/** + * Combines this patch and the specified patch to create a new patch that + * describes applying the changes from this patch and the specified patch + * sequentially. + * + * @since 2.0.0 + * @category constructors + */ +export const combine = internal.combine; +/** + * Applies the changes described by this patch to the specified collection + * of `FiberRef` values. + * + * @since 2.0.0 + * @category destructors + */ +export const patch = internal.patch; +//# sourceMappingURL=FiberRefsPatch.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/FiberStatus.js b/backend/node_modules/effect/dist/esm/FiberStatus.js new file mode 100644 index 0000000000000000000000000000000000000000..ea7c46ba1c02cb3dea942245e1e202d4bcb1a660 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/FiberStatus.js @@ -0,0 +1,52 @@ +import * as internal from "./internal/fiberStatus.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const FiberStatusTypeId = internal.FiberStatusTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +export const done = internal.done; +/** + * @since 2.0.0 + * @category constructors + */ +export const running = internal.running; +/** + * @since 2.0.0 + * @category constructors + */ +export const suspended = internal.suspended; +/** + * Returns `true` if the specified value is a `FiberStatus`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isFiberStatus = internal.isFiberStatus; +/** + * Returns `true` if the specified `FiberStatus` is `Done`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isDone = internal.isDone; +/** + * Returns `true` if the specified `FiberStatus` is `Running`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isRunning = internal.isRunning; +/** + * Returns `true` if the specified `FiberStatus` is `Suspended`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isSuspended = internal.isSuspended; +//# sourceMappingURL=FiberStatus.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Function.js b/backend/node_modules/effect/dist/esm/Function.js new file mode 100644 index 0000000000000000000000000000000000000000..bef55573fbb0700fbac37da9813c1be69764b9cb --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Function.js @@ -0,0 +1,467 @@ +/** + * Tests if a value is a `function`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isFunction } from "effect/Predicate" + * + * assert.deepStrictEqual(isFunction(isFunction), true) + * assert.deepStrictEqual(isFunction("function"), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isFunction = input => typeof input === "function"; +/** + * Creates a function that can be used in a data-last (aka `pipe`able) or + * data-first style. + * + * The first parameter to `dual` is either the arity of the uncurried function + * or a predicate that determines if the function is being used in a data-first + * or data-last style. + * + * Using the arity is the most common use case, but there are some cases where + * you may want to use a predicate. For example, if you have a function that + * takes an optional argument, you can use a predicate to determine if the + * function is being used in a data-first or data-last style. + * + * You can pass either the arity of the uncurried function or a predicate + * which determines if the function is being used in a data-first or + * data-last style. + * + * **Example** (Using arity to determine data-first or data-last style) + * + * ```ts + * import { dual, pipe } from "effect/Function" + * + * const sum = dual< + * (that: number) => (self: number) => number, + * (self: number, that: number) => number + * >(2, (self, that) => self + that) + * + * console.log(sum(2, 3)) // 5 + * console.log(pipe(2, sum(3))) // 5 + * ``` + * + * **Example** (Using call signatures to define the overloads) + * + * ```ts + * import { dual, pipe } from "effect/Function" + * + * const sum: { + * (that: number): (self: number) => number + * (self: number, that: number): number + * } = dual(2, (self: number, that: number): number => self + that) + * + * console.log(sum(2, 3)) // 5 + * console.log(pipe(2, sum(3))) // 5 + * ``` + * + * **Example** (Using a predicate to determine data-first or data-last style) + * + * ```ts + * import { dual, pipe } from "effect/Function" + * + * const sum = dual< + * (that: number) => (self: number) => number, + * (self: number, that: number) => number + * >( + * (args) => args.length === 2, + * (self, that) => self + that + * ) + * + * console.log(sum(2, 3)) // 5 + * console.log(pipe(2, sum(3))) // 5 + * ``` + * + * @since 2.0.0 + */ +export const dual = function (arity, body) { + if (typeof arity === "function") { + return function () { + if (arity(arguments)) { + // @ts-expect-error + return body.apply(this, arguments); + } + return self => body(self, ...arguments); + }; + } + switch (arity) { + case 0: + case 1: + throw new RangeError(`Invalid arity ${arity}`); + case 2: + return function (a, b) { + if (arguments.length >= 2) { + return body(a, b); + } + return function (self) { + return body(self, a); + }; + }; + case 3: + return function (a, b, c) { + if (arguments.length >= 3) { + return body(a, b, c); + } + return function (self) { + return body(self, a, b); + }; + }; + case 4: + return function (a, b, c, d) { + if (arguments.length >= 4) { + return body(a, b, c, d); + } + return function (self) { + return body(self, a, b, c); + }; + }; + case 5: + return function (a, b, c, d, e) { + if (arguments.length >= 5) { + return body(a, b, c, d, e); + } + return function (self) { + return body(self, a, b, c, d); + }; + }; + default: + return function () { + if (arguments.length >= arity) { + // @ts-expect-error + return body.apply(this, arguments); + } + const args = arguments; + return function (self) { + return body(self, ...args); + }; + }; + } +}; +/** + * Apply a function to given values. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, apply } from "effect/Function" + * import { length } from "effect/String" + * + * assert.deepStrictEqual(pipe(length, apply("hello")), 5) + * ``` + * + * @since 2.0.0 + */ +export const apply = (...a) => self => self(...a); +/** + * The identity function, i.e. A function that returns its input argument. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { identity } from "effect/Function" + * + * assert.deepStrictEqual(identity(5), 5) + * ``` + * + * @since 2.0.0 + */ +export const identity = a => a; +/** + * A function that ensures that the type of an expression matches some type, + * without changing the resulting type of that expression. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { satisfies } from "effect/Function" + * + * const test1 = satisfies()(5 as const) + * //^? const test: 5 + * // @ts-expect-error + * const test2 = satisfies()(5) + * //^? Argument of type 'number' is not assignable to parameter of type 'string' + * + * assert.deepStrictEqual(satisfies()(5), 5) + * ``` + * + * @since 2.0.0 + */ +export const satisfies = () => b => b; +/** + * Casts the result to the specified type. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { unsafeCoerce, identity } from "effect/Function" + * + * assert.deepStrictEqual(unsafeCoerce, identity) + * ``` + * + * @since 2.0.0 + */ +export const unsafeCoerce = identity; +/** + * Creates a constant value that never changes. + * + * This is useful when you want to pass a value to a higher-order function (a function that takes another function as its argument) + * and want that inner function to always use the same value, no matter how many times it is called. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { constant } from "effect/Function" + * + * const constNull = constant(null) + * + * assert.deepStrictEqual(constNull(), null) + * assert.deepStrictEqual(constNull(), null) + * ``` + * + * @since 2.0.0 + */ +export const constant = value => () => value; +/** + * A thunk that returns always `true`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { constTrue } from "effect/Function" + * + * assert.deepStrictEqual(constTrue(), true) + * ``` + * + * @since 2.0.0 + */ +export const constTrue = /*#__PURE__*/constant(true); +/** + * A thunk that returns always `false`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { constFalse } from "effect/Function" + * + * assert.deepStrictEqual(constFalse(), false) + * ``` + * + * @since 2.0.0 + */ +export const constFalse = /*#__PURE__*/constant(false); +/** + * A thunk that returns always `null`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { constNull } from "effect/Function" + * + * assert.deepStrictEqual(constNull(), null) + * ``` + * + * @since 2.0.0 + */ +export const constNull = /*#__PURE__*/constant(null); +/** + * A thunk that returns always `undefined`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { constUndefined } from "effect/Function" + * + * assert.deepStrictEqual(constUndefined(), undefined) + * ``` + * + * @since 2.0.0 + */ +export const constUndefined = /*#__PURE__*/constant(undefined); +/** + * A thunk that returns always `void`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { constVoid } from "effect/Function" + * + * assert.deepStrictEqual(constVoid(), undefined) + * ``` + * + * @since 2.0.0 + */ +export const constVoid = constUndefined; +/** + * Reverses the order of arguments for a curried function. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { flip } from "effect/Function" + * + * const f = (a: number) => (b: string) => a - b.length + * + * assert.deepStrictEqual(flip(f)('aaa')(2), -1) + * ``` + * + * @since 2.0.0 + */ +export const flip = f => (...b) => (...a) => f(...a)(...b); +/** + * Composes two functions, `ab` and `bc` into a single function that takes in an argument `a` of type `A` and returns a result of type `C`. + * The result is obtained by first applying the `ab` function to `a` and then applying the `bc` function to the result of `ab`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { compose } from "effect/Function" + * + * const increment = (n: number) => n + 1; + * const square = (n: number) => n * n; + * + * assert.strictEqual(compose(increment, square)(2), 9); + * ``` + * + * @since 2.0.0 + */ +export const compose = /*#__PURE__*/dual(2, (ab, bc) => a => bc(ab(a))); +/** + * The `absurd` function is a stub for cases where a value of type `never` is encountered in your code, + * meaning that it should be impossible for this code to be executed. + * + * This function is particularly useful when it's necessary to specify that certain cases are impossible. + * + * @since 2.0.0 + */ +export const absurd = _ => { + throw new Error("Called `absurd` function which should be uncallable"); +}; +/** + * Creates a version of this function: instead of `n` arguments, it accepts a single tuple argument. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { tupled } from "effect/Function" + * + * const sumTupled = tupled((x: number, y: number): number => x + y) + * + * assert.deepStrictEqual(sumTupled([1, 2]), 3) + * ``` + * + * @since 2.0.0 + */ +export const tupled = f => a => f(...a); +/** + * Inverse function of `tupled` + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { untupled } from "effect/Function" + * + * const getFirst = untupled((tuple: [A, B]): A => tuple[0]) + * + * assert.deepStrictEqual(getFirst(1, 2), 1) + * ``` + * + * @since 2.0.0 + */ +export const untupled = f => (...a) => f(a); +export function pipe(a, ab, bc, cd, de, ef, fg, gh, hi) { + switch (arguments.length) { + case 1: + return a; + case 2: + return ab(a); + case 3: + return bc(ab(a)); + case 4: + return cd(bc(ab(a))); + case 5: + return de(cd(bc(ab(a)))); + case 6: + return ef(de(cd(bc(ab(a))))); + case 7: + return fg(ef(de(cd(bc(ab(a)))))); + case 8: + return gh(fg(ef(de(cd(bc(ab(a))))))); + case 9: + return hi(gh(fg(ef(de(cd(bc(ab(a)))))))); + default: + { + let ret = arguments[0]; + for (let i = 1; i < arguments.length; i++) { + ret = arguments[i](ret); + } + return ret; + } + } +} +export function flow(ab, bc, cd, de, ef, fg, gh, hi, ij) { + switch (arguments.length) { + case 1: + return ab; + case 2: + return function () { + return bc(ab.apply(this, arguments)); + }; + case 3: + return function () { + return cd(bc(ab.apply(this, arguments))); + }; + case 4: + return function () { + return de(cd(bc(ab.apply(this, arguments)))); + }; + case 5: + return function () { + return ef(de(cd(bc(ab.apply(this, arguments))))); + }; + case 6: + return function () { + return fg(ef(de(cd(bc(ab.apply(this, arguments)))))); + }; + case 7: + return function () { + return gh(fg(ef(de(cd(bc(ab.apply(this, arguments))))))); + }; + case 8: + return function () { + return hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments)))))))); + }; + case 9: + return function () { + return ij(hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments))))))))); + }; + } + return; +} +/** + * Type hole simulation. + * + * @since 2.0.0 + */ +export const hole = /*#__PURE__*/unsafeCoerce(absurd); +/** + * The SK combinator, also known as the "S-K combinator" or "S-combinator", is a fundamental combinator in the + * lambda calculus and the SKI combinator calculus. + * + * This function is useful for discarding the first argument passed to it and returning the second argument. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { SK } from "effect/Function"; + * + * assert.deepStrictEqual(SK(0, "hello"), "hello") + * ``` + * + * @since 2.0.0 + */ +export const SK = (_, b) => b; +//# sourceMappingURL=Function.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Function.js.map b/backend/node_modules/effect/dist/esm/Function.js.map new file mode 100644 index 0000000000000000000000000000000000000000..843a4b707b9694952699671defe40b802b6854f2 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Function.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Function.js","names":["isFunction","input","dual","arity","body","arguments","apply","self","RangeError","a","b","length","c","d","e","args","identity","satisfies","unsafeCoerce","constant","value","constTrue","constFalse","constNull","constUndefined","undefined","constVoid","flip","f","compose","ab","bc","absurd","_","Error","tupled","untupled","pipe","cd","de","ef","fg","gh","hi","ret","i","flow","ij","hole","SK"],"sources":["../../src/Function.ts"],"sourcesContent":[null],"mappings":"AAaA;;;;;;;;;;;;;;;AAeA,OAAO,MAAMA,UAAU,GAAIC,KAAc,IAAwB,OAAOA,KAAK,KAAK,UAAU;AAE5F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgEA,OAAO,MAAMC,IAAI,GAmIb,SAAAA,CAASC,KAAK,EAAEC,IAAI;EACtB,IAAI,OAAOD,KAAK,KAAK,UAAU,EAAE;IAC/B,OAA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OsC,EAAG,CAACD,EAAG,CAACD,EAAG,CAACD,EAAG,CAACD,EAAG,CAACD,EAAG,CAACP,EAAG,CAACD,EAAE,CAACxB,KAAK,CAAC,IAAI,EAAED,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;MACrE,CAAC;IACH,KAAK,CAAC;MACJ,OAAO;QACL,OAAO0C,EAAG,CAACJ,EAAG,CAACD,EAAG,CAACD,EAAG,CAACD,EAAG,CAACD,EAAG,CAACD,EAAG,CAACP,EAAG,CAACD,EAAE,CAACxB,KAAK,CAAC,IAAI,EAAED,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;MAC1E,CAAC;EACL;EACA;AACF;AAEA;;;;;AAKA,OAAO,MAAM2C,IAAI,gBAAe9B,YAAY,CAACc,MAAM,CAAC;AAEpD;;;;;;;;;;;;;;;;AAgBA,OAAO,MAAMiB,EAAE,GAAGA,CAAOhB,CAAI,EAAEvB,CAAI,KAAQA,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/GlobalValue.js.map b/backend/node_modules/effect/dist/esm/GlobalValue.js.map new file mode 100644 index 0000000000000000000000000000000000000000..8d6f6d0e8e88e8e88e132903e1f9123bd339676b --- /dev/null +++ b/backend/node_modules/effect/dist/esm/GlobalValue.js.map @@ -0,0 +1 @@ +{"version":3,"file":"GlobalValue.js","names":["globalStoreId","globalStore","globalValue","id","compute","globalThis","Map","has","set","get"],"sources":["../../src/GlobalValue.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;AAcA,MAAMA,aAAa,GAAG,oBAAoB;AAE1C,IAAIC,WAA8B;AAElC;;;;;;;;;;;;;;;;;;;;;;;AAuBA,OAAO,MAAMC,WAAW,GAAGA,CAAIC,EAAW,EAAEC,OAAgB,KAAO;EACjE,IAAI,CAACH,WAAW,EAAE;IAChB;IACAI,UAAU,CAACL,aAAa,CAAC,KAAK,IAAIM,GAAG,EAAE;IACvC;IACAL,WAAW,GAAGI,UAAU,CAACL,aAAa,CAAsB;EAC9D;EACA,IAAI,CAACC,WAAW,CAACM,GAAG,CAACJ,EAAE,CAAC,EAAE;IACxBF,WAAW,CAACO,GAAG,CAACL,EAAE,EAAEC,OAAO,EAAE,CAAC;EAChC;EACA,OAAOH,WAAW,CAACQ,GAAG,CAACN,EAAE,CAAE;AAC7B,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/GroupBy.js b/backend/node_modules/effect/dist/esm/GroupBy.js new file mode 100644 index 0000000000000000000000000000000000000000..04c3db7a1dd8509d44485d2a6b45ffa699132521 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/GroupBy.js @@ -0,0 +1,39 @@ +/** + * @since 2.0.0 + */ +import * as internal from "./internal/groupBy.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const GroupByTypeId = internal.GroupByTypeId; +/** + * Run the function across all groups, collecting the results in an + * arbitrary order. + * + * @since 2.0.0 + * @category destructors + */ +export const evaluate = internal.evaluate; +/** + * Filter the groups to be processed. + * + * @since 2.0.0 + * @category utils + */ +export const filter = internal.filter; +/** + * Only consider the first `n` groups found in the `Stream`. + * + * @since 2.0.0 + * @category utils + */ +export const first = internal.first; +/** + * Constructs a `GroupBy` from a `Stream`. + * + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +//# sourceMappingURL=GroupBy.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/HKT.js b/backend/node_modules/effect/dist/esm/HKT.js new file mode 100644 index 0000000000000000000000000000000000000000..efe01cbe34c230b2cad622efc272e860073fccad --- /dev/null +++ b/backend/node_modules/effect/dist/esm/HKT.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=HKT.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Hash.js b/backend/node_modules/effect/dist/esm/Hash.js new file mode 100644 index 0000000000000000000000000000000000000000..7b769993e3b933b6303ab03b4c08677eb9145e9f --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Hash.js @@ -0,0 +1,166 @@ +/** + * @since 2.0.0 + */ +import { pipe } from "./Function.js"; +import { globalValue } from "./GlobalValue.js"; +import { hasProperty } from "./Predicate.js"; +import { structuralRegionState } from "./Utils.js"; +/** @internal */ +const randomHashCache = /*#__PURE__*/globalValue(/*#__PURE__*/Symbol.for("effect/Hash/randomHashCache"), () => new WeakMap()); +/** + * @since 2.0.0 + * @category symbols + */ +export const symbol = /*#__PURE__*/Symbol.for("effect/Hash"); +/** + * @since 2.0.0 + * @category hashing + */ +export const hash = self => { + if (structuralRegionState.enabled === true) { + return 0; + } + switch (typeof self) { + case "number": + return number(self); + case "bigint": + return string(self.toString(10)); + case "boolean": + return string(String(self)); + case "symbol": + return string(String(self)); + case "string": + return string(self); + case "undefined": + return string("undefined"); + case "function": + case "object": + { + if (self === null) { + return string("null"); + } else if (self instanceof Date) { + if (Number.isNaN(self.getTime())) { + return string("Invalid Date"); + } + return hash(self.toISOString()); + } else if (self instanceof URL) { + return hash(self.href); + } else if (isHash(self)) { + return self[symbol](); + } else { + return random(self); + } + } + default: + throw new Error(`BUG: unhandled typeof ${typeof self} - please report an issue at https://github.com/Effect-TS/effect/issues`); + } +}; +/** + * @since 2.0.0 + * @category hashing + */ +export const random = self => { + if (!randomHashCache.has(self)) { + randomHashCache.set(self, number(Math.floor(Math.random() * Number.MAX_SAFE_INTEGER))); + } + return randomHashCache.get(self); +}; +/** + * @since 2.0.0 + * @category hashing + */ +export const combine = b => self => self * 53 ^ b; +/** + * @since 2.0.0 + * @category hashing + */ +export const optimize = n => n & 0xbfffffff | n >>> 1 & 0x40000000; +/** + * @since 2.0.0 + * @category guards + */ +export const isHash = u => hasProperty(u, symbol); +/** + * @since 2.0.0 + * @category hashing + */ +export const number = n => { + if (n !== n || n === Infinity) { + return 0; + } + let h = n | 0; + if (h !== n) { + h ^= n * 0xffffffff; + } + while (n > 0xffffffff) { + h ^= n /= 0xffffffff; + } + return optimize(h); +}; +/** + * @since 2.0.0 + * @category hashing + */ +export const string = str => { + let h = 5381, + i = str.length; + while (i) { + h = h * 33 ^ str.charCodeAt(--i); + } + return optimize(h); +}; +/** + * @since 2.0.0 + * @category hashing + */ +export const structureKeys = (o, keys) => { + let h = 12289; + for (let i = 0; i < keys.length; i++) { + h ^= pipe(string(keys[i]), combine(hash(o[keys[i]]))); + } + return optimize(h); +}; +/** + * @since 2.0.0 + * @category hashing + */ +export const structure = o => structureKeys(o, Object.keys(o)); +/** + * @since 2.0.0 + * @category hashing + */ +export const array = arr => { + let h = 6151; + for (let i = 0; i < arr.length; i++) { + h = pipe(h, combine(hash(arr[i]))); + } + return optimize(h); +}; +/** + * @since 2.0.0 + * @category hashing + */ +export const cached = function () { + if (arguments.length === 1) { + const self = arguments[0]; + return function (hash) { + Object.defineProperty(self, symbol, { + value() { + return hash; + }, + enumerable: false + }); + return hash; + }; + } + const self = arguments[0]; + const hash = arguments[1]; + Object.defineProperty(self, symbol, { + value() { + return hash; + }, + enumerable: false + }); + return hash; +}; +//# sourceMappingURL=Hash.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/HashMap.js b/backend/node_modules/effect/dist/esm/HashMap.js new file mode 100644 index 0000000000000000000000000000000000000000..5c3140951bb8c18eb507f8b07b17340412bcd14b --- /dev/null +++ b/backend/node_modules/effect/dist/esm/HashMap.js @@ -0,0 +1,312 @@ +/** + * @since 2.0.0 + */ +import * as HM from "./internal/hashMap.js"; +import * as keySet_ from "./internal/hashMap/keySet.js"; +const TypeId = HM.HashMapTypeId; +/** + * @since 2.0.0 + * @category refinements + */ +export const isHashMap = HM.isHashMap; +/** + * Creates a new `HashMap`. + * + * @since 2.0.0 + * @category constructors + */ +export const empty = HM.empty; +/** + * Constructs a new `HashMap` from an array of key/value pairs. + * + * @since 2.0.0 + * @category constructors + */ +export const make = HM.make; +/** + * Creates a new `HashMap` from an iterable collection of key/value pairs. + * + * @since 2.0.0 + * @category constructors + */ +export const fromIterable = HM.fromIterable; +/** + * Checks if the `HashMap` contains any entries. + * + * @since 2.0.0 + * @category elements + */ +export const isEmpty = HM.isEmpty; +/** + * Safely lookup the value for the specified key in the `HashMap` using the + * internal hashing function. + * + * @since 2.0.0 + * @category elements + */ +export const get = HM.get; +/** + * Lookup the value for the specified key in the `HashMap` using a custom hash. + * + * @since 2.0.0 + * @category elements + */ +export const getHash = HM.getHash; +/** + * Unsafely lookup the value for the specified key in the `HashMap` using the + * internal hashing function. + * + * @since 2.0.0 + * @category unsafe + */ +export const unsafeGet = HM.unsafeGet; +/** + * Checks if the specified key has an entry in the `HashMap`. + * + * @since 2.0.0 + * @category elements + */ +export const has = HM.has; +/** + * Checks if the specified key has an entry in the `HashMap` using a custom + * hash. + * + * @since 2.0.0 + * @category elements + */ +export const hasHash = HM.hasHash; +/** + * Checks if an element matching the given predicate exists in the given `HashMap`. + * + * @example + * ```ts + * import { HashMap } from "effect" + * + * const hm = HashMap.make([1, 'a']) + * HashMap.hasBy(hm, (value, key) => value === 'a' && key === 1); // -> true + * HashMap.hasBy(hm, (value) => value === 'b'); // -> false + * + * ``` + * + * @since 3.16.0 + * @category elements + */ +export const hasBy = HM.hasBy; +/** + * Sets the specified key to the specified value using the internal hashing + * function. + * + * @since 2.0.0 + */ +export const set = HM.set; +/** + * Returns an `IterableIterator` of the keys within the `HashMap`. + * + * @since 2.0.0 + * @category getters + */ +export const keys = HM.keys; +/** + * Returns a `HashSet` of keys within the `HashMap`. + * + * @since 2.0.0 + * @category getter + */ +export const keySet = keySet_.keySet; +/** + * Returns an `IterableIterator` of the values within the `HashMap`. + * + * @since 2.0.0 + * @category getters + */ +export const values = HM.values; +/** + * Returns an `Array` of the values within the `HashMap`. + * + * @since 3.13.0 + * @category getters + */ +export const toValues = self => Array.from(values(self)); +/** + * Returns an `IterableIterator` of the entries within the `HashMap`. + * + * @since 2.0.0 + * @category getters + */ +export const entries = HM.entries; +/** + * Returns an `Array<[K, V]>` of the entries within the `HashMap`. + * + * @since 2.0.0 + * @category getters + */ +export const toEntries = self => Array.from(entries(self)); +/** + * Returns the number of entries within the `HashMap`. + * + * @since 2.0.0 + * @category getters + */ +export const size = HM.size; +/** + * Counts all the element of the given HashMap that pass the given predicate + * + * **Example** + * + * ```ts + * import { HashMap } from "effect" + * + * const map = HashMap.make([1, "a"], [2, "b"], [3, "c"]) + * const result = HashMap.countBy(map, (_v, key) => key % 2 === 1) + * console.log(result) // 2 + * ``` + * + * @since 3.17.0 + * @category folding + */ +export const countBy = HM.countBy; +/** + * Marks the `HashMap` as mutable. + * + * @since 2.0.0 + */ +export const beginMutation = HM.beginMutation; +/** + * Marks the `HashMap` as immutable. + * + * @since 2.0.0 + */ +export const endMutation = HM.endMutation; +/** + * Mutates the `HashMap` within the context of the provided function. + * + * @since 2.0.0 + */ +export const mutate = HM.mutate; +/** + * Set or remove the specified key in the `HashMap` using the specified + * update function. The value of the specified key will be computed using the + * provided hash. + * + * The update function will be invoked with the current value of the key if it + * exists, or `None` if no such value exists. + * + * @since 2.0.0 + */ +export const modifyAt = HM.modifyAt; +/** + * Alter the value of the specified key in the `HashMap` using the specified + * update function. The value of the specified key will be computed using the + * provided hash. + * + * The update function will be invoked with the current value of the key if it + * exists, or `None` if no such value exists. + * + * This function will always either update or insert a value into the `HashMap`. + * + * @since 2.0.0 + */ +export const modifyHash = HM.modifyHash; +/** + * Updates the value of the specified key within the `HashMap` if it exists. + * + * @since 2.0.0 + */ +export const modify = HM.modify; +/** + * Performs a union of this `HashMap` and that `HashMap`. + * + * @since 2.0.0 + */ +export const union = HM.union; +/** + * Remove the entry for the specified key in the `HashMap` using the internal + * hashing function. + * + * @since 2.0.0 + */ +export const remove = HM.remove; +/** + * Removes all entries in the `HashMap` which have the specified keys. + * + * @since 2.0.0 + */ +export const removeMany = HM.removeMany; +/** + * Maps over the entries of the `HashMap` using the specified function. + * + * @since 2.0.0 + * @category mapping + */ +export const map = HM.map; +/** + * Chains over the entries of the `HashMap` using the specified function. + * + * **NOTE**: the hash and equal of both maps have to be the same. + * + * @since 2.0.0 + * @category sequencing + */ +export const flatMap = HM.flatMap; +/** + * Applies the specified function to the entries of the `HashMap`. + * + * @since 2.0.0 + * @category traversing + */ +export const forEach = HM.forEach; +/** + * Reduces the specified state over the entries of the `HashMap`. + * + * @since 2.0.0 + * @category folding + */ +export const reduce = HM.reduce; +/** + * Filters entries out of a `HashMap` using the specified predicate. + * + * @since 2.0.0 + * @category filtering + */ +export const filter = HM.filter; +/** + * Filters out `None` values from a `HashMap` of `Options`s. + * + * @since 2.0.0 + * @category filtering + */ +export const compact = HM.compact; +/** + * Maps over the entries of the `HashMap` using the specified partial function + * and filters out `None` values. + * + * @since 2.0.0 + * @category filtering + */ +export const filterMap = HM.filterMap; +/** + * Returns the first element that satisfies the specified + * predicate, or `None` if no such element exists. + * + * @category elements + * @since 2.0.0 + */ +export const findFirst = HM.findFirst; +/** + * Checks if any entry in a hashmap meets a specific condition. + * + * @since 3.13.0 + * @category elements + */ +export const some = HM.some; +/** + * Checks if all entries in a hashmap meets a specific condition. + * + * @param self - The hashmap to check. + * @param predicate - The condition to test entries (value, key). + * + * @since 3.14.0 + * @category elements + */ +export const every = HM.every; +//# sourceMappingURL=HashMap.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/HashSet.js b/backend/node_modules/effect/dist/esm/HashSet.js new file mode 100644 index 0000000000000000000000000000000000000000..33f6e11f07c29537d10aeed008f304fe37693f8a --- /dev/null +++ b/backend/node_modules/effect/dist/esm/HashSet.js @@ -0,0 +1,1253 @@ +/** + * # HashSet + * + * An immutable `HashSet` provides a collection of unique values with efficient + * lookup, insertion and removal. Once created, a `HashSet` cannot be modified; + * any operation that would alter the set instead returns a new `HashSet` with + * the changes. This immutability offers benefits like predictable state + * management and easier reasoning about your code. + * + * ## What Problem Does It Solve? + * + * `HashSet` solves the problem of maintaining an unsorted collection where each + * value appears exactly once, with fast operations for checking membership and + * adding/removing values. + * + * ## When to Use + * + * Use `HashSet` when you need: + * + * - A collection with no duplicate values + * - Efficient membership testing (**`O(1)`** average complexity) + * - Set operations like union, intersection, and difference + * - An immutable data structure that preserves functional programming patterns + * + * ## Advanced Features + * + * HashSet provides operations for: + * + * - Transforming sets with map and flatMap + * - Filtering elements with filter + * - Combining sets with union, intersection and difference + * - Performance optimizations via mutable operations in controlled contexts + * + * ## Performance Characteristics + * + * - **Lookup** operations ({@link module:HashSet.has}): **`O(1)`** average time + * complexity + * - **Insertion** operations ({@link module:HashSet.add}): **`O(1)`** average time + * complexity + * - **Removal** operations ({@link module:HashSet.remove}): **`O(1)`** average + * time complexity + * - **Set** operations ({@link module:HashSet.union}, + * {@link module:HashSet.intersection}): **`O(n)`** where n is the size of the + * smaller set + * - **Iteration**: **`O(n)`** where n is the size of the set + * + * The HashSet data structure implements the following traits: + * + * - {@link Iterable}: allows iterating over the values in the set + * - {@link Equal}: allows comparing two sets for value-based equality + * - {@link Pipeable}: allows chaining operations with the pipe operator + * - {@link Inspectable}: allows inspecting the contents of the set + * + * ## Operations Reference + * + * | Category | Operation | Description | Complexity | + * | ------------ | ----------------------------------- | ------------------------------------------- | ---------- | + * | constructors | {@link module:HashSet.empty} | Creates an empty HashSet | O(1) | + * | constructors | {@link module:HashSet.fromIterable} | Creates a HashSet from an iterable | O(n) | + * | constructors | {@link module:HashSet.make} | Creates a HashSet from multiple values | O(n) | + * | | | | | + * | elements | {@link module:HashSet.has} | Checks if a value exists in the set | O(1) avg | + * | elements | {@link module:HashSet.some} | Checks if any element satisfies a predicate | O(n) | + * | elements | {@link module:HashSet.every} | Checks if all elements satisfy a predicate | O(n) | + * | elements | {@link module:HashSet.isSubset} | Checks if a set is a subset of another | O(n) | + * | | | | | + * | getters | {@link module:HashSet.values} | Gets an iterator of all values | O(1) | + * | getters | {@link module:HashSet.toValues} | Gets an array of all values | O(n) | + * | getters | {@link module:HashSet.size} | Gets the number of elements | O(1) | + * | | | | | + * | mutations | {@link module:HashSet.add} | Adds a value to the set | O(1) avg | + * | mutations | {@link module:HashSet.remove} | Removes a value from the set | O(1) avg | + * | mutations | {@link module:HashSet.toggle} | Toggles a value's presence | O(1) avg | + * | | | | | + * | operations | {@link module:HashSet.difference} | Computes set difference (A - B) | O(n) | + * | operations | {@link module:HashSet.intersection} | Computes set intersection (A ∩ B) | O(n) | + * | operations | {@link module:HashSet.union} | Computes set union (A ∪ B) | O(n) | + * | | | | | + * | mapping | {@link module:HashSet.map} | Transforms each element | O(n) | + * | | | | | + * | sequencing | {@link module:HashSet.flatMap} | Transforms and flattens elements | O(n) | + * | | | | | + * | traversing | {@link module:HashSet.forEach} | Applies a function to each element | O(n) | + * | | | | | + * | folding | {@link module:HashSet.reduce} | Reduces the set to a single value | O(n) | + * | | | | | + * | filtering | {@link module:HashSet.filter} | Keeps elements that satisfy a predicate | O(n) | + * | | | | | + * | partitioning | {@link module:HashSet.partition} | Splits into two sets by a predicate | O(n) | + * + * ## Notes + * + * ### Composability with the Effect Ecosystem: + * + * This `HashSet` is designed to work seamlessly within the Effect ecosystem. It + * implements the {@link Iterable}, {@link Equal}, {@link Pipeable}, and + * {@link Inspectable} traits from Effect. This ensures compatibility with other + * Effect data structures and functionalities. For example, you can easily use + * Effect's `pipe` method to chain operations on the `HashSet`. + * + * **Equality of Elements with Effect's {@link Equal `Equal`} Trait:** + * + * This `HashSet` relies on Effect's {@link Equal} trait to determine the + * uniqueness of elements within the set. The way equality is checked depends on + * the type of the elements: + * + * - **Primitive Values:** For primitive JavaScript values like strings, numbers, + * booleans, `null`, and `undefined`, equality is determined by their value + * (similar to the `===` operator). + * - **Objects and Custom Types:** For objects and other custom types, equality is + * determined by whether those types implement the {@link Equal} interface + * themselves. If an element type implements `Equal`, the `HashSet` will + * delegate to that implementation to perform the equality check. This allows + * you to define custom logic for determining when two instances of your + * objects should be considered equal based on their properties, rather than + * just their object identity. + * + * ```ts + * import { Equal, Hash, HashSet } from "effect" + * + * class Person implements Equal.Equal { + * constructor( + * readonly id: number, // Unique identifier + * readonly name: string, + * readonly age: number + * ) {} + * + * // Define equality based on id, name, and age + * [Equal.symbol](that: Equal.Equal): boolean { + * if (that instanceof Person) { + * return ( + * Equal.equals(this.id, that.id) && + * Equal.equals(this.name, that.name) && + * Equal.equals(this.age, that.age) + * ) + * } + * return false + * } + * + * // Generate a hash code based on the unique id + * [Hash.symbol](): number { + * return Hash.hash(this.id) + * } + * } + * + * // Creating a HashSet with objects that implement the Equal interface + * const set = HashSet.empty().pipe( + * HashSet.add(new Person(1, "Alice", 30)), + * HashSet.add(new Person(1, "Alice", 30)) + * ) + * + * // HashSet recognizes them as equal, so only one element is stored + * console.log(HashSet.size(set)) + * // Output: 1 + * ``` + * + * **Simplifying Equality and Hashing with `Data` and `Schema`:** + * + * Effect's {@link Data} and {@link Schema `Schema.Data`} modules offer powerful + * ways to automatically handle the implementation of both the {@link Equal} and + * {@link Hash} traits for your custom data structures. + * + * - **`Data` Module:** By using constructors like `Data.struct`, `Data.tuple`, + * `Data.array`, or `Data.case` to define your data types, Effect + * automatically generates the necessary implementations for value-based + * equality and consistent hashing. This significantly reduces boilerplate and + * ensures correctness. + * + * ```ts + * import { HashSet, Data, Equal } from "effect" + * import assert from "node:assert/strict" + * + * // Data.* implements the `Equal` traits for us + * const person1 = Data.struct({ id: 1, name: "Alice", age: 30 }) + * const person2 = Data.struct({ id: 1, name: "Alice", age: 30 }) + * + * assert(Equal.equals(person1, person2)) + * + * const set = HashSet.empty().pipe( + * HashSet.add(person1), + * HashSet.add(person2) + * ) + * + * // HashSet recognizes them as equal, so only one element is stored + * console.log(HashSet.size(set)) // Output: 1 + * ``` + * + * - **`Schema` Module:** When defining data schemas using the {@link Schema} + * module, you can use `Schema.Data` to automatically include the `Equal` and + * `Hash` traits in the decoded objects. This is particularly important when + * working with `HashSet`. **For decoded objects to be correctly recognized as + * equal within a `HashSet`, ensure that the schema for those objects is + * defined using `Schema.Data`.** + * + * ```ts + * import { Equal, HashSet, Schema } from "effect" + * import assert from "node:assert/strict" + * + * // Schema.Data implements the `Equal` traits for us + * const PersonSchema = Schema.Data( + * Schema.Struct({ + * id: Schema.Number, + * name: Schema.String, + * age: Schema.Number + * }) + * ) + * + * const Person = Schema.decode(PersonSchema) + * + * const person1 = Person({ id: 1, name: "Alice", age: 30 }) + * const person2 = Person({ id: 1, name: "Alice", age: 30 }) + * + * assert(Equal.equals(person1, person2)) // Output: true + * + * const set = HashSet.empty().pipe( + * HashSet.add(person1), + * HashSet.add(person2) + * ) + * + * // HashSet thanks to Schema.Data implementation of the `Equal` trait, recognizes the two Person as equal, so only one element is stored + * console.log(HashSet.size(set)) // Output: 1 + * ``` + * + * ### Interoperability with the JavaScript Runtime: + * + * To interoperate with the regular JavaScript runtime, Effect's `HashSet` + * provides methods to access its elements in formats readily usable by + * JavaScript APIs: {@link values `HashSet.values`}, + * {@link toValues `HashSet.toValues`} + * + * ```ts + * import { HashSet } from "effect" + * + * const hashSet: HashSet.HashSet = HashSet.make(1, 2, 3) + * + * // Using HashSet.values to convert HashSet.HashSet to IterableIterator + * const iterable: IterableIterator = HashSet.values(hashSet) + * + * console.log(...iterable) // Logs: 1 2 3 + * + * // Using HashSet.toValues to convert HashSet.HashSet to Array + * const array: Array = HashSet.toValues(hashSet) + * + * console.log(array) // Logs: [ 1, 2, 3 ] + * ``` + * + * Be mindful of performance implications (both time and space complexity) when + * frequently converting between Effect's immutable HashSet and mutable + * JavaScript data structures, especially for large collections. + * + * @module HashSet + * @since 2.0.0 + */ +import * as HS from "./internal/hashSet.js"; +const TypeId = HS.HashSetTypeId; +/** + * @memberof HashSet + * @since 2.0.0 + * @category refinements + */ +export const isHashSet = HS.isHashSet; +/** + * Creates an empty `HashSet`. + * + * Time complexity: **`O(1)`** + * + * @memberof HashSet + * @since 2.0.0 + * @category constructors + * @example + * + * ```ts + * import { HashSet, pipe } from "effect" + * + * console.log( + * pipe( + * // Provide a type argument to create a HashSet of a specific type + * HashSet.empty(), + * HashSet.add(1), + * HashSet.add(1), // Notice the duplicate + * HashSet.add(2), + * HashSet.toValues + * ) + * ) // Output: [1, 2] + * ``` + * + * @see Other `HashSet` constructors are {@link module:HashSet.make} {@link module:HashSet.fromIterable} + */ +export const empty = HS.empty; +/** + * Creates a new `HashSet` from an iterable collection of values. + * + * Time complexity: **`O(n)`** where n is the number of elements in the iterable + * + * @memberof HashSet + * @since 2.0.0 + * @category constructors + * @example + * + * ```ts + * // Creating a HashSet from an Array + * import { HashSet, pipe } from "effect" + * + * console.log( + * pipe( + * [1, 2, 3, 4, 5, 1, 2, 3], // Array is an Iterable; Note the duplicates. + * HashSet.fromIterable, + * HashSet.toValues + * ) + * ) // Output: [1, 2, 3, 4, 5] + * ``` + * + * @example + * + * ```ts + * // Creating a HashSet from a Set + * import { HashSet, pipe } from "effect" + * + * console.log( + * pipe( + * new Set(["apple", "banana", "orange", "apple"]), // Set is an Iterable + * HashSet.fromIterable, + * HashSet.toValues + * ) + * ) // Output: ["apple", "banana", "orange"] + * ``` + * + * @example + * + * ```ts + * // Creating a HashSet from a Generator + * import { HashSet } from "effect" + * + * // Generator functions return iterables + * function* fibonacci(n: number): Generator { + * let [a, b] = [0, 1] + * for (let i = 0; i < n; i++) { + * yield a + * ;[a, b] = [b, a + b] + * } + * } + * + * // Create a HashSet from the first 10 Fibonacci numbers + * const fibonacciSet = HashSet.fromIterable(fibonacci(10)) + * + * console.log(HashSet.toValues(fibonacciSet)) + * // Outputs: [0, 1, 2, 3, 5, 8, 13, 21, 34] but in unsorted order + * ``` + * + * @example + * + * ```ts + * // Creating a HashSet from another HashSet + * import { HashSet, pipe } from "effect" + * + * console.log( + * pipe( + * // since HashSet implements the Iterable interface, we can use it to create a new HashSet + * HashSet.make(1, 2, 3, 4), + * HashSet.fromIterable, + * HashSet.toValues // turns the HashSet back into an array + * ) + * ) // Output: [1, 2, 3, 4] + * ``` + * + * @example + * + * ```ts + * // Creating a HashSet from other Effect's data structures like Chunk + * import { Chunk, HashSet, pipe } from "effect" + * + * console.log( + * pipe( + * Chunk.make(1, 2, 3, 4), // Iterable + * HashSet.fromIterable, + * HashSet.toValues // turns the HashSet back into an array + * ) + * ) // Outputs: [1, 2, 3, 4] + * ``` + * + * @see Other `HashSet` constructors are {@link module:HashSet.empty} {@link module:HashSet.make} + */ +export const fromIterable = HS.fromIterable; +/** + * Construct a new `HashSet` from a variable number of values. + * + * Time complexity: **`O(n)`** where n is the number of elements + * + * @memberof HashSet + * @since 2.0.0 + * @category constructors + * @example + * + * ```ts + * import { Equal, Hash, HashSet, pipe } from "effect" + * import assert from "node:assert/strict" + * + * class Character implements Equal.Equal { + * readonly name: string + * readonly trait: string + * + * constructor(name: string, trait: string) { + * this.name = name + * this.trait = trait + * } + * + * // Define equality based on name, and trait + * [Equal.symbol](that: Equal.Equal): boolean { + * if (that instanceof Character) { + * return ( + * Equal.equals(this.name, that.name) && + * Equal.equals(this.trait, that.trait) + * ) + * } + * return false + * } + * + * // Generate a hash code based on the sum of the character's name and trait + * [Hash.symbol](): number { + * return Hash.hash(this.name + this.trait) + * } + * + * static readonly of = (name: string, trait: string): Character => { + * return new Character(name, trait) + * } + * } + * + * assert.strictEqual( + * Equal.equals( + * HashSet.make( + * Character.of("Alice", "Curious"), + * Character.of("Alice", "Curious"), + * Character.of("White Rabbit", "Always late"), + * Character.of("Mad Hatter", "Tea enthusiast") + * ), + * // Is the same as adding each character to an empty set + * pipe( + * HashSet.empty(), + * HashSet.add(Character.of("Alice", "Curious")), + * HashSet.add(Character.of("Alice", "Curious")), // Alice tried to attend twice! + * HashSet.add(Character.of("White Rabbit", "Always late")), + * HashSet.add(Character.of("Mad Hatter", "Tea enthusiast")) + * ) + * ), + * true, + * "`HashSet.make` and `HashSet.empty() + HashSet.add()` should be equal" + * ) + * + * assert.strictEqual( + * Equal.equals( + * HashSet.make( + * Character.of("Alice", "Curious"), + * Character.of("Alice", "Curious"), + * Character.of("White Rabbit", "Always late"), + * Character.of("Mad Hatter", "Tea enthusiast") + * ), + * HashSet.fromIterable([ + * Character.of("Alice", "Curious"), + * Character.of("Alice", "Curious"), + * Character.of("White Rabbit", "Always late"), + * Character.of("Mad Hatter", "Tea enthusiast") + * ]) + * ), + * true, + * "`HashSet.make` and `HashSet.fromIterable` should be equal" + * ) + * ``` + * + * @see Other `HashSet` constructors are {@link module:HashSet.fromIterable} {@link module:HashSet.empty} + */ +export const make = HS.make; +/** + * Checks if the specified value exists in the `HashSet`. + * + * Time complexity: **`O(1)`** average + * + * @memberof HashSet + * @since 2.0.0 + * @category elements + * @example + * + * ```ts + * // Syntax + * import { HashSet, pipe } from "effect" + * + * // with `data-last`, a.k.a. `pipeable` API + * pipe(HashSet.make(0, 1, 2), HashSet.has(3)) // false + * + * // or piped with the pipe function + * HashSet.make(0, 1, 2).pipe(HashSet.has(3)) // false + * + * // or with `data-first` API + * HashSet.has(HashSet.make(0, 1, 2), 3) // false + * ``` + * + * @returns A `boolean` signaling the presence of the value in the HashSet + * @see Other `HashSet` elements are {@link module:HashSet.some} {@link module:HashSet.every} {@link module:HashSet.isSubset} + */ +export const has = HS.has; +/** + * Check if a predicate holds true for some `HashSet` element. + * + * Time complexity: **`O(n)`** where n is the number of elements in the set + * + * @memberof HashSet + * @since 2.0.0 + * @category elements + * @example + * + * ```ts + * // Syntax + * import { HashSet, pipe } from "effect" + * + * const set: HashSet.HashSet = HashSet.make(0, 1, 2) + * + * // with `data-last`, a.k.a. `pipeable` API + * pipe( + * set, + * HashSet.some((n) => n > 0) + * ) // true + * + * // or piped with the pipe function + * set.pipe(HashSet.some((n) => n > 0)) // true + * + * // or with `data-first` API + * HashSet.some(set, (n) => n > 0) // true + * ``` + * + * @see Other `HashSet` elements are {@link module:HashSet.has} {@link module:HashSet.every} {@link module:HashSet.isSubset} + */ +export const some = HS.some; +/** + * Check if a predicate holds true for every `HashSet` element. + * + * Time complexity is **`O(n)`** as it needs to traverse the whole HashSet + * collection + * + * @memberof HashSet + * @since 2.0.0 + * @category elements + * @example + * + * ```ts + * // Syntax with Refinement + * import { HashSet, pipe, Predicate } from "effect" + * + * const numberOrString = HashSet.make(1, "1", "one", "uno") + * + * // with `data-last`, a.k.a. `pipeable` API and `Refinement` + * pipe( + * numberOrString, // HashSet.HashSet + * HashSet.every(Predicate.isString) + * ) // HashSet.HashSet + * + * // or piped with the pipe function and `Refinement` + * numberOrString // HashSet.HashSet + * .pipe(HashSet.every(Predicate.isString)) // HashSet.HashSet + * + * // or with `data-first` API and `Refinement` + * HashSet.every( + * numberOrString, // HashSet.HashSet + * Predicate.isString + * ) // HashSet.HashSet + * ``` + * + * @example + * + * ```ts + * // Syntax with Predicate + * import { HashSet, pipe } from "effect" + * + * const set = HashSet.make(1, 2, 3) + * + * // with `data-last`, a.k.a. `pipeable` API + * pipe( + * set, + * HashSet.every((n) => n >= 0) + * ) // true + * + * // or piped with the pipe function + * set.pipe(HashSet.every((n) => n >= 0)) // true + * + * // or with `data-first` API + * HashSet.every(set, (n) => n >= 0) // true + * ``` + * + * @returns A boolean once it has evaluated that whole collection fulfill the + * Predicate function + * @see Other `HashSet` elements are {@link module:HashSet.has} {@link module:HashSet.some} {@link module:HashSet.isSubset} + */ +export const every = HS.every; +/** + * Returns `true` if and only if every element in the this `HashSet` is an + * element of the second set, + * + * **NOTE**: the hash and equal of both sets must be the same. + * + * Time complexity analysis is of **`O(n)`** + * + * @memberof HashSet + * @since 2.0.0 + * @category elements + * @example + * + * ```ts + * // Syntax + * import { HashSet, pipe } from "effect" + * + * const set1 = HashSet.make(0, 1) + * const set2 = HashSet.make(1, 2) + * const set3 = HashSet.make(0, 1, 2) + * + * // with `data-last`, a.k.a. `pipeable` API + * pipe(set1, HashSet.isSubset(set2)) // false + * pipe(set1, HashSet.isSubset(set3)) // true + * + * // or piped with the pipe function + * set1.pipe(HashSet.isSubset(set2)) // false + * set1.pipe(HashSet.isSubset(set3)) // true + * + * // or with `data-first` API + * HashSet.isSubset(set1, set2) // false + * HashSet.isSubset(set1, set3) // true) + * ``` + * + * @see Other `HashSet` elements are {@link module:HashSet.has} {@link module:HashSet.some} {@link module:HashSet.every} + */ +export const isSubset = HS.isSubset; +/** + * Returns an `IterableIterator` of the values in the `HashSet`. + * + * Time complexity: **`O(1)`** + * + * @memberof HashSet + * @since 2.0.0 + * @category getters + * @example + * + * ```ts + * import { HashSet, pipe } from "effect" + * + * const numberIterable = pipe( + * HashSet.make(0, 1, 1, 2), // HashSet.HashSet + * HashSet.values // takes an HashSet and returns an IterableIterator + * ) + * + * for (const number of numberIterable) { + * console.log(number) // it will logs: 0, 1, 2 + * } + * ``` + * + * @see Other `HashSet` getters are {@link module:HashSet.toValues} {@link module:HashSet.size} + */ +export const values = HS.values; +/** + * Returns an `Array` of the values within the `HashSet`. + * + * Time complexity: **`O(n)`** where n is the number of elements in the set + * + * @memberof HashSet + * @since 3.13.0 + * @category getters + * @example + * + * ```ts + * import { HashSet, pipe } from "effect" + * import { deepStrictEqual } from "node:assert/strict" + * + * deepStrictEqual( + * pipe( + * HashSet.make(0, 1, 1, 2), // HashSet + * HashSet.toValues // takes an HashSet and returns an Array + * ), + * Array.of(0, 1, 2) + * ) + * ``` + * + * @see Other `HashSet` getters are {@link module:HashSet.values} {@link module:HashSet.size} + */ +export const toValues = self => Array.from(values(self)); +/** + * Calculates the number of values in the `HashSet`. + * + * Time complexity: **`O(1)`** + * + * @memberof HashSet + * @since 2.0.0 + * @category getters + * @example + * + * ```ts + * import { HashSet, pipe } from "effect" + * import assert from "node:assert/strict" + * + * assert.deepStrictEqual(pipe(HashSet.empty(), HashSet.size), 0) + * + * assert.deepStrictEqual( + * pipe(HashSet.make(1, 2, 2, 3, 4, 3), HashSet.size), + * 4 + * ) + * ``` + * + * @see Other `HashSet` getters are {@link module:HashSet.values} {@link module:HashSet.toValues} + */ +export const size = HS.size; +/** + * Creates a new mutable version of the `HashSet` + * + * When a `HashSet` is mutable, operations like {@link add} and {@link remove} + * modify the data structure in place instead of creating a new one, which is + * more efficient when performing multiple operations. + * + * @memberof HashSet + * @since 2.0.0 + * @example + * + * ```ts + * import { HashSet } from "effect" + * import assert from "node:assert/strict" + * + * const UPPER_BOUND = 10_000 + * + * const immutableSet = HashSet.empty().pipe(HashSet.add(0)) + * + * // Create a mutable version of the immutableSet + * const mutableSet = HashSet.beginMutation(immutableSet) + * + * for (let i = 1; i < UPPER_BOUND; i++) { + * // Operations now modify the set in place instead of creating new instances + * // This is more efficient when making multiple changes + * const pointerToMutableSet = HashSet.add(mutableSet, i) + * + * // the two sets have the same identity, hence `add` is mutating mutableSet and not returning a new HashSet instance + * assert(Object.is(mutableSet, pointerToMutableSet)) + * assert.equal(HashSet.has(mutableSet, i), true) // `i` is in the mutableSet + * assert.equal(HashSet.has(immutableSet, i), false) // `i` is not in the immutableSet + * } + * + * const next = UPPER_BOUND + 1 + * // When done, mark the set as immutable again + * HashSet.endMutation(mutableSet).pipe( + * HashSet.add(next) // since this returns a new HashSet, it will not be logged as part of the mutableSet + * ) + * assert.equal(HashSet.has(mutableSet, next), false) + * + * console.log(HashSet.toValues(immutableSet)) // [0] + * console.log(HashSet.toValues(mutableSet).sort((a, b) => a - b)) // [0, 1, 2, 3, ...rest] + * ``` + * + * @see Other `HashSet` mutations are {@link module:HashSet.add} {@link module:HashSet.remove} {@link module:HashSet.toggle} {@link module:HashSet.endMutation} {@link module:HashSet.mutate} + */ +export const beginMutation = HS.beginMutation; +/** + * Makes the `HashSet` immutable again. + * + * After calling `endMutation`, operations like {@link add} and {@link remove} + * will create new instances of the `HashSet` instead of modifying the existing + * one. + * + * @memberof HashSet + * @since 2.0.0 + * @example + * + * ```ts + * import { HashSet } from "effect" + * import assert from "node:assert/strict" + * + * // Create a mutable set + * const mutableSet = HashSet.beginMutation(HashSet.empty()) + * + * // Add some elements to the mutable set + * HashSet.add(mutableSet, 1) + * HashSet.add(mutableSet, 2) + * + * // Before endMutation, operations modify the set in place + * const sameSet = HashSet.add(mutableSet, 3) + * assert(Object.is(mutableSet, sameSet)) // true - same object reference + * assert.deepStrictEqual(HashSet.toValues(mutableSet).sort(), [1, 2, 3]) + * + * // Make the set immutable again + * const immutableSet = HashSet.endMutation(mutableSet) + * + * // endMutation returns the same set instance, now made immutable + * assert(Object.is(mutableSet, immutableSet)) // true - same object reference + * + * // After endMutation, operations create new instances + * const newSet = HashSet.add(immutableSet, 4) + * assert(!Object.is(immutableSet, newSet)) // false - different object references + * + * // The original set remains unchanged + * assert.deepStrictEqual(HashSet.toValues(immutableSet).sort(), [1, 2, 3]) + * + * // The new set contains the added element + * assert.deepStrictEqual(HashSet.toValues(newSet).sort(), [1, 2, 3, 4]) + * ``` + * + * @see Other `HashSet` mutations are {@link module:HashSet.add} {@link module:HashSet.remove} {@link module:HashSet.toggle} {@link module:HashSet.beginMutation} {@link module:HashSet.mutate} + */ +export const endMutation = HS.endMutation; +/** + * Mutates the `HashSet` within the context of the provided function. + * + * You can consider it a functional abstraction on top of the lower-level + * mutation primitives of {@link module:HashSet.beginMutation} `->` `mutable + * context` `->` {@link HashSet.endMutation}. + * + * @memberof HashSet + * @since 2.0.0 + * @example + * + * ```ts + * // Syntax + * import { HashSet, pipe } from "effect" + * + * // with data-last, a.k.a. pipeable API + * pipe( + * HashSet.make(1, 2, 3), + * HashSet.mutate((set) => { + * HashSet.add(set, 4) + * HashSet.remove(set, 1) + * }) + * ) + * + * // or piped with the pipe function + * HashSet.make(1, 2, 3).pipe( + * HashSet.mutate((set) => { + * HashSet.add(set, 4) + * HashSet.remove(set, 1) + * }) + * ) + * + * // or with data-first API + * HashSet.mutate(HashSet.make(1, 2, 3), (set) => { + * HashSet.add(set, 4) + * HashSet.remove(set, 1) + * }) + * ``` + * + * @see Other `HashSet` mutations are {@link module:HashSet.add} {@link module:HashSet.remove} {@link module:HashSet.toggle} {@link module:HashSet.beginMutation} {@link module:HashSet.endMutation} + */ +export const mutate = HS.mutate; +/** + * Adds a value to the `HashSet`. + * + * Time complexity: **`O(1)`** average + * + * @remarks + * Remember that a `HashSet` is a collection of unique values, so adding a value + * that already exists in the `HashSet` will not add a duplicate. + * + * Remember that HashSet is an immutable data structure, so the `add` function, + * like all other functions that modify the HashSet, will return a new HashSet + * with the added value. + * @memberof HashSet + * @since 2.0.0 + * @example + * + * ```ts + * // Syntax + * import { HashSet, pipe } from "effect" + * + * // with data-last, a.k.a. pipeable API + * pipe(HashSet.empty(), HashSet.add(0), HashSet.add(0)) + * + * // or piped with the pipe function + * HashSet.empty().pipe(HashSet.add(0)) + * + * // or with data-first API + * HashSet.add(HashSet.empty(), 0) + * ``` + * + * @see Other `HashSet` mutations are {@link module:HashSet.remove} {@link module:HashSet.toggle} {@link module:HashSet.beginMutation} {@link module:HashSet.endMutation} {@link module:HashSet.mutate} + */ +export const add = HS.add; +/** + * Removes a value from the `HashSet`. + * + * Time complexity: **`O(1)`** average + * + * @memberof HashSet + * @since 2.0.0 + * @example + * + * ```ts + * // Syntax + * import { HashSet, pipe } from "effect" + * + * // with `data-last`, a.k.a. `pipeable` API + * pipe(HashSet.make(0, 1, 2), HashSet.remove(0)) + * + * // or piped with the pipe function + * HashSet.make(0, 1, 2).pipe(HashSet.remove(0)) + * + * // or with `data-first` API + * HashSet.remove(HashSet.make(0, 1, 2), 0) + * ``` + * + * @see Other `HashSet` mutations are {@link module:HashSet.add} {@link module:HashSet.toggle} {@link module:HashSet.beginMutation} {@link module:HashSet.endMutation} {@link module:HashSet.mutate} + */ +export const remove = HS.remove; +/** + * Computes the set difference `(A - B)` between this `HashSet` and the + * specified `Iterable`. + * + * Time complexity: **`O(n)`** where n is the number of elements in the set + * + * **NOTE**: the hash and equal of the values in both the set and the iterable + * must be the same; meaning we cannot compute a difference between a `HashSet + * of bananas` and a `HashSet of elephants` as they are not the same type and + * won't implement the Equal trait in the same way. + * + * @memberof HashSet + * @since 2.0.0 + * @example + * + * ```ts + * // Syntax + * import { HashSet, pipe } from "effect" + * + * // with data-last, a.k.a. pipeable API + * pipe(HashSet.make(1, 2, 3), HashSet.difference(HashSet.make(3, 4, 5))) + * + * // or piped with the pipe function + * HashSet.make(1, 2, 3).pipe(HashSet.difference(HashSet.make(3, 4, 5))) + * + * // or with data-first API + * HashSet.difference(HashSet.make(1, 2, 3), HashSet.make(3, 4, 5)) + * ``` + * + * @see Other `HashSet` operations are {@link module:HashSet.intersection} {@link module:HashSet.union} + */ +export const difference = HS.difference; +/** + * Returns a `HashSet` of values which are present in both this set and that + * `Iterable`. Computes set intersection (A ∩ B) + * + * Time complexity: **`O(n)`** where n is the number of elements in the smaller + * set + * + * **NOTE**: the hash and equal of the values in both the set and the iterable + * must be the same. + * + * @memberof HashSet + * @since 2.0.0 + * @example + * + * ```ts + * // Syntax + * import { HashSet, pipe } from "effect" + * + * // with data-last, a.k.a. pipeable API + * pipe(HashSet.make(1, 2, 3), HashSet.intersection(HashSet.make(2, 3, 4))) + * + * // or piped with the pipe function + * HashSet.make(1, 2, 3).pipe(HashSet.intersection(HashSet.make(2, 3, 4))) + * + * // or with data-first API + * HashSet.intersection(HashSet.make(1, 2, 3), HashSet.make(2, 3, 4)) + * ``` + * + * @see Other `HashSet` operations are {@link module:HashSet.difference} {@link module:HashSet.union} + */ +export const intersection = HS.intersection; +/** + * Computes the set union `( self ∪ that )` between this `HashSet` and the + * specified `Iterable`. + * + * Time complexity: **`O(n)`** where n is the number of elements in the set + * + * **NOTE**: the hash and equal of the values in both the set and the iterable + * must be the same. + * + * @memberof HashSet + * @since 2.0.0 + * @example + * + * ```ts + * // Syntax + * import { HashSet, pipe } from "effect" + * + * // with data-last, a.k.a. pipeable API + * pipe(HashSet.make(1, 2, 3), HashSet.union(HashSet.make(3, 4, 5))) + * + * // or piped with the pipe function + * HashSet.make(1, 2, 3).pipe(HashSet.union(HashSet.make(3, 4, 5))) + * + * // or with data-first API + * HashSet.union(HashSet.make(1, 2, 3), HashSet.make(3, 4, 5)) + * ``` + * + * @see Other `HashSet` operations are {@link module:HashSet.difference} {@link module:HashSet.intersection} + */ +export const union = HS.union; +/** + * Checks if a value is present in the `HashSet`. If it is present, the value + * will be removed from the `HashSet`, otherwise the value will be added to the + * `HashSet`. + * + * Time complexity: **`O(1)`** average + * + * @memberof HashSet + * @since 2.0.0 + * @example + * + * ```ts + * // Syntax + * import { HashSet, pipe } from "effect" + * + * // with `data-last`, a.k.a. `pipeable` API + * pipe(HashSet.make(0, 1, 2), HashSet.toggle(0)) + * + * // or piped with the pipe function + * HashSet.make(0, 1, 2).pipe(HashSet.toggle(0)) + * + * // or with `data-first` API + * HashSet.toggle(HashSet.make(0, 1, 2), 0) + * ``` + * + * @returns A new `HashSet` where the toggled value is being either added or + * removed based on the initial `HashSet` state. + * @see Other `HashSet` mutations are {@link module:HashSet.add} {@link module:HashSet.remove} {@link module:HashSet.beginMutation} {@link module:HashSet.endMutation} {@link module:HashSet.mutate} + */ +export const toggle = HS.toggle; +/** + * Maps over the values of the `HashSet` using the specified function. + * + * The time complexity is of **`O(n)`**. + * + * @memberof HashSet + * @since 2.0.0 + * @category mapping + * @example + * + * ```ts + * // Syntax + * import { HashSet, pipe } from "effect" + * + * // with `data-last`, a.k.a. `pipeable` API + * pipe( + * HashSet.make(0, 1, 2), // HashSet.HashSet + * HashSet.map(String) // HashSet.HashSet + * ) + * + * // or piped with the pipe method + * HashSet.make(0, 1, 2).pipe(HashSet.map(String)) + * + * // or with `data-first` API + * HashSet.map(HashSet.make(0, 1, 2), String) + * ``` + */ +export const map = HS.map; +/** + * Chains over the values of the `HashSet` using the specified function. + * + * The time complexity is of **`O(n)`**. + * + * @memberof HashSet + * @since 2.0.0 + * @category sequencing + * @example + * + * ```ts + * // Syntax + * import { HashSet, pipe } from "effect" + * + * // with `data-last`, a.k.a. `pipeable` API + * pipe( + * HashSet.make(0, 1, 2), // HashSet.HashSet + * HashSet.flatMap((n) => Array.of(String(n))) // HashSet.HashSet + * ) + * + * // or piped with the pipe method + * HashSet.make(0, 1, 2) // HashSet.HashSet + * .pipe( + * HashSet.flatMap((n) => Array.of(String(n))) // HashSet.HashSet + * ) + * + * // or with `data-first` API + * HashSet.flatMap(HashSet.make(0, 1, 2), (n) => Array.of(String(n))) + * ``` + */ +export const flatMap = HS.flatMap; +/** + * Applies the specified function to the values of the `HashSet`. + * + * The time complexity is of **`O(n)`**. + * + * @memberof HashSet + * @since 2.0.0 + * @category traversing + * @example + * + * ```ts + * // Syntax + * import { HashSet, pipe } from "effect" + * + * // with `data-last`, a.k.a. `pipeable` API + * pipe(HashSet.make(0, 1, 2), HashSet.forEach(console.log)) // logs: 0 1 2 + * + * // or piped with the pipe method + * HashSet.make(0, 1, 2).pipe(HashSet.forEach(console.log)) // logs: 0 1 2 + * + * // or with `data-first` API + * HashSet.forEach(HashSet.make(0, 1, 2), console.log) // logs: 0 1 2 + * ``` + */ +export const forEach = HS.forEach; +/** + * Reduces the specified state over the values of the `HashSet`. + * + * The time complexity is of **`O(n)`**. + * + * @memberof HashSet + * @since 2.0.0 + * @category folding + * @example + * + * ```ts + * // Syntax + * import { HashSet, pipe } from "effect" + * + * const sum = (a: number, b: number): number => a + b + * + * // with `data-last`, a.k.a. `pipeable` API + * pipe(HashSet.make(0, 1, 2), HashSet.reduce(0, sum)) + * + * // or with the pipe method + * HashSet.make(0, 1, 2).pipe(HashSet.reduce(0, sum)) + * + * // or with `data-first` API + * HashSet.reduce(HashSet.make(0, 1, 2), 0, sum) + * ``` + */ +export const reduce = HS.reduce; +/** + * Filters values out of a `HashSet` using the specified predicate. + * + * The time complexity is of **`O(n)`**. + * + * @memberof HashSet + * @since 2.0.0 + * @category filtering + * @example + * + * ```ts + * // Syntax with Predicate + * import { HashSet, type Predicate, pipe } from "effect" + * + * const filterPositiveNumbers: Predicate.Predicate = (n) => n > 0 + * + * // with `data-last`, a.k.a. `pipeable` API + * pipe( + * HashSet.make(-2, -1, 0, 1, 2), + * HashSet.filter(filterPositiveNumbers) + * ) + * + * // or with the pipe method + * HashSet.make(-2, -1, 0, 1, 2).pipe(HashSet.filter(filterPositiveNumbers)) + * + * // or with `data-first` API + * HashSet.filter(HashSet.make(-2, -1, 0, 1, 2), filterPositiveNumbers) + * ``` + * + * @example + * + * ```ts + * /// Syntax with Refinement + * import { HashSet, pipe } from "effect" + * + * const stringRefinement = (value: unknown): value is string => + * typeof value === "string" + * + * // with `data-last`, a.k.a. `pipeable` API + * pipe( + * HashSet.make(1, "unos", 2, "two", 3, "trois", 4, "vier"), // // HashSet.HashSet + * HashSet.filter(stringRefinement) + * ) // HashSet.HashSet + * + * // or with the pipe method + * HashSet.make(1, "unos", 2, "two", 3, "trois", 4, "vier") // HashSet.HashSet + * .pipe(HashSet.filter(stringRefinement)) // HashSet.HashSet + * + * // or with `data-first` API + * HashSet.filter( + * HashSet.make(1, "unos", 2, "two", 3, "trois", 4, "vier"), // HashSet.HashSet + * stringRefinement + * ) // HashSet.HashSet + * ``` + */ +export const filter = HS.filter; +/** + * Partition the values of a `HashSet` using the specified predicate. + * + * If a value matches the predicate, it will be placed into the `HashSet` on the + * right side of the resulting `Tuple`, otherwise the value will be placed into + * the left side. + * + * Time complexity is of **`O(n)`**. + * + * @memberof HashSet + * @since 2.0.0 + * @category partitioning + * @example + * + * ```ts + * // Syntax with Predicate + * import { HashSet, pipe, Predicate } from "effect" + * + * // with `data-last`, a.k.a. `pipeable` API + * pipe( + * HashSet.make(0, 1, 2, 3, 4, 5), + * HashSet.partition((n) => n % 2 === 0) + * ) + * + * // or with the pipe method + * HashSet.make(0, 1, 2, 3, 4, 5).pipe( + * HashSet.partition((n) => n % 2 === 0) + * ) + * + * // or with `data-first` API + * HashSet.partition(HashSet.make(0, 1, 2, 3, 4, 5), (n) => n % 2 === 0) + * ``` + * + * @example + * + * ```ts + * // Syntax with Refinement + * import { HashSet, pipe, Predicate } from "effect" + * + * const stringRefinement: Predicate.Refinement = ( + * value + * ) => typeof value === "string" + * + * // with `data-last`, a.k.a. `pipeable` API + * pipe( + * HashSet.make(1, "unos", 2, "two", 3, "trois", 4, "vier"), + * HashSet.partition(stringRefinement) + * ) + * + * // or with the pipe method + * HashSet.make(1, "unos", 2, "two", 3, "trois", 4, "vier").pipe( + * HashSet.partition(stringRefinement) + * ) + * + * // or with `data-first` API + * HashSet.partition( + * HashSet.make(1, "unos", 2, "two", 3, "trois", 4, "vier"), + * stringRefinement + * ) + * ``` + */ +export const partition = HS.partition; +//# sourceMappingURL=HashSet.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/HashSet.js.map b/backend/node_modules/effect/dist/esm/HashSet.js.map new file mode 100644 index 0000000000000000000000000000000000000000..589221223117c5185781be78d6e8d86451cd1544 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/HashSet.js.map @@ -0,0 +1 @@ +{"version":3,"file":"HashSet.js","names":["HS","TypeId","HashSetTypeId","isHashSet","empty","fromIterable","make","has","some","every","isSubset","values","toValues","self","Array","from","size","beginMutation","endMutation","mutate","add","remove","difference","intersection","union","toggle","map","flatMap","forEach","reduce","filter","partition"],"sources":["../../src/HashSet.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgQA,OAAO,KAAKA,EAAE,MAAM,uBAAuB;AAK3C,MAAMC,MAAM,GAAkBD,EAAE,CAACE,aAAuB;AA2BxD;;;;;AAKA,OAAO,MAAMC,SAAS,GAoDlBH,EAAE,CAACG,SAAS;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,OAAO,MAAMC,KAAK,GAAgCJ,EAAE,CAACI,KAAK;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6FA,OAAO,MAAMC,YAAY,GAA6CL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E,CAAC+B,SAAS","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Inspectable.js b/backend/node_modules/effect/dist/esm/Inspectable.js new file mode 100644 index 0000000000000000000000000000000000000000..e0a19f881689d2730f3d03034d62638e01d3a1c8 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Inspectable.js @@ -0,0 +1,194 @@ +import { globalValue } from "./GlobalValue.js"; +import * as Predicate from "./Predicate.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const NodeInspectSymbol = /*#__PURE__*/Symbol.for("nodejs.util.inspect.custom"); +/** + * @since 2.0.0 + */ +export const toJSON = x => { + try { + if (Predicate.hasProperty(x, "toJSON") && Predicate.isFunction(x["toJSON"]) && x["toJSON"].length === 0) { + return x.toJSON(); + } else if (Array.isArray(x)) { + return x.map(toJSON); + } + } catch { + return {}; + } + return redact(x); +}; +const CIRCULAR = "[Circular]"; +/** @internal */ +export function formatDate(date) { + try { + return date.toISOString(); + } catch { + return "Invalid Date"; + } +} +function safeToString(input) { + try { + const s = input.toString(); + return typeof s === "string" ? s : String(s); + } catch { + return "[toString threw]"; + } +} +/** @internal */ +export function formatPropertyKey(name) { + return Predicate.isString(name) ? JSON.stringify(name) : String(name); +} +/** @internal */ +export function formatUnknown(input, options) { + const space = options?.space ?? 0; + const seen = new WeakSet(); + const gap = !space ? "" : Predicate.isNumber(space) ? " ".repeat(space) : space; + const ind = d => gap.repeat(d); + const wrap = (v, body) => { + const ctor = v?.constructor; + return ctor && ctor !== Object.prototype.constructor && ctor.name ? `${ctor.name}(${body})` : body; + }; + const ownKeys = o => { + try { + return Reflect.ownKeys(o); + } catch { + return ["[ownKeys threw]"]; + } + }; + function go(v, d = 0) { + if (Array.isArray(v)) { + if (seen.has(v)) return CIRCULAR; + seen.add(v); + if (!gap || v.length <= 1) return `[${v.map(x => go(x, d)).join(",")}]`; + const inner = v.map(x => go(x, d + 1)).join(",\n" + ind(d + 1)); + return `[\n${ind(d + 1)}${inner}\n${ind(d)}]`; + } + if (Predicate.isDate(v)) return formatDate(v); + if (!options?.ignoreToString && Predicate.hasProperty(v, "toString") && Predicate.isFunction(v["toString"]) && v["toString"] !== Object.prototype.toString && v["toString"] !== Array.prototype.toString) { + const s = safeToString(v); + if (v instanceof Error && v.cause) { + return `${s} (cause: ${go(v.cause, d)})`; + } + return s; + } + if (Predicate.isString(v)) return JSON.stringify(v); + if (Predicate.isNumber(v) || v == null || Predicate.isBoolean(v) || Predicate.isSymbol(v)) return String(v); + if (Predicate.isBigInt(v)) return String(v) + "n"; + if (v instanceof Set || v instanceof Map) { + if (seen.has(v)) return CIRCULAR; + seen.add(v); + return `${v.constructor.name}(${go(Array.from(v), d)})`; + } + if (Predicate.isObject(v)) { + if (seen.has(v)) return CIRCULAR; + seen.add(v); + const keys = ownKeys(v); + if (!gap || keys.length <= 1) { + const body = `{${keys.map(k => `${formatPropertyKey(k)}:${go(v[k], d)}`).join(",")}}`; + return wrap(v, body); + } + const body = `{\n${keys.map(k => `${ind(d + 1)}${formatPropertyKey(k)}: ${go(v[k], d + 1)}`).join(",\n")}\n${ind(d)}}`; + return wrap(v, body); + } + return String(v); + } + return go(input, 0); +} +/** + * @since 2.0.0 + */ +export const format = x => JSON.stringify(x, null, 2); +/** + * @since 2.0.0 + */ +export const BaseProto = { + toJSON() { + return toJSON(this); + }, + [NodeInspectSymbol]() { + return this.toJSON(); + }, + toString() { + return format(this.toJSON()); + } +}; +/** + * @since 2.0.0 + */ +export class Class { + /** + * @since 2.0.0 + */ + [NodeInspectSymbol]() { + return this.toJSON(); + } + /** + * @since 2.0.0 + */ + toString() { + return format(this.toJSON()); + } +} +/** + * @since 2.0.0 + */ +export const toStringUnknown = (u, whitespace = 2) => { + if (typeof u === "string") { + return u; + } + try { + return typeof u === "object" ? stringifyCircular(u, whitespace) : String(u); + } catch { + return String(u); + } +}; +/** + * @since 2.0.0 + */ +export const stringifyCircular = (obj, whitespace) => { + let cache = []; + const retVal = JSON.stringify(obj, (_key, value) => typeof value === "object" && value !== null ? cache.includes(value) ? undefined // circular reference + : cache.push(value) && (redactableState.fiberRefs !== undefined && isRedactable(value) ? value[symbolRedactable](redactableState.fiberRefs) : value) : value, whitespace); + cache = undefined; + return retVal; +}; +/** + * @since 3.10.0 + * @category redactable + */ +export const symbolRedactable = /*#__PURE__*/Symbol.for("effect/Inspectable/Redactable"); +/** + * @since 3.10.0 + * @category redactable + */ +export const isRedactable = u => typeof u === "object" && u !== null && symbolRedactable in u; +const redactableState = /*#__PURE__*/globalValue("effect/Inspectable/redactableState", () => ({ + fiberRefs: undefined +})); +/** + * @since 3.10.0 + * @category redactable + */ +export const withRedactableContext = (context, f) => { + const prev = redactableState.fiberRefs; + redactableState.fiberRefs = context; + try { + return f(); + } finally { + redactableState.fiberRefs = prev; + } +}; +/** + * @since 3.10.0 + * @category redactable + */ +export const redact = u => { + if (isRedactable(u) && redactableState.fiberRefs !== undefined) { + return u[symbolRedactable](redactableState.fiberRefs); + } + return u; +}; +//# sourceMappingURL=Inspectable.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/JSONSchema.js.map b/backend/node_modules/effect/dist/esm/JSONSchema.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a4a017e02d06dd8e99f0c7c7c6aa1ef08fe47636 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/JSONSchema.js.map @@ -0,0 +1 @@ +{"version":3,"file":"JSONSchema.js","names":["Arr","errors_","schemaId_","Option","ParseResult","Predicate","Record","AST","make","schema","options","definitions","target","ast","isTransformation","isParseJsonTransformation","from","to","jsonSchema","fromAST","out","$schema","getMetaSchemaUri","$defs","isEmptyRecord","definitionPath","getRef","id","topLevelReferenceStrategy","additionalPropertiesStrategy","go","constNever","$id","not","constAny","constUnknown","constVoid","constObject","constEmptyStruct","getRawDescription","annotated","undefined","getOrUndefined","getDescriptionAnnotation","getRawTitle","getTitleAnnotation","getRawDefault","getDefaultAnnotation","none","encodeDefault","def","getOption","getRawExamples","getExamplesAnnotation","encodeExamples","examples","filterMap","e","pipe","filter","isJsonValue","length","filterBuiltIn","annotation","key","_tag","stringKeyword","annotations","numberKeyword","booleanKeyword","value","visited","Set","Array","isArray","has","add","every","item","proto","Object","getPrototypeOf","prototype","getOwnPropertySymbols","values","v","delete","pruneJsonSchemaAnnotations","description","title","isSome","o","default","encodedExamples","keys","getContextJsonSchemaAnnotations","getJsonSchemaAnnotations","DescriptionAnnotationId","TitleAnnotationId","mergeJsonSchemaAnnotations","jsonSchemaAnnotations","allOf","pruneUndefined","isNone","getJSONSchemaAnnotation","SchemaIdAnnotationId","ParseJsonSchemaId","isOverrideAnnotation","isRefinement","schemaId","IntSchemaId","type","mergeRefinements","handle","name","unshift","i","minLength","maxLength","pattern","minItems","maxItems","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","isContentSchemaSupported","getAdditionalProperties","addASTAnnotations","addAnnotations","getIdentifierAnnotation","identifier","getJSONIdentifier","isSuspend","f","isTypeLiteral","isDeclaration","surrogate","getSurrogateAnnotation","path","errors","escapedId","replace","$ref","hook","handler","t","getTransformationFrom","Error","getJSONSchemaMissingAnnotationErrorMessage","getJSONSchemaMissingIdentifierAnnotationErrorMessage","literal","isString","enum","isNumber","isBoolean","anyOf","enums","map","$comment","elements","concat","rest","output","len","element","isOptional","items","prefixItems","restLength","head","isHomogeneous","additionalItems","getJSONSchemaUnsupportedPostRestElementsErrorMessage","propertySignatures","indexSignatures","required","properties","additionalProperties","patternProperties","propertyNames","is","pruned","parameter","getTemplateLiteralRegExp","source","indexSignaturePath","ps","push","getJSONSchemaUnsupportedKeyErrorMessage","members","types","compactUnion","regex","String","transformation","isJsonSchema7Object","propertySignatureTransformations","toKey","fromKey","toProperty","isRecord","fromProperty","hasOwn","isNeverWithoutCustomAnnotations","hasProperty","neverKeyword","isAny","isUnknown","isVoid","isCompactableLiteral","m","last"],"sources":["../../src/JSONSchema.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAIA,OAAO,KAAKA,GAAG,MA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,GAAG,CAACA,GAAG,CAACyC,MAAM,GAAG,CAAC,CAAC,GAAG;UACpBkD,IAAI,EAAEsG,IAAI,CAACtG,IAAI;UACf2C,IAAI,EAAE,CAAC,GAAG2D,IAAI,CAAC3D,IAAI,EAAE,GAAG0D,CAAC,CAAC1D,IAAI;SACZ;QACpB;MACF;IACF;IACAtI,GAAG,CAACyK,IAAI,CAACuB,CAAC,CAAC;EACb;EACA,OAAOhM,GAAG;AACZ","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Layer.js b/backend/node_modules/effect/dist/esm/Layer.js new file mode 100644 index 0000000000000000000000000000000000000000..2c78f0ee4aa57ff82ba8be1e92b51c0f8a039910 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Layer.js @@ -0,0 +1,687 @@ +import * as Context from "./Context.js"; +import { dual } from "./Function.js"; +import { clockTag } from "./internal/clock.js"; +import * as core from "./internal/core.js"; +import * as defaultServices from "./internal/defaultServices.js"; +import * as fiberRuntime from "./internal/fiberRuntime.js"; +import * as internal from "./internal/layer.js"; +import * as circularLayer from "./internal/layer/circular.js"; +import * as query from "./internal/query.js"; +import { randomTag } from "./internal/random.js"; +import * as Scheduler from "./Scheduler.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const LayerTypeId = internal.LayerTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +export const MemoMapTypeId = internal.MemoMapTypeId; +/** + * @since 3.13.0 + * @category models + */ +export const CurrentMemoMap = internal.CurrentMemoMap; +/** + * Returns `true` if the specified value is a `Layer`, `false` otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const isLayer = internal.isLayer; +/** + * Returns `true` if the specified `Layer` is a fresh version that will not be + * shared, `false` otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const isFresh = internal.isFresh; +/** + * @since 3.3.0 + * @category tracing + */ +export const annotateLogs = internal.annotateLogs; +/** + * @since 3.3.0 + * @category tracing + */ +export const annotateSpans = internal.annotateSpans; +/** + * Builds a layer into a scoped value. + * + * @since 2.0.0 + * @category destructors + */ +export const build = internal.build; +/** + * Builds a layer into an `Effect` value. Any resources associated with this + * layer will be released when the specified scope is closed unless their scope + * has been extended. This allows building layers where the lifetime of some of + * the services output by the layer exceed the lifetime of the effect the + * layer is provided to. + * + * @since 2.0.0 + * @category destructors + */ +export const buildWithScope = internal.buildWithScope; +/** + * Recovers from all errors. + * + * @since 2.0.0 + * @category error handling + */ +export const catchAll = internal.catchAll; +/** + * Recovers from all errors. + * + * @since 2.0.0 + * @category error handling + */ +export const catchAllCause = internal.catchAllCause; +/** + * Constructs a `Layer` that passes along the specified context as an + * output. + * + * @since 2.0.0 + * @category constructors + */ +export const context = internal.context; +/** + * Constructs a layer that dies with the specified defect. + * + * @since 2.0.0 + * @category constructors + */ +export const die = internal.die; +/** + * Constructs a layer that dies with the specified defect. + * + * @since 2.0.0 + * @category constructors + */ +export const dieSync = internal.dieSync; +/** + * Replaces the layer's output with `never` and includes the layer only for its + * side-effects. + * + * @since 2.0.0 + * @category mapping + */ +export const discard = internal.discard; +/** + * Constructs a layer from the specified effect. + * + * @since 2.0.0 + * @category constructors + */ +export const effect = internal.fromEffect; +/** + * Constructs a layer from the specified effect, discarding its output. + * + * @since 2.0.0 + * @category constructors + */ +export const effectDiscard = internal.fromEffectDiscard; +/** + * Constructs a layer from the specified effect, which must return one or more + * services. + * + * @since 2.0.0 + * @category constructors + */ +export const effectContext = internal.fromEffectContext; +/** + * A Layer that constructs an empty Context. + * + * @since 2.0.0 + * @category constructors + */ +export const empty = internal.empty; +/** + * Extends the scope of this layer, returning a new layer that when provided + * to an effect will not immediately release its associated resources when + * that effect completes execution but instead when the scope the resulting + * effect depends on is closed. + * + * @since 2.0.0 + * @category utils + */ +export const extendScope = internal.extendScope; +/** + * Constructs a layer that fails with the specified error. + * + * @since 2.0.0 + * @category constructors + */ +export const fail = internal.fail; +/** + * Constructs a layer that fails with the specified error. + * + * @since 2.0.0 + * @category constructors + */ +export const failSync = internal.failSync; +/** + * Constructs a layer that fails with the specified cause. + * + * @since 2.0.0 + * @category constructors + */ +export const failCause = internal.failCause; +/** + * Constructs a layer that fails with the specified cause. + * + * @since 2.0.0 + * @category constructors + */ +export const failCauseSync = internal.failCauseSync; +/** + * Constructs a layer dynamically based on the output of this layer. + * + * @since 2.0.0 + * @category sequencing + */ +export const flatMap = internal.flatMap; +/** + * Flattens layers nested in the context of an effect. + * + * @since 2.0.0 + * @category sequencing + */ +export const flatten = internal.flatten; +/** + * Creates a fresh version of this layer that will not be shared. + * + * @since 2.0.0 + * @category utils + */ +export const fresh = internal.fresh; +/** + * Creates a mock layer for testing purposes. You can provide a partial + * implementation of the service, and any methods not provided will + * throw an `UnimplementedError` defect when called. + * + * **Example** + * + * ```ts + * import { Context, Effect, Layer } from "effect" + * + * class MyService extends Context.Tag("MyService")< + * MyService, + * { + * one: Effect.Effect + * two(): Effect.Effect + * } + * >() {} + * + * const MyServiceTest = Layer.mock(MyService, { + * two: () => Effect.succeed(2) + * }) + * ``` + * + * @since 3.17.0 + * @category Testing + */ +export const mock = internal.mock; +const fromFunction = internal.fromFunction; +export { +/** + * Constructs a layer from the context using the specified function. + * + * @since 2.0.0 + * @category constructors + */ +fromFunction as function }; +/** + * Builds this layer and uses it until it is interrupted. This is useful when + * your entire application is a layer, such as an HTTP server. + * + * @since 2.0.0 + * @category conversions + */ +export const launch = internal.launch; +/** + * Returns a new layer whose output is mapped by the specified function. + * + * @since 2.0.0 + * @category mapping + */ +export const map = internal.map; +/** + * Returns a layer with its error channel mapped using the specified function. + * + * @since 2.0.0 + * @category mapping + */ +export const mapError = internal.mapError; +/** + * Feeds the error or output services of this layer into the input of either + * the specified `failure` or `success` layers, resulting in a new layer with + * the inputs of this layer, and the error or outputs of the specified layer. + * + * @since 2.0.0 + * @category folding + */ +export const match = internal.match; +/** + * Feeds the error or output services of this layer into the input of either + * the specified `failure` or `success` layers, resulting in a new layer with + * the inputs of this layer, and the error or outputs of the specified layer. + * + * @since 2.0.0 + * @category folding + */ +export const matchCause = internal.matchCause; +/** + * Returns a scoped effect that, if evaluated, will return the lazily computed + * result of this layer. + * + * @since 2.0.0 + * @category utils + */ +export const memoize = internal.memoize; +/** + * Merges this layer with the specified layer concurrently, producing a new layer with combined input and output types. + * + * @since 2.0.0 + * @category zipping + */ +export const merge = internal.merge; +/** + * Combines all the provided layers concurrently, creating a new layer with merged input, error, and output types. + * + * @since 2.0.0 + * @category zipping + */ +export const mergeAll = internal.mergeAll; +/** + * Translates effect failure into death of the fiber, making all failures + * unchecked and not a part of the type of the layer. + * + * @since 2.0.0 + * @category error handling + */ +export const orDie = internal.orDie; +/** + * Executes this layer and returns its output, if it succeeds, but otherwise + * executes the specified layer. + * + * @since 2.0.0 + * @category error handling + */ +export const orElse = internal.orElse; +/** + * Returns a new layer that produces the outputs of this layer but also + * passes through the inputs. + * + * @since 2.0.0 + * @category utils + */ +export const passthrough = internal.passthrough; +/** + * Projects out part of one of the services output by this layer using the + * specified function. + * + * @since 2.0.0 + * @category utils + */ +export const project = internal.project; +/** + * @since 2.0.0 + * @category utils + */ +export const locallyEffect = internal.locallyEffect; +/** + * @since 2.0.0 + * @category utils + */ +export const locally = internal.fiberRefLocally; +/** + * @since 2.0.0 + * @category utils + */ +export const locallyWith = internal.fiberRefLocallyWith; +/** + * @since 2.0.0 + * @category utils + */ +export const locallyScoped = internal.fiberRefLocallyScoped; +/** + * @since 2.0.0 + * @category utils + */ +export const fiberRefLocallyScopedWith = internal.fiberRefLocallyScopedWith; +/** + * Retries constructing this layer according to the specified schedule. + * + * @since 2.0.0 + * @category retrying + */ +export const retry = internal.retry; +/** + * A layer that constructs a scope and closes it when the workflow the layer + * is provided to completes execution, whether by success, failure, or + * interruption. This can be used to close a scope when providing a layer to a + * workflow. + * + * @since 2.0.0 + * @category constructors + */ +export const scope = internal.scope; +/** + * Constructs a layer from the specified scoped effect. + * + * @since 2.0.0 + * @category constructors + */ +export const scoped = internal.scoped; +/** + * Constructs a layer from the specified scoped effect, discarding its output. + * + * @since 2.0.0 + * @category constructors + */ +export const scopedDiscard = internal.scopedDiscard; +/** + * Constructs a layer from the specified scoped effect, which must return one + * or more services. + * + * @since 2.0.0 + * @category constructors + */ +export const scopedContext = internal.scopedContext; +/** + * Constructs a layer that accesses and returns the specified service from the + * context. + * + * @since 2.0.0 + * @category constructors + */ +export const service = internal.service; +/** + * Constructs a layer from the specified value. + * + * @since 2.0.0 + * @category constructors + */ +export const succeed = internal.succeed; +/** + * Constructs a layer from the specified value, which must return one or more + * services. + * + * @since 2.0.0 + * @category constructors + */ +export const succeedContext = internal.succeedContext; +/** + * Lazily constructs a layer. This is useful to avoid infinite recursion when + * creating layers that refer to themselves. + * + * @since 2.0.0 + * @category constructors + */ +export const suspend = internal.suspend; +/** + * Lazily constructs a layer from the specified value. + * + * @since 2.0.0 + * @category constructors + */ +export const sync = internal.sync; +/** + * Lazily constructs a layer from the specified value, which must return one or more + * services. + * + * @since 2.0.0 + * @category constructors + */ +export const syncContext = internal.syncContext; +/** + * Performs the specified effect if this layer succeeds. + * + * @since 2.0.0 + * @category sequencing + */ +export const tap = internal.tap; +/** + * Performs the specified effect if this layer fails. + * + * @since 2.0.0 + * @category sequencing + */ +export const tapError = internal.tapError; +/** + * Performs the specified effect if this layer fails. + * + * @since 2.0.0 + * @category sequencing + */ +export const tapErrorCause = internal.tapErrorCause; +/** + * Converts a layer that requires no services into a scoped runtime, which can + * be used to execute effects. + * + * @since 2.0.0 + * @category conversions + */ +export const toRuntime = internal.toRuntime; +/** + * Converts a layer that requires no services into a scoped runtime, which can + * be used to execute effects. + * + * @since 2.0.0 + * @category conversions + */ +export const toRuntimeWithMemoMap = internal.toRuntimeWithMemoMap; +/** + * Feeds the output services of this builder into the input of the specified + * builder, resulting in a new builder with the inputs of this builder as + * well as any leftover inputs, and the outputs of the specified builder. + * + * @since 2.0.0 + * @category utils + */ +export const provide = internal.provide; +/** + * Feeds the output services of this layer into the input of the specified + * layer, resulting in a new layer with the inputs of this layer, and the + * outputs of both layers. + * + * @since 2.0.0 + * @category utils + */ +export const provideMerge = internal.provideMerge; +/** + * Combines this layer with the specified layer concurrently, creating a new layer with merged input types and + * combined output types using the provided function. + * + * @since 2.0.0 + * @category zipping + */ +export const zipWith = internal.zipWith; +/** + * @since 2.0.0 + * @category utils + */ +export const unwrapEffect = internal.unwrapEffect; +/** + * @since 2.0.0 + * @category utils + */ +export const unwrapScoped = internal.unwrapScoped; +/** + * @since 2.0.0 + * @category clock + */ +export const setClock = clock => scopedDiscard(fiberRuntime.fiberRefLocallyScopedWith(defaultServices.currentServices, Context.add(clockTag, clock))); +/** + * Sets the current `ConfigProvider`. + * + * @since 2.0.0 + * @category config + */ +export const setConfigProvider = circularLayer.setConfigProvider; +/** + * Adds the provided span to the span stack. + * + * @since 2.0.0 + * @category tracing + */ +export const parentSpan = circularLayer.parentSpan; +/** + * @since 3.15.0 + * @category Random + */ +export const setRandom = random => scopedDiscard(fiberRuntime.fiberRefLocallyScopedWith(defaultServices.currentServices, Context.add(randomTag, random))); +/** + * @since 2.0.0 + * @category requests & batching + */ +export const setRequestBatching = requestBatching => scopedDiscard(fiberRuntime.fiberRefLocallyScoped(core.currentRequestBatching, requestBatching)); +/** + * @since 2.0.0 + * @category requests & batching + */ +export const setRequestCaching = requestCaching => scopedDiscard(fiberRuntime.fiberRefLocallyScoped(query.currentCacheEnabled, requestCaching)); +/** + * @since 2.0.0 + * @category requests & batching + */ +export const setRequestCache = cache => scopedDiscard(core.isEffect(cache) ? core.flatMap(cache, x => fiberRuntime.fiberRefLocallyScoped(query.currentCache, x)) : fiberRuntime.fiberRefLocallyScoped(query.currentCache, cache)); +/** + * @since 2.0.0 + * @category scheduler + */ +export const setScheduler = scheduler => scopedDiscard(fiberRuntime.fiberRefLocallyScoped(Scheduler.currentScheduler, scheduler)); +/** + * Create and add a span to the current span stack. + * + * The span is ended when the Layer is released. + * + * @since 2.0.0 + * @category tracing + */ +export const span = circularLayer.span; +/** + * Create a Layer that sets the current Tracer + * + * @since 2.0.0 + * @category tracing + */ +export const setTracer = circularLayer.setTracer; +/** + * @since 2.0.0 + * @category tracing + */ +export const setTracerEnabled = enabled => scopedDiscard(fiberRuntime.fiberRefLocallyScoped(core.currentTracerEnabled, enabled)); +/** + * @since 2.0.0 + * @category tracing + */ +export const setTracerTiming = enabled => scopedDiscard(fiberRuntime.fiberRefLocallyScoped(core.currentTracerTimingEnabled, enabled)); +/** + * @since 2.0.0 + * @category logging + */ +export const setUnhandledErrorLogLevel = level => scopedDiscard(fiberRuntime.fiberRefLocallyScoped(core.currentUnhandledErrorLogLevel, level)); +/** + * @since 3.17.0 + * @category logging + */ +export const setVersionMismatchErrorLogLevel = level => scopedDiscard(fiberRuntime.fiberRefLocallyScoped(core.currentVersionMismatchErrorLogLevel, level)); +/** + * @since 2.0.0 + * @category tracing + */ +export const withSpan = internal.withSpan; +/** + * @since 2.0.0 + * @category tracing + */ +export const withParentSpan = internal.withParentSpan; +// ----------------------------------------------------------------------------- +// memo map +// ----------------------------------------------------------------------------- +/** + * Constructs a `MemoMap` that can be used to build additional layers. + * + * @since 2.0.0 + * @category memo map + */ +export const makeMemoMap = internal.makeMemoMap; +/** + * Builds a layer into an `Effect` value, using the specified `MemoMap` to memoize + * the layer construction. + * + * @since 2.0.0 + * @category memo map + */ +export const buildWithMemoMap = internal.buildWithMemoMap; +/** + * Updates a service in the context with a new implementation. + * + * **Details** + * + * This function modifies the existing implementation of a service in the + * context. It retrieves the current service, applies the provided + * transformation function `f`, and replaces the old service with the + * transformed one. + * + * **When to Use** + * + * This is useful for adapting or extending a service's behavior during the + * creation of a layer. + * + * @since 3.13.0 + * @category utils + */ +export const updateService = /*#__PURE__*/dual(3, (layer, tag, f) => provide(layer, map(context(), c => Context.add(c, tag, f(Context.unsafeGet(c, tag)))))); +// ----------------------------------------------------------------------------- +// Type constraints +// ----------------------------------------------------------------------------- +/** + * A no-op type constraint that enforces the success channel of a Layer conforms to + * the specified success type `ROut`. + * + * @example + * import { Layer } from "effect" + * + * // Ensure that the layer produces the expected services. + * const program = Layer.succeed(MyService, new MyServiceImpl()).pipe(Layer.ensureSuccessType()) + * + * @since 3.20.0 + * @category Type constraints + */ +export const ensureSuccessType = () => layer => layer; +/** + * A no-op type constraint that enforces the error channel of a Layer conforms to + * the specified error type `E`. + * + * @example + * import { Layer } from "effect" + * + * // Ensure that the layer does not expose any unhandled errors. + * const program = Layer.succeed(MyService, new MyServiceImpl()).pipe(Layer.ensureErrorType()) + * + * @since 3.20.0 + * @category Type constraints + */ +export const ensureErrorType = () => layer => layer; +/** + * A no-op type constraint that enforces the requirements channel of a Layer conforms to + * the specified requirements type `RIn`. + * + * @example + * import { Layer } from "effect" + * + * // Ensure that the layer does not have any requirements. + * const program = Layer.succeed(MyService, new MyServiceImpl()).pipe(Layer.ensureRequirementsType()) + * + * @since 3.20.0 + * @category Type constraints + */ +export const ensureRequirementsType = () => layer => layer; +//# sourceMappingURL=Layer.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Layer.js.map b/backend/node_modules/effect/dist/esm/Layer.js.map new file mode 100644 index 0000000000000000000000000000000000000000..35868491777acdac8b88bfedc187474414b7503d --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Layer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Layer.js","names":["Context","dual","clockTag","core","defaultServices","fiberRuntime","internal","circularLayer","query","randomTag","Scheduler","LayerTypeId","MemoMapTypeId","CurrentMemoMap","isLayer","isFresh","annotateLogs","annotateSpans","build","buildWithScope","catchAll","catchAllCause","context","die","dieSync","discard","effect","fromEffect","effectDiscard","fromEffectDiscard","effectContext","fromEffectContext","empty","extendScope","fail","failSync","failCause","failCauseSync","flatMap","flatten","fresh","mock","fromFunction","function","launch","map","mapError","match","matchCause","memoize","merge","mergeAll","orDie","orElse","passthrough","project","locallyEffect","locally","fiberRefLocally","locallyWith","fiberRefLocallyWith","locallyScoped","fiberRefLocallyScoped","fiberRefLocallyScopedWith","retry","scope","scoped","scopedDiscard","scopedContext","service","succeed","succeedContext","suspend","sync","syncContext","tap","tapError","tapErrorCause","toRuntime","toRuntimeWithMemoMap","provide","provideMerge","zipWith","unwrapEffect","unwrapScoped","setClock","clock","currentServices","add","setConfigProvider","parentSpan","setRandom","random","setRequestBatching","requestBatching","currentRequestBatching","setRequestCaching","requestCaching","currentCacheEnabled","setRequestCache","cache","isEffect","x","currentCache","setScheduler","scheduler","currentScheduler","span","setTracer","setTracerEnabled","enabled","currentTracerEnabled","setTracerTiming","currentTracerTimingEnabled","setUnhandledErrorLogLevel","level","currentUnhandledErrorLogLevel","setVersionMismatchErrorLogLevel","currentVersionMismatchErrorLogLevel","withSpan","withParentSpan","makeMemoMap","buildWithMemoMap","updateService","layer","tag","f","c","unsafeGet","ensureSuccessType","ensureErrorType","ensureRequirementsType"],"sources":["../../src/Layer.ts"],"sourcesContent":[null],"mappings":"AAsBA,OAAO,KAAKA,OAAO,MAAM,cAAc;AAIvC,SAASC,IAAI,QAAsB,eAAe;AAClD,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,OAAO,KAAKC,IAAI,MAAM,oBAAoB;AAC1C,OAAO,KAAKC,eAAe,MAAM,+BAA+B;AAChE,OAAO,KAAKC,YAAY,MAAM,4BAA4B;AAC1D,OAAO,KAAKC,QAAQ,MAAM,qBAAqB;AAC/C,OAAO,KAAKC,aAAa,MAAM,8BAA8B;AAC7D,OAAO,KAAKC,KAAK,MAAM,qBAAqB;AAC5C,SAASC,SAAS,QAAQ,sBAAsB;AAQhD,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAM3C;;;;AAIA,OAAO,MAAMC,WAAW,GAAkBL,QAAQ,CAACK,WAAW;AA4D9D;;;;AAIA,OAAO,MAAMC,aAAa,GAAkBN,QAAQ,CAACM,aAAa;AA8BlE;;;;AAIA,OAAO,MAAMC,cAAc,GAA+CP,QAAQ,CAACO,cAAc;AAEjG;;;;;;AAMA,OAAO,MAAMC,OAAO,GAA0DR,QAAQ,CAACQ,OAAO;AAE9F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2B,IAA2BA,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/LayerMap.js.map b/backend/node_modules/effect/dist/esm/LayerMap.js.map new file mode 100644 index 0000000000000000000000000000000000000000..9577f5e4371f24705f55505f53a562a289b7773f --- /dev/null +++ b/backend/node_modules/effect/dist/esm/LayerMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"LayerMap.js","names":["Context","Effect","FiberRefsPatch","identity","core","Layer","RcMap","Runtime","Scope","TypeId","Symbol","for","make","fnUntraced","lookup","options","context","memoMap","unsafeMap","has","CurrentMemoMap","key","get","makeMemoMap","rcMap","scopeWith","scope","diffFiberRefs","buildWithMemoMap","pipe","map","patch","layer","scopedContext","withFiberRuntime","fiber","unsafeGet","currentContext","oldRefs","getFiberRefs","newRefs","id","revert","diff","setFiberRefs","as","addFinalizerExit","void","runtimeEffect","fiberRefs","succeed","runtimeFlags","defaultRuntime","idleTimeToLive","preloadKeys","unwrapScoped","runtime","flatMap","invalidate","fromRecord","layers","preload","Object","keys","undefined","Service","Err","globalThis","Error","limit","stackTraceLimit","creationError","TagClass","TagClass_","setPrototypeOf","getPrototypeOf","GenericTag","defineProperty","stack","DefaultWithoutDependencies","scoped","Default","dependencies","length","provide","layerMap"],"sources":["../../src/LayerMap.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;AAIA,OAAO,KAAKA,OAAO,MAAM,cAAc;AAEvC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,cAAc,MAAM,qBAAqB;AACrD,SAASC,QAAQ,QAAQ,eAAe;AACxC,OAAO,KAAKC,IAAI,MAAM,oBAAoB;AAC1C,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,KAAK,MAAM,YAAY;AAGnC;;;;AAIA,OAAO,MAAMC,MAAM,gBAAkBC,MAAM,CAACC,GA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AA;MACD,OAAOiD,aAAa,CAACO,KAAK;IAC5B;GACD,CAAC;EAEFL,SAAS,CAACM,0BAA0B,GAAG1E,KAAK,CAAC2E,MAAM,CACjDP,SAAS,EACT,QAAQ,IAAI1D,OAAO,GACfH,IAAI,CAACG,OAAO,CAACD,MAAM,EAAEC,OAAO,CAAC,GAC7B4C,UAAU,CAAC5C,OAAO,CAAC6C,MAAa,EAAE7C,OAAO,CAAC,CAC/C;EACD0D,SAAS,CAACQ,OAAO,GAAGlE,OAAO,CAACmE,YAAY,IAAInE,OAAO,CAACmE,YAAY,CAACC,MAAM,GAAG,CAAC,GACzE9E,KAAK,CAAC+E,OAAO,CAACX,SAAS,CAACM,0BAA0B,EAAEhE,OAAO,CAACmE,YAAmB,CAAC,GAChFT,SAAS,CAACM,0BAA0B;EAEtCN,SAAS,CAACnD,GAAG,GAAID,GAAW,IAAKhB,KAAK,CAACkD,YAAY,CAACtD,MAAM,CAAC6B,GAAG,CAAC2C,SAAS,EAAGY,QAAQ,IAAKA,QAAQ,CAAC/D,GAAG,CAACD,GAAG,CAAC,CAAC,CAAC;EAC3GoD,SAAS,CAACjB,OAAO,GAAInC,GAAW,IAAKpB,MAAM,CAACwD,OAAO,CAACgB,SAAS,EAAGY,QAAQ,IAAKA,QAAQ,CAAC7B,OAAO,CAACnC,GAAG,CAAC,CAAC;EACnGoD,SAAS,CAACf,UAAU,GAAIrC,GAAW,IAAKpB,MAAM,CAACwD,OAAO,CAACgB,SAAS,EAAGY,QAAQ,IAAKA,QAAQ,CAAC3B,UAAU,CAACrC,GAAG,CAAC,CAAC;EAEzG,OAAOmD,QAAe;AACxB,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/LogLevel.js.map b/backend/node_modules/effect/dist/esm/LogLevel.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e1333b5af656c90cbb509787173cf9f119440d2d --- /dev/null +++ b/backend/node_modules/effect/dist/esm/LogLevel.js.map @@ -0,0 +1 @@ +{"version":3,"file":"LogLevel.js","names":["dual","pipe","core","number","order","All","logLevelAll","Fatal","logLevelFatal","Error","logLevelError","Warning","logLevelWarning","Info","logLevelInfo","Debug","logLevelDebug","Trace","logLevelTrace","None","logLevelNone","allLevels","allLogLevels","locally","use","self","fiberRefLocally","currentLogLevel","Order","mapInput","level","ordinal","lessThan","lessThanEqual","lessThanOrEqualTo","greaterThan","greaterThanEqual","greaterThanOrEqualTo","fromLiteral","literal"],"sources":["../../src/LogLevel.ts"],"sourcesContent":[null],"mappings":"AAIA,SAASA,IAAI,EAAEC,IAAI,QAAQ,eAAe;AAC1C,OAAO,KAAKC,IAAI,MAAM,oBAAoB;AAC1C,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,KAAK,MAAM,YAAY;AA+GnC;;;;AAIA,OAAO,MAAMC,GAAG,GAAaH,IAAI,CAACI,WAAW;AAE7C;;;;AAIA,OAAO,MAAMC,KAAK,GAAaL,IAAI,CAACM,aAAa;AAEjD;;;;AAIA,OAAO,MAAMC,KAAK,GAAaP,IAAI,CAACQ,aAAa;AAEjD;;;;AAIA,OAAO,MAAMC,OAAO,GAAaT,IAAI,CAACU,eAAe;AAErD;;;;AAIA,OAAO,MAAMC,IAAI,GAAaX,IAAI,CAACY,YAAY;AAE/C;;;;AAIA,OAAO,MAAMC,KAAK,GAAab,IAAI,CAACc,aAAa;AAEjD;;;;AAIA,OAAO,MAAMC,KAAK,GAAaf,IAAI,CAACgB,aAAa;AAEjD;;;;AAIA,OAAO,MAAMC,IAAI,GAAajB,IAAI,CAACkB,YAAY;AAE/C;;;;AAIA,OAAO,MAAMC,SAAS,GAAGnB,IAAI,CAACoB,YAAY;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,OAAO,MAAMC,OAAO,gBAyEhBvB,IAAI,CACN,CAAC,EACD,CAAUwB,GAA2B,EAAEC,IAAc,KACnDvB,IAAI,CAACwB,eAAe,CAACF,GAAG,EAAEtB,IAAI,CAACyB,eAAe,EAAEF,IAAI,CAAC,CACxD;AAED;;;;AAIA,OAAO,MAAMG,KAAK,gBAA0B3B,IAAI,CAC9CE,MAAM,CAACyB,KAAK,eACZxB,KAAK,CAACyB,QAAQ,CAAEC,KAAe,IAAKA,KAAK,CAACC,OAAO,CAAC,CACnD;AAED;;;;AAIA,OAAO,MAAMC,QAAQ,gBAWjB5B,KAAK,CAAC4B,QAAQ,CAACJ,KAAK,CAAC;AAEzB;;;;AAIA,OAAO,MAAMK,aAAa,gBAWtB7B,KAAK,CAAC8B,iBAAiB,CAACN,KAAK,CAAC;AAElC;;;;AAIA,OAAO,MAAMO,WAAW,gBAWpB/B,KAAK,CAAC+B,WAAW,CAACP,KAAK,CAAC;AAE5B;;;;AAIA,OAAO,MAAMQ,gBAAgB,gBAWzBhC,KAAK,CAACiC,oBAAoB,CAACT,KAAK,CAAC;AAErC;;;;AAIA,OAAO,MAAMU,WAAW,GAAIC,OAAgB,IAAc;EACxD,QAAQA,OAAO;IACb,KAAK,KAAK;MACR,OAAOlC,GAAG;IACZ,KAAK,OAAO;MACV,OAAOU,KAAK;IACd,KAAK,OAAO;MACV,OAAON,KAAK;IACd,KAAK,OAAO;MACV,OAAOF,KAAK;IACd,KAAK,MAAM;MACT,OAAOM,IAAI;IACb,KAAK,OAAO;MACV,OAAOI,KAAK;IACd,KAAK,MAAM;MACT,OAAOE,IAAI;IACb,KAAK,SAAS;MACZ,OAAOR,OAAO;EAClB;AACF,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/LogSpan.js b/backend/node_modules/effect/dist/esm/LogSpan.js new file mode 100644 index 0000000000000000000000000000000000000000..435e3e741ed22c20677ca90c65e14a4f41b6d664 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/LogSpan.js @@ -0,0 +1,15 @@ +/** + * @since 2.0.0 + */ +import * as internal from "./internal/logSpan.js"; +/** + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * @since 2.0.0 + * @category destructors + */ +export const render = internal.render; +//# sourceMappingURL=LogSpan.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Logger.js.map b/backend/node_modules/effect/dist/esm/Logger.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0c2d67f11a1b36f2d6450f80d934091226522df5 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Logger.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Logger.js","names":["fiberRuntime","circular","internalCircular","internal","LoggerTypeId","make","makeLogger","add","addLogger","addEffect","addLoggerEffect","addScoped","addLoggerScoped","mapInput","mapInputOptions","filterLogLevel","map","batched","batchedLogger","withConsoleLog","loggerWithConsoleLog","withLeveledConsole","loggerWithLeveledLog","withConsoleError","loggerWithConsoleError","none","remove","removeLogger","replace","replaceLogger","replaceEffect","replaceLoggerEffect","replaceScoped","replaceLoggerScoped","simple","succeed","sync","test","withMinimumLogLevel","withSpanAnnotations","loggerWithSpanAnnotations","zip","zipLeft","zipRight","defaultLogger","jsonLogger","logfmtLogger","stringLogger","prettyLogger","prettyLoggerDefault","structuredLogger","tracerLogger","json","logFmt","logFmtLogger","pretty","structured","minimumLogLevel","isLogger"],"sources":["../../src/Logger.ts"],"sourcesContent":[null],"mappings":"AAUA,OAAO,KAAKA,YAAY,MAAM,4BAA4B;AAC1D,OAAO,KAAKC,QAAQ,MAAM,8BAA8B;AACxD,OAAO,KAAKC,gBAAgB,MAAM,+BAA+B;AACjE,OAAO,KAAKC,QAAQ,MAAM,sBAAsB;AAUhD;;;;AAIA,OAAO,MAAMC,YAAY,GAAkBD,QAAQ,CAACC,YAAY;AA+ChE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,OAAO,MAAMC,IAAI,GACfF,QAAQ,CAACG,UAAU;AAErB;;;;AAIA,OAAO,MAAMC,GAAG,GAA0DN,QAAQ,CAACO,SAAS;AAE5F;;;;AAIA,OAAO,MAAMC,SAAS,GACpBR,QAAQ,CAACS,eAAe;AAE1B;;;;AAIA,OAAO,MAAMC,SAAS,GAE0BV,QAAQ,CAACW,eAAe;AAExE;;;;AAIA,OAAO,MAAMC,QAAQ,GAWjBV,QAAQ,CAACU,QAAQ;AAErB;;;;AAIA,OAAO,MAAMC,eAAe,GAcxBX,QAAQ,CAACW,eAAe;AAE5B;;;;;;;AAOA,OAAO,MAAMC,cAAc,GAiBvBZ,QAAQ,CAACY,cAAc;AAE3B;;;;AAIA,OAAO,MAAMC,GAAG,GAWZb,QAAQ,CAACa,GAAG;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,OAAO,MAAMC,OAAO,GA0EhBjB,YAAY,CAACkB,aAAa;AAE9B;;;;AAIA,OAAO,MAAMC,cAAc,GAAkDnB,YAAY,CAACoB,oBAAoB;A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GAAkDvD,QAAQ,CAACuD,QAAQ","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Mailbox.js b/backend/node_modules/effect/dist/esm/Mailbox.js new file mode 100644 index 0000000000000000000000000000000000000000..3f66018ce2b349b411ca479026901eb993d1efaa --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Mailbox.js @@ -0,0 +1,96 @@ +import * as internal from "./internal/mailbox.js"; +import { hasProperty } from "./Predicate.js"; +/** + * @since 3.8.0 + * @experimental + * @category type ids + */ +export const TypeId = internal.TypeId; +/** + * @since 3.8.0 + * @experimental + * @category type ids + */ +export const ReadonlyTypeId = internal.ReadonlyTypeId; +/** + * @since 3.8.0 + * @experimental + * @category guards + */ +export const isMailbox = u => hasProperty(u, TypeId); +/** + * @since 3.8.0 + * @experimental + * @category guards + */ +export const isReadonlyMailbox = u => hasProperty(u, ReadonlyTypeId); +/** + * A `Mailbox` is a queue that can be signaled to be done or failed. + * + * @since 3.8.0 + * @experimental + * @category constructors + * @example + * ```ts + * import * as assert from "node:assert" + * import { Effect, Mailbox } from "effect" + * + * Effect.gen(function*() { + * const mailbox = yield* Mailbox.make() + * + * // add messages to the mailbox + * yield* mailbox.offer(1) + * yield* mailbox.offer(2) + * yield* mailbox.offerAll([3, 4, 5]) + * + * // take messages from the mailbox + * const [messages, done] = yield* mailbox.takeAll + * assert.deepStrictEqual(messages, [1, 2, 3, 4, 5]) + * assert.strictEqual(done, false) + * + * // signal that the mailbox is done + * yield* mailbox.end + * const [messages2, done2] = yield* mailbox.takeAll + * assert.deepStrictEqual(messages2, []) + * assert.strictEqual(done2, true) + * + * // signal that the mailbox has failed + * yield* mailbox.fail("boom") + * }) + * ``` + */ +export const make = internal.make; +/** + * Run an `Effect` into a `Mailbox`, where success ends the mailbox and failure + * fails the mailbox. + * + * @since 3.8.0 + * @experimental + * @category combinators + */ +export const into = internal.into; +/** + * Create a `Channel` from a `Mailbox`. + * + * @since 3.8.0 + * @experimental + * @category conversions + */ +export const toChannel = internal.toChannel; +/** + * Create a `Stream` from a `Mailbox`. + * + * @since 3.8.0 + * @experimental + * @category conversions + */ +export const toStream = internal.toStream; +/** + * Create a `ReadonlyMailbox` from a `Stream`. + * + * @since 3.11.0 + * @experimental + * @category conversions + */ +export const fromStream = internal.fromStream; +//# sourceMappingURL=Mailbox.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Mailbox.js.map b/backend/node_modules/effect/dist/esm/Mailbox.js.map new file mode 100644 index 0000000000000000000000000000000000000000..36a9d645d5ce87f19791bb338f3c9cc9a523e3d8 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Mailbox.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Mailbox.js","names":["internal","hasProperty","TypeId","ReadonlyTypeId","isMailbox","u","isReadonlyMailbox","make","into","toChannel","toStream","fromStream"],"sources":["../../src/Mailbox.ts"],"sourcesContent":[null],"mappings":"AAUA,OAAO,KAAKA,QAAQ,MAAM,uBAAuB;AAEjD,SAASC,WAAW,QAAQ,gBAAgB;AAI5C;;;;;AAKA,OAAO,MAAMC,MAAM,GAAkBF,QAAQ,CAACE,MAAM;AASpD;;;;;AAKA,OAAO,MAAMC,cAAc,GAAkBH,QAAQ,CAACG,cAAc;AASpE;;;;;AAKA,OAAO,MAAMC,SAAS,GAA8BC,CAAU,IAAyBJ,WAAW,CAACI,CAAC,EAAEH,MAAM,CAAC;AAE7G;;;;;AAKA,OAAO,MAAMI,iBAAiB,GAA8BD,CAAU,IACpEJ,WAAW,CAACI,CAAC,EAAEF,cAAc,CAAC;AAoHhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,OAAO,MAAMI,IAAI,GAKYP,QAAQ,CAACO,IAAI;AAE1C;;;;;;;;AAQA,OAAO,MAAMC,IAAI,GAmBbR,QAAQ,CAACQ,IAAI;AAEjB;;;;;;;AAOA,OAAO,MAAMC,SAAS,GAAyET,QAAQ,CAACS,SAAS;AAEjH;;;;;;;AAOA,OAAO,MAAMC,QAAQ,GAAwDV,QAAQ,CAACU,QAAQ;AAE9F;;;;;;;AAOA,OAAO,MAAMC,UAAU,GA4BnBX,QAAQ,CAACW,UAAU","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Match.js b/backend/node_modules/effect/dist/esm/Match.js new file mode 100644 index 0000000000000000000000000000000000000000..9fca2c989af8e0d772f5bfdc35988c2f592f3abc --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Match.js @@ -0,0 +1,828 @@ +import * as internal from "./internal/matcher.js"; +import * as Predicate from "./Predicate.js"; +/** + * @category Symbols + * @since 1.0.0 + */ +export const MatcherTypeId = internal.TypeId; +/** + * Creates a matcher for a specific type. + * + * **Details** + * + * This function defines a `Matcher` that operates on a given type, allowing you + * to specify conditions for handling different cases. Once the matcher is + * created, you can use pattern-matching functions like {@link when} to define + * how different values should be processed. + * + * **Example** (Matching Numbers and Strings) + * + * ```ts + * import { Match } from "effect" + * + * // Create a matcher for values that are either strings or numbers + * // + * // ┌─── (u: string | number) => string + * // ▼ + * const match = Match.type().pipe( + * // Match when the value is a number + * Match.when(Match.number, (n) => `number: ${n}`), + * // Match when the value is a string + * Match.when(Match.string, (s) => `string: ${s}`), + * // Ensure all possible cases are handled + * Match.exhaustive + * ) + * + * console.log(match(0)) + * // Output: "number: 0" + * + * console.log(match("hello")) + * // Output: "string: hello" + * ``` + * + * @see {@link value} for creating a matcher from a specific value. + * + * @category Creating a matcher + * @since 1.0.0 + */ +export const type = internal.type; +/** + * Creates a matcher from a specific value. + * + * **Details** + * + * This function allows you to define a `Matcher` directly from a given value, + * rather than from a type. This is useful when working with known values, + * enabling structured pattern matching on objects, primitives, or any data + * structure. + * + * Once the matcher is created, you can use pattern-matching functions like + * {@link when} to define how different cases should be handled. + * + * **Example** (Matching an Object by Property) + * + * ```ts + * import { Match } from "effect" + * + * const input = { name: "John", age: 30 } + * + * // Create a matcher for the specific object + * const result = Match.value(input).pipe( + * // Match when the 'name' property is "John" + * Match.when( + * { name: "John" }, + * (user) => `${user.name} is ${user.age} years old` + * ), + * // Provide a fallback if no match is found + * Match.orElse(() => "Oh, not John") + * ) + * + * console.log(result) + * // Output: "John is 30 years old" + * ``` + * + * @see {@link type} for creating a matcher from a specific type. + * + * @category Creating a matcher + * @since 1.0.0 + */ +export const value = internal.value; +/** + * @category Creating a matcher + * @since 1.0.0 + */ +export const valueTags = internal.valueTags; +/** + * @category Creating a matcher + * @since 1.0.0 + */ +export const typeTags = internal.typeTags; +/** + * Ensures that all branches of a matcher return a specific type. + * + * **Details** + * + * This function enforces a consistent return type across all pattern-matching + * branches. By specifying a return type, TypeScript will check that every + * matching condition produces a value of the expected type. + * + * **Important:** This function must be the first step in the matcher pipeline. + * If used later, TypeScript will not enforce type consistency correctly. + * + * **Example** (Validating Return Type Consistency) + * + * ```ts + * import { Match } from "effect" + * + * const match = Match.type<{ a: number } | { b: string }>().pipe( + * // Ensure all branches return a string + * Match.withReturnType(), + * // ❌ Type error: 'number' is not assignable to type 'string' + * // @ts-expect-error + * Match.when({ a: Match.number }, (_) => _.a), + * // ✅ Correct: returns a string + * Match.when({ b: Match.string }, (_) => _.b), + * Match.exhaustive + * ) + * ``` + * + * @since 1.0.0 + */ +export const withReturnType = internal.withReturnType; +/** + * Defines a condition for matching values. + * + * **Details** + * + * This function enables pattern matching by checking whether a given value + * satisfies a condition. It supports both direct value comparisons and + * predicate functions. If the condition is met, the associated function is + * executed. + * + * This function is useful when defining matchers that need to check for + * specific values or apply logical conditions to determine a match. It works + * well with structured objects and primitive types. + * + * **Example** (Matching with Values and Predicates) + * + * ```ts + * import { Match } from "effect" + * + * // Create a matcher for objects with an "age" property + * const match = Match.type<{ age: number }>().pipe( + * // Match when age is greater than 18 + * Match.when({ age: (age) => age > 18 }, (user) => `Age: ${user.age}`), + * // Match when age is exactly 18 + * Match.when({ age: 18 }, () => "You can vote"), + * // Fallback case for all other ages + * Match.orElse((user) => `${user.age} is too young`) + * ) + * + * console.log(match({ age: 20 })) + * // Output: "Age: 20" + * + * console.log(match({ age: 18 })) + * // Output: "You can vote" + * + * console.log(match({ age: 4 })) + * // Output: "4 is too young" + * ``` + * + * @see {@link whenOr} Use this when multiple patterns should match in a single + * condition. + * @see {@link whenAnd} Use this when a value must match all provided patterns. + * @see {@link orElse} Provides a fallback when no patterns match. + * + * @category Defining patterns + * @since 1.0.0 + */ +export const when = internal.when; +/** + * Matches one of multiple patterns in a single condition. + * + * **Details** + * + * This function allows defining a condition where a value matches any of the + * provided patterns. If a match is found, the associated function is executed. + * It simplifies cases where multiple patterns share the same handling logic. + * + * Unlike {@link when}, which requires separate conditions for each pattern, + * this function enables combining them into a single statement, making the + * matcher more concise. + * + * @example + * ```ts + * import { Match } from "effect" + * + * type ErrorType = + * | { readonly _tag: "NetworkError"; readonly message: string } + * | { readonly _tag: "TimeoutError"; readonly duration: number } + * | { readonly _tag: "ValidationError"; readonly field: string } + * + * const handleError = Match.type().pipe( + * Match.whenOr( + * { _tag: "NetworkError" }, + * { _tag: "TimeoutError" }, + * () => "Retry the request" + * ), + * Match.when({ _tag: "ValidationError" }, (_) => `Invalid field: ${_.field}`), + * Match.exhaustive + * ) + * + * console.log(handleError({ _tag: "NetworkError", message: "No connection" })) + * // Output: "Retry the request" + * + * console.log(handleError({ _tag: "ValidationError", field: "email" })) + * // Output: "Invalid field: email" + * ``` + * + * @category Defining patterns + * @since 1.0.0 + */ +export const whenOr = internal.whenOr; +/** + * Matches a value that satisfies all provided patterns. + * + * **Details** + * + * This function allows defining a condition where a value must match all the + * given patterns simultaneously. If the value satisfies every pattern, the + * associated function is executed. + * + * Unlike {@link when}, which matches a single pattern at a time, this function + * ensures that multiple conditions are met before executing the callback. It is + * useful when checking for values that need to fulfill multiple criteria at + * once. + * + * @example + * ```ts + * import { Match } from "effect" + * + * type User = { readonly age: number; readonly role: "admin" | "user" } + * + * const checkUser = Match.type().pipe( + * Match.whenAnd( + * { age: (n) => n >= 18 }, + * { role: "admin" }, + * () => "Admin access granted" + * ), + * Match.orElse(() => "Access denied") + * ) + * + * console.log(checkUser({ age: 20, role: "admin" })) + * // Output: "Admin access granted" + * + * console.log(checkUser({ age: 20, role: "user" })) + * // Output: "Access denied" + * ``` + * + * @category Defining patterns + * @since 1.0.0 + */ +export const whenAnd = internal.whenAnd; +/** + * Matches values based on a specified discriminant field. + * + * **Details** + * + * This function is used to define pattern matching on objects that follow a + * **discriminated union** structure, where a specific field (e.g., `type`, + * `kind`, `_tag`) determines the variant of the object. It allows matching + * multiple values of the discriminant and provides a function to handle the + * matched cases. + * + * @example + * ```ts + * import { Match, pipe } from "effect" + * + * const match = pipe( + * Match.type<{ type: "A"; a: string } | { type: "B"; b: number } | { type: "C"; c: boolean }>(), + * Match.discriminator("type")("A", "B", (_) => `A or B: ${_.type}`), + * Match.discriminator("type")("C", (_) => `C(${_.c})`), + * Match.exhaustive + * ) + * ``` + * + * @category Defining patterns + * @since 1.0.0 + */ +export const discriminator = internal.discriminator; +/** + * Matches values where a specified field starts with a given prefix. + * + * **Details** + * + * This function is useful for working with discriminated unions where the + * discriminant field follows a hierarchical or namespaced structure. It allows + * you to match values based on whether the specified field starts with a given + * prefix, making it easier to handle grouped cases. + * + * Instead of checking for exact matches, this function lets you match values + * that share a common prefix. For example, if your discriminant field contains + * hierarchical names like `"A"`, `"A.A"`, and `"B"`, you can match all values + * starting with `"A"` using a single rule. + * + * @example + * ```ts + * import { Match, pipe } from "effect" + * + * const match = pipe( + * Match.type<{ type: "A" } | { type: "B" } | { type: "A.A" } | {}>(), + * Match.discriminatorStartsWith("type")("A", (_) => 1 as const), + * Match.discriminatorStartsWith("type")("B", (_) => 2 as const), + * Match.orElse((_) => 3 as const) + * ) + * + * console.log(match({ type: "A" })) // 1 + * console.log(match({ type: "B" })) // 2 + * console.log(match({ type: "A.A" })) // 1 + * ``` + * + * @category Defining patterns + * @since 1.0.0 + */ +export const discriminatorStartsWith = internal.discriminatorStartsWith; +/** + * Matches values based on a field that serves as a discriminator, mapping each + * possible value to a corresponding handler. + * + * **Details** + * + * This function simplifies working with discriminated unions by letting you + * define a set of handlers for each possible value of a given field. Instead of + * chaining multiple calls to {@link discriminator}, this function allows + * defining all possible cases at once using an object where the keys are the + * possible values of the field, and the values are the corresponding handler + * functions. + * + * @example + * ```ts + * import { Match, pipe } from "effect" + * + * const match = pipe( + * Match.type<{ type: "A"; a: string } | { type: "B"; b: number } | { type: "C"; c: boolean }>(), + * Match.discriminators("type")({ + * A: (a) => a.a, + * B: (b) => b.b, + * C: (c) => c.c + * }), + * Match.exhaustive + * ) + * ``` + * + * @category Defining patterns + * @since 1.0.0 + */ +export const discriminators = internal.discriminators; +/** + * Matches values based on a discriminator field and **ensures all cases are + * handled**. + * + * **Details*+ + * + * This function is similar to {@link discriminators}, but **requires that all + * possible cases** are explicitly handled. It is useful when working with + * discriminated unions, where a specific field (e.g., `"type"`) determines the + * shape of an object. Each possible value of the field must have a + * corresponding handler, ensuring **exhaustiveness checking** at compile time. + * + * This function **does not require** `Match.exhaustive` at the end of the + * pipeline because it enforces exhaustiveness by design. + * + * @example + * ```ts + * import { Match, pipe } from "effect" + * + * const match = pipe( + * Match.type<{ type: "A"; a: string } | { type: "B"; b: number } | { type: "C"; c: boolean }>(), + * Match.discriminatorsExhaustive("type")({ + * A: (a) => a.a, + * B: (b) => b.b, + * C: (c) => c.c + * }) + * ) + * ``` + * + * @category Defining patterns + * @since 1.0.0 + */ +export const discriminatorsExhaustive = internal.discriminatorsExhaustive; +/** + * The `Match.tag` function allows pattern matching based on the `_tag` field in + * a [Discriminated Union](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes-func.html#discriminated-unions). + * You can specify multiple tags to match within a single pattern. + * + * **Note** + * + * The `Match.tag` function relies on the convention within the Effect ecosystem + * of naming the tag field as `"_tag"`. Ensure that your discriminated unions + * follow this naming convention for proper functionality. + * + * **Example** (Matching a Discriminated Union by Tag) + * + * ```ts + * import { Match } from "effect" + * + * type Event = + * | { readonly _tag: "fetch" } + * | { readonly _tag: "success"; readonly data: string } + * | { readonly _tag: "error"; readonly error: Error } + * | { readonly _tag: "cancel" } + * + * // Create a Matcher for Either + * const match = Match.type().pipe( + * // Match either "fetch" or "success" + * Match.tag("fetch", "success", () => `Ok!`), + * // Match "error" and extract the error message + * Match.tag("error", (event) => `Error: ${event.error.message}`), + * // Match "cancel" + * Match.tag("cancel", () => "Cancelled"), + * Match.exhaustive + * ) + * + * console.log(match({ _tag: "success", data: "Hello" })) + * // Output: "Ok!" + * + * console.log(match({ _tag: "error", error: new Error("Oops!") })) + * // Output: "Error: Oops!" + * ``` + * + * @category Defining patterns + * @since 1.0.0 + */ +export const tag = internal.tag; +/** + * Matches values where the `_tag` field starts with a given prefix. + * + * **Details** + * + * This function allows you to match on values in a **discriminated union** + * based on whether the `_tag` field starts with a specified prefix. It is + * useful for handling hierarchical or namespaced tags, where multiple related + * cases share a common prefix. + * + * @example + * ```ts + * import { Match, pipe } from "effect" + * + * const match = pipe( + * Match.type<{ _tag: "A" } | { _tag: "B" } | { _tag: "A.A" } | {}>(), + * Match.tagStartsWith("A", (_) => 1 as const), + * Match.tagStartsWith("B", (_) => 2 as const), + * Match.orElse((_) => 3 as const) + * ) + * + * console.log(match({ _tag: "A" })) // 1 + * console.log(match({ _tag: "B" })) // 2 + * console.log(match({ _tag: "A.A" })) // 1 + * ``` + * + * @category Defining patterns + * @since 1.0.0 + */ +export const tagStartsWith = internal.tagStartsWith; +/** + * Matches values based on their `_tag` field, mapping each tag to a + * corresponding handler. + * + * **Details** + * + * This function provides a way to handle discriminated unions by mapping `_tag` + * values to specific functions. Each handler receives the matched value and + * returns a transformed result. If all possible tags are handled, you can + * enforce exhaustiveness using `Match.exhaustive` to ensure no case is missed. + * + * @example + * ```ts + * import { Match, pipe } from "effect" + * + * const match = pipe( + * Match.type<{ _tag: "A"; a: string } | { _tag: "B"; b: number } | { _tag: "C"; c: boolean }>(), + * Match.tags({ + * A: (a) => a.a, + * B: (b) => b.b, + * C: (c) => c.c + * }), + * Match.exhaustive + * ) + * ``` + * + * @category Defining patterns + * @since 1.0.0 + */ +export const tags = internal.tags; +/** + * Matches values based on their `_tag` field and requires handling of all + * possible cases. + * + * **Details** + * + * This function is designed for **discriminated unions** where every possible + * `_tag` value must have a corresponding handler. Unlike {@link tags}, this + * function ensures **exhaustiveness**, meaning all cases must be explicitly + * handled. If a `_tag` value is missing from the mapping, TypeScript will + * report an error. + * + * @example + * ```ts + * import { Match, pipe } from "effect" + * + * const match = pipe( + * Match.type<{ _tag: "A"; a: string } | { _tag: "B"; b: number } | { _tag: "C"; c: boolean }>(), + * Match.tagsExhaustive({ + * A: (a) => a.a, + * B: (b) => b.b, + * C: (c) => c.c + * }) + * ) + * ``` + * + * @category Defining patterns + * @since 1.0.0 + */ +export const tagsExhaustive = internal.tagsExhaustive; +/** + * Excludes a specific value from matching while allowing all others. + * + * **Details** + * + * This function is useful when you need to **handle all values except one or + * more specific cases**. Instead of listing all possible matches manually, this + * function simplifies the logic by allowing you to specify values to exclude. + * Any excluded value will bypass the provided function and continue matching + * through other cases. + * + * **Example** (Ignoring a Specific Value) + * + * ```ts + * import { Match } from "effect" + * + * // Create a matcher for string or number values + * const match = Match.type().pipe( + * // Match any value except "hi", returning "ok" + * Match.not("hi", () => "ok"), + * // Fallback case for when the value is "hi" + * Match.orElse(() => "fallback") + * ) + * + * console.log(match("hello")) + * // Output: "ok" + * + * console.log(match("hi")) + * // Output: "fallback" + * ``` + * + * @category Defining patterns + * @since 1.0.0 + */ +export const not = internal.not; +/** + * Matches non-empty strings. + * + * @category Predicates + * @since 1.0.0 + */ +export const nonEmptyString = internal.nonEmptyString; +/** + * Matches a specific set of literal values (e.g., `Match.is("a", 42, true)`). + * + * @category Predicates + * @since 1.0.0 + */ +export const is = internal.is; +/** + * Matches values of type `string`. + * + * @category Predicates + * @since 1.0.0 + */ +export const string = Predicate.isString; +/** + * Matches values of type `number`. + * + * @category Predicates + * @since 1.0.0 + */ +export const number = Predicate.isNumber; +/** + * Matches any value without restrictions. + * + * @category Predicates + * @since 1.0.0 + */ +export const any = internal.any; +/** + * Matches any defined (non-null and non-undefined) value. + * + * @category Predicates + * @since 1.0.0 + */ +export const defined = internal.defined; +/** + * Matches values of type `boolean`. + * + * @category Predicates + * @since 1.0.0 + */ +export const boolean = Predicate.isBoolean; +const _undefined = Predicate.isUndefined; +export { +/** + * Matches the value `undefined`. + * + * @category Predicates + * @since 1.0.0 + */ +_undefined as undefined }; +const _null = Predicate.isNull; +export { +/** + * Matches the value `null`. + * + * @category Predicates + * @since 1.0.0 + */ +_null as null }; +/** + * Matches values of type `bigint`. + * + * @category Predicates + * @since 1.0.0 + */ +export const bigint = Predicate.isBigInt; +/** + * Matches values of type `symbol`. + * + * @category Predicates + * @since 1.0.0 + */ +export const symbol = Predicate.isSymbol; +/** + * Matches values that are instances of `Date`. + * + * @category Predicates + * @since 1.0.0 + */ +export const date = Predicate.isDate; +/** + * Matches objects where keys are `string` or `symbol` and values are `unknown`. + * + * @category Predicates + * @since 1.0.0 + */ +export const record = Predicate.isRecord; +/** + * Matches instances of a given class. + * + * @category Predicates + * @since 1.0.0 + */ +export const instanceOf = internal.instanceOf; +/** + * @category Predicates + * @since 1.0.0 + */ +export const instanceOfUnsafe = internal.instanceOf; +/** + * Provides a fallback value when no patterns match. + * + * **Details** + * + * This function ensures that a matcher always returns a valid result, even if + * no defined patterns match. It acts as a default case, similar to the + * `default` clause in a `switch` statement or the final `else` in an `if-else` + * chain. + * + * **Example** (Providing a Default Value When No Patterns Match) + * + * ```ts + * import { Match } from "effect" + * + * // Create a matcher for string or number values + * const match = Match.type().pipe( + * // Match when the value is "a" + * Match.when("a", () => "ok"), + * // Fallback when no patterns match + * Match.orElse(() => "fallback") + * ) + * + * console.log(match("a")) + * // Output: "ok" + * + * console.log(match("b")) + * // Output: "fallback" + * ``` + * + * @category Completion + * @since 1.0.0 + */ +export const orElse = internal.orElse; +// TODO(4.0): Rename to "orThrow"? Like Either.getOrThrow +/** + * Throws an error if no pattern matches. + * + * **Details** + * + * This function finalizes a matcher by ensuring that if no patterns match, an + * error is thrown. It is useful when all cases should be covered, and any + * unexpected input should trigger an error instead of returning a default + * value. + * + * When used, this function removes the need for an explicit fallback case and + * ensures that an unmatched value is never silently ignored. + * + * @category Completion + * @since 1.0.0 + */ +export const orElseAbsurd = internal.orElseAbsurd; +/** + * Wraps the match result in an `Either`, distinguishing matched and unmatched + * cases. + * + * **Details** + * + * This function ensures that the result of a matcher is always wrapped in an + * `Either`, allowing clear differentiation between successful matches + * (`Right(value)`) and cases where no pattern matched (`Left(unmatched + * value)`). + * + * This approach is particularly useful when handling optional values or when an + * unmatched case should be explicitly handled rather than returning a default + * value or throwing an error. + * + * **Example** (Extracting a User Role with `Match.either`) + * + * ```ts + * import { Match } from "effect" + * + * type User = { readonly role: "admin" | "editor" | "viewer" } + * + * // Create a matcher to extract user roles + * const getRole = Match.type().pipe( + * Match.when({ role: "admin" }, () => "Has full access"), + * Match.when({ role: "editor" }, () => "Can edit content"), + * Match.either // Wrap the result in an Either + * ) + * + * console.log(getRole({ role: "admin" })) + * // Output: { _id: 'Either', _tag: 'Right', right: 'Has full access' } + * + * console.log(getRole({ role: "viewer" })) + * // Output: { _id: 'Either', _tag: 'Left', left: { role: 'viewer' } } + * ``` + * + * @category Completion + * @since 1.0.0 + */ +export const either = internal.either; +/** + * Wraps the match result in an `Option`, representing an optional match. + * + * **Details** + * + * This function ensures that the result of a matcher is wrapped in an `Option`, + * making it easy to handle cases where no pattern matches. If a match is found, + * it returns `Some(value)`, otherwise, it returns `None`. + * + * This is useful in cases where a missing match is expected and should be + * handled explicitly rather than throwing an error or returning a default + * value. + * + * **Example** (Extracting a User Role with `Match.option`) + * + * ```ts + * import { Match } from "effect" + * + * type User = { readonly role: "admin" | "editor" | "viewer" } + * + * // Create a matcher to extract user roles + * const getRole = Match.type().pipe( + * Match.when({ role: "admin" }, () => "Has full access"), + * Match.when({ role: "editor" }, () => "Can edit content"), + * Match.option // Wrap the result in an Option + * ) + * + * console.log(getRole({ role: "admin" })) + * // Output: { _id: 'Option', _tag: 'Some', value: 'Has full access' } + * + * console.log(getRole({ role: "viewer" })) + * // Output: { _id: 'Option', _tag: 'None' } + * ``` + * + * @category Completion + * @since 1.0.0 + */ +export const option = internal.option; +/** + * The `Match.exhaustive` method finalizes the pattern matching process by + * ensuring that all possible cases are accounted for. If any case is missing, + * TypeScript will produce a type error. This is particularly useful when + * working with unions, as it helps prevent unintended gaps in pattern matching. + * + * **Example** (Ensuring All Cases Are Covered) + * + * ```ts + * import { Match } from "effect" + * + * // Create a matcher for string or number values + * const match = Match.type().pipe( + * // Match when the value is a number + * Match.when(Match.number, (n) => `number: ${n}`), + * // Mark the match as exhaustive, ensuring all cases are handled + * // TypeScript will throw an error if any case is missing + * // @ts-expect-error Type 'string' is not assignable to type 'never' + * Match.exhaustive + * ) + * ``` + * + * @category Completion + * @since 1.0.0 + */ +export const exhaustive = internal.exhaustive; +/** + * @since 1.0.0 + * @category Symbols + */ +export const SafeRefinementId = /*#__PURE__*/Symbol.for("effect/SafeRefinement"); +const Fail = /*#__PURE__*/Symbol.for("effect/Fail"); +//# sourceMappingURL=Match.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Metric.js b/backend/node_modules/effect/dist/esm/Metric.js new file mode 100644 index 0000000000000000000000000000000000000000..611d0f251525b4409dacf2cdd9a285bc8963ff86 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Metric.js @@ -0,0 +1,408 @@ +import * as fiberRuntime from "./internal/fiberRuntime.js"; +import * as internal from "./internal/metric.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const MetricTypeId = internal.MetricTypeId; +/** + * @since 2.0.0 + * @category globals + */ +export const globalMetricRegistry = internal.globalMetricRegistry; +/** + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * Returns a new metric that is powered by this one, but which accepts updates + * of the specified new type, which must be transformable to the input type of + * this metric. + * + * @since 2.0.0 + * @category mapping + */ +export const mapInput = internal.mapInput; +/** + * Represents a Counter metric that tracks cumulative numerical values over time. + * Counters can be incremented and decremented and provide a running total of changes. + * + * **Options** + * + * - description - A description of the counter. + * - bigint - Indicates if the counter uses 'bigint' data type. + * - incremental - Set to 'true' for a counter that only increases. With this configuration, Effect ensures that non-incremental updates have no impact on the counter, making it exclusively suitable for counting upwards. + * + * @example + * ```ts + * import { Metric } from "effect" + * + * const numberCounter = Metric.counter("count", { + * description: "A number counter" + * }); + * + * const bigintCounter = Metric.counter("count", { + * description: "A bigint counter", + * bigint: true + * }); + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const counter = internal.counter; +/** + * Creates a Frequency metric to count occurrences of events. + * Frequency metrics are used to count the number of times specific events or incidents occur. + * + * @example + * ```ts + * import { Metric } from "effect" + * + * const errorFrequency = Metric.frequency("error_frequency", { + * description: "Counts the occurrences of errors." + * }); + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const frequency = internal.frequency; +/** + * Returns a new metric that is powered by this one, but which accepts updates + * of any type, and translates them to updates with the specified constant + * update value. + * + * @since 2.0.0 + * @category constructors + */ +export const withConstantInput = internal.withConstantInput; +/** + * @since 2.0.0 + * @category constructors + */ +export const fromMetricKey = internal.fromMetricKey; +/** + * Represents a Gauge metric that tracks and reports a single numerical value at a specific moment. + * Gauges are suitable for metrics that represent instantaneous values, such as memory usage or CPU load. + * + * **Options** + * + * - description - A description of the gauge metric. + * - bigint - Indicates if the counter uses 'bigint' data type. + * + * @example + * ```ts + * import { Metric } from "effect" + * + * const numberGauge = Metric.gauge("memory_usage", { + * description: "A gauge for memory usage" + * }); + * + * const bigintGauge = Metric.gauge("cpu_load", { + * description: "A gauge for CPU load", + * bigint: true + * }); + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const gauge = internal.gauge; +/** + * Represents a Histogram metric that records observations in specified value boundaries. + * Histogram metrics are useful for measuring the distribution of values within a range. + * + * @example + * ```ts + * import { Metric, MetricBoundaries } from "effect" + * + * const latencyHistogram = Metric.histogram("latency_histogram", + * MetricBoundaries.linear({ start: 0, width: 10, count: 11 }), + * "Measures the distribution of request latency." + * ); + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const histogram = internal.histogram; +/** + * @since 2.0.0 + * @category combinators + */ +export const increment = internal.increment; +/** + * @since 2.0.0 + * @category combinators + */ +export const incrementBy = internal.incrementBy; +/** + * Returns a new metric that is powered by this one, but which outputs a new + * state type, determined by transforming the state type of this metric by the + * specified function. + * + * @since 2.0.0 + * @category mapping + */ +export const map = internal.map; +/** + * @since 2.0.0 + * @category mapping + */ +export const mapType = internal.mapType; +/** + * Modifies the metric with the specified update message. For example, if the + * metric were a gauge, the update would increment the method by the provided + * amount. + * + * @since 3.6.5 + * @category utils + */ +export const modify = internal.modify; +/** + * @since 2.0.0 + * @category aspects + */ +export const set = internal.set; +/** + * Captures a snapshot of all metrics recorded by the application. + * + * @since 2.0.0 + * @category getters + */ +export const snapshot = internal.snapshot; +/** + * Creates a metric that ignores input and produces constant output. + * + * @since 2.0.0 + * @category constructors + */ +export const succeed = internal.succeed; +/** + * Creates a metric that ignores input and produces constant output. + * + * @since 2.0.0 + * @category constructors + */ +export const sync = internal.sync; +/** + * Creates a Summary metric that records observations and calculates quantiles. + * Summary metrics provide statistical information about a set of values, including quantiles. + * + * **Options** + * + * - name - The name of the Summary metric. + * - maxAge - The maximum age of observations to retain. + * - maxSize - The maximum number of observations to keep. + * - error - The error percentage when calculating quantiles. + * - quantiles - An `Chunk` of quantiles to calculate (e.g., [0.5, 0.9]). + * - description - An optional description of the Summary metric. + * + * @example + * ```ts + * import { Metric, Chunk } from "effect" + * + * const responseTimesSummary = Metric.summary({ + * name: "response_times_summary", + * maxAge: "60 seconds", // Retain observations for 60 seconds. + * maxSize: 1000, // Keep a maximum of 1000 observations. + * error: 0.01, // Allow a 1% error when calculating quantiles. + * quantiles: [0.5, 0.9, 0.99], // Calculate 50th, 90th, and 99th percentiles. + * description: "Measures the distribution of response times." + * }); + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const summary = internal.summary; +/** + * @since 2.0.0 + * @category constructors + */ +export const summaryTimestamp // readonly because contravariant += internal.summaryTimestamp; +/** + * Returns a new metric, which is identical in every way to this one, except + * the specified tags have been added to the tags of this metric. + * + * @since 2.0.0 + * @category utils + */ +export const tagged = internal.tagged; +/** + * Returns a new metric, which is identical in every way to this one, except + * dynamic tags are added based on the update values. Note that the metric + * returned by this method does not return any useful information, due to the + * dynamic nature of the added tags. + * + * @since 2.0.0 + * @category utils + */ +export const taggedWithLabelsInput = internal.taggedWithLabelsInput; +/** + * Returns a new metric, which is identical in every way to this one, except + * the specified tags have been added to the tags of this metric. + * + * @since 2.0.0 + * @category utils + */ +export const taggedWithLabels = internal.taggedWithLabels; +/** + * Creates a timer metric, based on a histogram, which keeps track of + * durations in milliseconds. The unit of time will automatically be added to + * the metric as a tag (i.e. `"time_unit: milliseconds"`). + * + * @since 2.0.0 + * @category constructors + */ +export const timer = internal.timer; +/** + * Creates a timer metric, based on a histogram created from the provided + * boundaries, which keeps track of durations in milliseconds. The unit of time + * will automatically be added to the metric as a tag (i.e. + * `"time_unit: milliseconds"`). + * + * @since 2.0.0 + * @category constructors + */ +export const timerWithBoundaries = internal.timerWithBoundaries; +/** + * Returns an aspect that will update this metric with the specified constant + * value every time the aspect is applied to an effect, regardless of whether + * that effect fails or succeeds. + * + * @since 2.0.0 + * @category aspects + */ +export const trackAll = internal.trackAll; +/** + * Returns an aspect that will update this metric with the defects of the + * effects that it is applied to. + * + * @since 2.0.0 + * @category aspects + */ +export const trackDefect = internal.trackDefect; +/** + * Returns an aspect that will update this metric with the result of applying + * the specified function to the defect throwables of the effects that the + * aspect is applied to. + * + * @since 2.0.0 + * @category aspects + */ +export const trackDefectWith = internal.trackDefectWith; +/** + * Returns an aspect that will update this metric with the duration that the + * effect takes to execute. To call this method, the input type of the metric + * must be `Duration`. + * + * @since 2.0.0 + * @category aspects + */ +export const trackDuration = internal.trackDuration; +/** + * Returns an aspect that will update this metric with the duration that the + * effect takes to execute. To call this method, you must supply a function + * that can convert the `Duration` to the input type of this metric. + * + * @since 2.0.0 + * @category aspects + */ +export const trackDurationWith = internal.trackDurationWith; +/** + * Returns an aspect that will update this metric with the failure value of + * the effects that it is applied to. + * + * @since 2.0.0 + * @category aspects + */ +export const trackError = internal.trackError; +/** + * Returns an aspect that will update this metric with the result of applying + * the specified function to the error value of the effects that the aspect is + * applied to. + * + * @since 2.0.0 + * @category aspects + */ +export const trackErrorWith = internal.trackErrorWith; +/** + * Returns an aspect that will update this metric with the success value of + * the effects that it is applied to. + * + * @since 2.0.0 + * @category aspects + */ +export const trackSuccess = internal.trackSuccess; +/** + * Returns an aspect that will update this metric with the result of applying + * the specified function to the success value of the effects that the aspect is + * applied to. + * + * @since 2.0.0 + * @category aspects + */ +export const trackSuccessWith = internal.trackSuccessWith; +/** + * Updates the metric with the specified update message. For example, if the + * metric were a counter, the update would increment the method by the + * provided amount. + * + * @since 2.0.0 + * @category utils + */ +export const update = internal.update; +/** + * Retrieves a snapshot of the value of the metric at this moment in time. + * + * @since 2.0.0 + * @category getters + */ +export const value = internal.value; +/** + * @since 2.0.0 + * @category utils + */ +export const withNow = internal.withNow; +/** + * @since 2.0.0 + * @category zipping + */ +export const zip = internal.zip; +/** + * Unsafely captures a snapshot of all metrics recorded by the application. + * + * @since 2.0.0 + * @category unsafe + */ +export const unsafeSnapshot = internal.unsafeSnapshot; +/** + * @since 2.0.0 + * @category metrics + */ +export const fiberStarted = fiberRuntime.fiberStarted; +/** + * @since 2.0.0 + * @category metrics + */ +export const fiberSuccesses = fiberRuntime.fiberSuccesses; +/** + * @since 2.0.0 + * @category metrics + */ +export const fiberFailures = fiberRuntime.fiberFailures; +/** + * @since 2.0.0 + * @category metrics + */ +export const fiberLifetimes = fiberRuntime.fiberLifetimes; +/** + * @since 2.0.0 + * @category metrics + */ +export const fiberActive = fiberRuntime.fiberActive; +//# sourceMappingURL=Metric.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MetricBoundaries.js b/backend/node_modules/effect/dist/esm/MetricBoundaries.js new file mode 100644 index 0000000000000000000000000000000000000000..0fbe29951d363e91ffe524d6b0b2202fc8b1c757 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MetricBoundaries.js @@ -0,0 +1,33 @@ +import * as internal from "./internal/metric/boundaries.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const MetricBoundariesTypeId = internal.MetricBoundariesTypeId; +/** + * @since 2.0.0 + * @category refinements + */ +export const isMetricBoundaries = internal.isMetricBoundaries; +/** + * @since 2.0.0 + * @category constructors + */ +export const fromIterable = internal.fromIterable; +/** + * A helper method to create histogram bucket boundaries for a histogram + * with linear increasing values. + * + * @since 2.0.0 + * @category constructors + */ +export const linear = internal.linear; +/** + * A helper method to create histogram bucket boundaries for a histogram + * with exponentially increasing values. + * + * @since 2.0.0 + * @category constructors + */ +export const exponential = internal.exponential; +//# sourceMappingURL=MetricBoundaries.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MetricHook.js b/backend/node_modules/effect/dist/esm/MetricHook.js new file mode 100644 index 0000000000000000000000000000000000000000..6e40086daa12447044b37203919475ccfdf2cff9 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MetricHook.js @@ -0,0 +1,47 @@ +import * as internal from "./internal/metric/hook.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const MetricHookTypeId = internal.MetricHookTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * @since 2.0.0 + * @category constructors + */ +export const counter = internal.counter; +/** + * @since 2.0.0 + * @category constructors + */ +export const frequency = internal.frequency; +/** + * @since 2.0.0 + * @category constructors + */ +export const gauge = internal.gauge; +/** + * @since 2.0.0 + * @category constructors + */ +export const histogram = internal.histogram; +/** + * @since 2.0.0 + * @category constructors + */ +export const summary = internal.summary; +/** + * @since 2.0.0 + * @category utils + */ +export const onUpdate = internal.onUpdate; +/** + * @since 3.6.5 + * @category utils + */ +export const onModify = internal.onModify; +//# sourceMappingURL=MetricHook.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MetricHook.js.map b/backend/node_modules/effect/dist/esm/MetricHook.js.map new file mode 100644 index 0000000000000000000000000000000000000000..1963332eceee057167c0017d3474069c30d7aadc --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MetricHook.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MetricHook.js","names":["internal","MetricHookTypeId","make","counter","frequency","gauge","histogram","summary","onUpdate","onModify"],"sources":["../../src/MetricHook.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,QAAQ,MAAM,2BAA2B;AAMrD;;;;AAIA,OAAO,MAAMC,gBAAgB,GAAkBD,QAAQ,CAACC,gBAAgB;AA4ExE;;;;AAIA,OAAO,MAAMC,IAAI,GAIWF,QAAQ,CAACE,IAAI;AAEzC;;;;AAIA,OAAO,MAAMC,OAAO,GAClBH,QAAQ,CAACG,OAAO;AAElB;;;;AAIA,OAAO,MAAMC,SAAS,GAAkEJ,QAAQ,CAACI,SAAS;AAE1G;;;;AAIA,OAAO,MAAMC,KAAK,GAWdL,QAAQ,CAACK,KAAK;AAElB;;;;AAIA,OAAO,MAAMC,SAAS,GAAiEN,QAAQ,CAACM,SAAS;AAEzG;;;;AAIA,OAAO,MAAMC,OAAO,GAA6DP,QAAQ,CAACO,OAAO;AAEjG;;;;AAIA,OAAO,MAAMC,QAAQ,GAWjBR,QAAQ,CAACQ,QAAQ;AAErB;;;;AAIA,OAAO,MAAMC,QAAQ,GAWjBT,QAAQ,CAACS,QAAQ","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MetricKeyType.js b/backend/node_modules/effect/dist/esm/MetricKeyType.js new file mode 100644 index 0000000000000000000000000000000000000000..8cd3f9c4bee434e96bc78cffe5d58fe1d4f508cb --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MetricKeyType.js @@ -0,0 +1,87 @@ +import * as internal from "./internal/metric/keyType.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const MetricKeyTypeTypeId = internal.MetricKeyTypeTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +export const CounterKeyTypeTypeId = internal.CounterKeyTypeTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +export const FrequencyKeyTypeTypeId = internal.FrequencyKeyTypeTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +export const GaugeKeyTypeTypeId = internal.GaugeKeyTypeTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +export const HistogramKeyTypeTypeId = internal.HistogramKeyTypeTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +export const SummaryKeyTypeTypeId = internal.SummaryKeyTypeTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +export const counter = internal.counter; +/** + * @since 2.0.0 + * @category constructors + */ +export const frequency = internal.frequency; +/** + * @since 2.0.0 + * @category constructors + */ +export const gauge = internal.gauge; +/** + * @since 2.0.0 + * @category constructors + */ +export const histogram = internal.histogram; +/** + * @since 2.0.0 + * @category constructors + */ +export const summary = internal.summary; +/** + * @since 2.0.0 + * @category refinements + */ +export const isMetricKeyType = internal.isMetricKeyType; +/** + * @since 2.0.0 + * @category refinements + */ +export const isCounterKey = internal.isCounterKey; +/** + * @since 2.0.0 + * @category refinements + */ +export const isFrequencyKey = internal.isFrequencyKey; +/** + * @since 2.0.0 + * @category refinements + */ +export const isGaugeKey = internal.isGaugeKey; +/** + * @since 2.0.0 + * @category refinements + */ +export const isHistogramKey = internal.isHistogramKey; +/** + * @since 2.0.0 + * @category refinements + */ +export const isSummaryKey = internal.isSummaryKey; +//# sourceMappingURL=MetricKeyType.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MetricKeyType.js.map b/backend/node_modules/effect/dist/esm/MetricKeyType.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d2073d165a59be04b7c93a52f3a1ec79daeaeb8d --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MetricKeyType.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MetricKeyType.js","names":["internal","MetricKeyTypeTypeId","CounterKeyTypeTypeId","FrequencyKeyTypeTypeId","GaugeKeyTypeTypeId","HistogramKeyTypeTypeId","SummaryKeyTypeTypeId","counter","frequency","gauge","histogram","summary","isMetricKeyType","isCounterKey","isFrequencyKey","isGaugeKey","isHistogramKey","isSummaryKey"],"sources":["../../src/MetricKeyType.ts"],"sourcesContent":[null],"mappings":"AAKA,OAAO,KAAKA,QAAQ,MAAM,8BAA8B;AAMxD;;;;AAIA,OAAO,MAAMC,mBAAmB,GAAkBD,QAAQ,CAACC,mBAAmB;AAQ9E;;;;AAIA,OAAO,MAAMC,oBAAoB,GAAkBF,QAAQ,CAACE,oBAAoB;AAQhF;;;;AAIA,OAAO,MAAMC,sBAAsB,GAAkBH,QAAQ,CAACG,sBAAsB;AAQpF;;;;AAIA,OAAO,MAAMC,kBAAkB,GAAkBJ,QAAQ,CAACI,kBAAkB;AAQ5E;;;;AAIA,OAAO,MAAMC,sBAAsB,GAAkBL,QAAQ,CAACK,sBAAsB;AAQpF;;;;AAIA,OAAO,MAAMC,oBAAoB,GAAkBN,QAAQ,CAACM,oBAAoB;AA+GhF;;;;AAIA,OAAO,MAAMC,OAAO,GAA8DP,QAAQ,CAACO,OAAO;AAElG;;;;AAIA,OAAO,MAAMC,SAAS,GAISR,QAAQ,CAACQ,SAAS;AAEjD;;;;AAIA,OAAO,MAAMC,KAAK,GAA4DT,QAAQ,CAACS,KAAK;AAE5F;;;;AAIA,OAAO,MAAMC,SAAS,GAA+EV,QAAQ,CAACU,SAAS;AAEvH;;;;AAIA,OAAO,MAAMC,OAAO,GAOSX,QAAQ,CAACW,OAAO;AAE7C;;;;AAIA,OAAO,MAAMC,eAAe,GAAyDZ,QAAQ,CAACY,eAAe;AAE7G;;;;AAIA,OAAO,MAAMC,YAAY,GAAgEb,QAAQ,CAACa,YAAY;AAE9G;;;;AAIA,OAAO,MAAMC,cAAc,GAAiDd,QAAQ,CAACc,cAAc;AAEnG;;;;AAIA,OAAO,MAAMC,UAAU,GAA8Df,QAAQ,CAACe,UAAU;AAExG;;;;AAIA,OAAO,MAAMC,cAAc,GAAiDhB,QAAQ,CAACgB,cAAc;AAEnG;;;;AAIA,OAAO,MAAMC,YAAY,GAA+CjB,QAAQ,CAACiB,YAAY","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MetricRegistry.js b/backend/node_modules/effect/dist/esm/MetricRegistry.js new file mode 100644 index 0000000000000000000000000000000000000000..9ac9d34c0ad41558204b13b2a2dc540599e9b99e --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MetricRegistry.js @@ -0,0 +1,15 @@ +/** + * @since 2.0.0 + */ +import * as internal from "./internal/metric/registry.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const MetricRegistryTypeId = internal.MetricRegistryTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +//# sourceMappingURL=MetricRegistry.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MetricRegistry.js.map b/backend/node_modules/effect/dist/esm/MetricRegistry.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d53b4a62d027fcdb4a3c21fcb98df61a4fab163f --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MetricRegistry.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MetricRegistry.js","names":["internal","MetricRegistryTypeId","make"],"sources":["../../src/MetricRegistry.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,QAAQ,MAAM,+BAA+B;AAMzD;;;;AAIA,OAAO,MAAMC,oBAAoB,GAAkBD,QAAQ,CAACC,oBAAoB;AA8BhF;;;;AAIA,OAAO,MAAMC,IAAI,GAAgCF,QAAQ,CAACE,IAAI","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Micro.js.map b/backend/node_modules/effect/dist/esm/Micro.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f276e9bf190251b64df6d9e53e289b24dbf05ee5 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Micro.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Micro.js","names":["Arr","Context","Effectable","Either","Equal","constTrue","constVoid","dual","identity","globalValue","Hash","format","NodeInspectSymbol","toStringUnknown","InternalContext","doNotation","StructuralPrototype","Option","pipeArguments","hasProperty","isIterable","isTagged","SingleShotGen","YieldWrap","yieldWrapGet","TypeId","Symbol","for","MicroExitTypeId","isMicro","u","MicroCauseTypeId","isMicroCause","self","microCauseVariance","_E","MicroCauseImpl","globalThis","Error","_tag","traces","constructor","originalError","causeName","name","message","stack","messageLines","split","length","slice","join","pipe","arguments","toString","Fail","error","causeFail","Die","defect","causeDie","Interrupt","causeInterrupt","causeIsFail","causeIsDie","causeIsInterrupt","causeSquash","causeWithTrace","trace","MicroFiberTypeId","fiberVariance","_A","MicroFiberImpl","context","interruptible","_stack","_observers","_exit","_children","currentOpCount","getRef","ref","unsafeGetReference","addObserver","cb","push","index","indexOf","splice","_interrupted","unsafeInterrupt","evaluate","exitInterrupt","unsafePoll","effect","_yielded","undefined","yielded","exit","runLoop","Yield","interruptChildren","fiberMiddleware","flatMap","i","yielding","current","CurrentScheduler","shouldYield","prev","yieldNow","exitDie","String","getCont","symbol","op","pop","cont","ensureCont","yieldWith","value","children","Set","fiberInterruptChildren","fiber","size","fiberInterruptAll","fiberAwait","async","resume","sync","succeed","fiberJoin","flatten","fiberInterrupt","suspend","asVoid","fibers","iter","iterator","wait","result","next","done","_","exitVoid","identifier","args","successCont","failureCont","microVariance","_R","MicroProto","EffectPrototype","_op","toJSON","_id","defaultEvaluate","_fiber","makePrimitiveProto","options","eval","contA","contE","ensure","makePrimitive","Proto","Object","create","single","makeExit","prop","that","isMicroExit","equals","cached","combine","string","hash","failCause","fail","exitSucceed","yieldNowWith","resumed","scheduleTask","succeedSome","a","some","succeedNone","none","failCauseSync","die","failSync","fromOption","option","NoSuchElementException","fromEither","either","right","left","void_","void","try_","try","err","catch","promise","asyncOptions","signal","then","e","tryPromise","withMicroFiber","yieldFlush","flush","register","controller","AbortController","onCancel","asyncFinalizer","abort","setInterruptible","cause","never","interval","setInterval","clearInterval","gen","fromIterator","call","state","as","map","asSome","flip","matchEffect","onFailure","onSuccess","andThen","f","tap","matchCause","exitFailCause","sandbox","catchAllCause","raceAll","all","parent","effects","fromIterable","len","doneCount","causes","onExit","uninterruptible","unsafeFork","add","delete","raceAllFirst","race","raceFirst","OnSuccessProto","exitFail","exitIsSuccess","exitIsFailure","exitIsInterrupt","exitIsFail","exitIsDie","exitVoidAll","exits","setImmediate","setTimeout","MicroSchedulerDefault","tasks","running","task","_priority","afterScheduled","runTasks","MaxOpsBeforeYield","service","tag","unsafeGet","serviceOption","getOption","updateContext","updateService","getContext","provideContext","provided","merge","provideService","provideServiceEffect","acquire","Reference","defaultValue","CurrentConcurrency","withConcurrency","concurrency","zip","zipWith","a2","concurrent","filterOrFailCause","refinement","orFailWith","filterOrFail","when","condition","pass","repeatExit","startedAt","schedule","Date","now","attempt","loop","while","times","delayEffect","elapsed","duration","isNone","sleep","repeat","replicate","n","Array","from","replicateEffect","forever","scheduleRecurs","scheduleSpaced","millis","scheduleExponential","baseMillis","factor","Math","pow","scheduleAddDelay","scheduleWithMaxDelay","max","min","scheduleWithMaxElapsed","scheduleUnion","d1","d2","scheduleIntersect","OnFailureProto","catchCauseIf","predicate","catchAll","catchAllDefect","tapErrorCause","tapErrorCauseIf","tapError","tapDefect","catchIf","catchTag","k","mapErrorCause","mapError","orDie","orElseSucceed","ignore","ignoreLogged","console","match","retry","withTrace","prevLimit","stackTraceLimit","generate","line","trim","replace","lineMatch","onError","matchCauseEffect","primitive","OnSuccessAndFailureProto","timeout","clearTimeout","delay","timeoutOrElse","onTimeout","TimeoutException","timeoutOption","MicroScopeTypeId","MicroScope","GenericTag","MicroScopeImpl","finalizers","unsafeAddFinalizer","finalizer","addFinalizer","unsafeRemoveFinalizer","close","microExit","reverse","forEach","fork","newScope","fin","scopeMake","scopeUnsafeMake","scope","provideScope","scoped","acquireRelease","release","uninterruptibleMask","restore","ensuring","onExitIf","onInterrupt","acquireUseRelease","use","interrupt","arg","isArray","discard","values","out","entries","key","whileLoop","step","body","iterable","concurrencyOption","Number","POSITIVE_INFINITY","items","b","inProgress","pumping","interrupted","pump","currentIndex","item","child","filter","filterMap","negate","o","Do","bindTo","bind","let_","let","immediate","daemon","forkDaemon","forkIn","forkScoped","runFork","scheduler","aborted","addEventListener","once","removeEventListener","runPromiseExit","Promise","resolve","_reject","handle","runPromise","runSyncExit","runSync","YieldableError","assign","prototype","TaggedError","Base"],"sources":["../../src/Micro.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;AAMA,OAAO,KAAKA,GAAG,MAAM,YAAY;AAEjC,OAAO,KAAKC,OAAO,MAAM,cAAc;AAEvC,OAAO,KAAKC,UAAU,MAAM,iBAAiB;AAC7C,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC,SAASC,SAAS,EAAEC,SAAS,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,eAAe;AACpE,SAASC,WAAW,QAAQ,kBAAkB;AAC9C,OAAO,KAAKC,IAAI,MAAM,WAAW;AAGjC,SAASC,MAAM,EAAEC,iBAAiB,EAAEC,eAAe,QAAQ,kBAAkB;AAC7E,OAAO,KAAKC,eAAe,MAAM,uBAAuB;AACxD,OAAO,KAAKC,UAAU,MAAM,0BAA0B;AACtD,SAASC,mBAAmB,QAAQ,0BAA0B;AAC9D,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC,SAASC,aAAa,QAAQ,eAAe;AAE7C,SAASC,WAAW,EAAEC,UAAU,EAAEC,QAAQ,QAAQ,gBAAgB;AAKlE,SAASC,aAAa,EAAEC,SAAS,EAAEC,YAAY,QAAQ,YAAY;AAEnE;;;;;AAKA,OAAO,MAAMC,MAAM,gBAAkBC,MAAM,CAACC,GAAG,CAAC,cAAc,CAAC;AAS/D;;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hM,GAAQ,IAGK;EAC3D,MAAMiM,IAAK,SAAQpb,KAAS;IACjBC,IAAI,GAAGkP,GAAG;;EAErB;EAAEiM,IAAI,CAACF,SAAiB,CAAC5a,IAAI,GAAG6O,GAAG;EACnC,OAAOiM,IAAW;AACpB,CAAC;AAED;;;;;;;;AAQA,OAAM,MAAOvR,sBAAuB,sBAAQsR,WAAW,CAAC,wBAAwB,CAAmC;AAEnH;;;;;;;AAOA,OAAM,MAAOvF,gBAAiB,sBAAQuF,WAAW,CAAC,kBAAkB,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ModuleVersion.js b/backend/node_modules/effect/dist/esm/ModuleVersion.js new file mode 100644 index 0000000000000000000000000000000000000000..410ac0658777580105b3c38ec8c88aaac20097b9 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ModuleVersion.js @@ -0,0 +1,17 @@ +/** + * @since 2.0.0 + * + * Enables low level framework authors to run on their own isolated effect version + */ +import * as internal from "./internal/version.js"; +/** + * @since 2.0.0 + * @category version + */ +export const getCurrentVersion = internal.getCurrentVersion; +/** + * @since 2.0.0 + * @category version + */ +export const setCurrentVersion = internal.setCurrentVersion; +//# sourceMappingURL=ModuleVersion.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ModuleVersion.js.map b/backend/node_modules/effect/dist/esm/ModuleVersion.js.map new file mode 100644 index 0000000000000000000000000000000000000000..917f97a7a32380a367dc9de4d42b8493cd8475c4 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ModuleVersion.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ModuleVersion.js","names":["internal","getCurrentVersion","setCurrentVersion"],"sources":["../../src/ModuleVersion.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;AAKA,OAAO,KAAKA,QAAQ,MAAM,uBAAuB;AAEjD;;;;AAIA,OAAO,MAAMC,iBAAiB,GAAiBD,QAAQ,CAACC,iBAAiB;AAEzE;;;;AAIA,OAAO,MAAMC,iBAAiB,GAA8BF,QAAQ,CAACE,iBAAiB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MutableHashMap.js.map b/backend/node_modules/effect/dist/esm/MutableHashMap.js.map new file mode 100644 index 0000000000000000000000000000000000000000..489cb34a35c9ee0b12a2646cf10130cbd93aea3c --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MutableHashMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MutableHashMap.js","names":["Equal","dual","Hash","format","NodeInspectSymbol","toJSON","Option","pipeArguments","TypeId","Symbol","for","MutableHashMapProto","iterator","MutableHashMapIterator","toString","_id","values","Array","from","map","pipe","arguments","self","referentialIterator","bucketIterator","constructor","referential","next","undefined","result","done","BucketIterator","buckets","backing","currentBucket","value","empty","Object","create","Map","bucketsSize","make","entries","fromIterable","key","set","get","isEqual","has","some","none","hash","symbol","bucket","getFromBucket","keys","i","len","length","push","remove","splice","isSome","removeFromBucket","modify","f","isNone","modifyAt","delete","clear","size","isEmpty","forEach"],"sources":["../../src/MutableHashMap.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,SAASC,MAAM,EAAoBC,iBAAiB,EAAEC,MAAM,QAAQ,kBAAkB;AACtF,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC,SAASC,aAAa,QAAQ,eAAe;AAE7C,MAAMC,MAAM,gBAAkBC,MAAM,CAACC,GAAG,CAAC,uBAAuB,CAAW;AAsB3E,MAAMC,mBAAmB,GAAsF;EAC7G,CAACH,MAAM,GAAGA,MAAM;EAChB,CAACC,MAAM,CAACG,QAAQ,IAAC;IACf,OAAO,IAAIC,sBAAsB,CAAC,IAAI,CAAC;EACzC,CAAC;EACDC,QAAQA,CAAA;IACN,OAAOX,MAAM,CAAC,IAAI,CAACE,MAAM,EAAE,CAAC;EAC9B,CAAC;EACDA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MAAM,EAAE;MACjCY,CAAC,CAAC9B,KAAK,EAAES,GAAG,CAAC;IACf;EACF;AACF,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MutableList.js b/backend/node_modules/effect/dist/esm/MutableList.js new file mode 100644 index 0000000000000000000000000000000000000000..f1daaf29859808559157f676f41d4b5665616983 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MutableList.js @@ -0,0 +1,240 @@ +/** + * @since 2.0.0 + */ +import * as Dual from "./Function.js"; +import { format, NodeInspectSymbol, toJSON } from "./Inspectable.js"; +import { pipeArguments } from "./Pipeable.js"; +const TypeId = /*#__PURE__*/Symbol.for("effect/MutableList"); +const MutableListProto = { + [TypeId]: TypeId, + [Symbol.iterator]() { + let done = false; + let head = this.head; + return { + next() { + if (done) { + return this.return(); + } + if (head == null) { + done = true; + return this.return(); + } + const value = head.value; + head = head.next; + return { + done, + value + }; + }, + return(value) { + if (!done) { + done = true; + } + return { + done: true, + value + }; + } + }; + }, + toString() { + return format(this.toJSON()); + }, + toJSON() { + return { + _id: "MutableList", + values: Array.from(this).map(toJSON) + }; + }, + [NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return pipeArguments(this, arguments); + } +}; +/** @internal */ +const makeNode = value => ({ + value, + removed: false, + prev: undefined, + next: undefined +}); +/** + * Creates an empty `MutableList`. + * + * @since 2.0.0 + * @category constructors + */ +export const empty = () => { + const list = Object.create(MutableListProto); + list.head = undefined; + list.tail = undefined; + list._length = 0; + return list; +}; +/** + * Creates a new `MutableList` from an iterable collection of values. + * + * @since 2.0.0 + * @category constructors + */ +export const fromIterable = iterable => { + const list = empty(); + for (const element of iterable) { + append(list, element); + } + return list; +}; +/** + * Creates a new `MutableList` from the specified elements. + * + * @since 2.0.0 + * @category constructors + */ +export const make = (...elements) => fromIterable(elements); +/** + * Returns `true` if the list contains zero elements, `false`, otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const isEmpty = self => length(self) === 0; +/** + * Returns the length of the list. + * + * @since 2.0.0 + * @category getters + */ +export const length = self => self._length; +/** + * Returns the last element of the list, if it exists. + * + * @since 2.0.0 + * @category getters + */ +export const tail = self => self.tail === undefined ? undefined : self.tail.value; +/** + * Returns the first element of the list, if it exists. + * + * @since 2.0.0 + * @category getters + */ +export const head = self => self.head === undefined ? undefined : self.head.value; +/** + * Executes the specified function `f` for each element in the list. + * + * @since 2.0.0 + * @category traversing + */ +export const forEach = /*#__PURE__*/Dual.dual(2, (self, f) => { + let current = self.head; + while (current !== undefined) { + f(current.value); + current = current.next; + } +}); +/** + * Removes all elements from the doubly-linked list. + * + * @since 2.0.0 + */ +export const reset = self => { + ; + self._length = 0; + self.head = undefined; + self.tail = undefined; + return self; +}; +/** + * Appends the specified element to the end of the `MutableList`. + * + * @category concatenating + * @since 2.0.0 + */ +export const append = /*#__PURE__*/Dual.dual(2, (self, value) => { + const node = makeNode(value); + if (self.head === undefined) { + self.head = node; + } + if (self.tail === undefined) { + self.tail = node; + } else { + self.tail.next = node; + node.prev = self.tail; + self.tail = node; + } + ; + self._length += 1; + return self; +}); +/** + * Removes the first value from the list and returns it, if it exists. + * + * @since 0.0.1 + */ +export const shift = self => { + const head = self.head; + if (head !== undefined) { + remove(self, head); + return head.value; + } + return undefined; +}; +/** + * Removes the last value from the list and returns it, if it exists. + * + * @since 0.0.1 + */ +export const pop = self => { + const tail = self.tail; + if (tail !== undefined) { + remove(self, tail); + return tail.value; + } + return undefined; +}; +/** + * Prepends the specified value to the beginning of the list. + * + * @category concatenating + * @since 2.0.0 + */ +export const prepend = /*#__PURE__*/Dual.dual(2, (self, value) => { + const node = makeNode(value); + node.next = self.head; + if (self.head !== undefined) { + self.head.prev = node; + } + self.head = node; + if (self.tail === undefined) { + self.tail = node; + } + ; + self._length += 1; + return self; +}); +const remove = (self, node) => { + if (node.removed) { + return; + } + node.removed = true; + if (node.prev !== undefined && node.next !== undefined) { + node.prev.next = node.next; + node.next.prev = node.prev; + } else if (node.prev !== undefined) { + self.tail = node.prev; + node.prev.next = undefined; + } else if (node.next !== undefined) { + self.head = node.next; + node.next.prev = undefined; + } else { + self.tail = undefined; + self.head = undefined; + } + if (self._length > 0) { + ; + self._length -= 1; + } +}; +//# sourceMappingURL=MutableList.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MutableList.js.map b/backend/node_modules/effect/dist/esm/MutableList.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ed603ab6b25ebe0043ecfe25ae1db484861076cd --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MutableList.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MutableList.js","names":["Dual","format","NodeInspectSymbol","toJSON","pipeArguments","TypeId","Symbol","for","MutableListProto","iterator","done","head","next","return","value","toString","_id","values","Array","from","map","pipe","arguments","makeNode","removed","prev","undefined","empty","list","Object","create","tail","_length","fromIterable","iterable","element","append","make","elements","isEmpty","self","length","forEach","dual","f","current","reset","node","shift","remove","pop","prepend"],"sources":["../../src/MutableList.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,IAAI,MAAM,eAAe;AACrC,SAASC,MAAM,EAAEC,iBAAiB,EAAEC,MAAM,QAAQ,kBAAkB;AAGpE,SAASC,aAAa,QAAQ,eAAe;AAE7C,MAAMC,MAAM,gBAAkBC,MAAM,CAACC,GAAG,CAAC,oBAAoB,CAAW;AAqBxE,MAAMC,gBAAgB,GAAgD;EACpE,CAACH,MAAM,GAAGA,MAAM;EAChB,CAACC,MAAM,CAACG,QAAQ,IAAC;IACf,IAAIC,IAAI,GAAG,KAAK;IAChB,IAAIC,IAAI,GAAwC,IAAI,CAACA,IAAI;IACzD,OAAO;MACLC,IAAIA,CAAA;QACF,IAAIF,IAAI,EAAE;UACR,OAAO,IAAI,CAACG,MAAO,EAAE;QACvB;QACA,IAAIF,IAAI,IAAI,IAAI,EAAE;UAChBD,IAAI,GAAG,IAAI;UACX,OAAO,IAAI,CAACG,MAAO,EAAE;QACvB;Q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IAAI,CAAC7B,IAAI,GAAGe,SAAS;EACvB;EACA,IAAKc,IAA2B,CAACR,OAAO,GAAG,CAAC,EAAE;IAC5C;IAAEQ,IAA2B,CAACR,OAAO,IAAI,CAAC;EAC5C;AACF,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MutableRef.js.map b/backend/node_modules/effect/dist/esm/MutableRef.js.map new file mode 100644 index 0000000000000000000000000000000000000000..2e835b5f3de9a23ca60030346a7bf9b2546d37e6 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MutableRef.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MutableRef.js","names":["Equal","Dual","format","NodeInspectSymbol","toJSON","pipeArguments","TypeId","Symbol","for","MutableRefProto","toString","_id","current","pipe","arguments","make","value","ref","Object","create","compareAndSet","dual","self","oldValue","newValue","equals","decrement","update","n","decrementAndGet","updateAndGet","get","getAndDecrement","getAndUpdate","getAndIncrement","getAndSet","ret","f","increment","incrementAndGet","set","setAndGet","toggle","_"],"sources":["../../src/MutableRef.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,IAAI,MAAM,eAAe;AACrC,SAASC,MAAM,EAAoBC,iBAAiB,EAAEC,MAAM,QAAQ,kBAAkB;AAEtF,SAASC,aAAa,QAAQ,eAAe;AAE7C,MAAMC,MAAM,gBAAkBC,MAAM,CAACC,GAAG,CAAC,mBAAmB,CAAW;AAiBvE,MAAMC,eAAe,GAAyC;EAC5D,CAACH,MAAM,GAAGA,MAAM;EAChBI,QAAQA,CAAA;IACN,OAAOR,MAAM,CAAC,IAAI,CAACE,MAAM,EAAE,CAAC;EAC9B,CAAC;EACDA,MAAMA,CAAA;IACJ,OAAO;MACLO,GAAG,EAAE,YAAY;MACjBC,OAAO,EAAER,MAAM,CAAC,IAAI,CAACQ,OAAO;KAC7B;EACH,CAAC;EACD,CAACT,iBAAiB,IAAC;IACjB,OAAO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,YAAY,gBAWrB7B,IAAI,CAACoB,IAAI,CAGX,CAAC,EAAE,CAACC,IAAI,EAAEe,CAAC,KAAKI,SAAS,CAACnB,IAAI,EAAEe,CAAC,CAACN,GAAG,CAACT,IAAI,CAAC,CAAC,CAAC,CAAC;AAEhD;;;;AAIA,OAAO,MAAMoB,MAAM,GAAIpB,IAAyB,IAA0BK,MAAM,CAACL,IAAI,EAAGqB,CAAC,IAAK,CAACA,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/NonEmptyIterable.js b/backend/node_modules/effect/dist/esm/NonEmptyIterable.js new file mode 100644 index 0000000000000000000000000000000000000000..1bb3f9b2e7a87fffc5ca4c7ba4459013719d08ff --- /dev/null +++ b/backend/node_modules/effect/dist/esm/NonEmptyIterable.js @@ -0,0 +1,16 @@ +/** + * @since 2.0.0 + */ +/** + * @category getters + * @since 2.0.0 + */ +export const unprepend = self => { + const iterator = self[Symbol.iterator](); + const next = iterator.next(); + if (next.done) { + throw new Error("BUG: NonEmptyIterator should not be empty - please report an issue at https://github.com/Effect-TS/effect/issues"); + } + return [next.value, iterator]; +}; +//# sourceMappingURL=NonEmptyIterable.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Option.js.map b/backend/node_modules/effect/dist/esm/Option.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d84adeafeb5fa85bed49c7251e7143464f4761aa --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Option.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Option.js","names":["Equal","Equivalence","constNull","constUndefined","dual","identity","isFunction","doNotation","either","option","order","Gen","TypeId","Symbol","for","none","some","isOption","isNone","isSome","match","self","onNone","onSome","value","toRefinement","f","a","fromIterable","collection","getRight","getLeft","getOrElse","orElse","that","orElseSome","orElseEither","map","right","left","firstSomeOf","out","fromNullable","nullableValue","liftNullable","getOrNull","getOrUndefined","liftThrowable","getOrThrowWith","getOrThrow","Error","as","b","asVoid","undefined","void_","void","flatMap","andThen","flatMapNullable","flatten","zipRight","zipLeft","tap","composeK","afb","bfc","product","productMany","o","push","all","input","iterator","key","Object","keys","zipWith","ap","reduceCompact","oa","toArray","partitionMap","e","isLeft","filterMap","filter","predicate","getEquivalence","isEquivalent","make","x","y","getOrder","O","lift2","liftPredicate","containsWith","_equivalence","equivalence","contains","exists","refinement","bindTo","let_","let","bind","Do","adapter","gen","args","length","state","next","done","current","isGenKind","yieldWrapGet","mergeWith","o1","o2"],"sources":["../../src/Option.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAE/C,SAASC,SAAS,EAAEC,cAAc,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,UAAU,QAAQ,eAAe;AAGrF,OAAO,KAAKC,UAAU,MAAM,0BAA0B;AACtD,OAAO,KAAKC,MAAM,MAAM,sBAAsB;AAC9C,OAAO,KAAKC,MAAM,MAAM,sBAAsB;AAE9C,OAAO,KAAKC,KAAK,MAAM,YAAY;AAKnC,OAAO,KAAKC,GAAG,MAAM,YAAY;AAsBjC;;;;AAIA,OAAO,MAAMC,MAAM,gBAAkBC,MAAM,CAACC,GAAG,CAAC,eAAe,CAAC;AAyFhE;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,OAAO,MAAMC,IAAI,GAAGA,CAAA,KAA4BN,MAAM,CAACM,IAAI;AAE3D;;;;;;;;;;;;;;;;;;;;;;;AAuBA,OAAO,MAAMC,IAAI,GAA+BP,MAAM,CAACO,IAAI;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,OAAO,MAAMC,QAAQ,GAAiDR,MAAM,CAACQ,QAAQ;AAErF;;;;;;;;;;;;;;;;;;;AAmBA,OAAO,MAAMC,MAAM,GAA4CT,MAAM,CAACS,MAAM;AAE5E;;;;;;;;;;;;;;;;;;;AAmBA,OAAO,MAAMC,MAAM,GAA4CV,MAAM,CAACU,MA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AAC;AAED;;;;;;AAMA,OAAO,MAAM8F,SAAS,GAAO5F,CAAsB,IAAK,CAAC6F,EAAa,EAAEC,EAAa,KAAe;EAClG,IAAItG,MAAM,CAACqG,EAAE,CAAC,EAAE;IACd,OAAOC,EAAE;EACX,CAAC,MAAM,IAAItG,MAAM,CAACsG,EAAE,CAAC,EAAE;IACrB,OAAOD,EAAE;EACX;EACA,OAAOvG,IAAI,CAACU,CAAC,CAAC6F,EAAE,CAAC/F,KAAK,EAAEgG,EAAE,CAAChG,KAAK,CAAC,CAAC;AACpC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Ordering.js b/backend/node_modules/effect/dist/esm/Ordering.js new file mode 100644 index 0000000000000000000000000000000000000000..824760f022b02db00998140f5c0d5891eac33bbf --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Ordering.js @@ -0,0 +1,72 @@ +import { dual } from "./Function.js"; +/** + * Inverts the ordering of the input `Ordering`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { reverse } from "effect/Ordering" + * + * assert.deepStrictEqual(reverse(1), -1) + * assert.deepStrictEqual(reverse(-1), 1) + * assert.deepStrictEqual(reverse(0), 0) + * ``` + * + * @since 2.0.0 + */ +export const reverse = o => o === -1 ? 1 : o === 1 ? -1 : 0; +/** + * Depending on the `Ordering` parameter given to it, returns a value produced by one of the 3 functions provided as parameters. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Ordering } from "effect" + * import { constant } from "effect/Function" + * + * const toMessage = Ordering.match({ + * onLessThan: constant('less than'), + * onEqual: constant('equal'), + * onGreaterThan: constant('greater than') + * }) + * + * assert.deepStrictEqual(toMessage(-1), "less than") + * assert.deepStrictEqual(toMessage(0), "equal") + * assert.deepStrictEqual(toMessage(1), "greater than") + * ``` + * + * @category pattern matching + * @since 2.0.0 + */ +export const match = /*#__PURE__*/dual(2, (self, { + onEqual, + onGreaterThan, + onLessThan +}) => self === -1 ? onLessThan() : self === 0 ? onEqual() : onGreaterThan()); +/** + * @category combining + * @since 2.0.0 + */ +export const combine = /*#__PURE__*/dual(2, (self, that) => self !== 0 ? self : that); +/** + * @category combining + * @since 2.0.0 + */ +export const combineMany = /*#__PURE__*/dual(2, (self, collection) => { + let ordering = self; + if (ordering !== 0) { + return ordering; + } + for (ordering of collection) { + if (ordering !== 0) { + return ordering; + } + } + return ordering; +}); +/** + * @category combining + * @since 2.0.0 + */ +export const combineAll = collection => combineMany(0, collection); +//# sourceMappingURL=Ordering.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Ordering.js.map b/backend/node_modules/effect/dist/esm/Ordering.js.map new file mode 100644 index 0000000000000000000000000000000000000000..139d08ceed80a1955ac10e5802346b5bee33a17a --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Ordering.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Ordering.js","names":["dual","reverse","o","match","self","onEqual","onGreaterThan","onLessThan","combine","that","combineMany","collection","ordering","combineAll"],"sources":["../../src/Ordering.ts"],"sourcesContent":[null],"mappings":"AAIA,SAASA,IAAI,QAAQ,eAAe;AAQpC;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,OAAO,GAAIC,CAAW,IAAgBA,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,GAAGA,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAE;AAEnF;;;;;;;;;;;;;;;;;;;;;;;AAuBA,OAAO,MAAMC,KAAK,gBA8DdH,IAAI,CAAC,CAAC,EAAE,CACVI,IAAc,EACd;EAAEC,OAAO;EAAEC,aAAa;EAAEC;AAAU,CAInC,KACaH,IAAI,KAAK,CAAC,CAAC,GAAGG,UAAU,EAAE,GAAGH,IAAI,KAAK,CAAC,GAAGC,OAAO,EAAE,GAAGC,aAAa,EAAE,CAAC;AAEtF;;;;AAIA,OAAO,MAAME,OAAO,gBAWhBR,IAAI,CAAC,CAAC,EAAE,CAACI,IAAc,EAAEK,IAAc,KAAeL,IAAI,KAAK,CAAC,GAAGA,IAAI,GAAGK,IAAI,CAAC;AAEnF;;;;AAIA,OAAO,MAAMC,WAAW,gBAWpBV,IAAI,CAAC,CAAC,EAAE,CAACI,IAAc,EAAEO,UAA8B,KAAc;EACvE,IAAIC,QAAQ,GAAGR,IAAI;EACnB,IAAIQ,QAAQ,KAAK,CAAC,EAAE;IAClB,OAAOA,QAAQ;EACjB;EACA,KAAKA,QAAQ,IAAID,UAAU,EAAE;IAC3B,IAAIC,QAAQ,KAAK,CAAC,EAAE;MAClB,OAAOA,QAAQ;IACjB;EACF;EACA,OAAOA,QAAQ;AACjB,CAAC,CAAC;AAEF;;;;AAIA,OAAO,MAAMC,UAAU,GAAIF,UAA8B,IAAeD,WAAW,CAAC,CAAC,EAAEC,UAAU,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/PartitionedSemaphore.js b/backend/node_modules/effect/dist/esm/PartitionedSemaphore.js new file mode 100644 index 0000000000000000000000000000000000000000..3fb2a74a8496ef1b26cb6a150e14fd0070b17d2a --- /dev/null +++ b/backend/node_modules/effect/dist/esm/PartitionedSemaphore.js @@ -0,0 +1,137 @@ +/** + * @since 3.19.4 + * @experimental + */ +import * as Effect from "./Effect.js"; +import * as Iterable from "./Iterable.js"; +import * as MutableHashMap from "./MutableHashMap.js"; +import * as Option from "./Option.js"; +/** + * @since 3.19.4 + * @category Models + * @experimental + */ +export const TypeId = "~effect/PartitionedSemaphore"; +/** + * A `PartitionedSemaphore` is a concurrency primitive that can be used to + * control concurrent access to a resource across multiple partitions identified + * by keys. + * + * The total number of permits is shared across all partitions, with waiting + * permits equally distributed among partitions using a round-robin strategy. + * + * This is useful when you want to limit the total number of concurrent accesses + * to a resource, while still allowing for fair distribution of access across + * different partitions. + * + * @since 3.19.4 + * @category Constructors + * @experimental + */ +export const makeUnsafe = options => { + const maxPermits = Math.max(0, options.permits); + if (!Number.isFinite(maxPermits)) { + return { + [TypeId]: TypeId, + withPermits: () => effect => effect + }; + } + let totalPermits = maxPermits; + let waitingPermits = 0; + const partitions = MutableHashMap.empty(); + const take = (key, permits) => Effect.async(resume => { + if (maxPermits < permits) { + return resume(Effect.never); + } else if (totalPermits >= permits) { + totalPermits -= permits; + return resume(Effect.void); + } + const needed = permits - totalPermits; + const taken = permits - needed; + if (totalPermits > 0) { + totalPermits = 0; + } + waitingPermits += needed; + const waiters = Option.getOrElse(MutableHashMap.get(partitions, key), () => { + const set = new Set(); + MutableHashMap.set(partitions, key, set); + return set; + }); + const entry = { + permits: needed, + resume() { + cleanup(); + resume(Effect.void); + } + }; + function cleanup() { + waiters.delete(entry); + if (waiters.size === 0) { + MutableHashMap.remove(partitions, key); + } + } + waiters.add(entry); + return Effect.sync(() => { + cleanup(); + waitingPermits -= entry.permits; + if (taken > 0) { + releaseUnsafe(taken); + } + }); + }); + let iterator = partitions[Symbol.iterator](); + const releaseUnsafe = permits => { + while (permits > 0) { + if (waitingPermits === 0) { + totalPermits += permits; + return; + } + let state = iterator.next(); + if (state.done) { + iterator = partitions[Symbol.iterator](); + state = iterator.next(); + if (state.done) return; + } + const entry = Iterable.unsafeHead(state.value[1]); + entry.permits--; + waitingPermits--; + if (entry.permits === 0) entry.resume(); + permits--; + } + }; + return { + [TypeId]: TypeId, + withPermits: (key, permits) => { + const takePermits = take(key, permits); + const release = Effect.matchCauseEffect({ + onFailure(cause) { + releaseUnsafe(permits); + return Effect.failCause(cause); + }, + onSuccess(value) { + releaseUnsafe(permits); + return Effect.succeed(value); + } + }); + return effect => Effect.uninterruptibleMask(restore => Effect.flatMap(restore(takePermits), () => release(restore(effect)))); + } + }; +}; +/** + * A `PartitionedSemaphore` is a concurrency primitive that can be used to + * control concurrent access to a resource across multiple partitions identified + * by keys. + * + * The total number of permits is shared across all partitions, with waiting + * permits equally distributed among partitions using a round-robin strategy. + * + * This is useful when you want to limit the total number of concurrent accesses + * to a resource, while still allowing for fair distribution of access across + * different partitions. + * + * @since 3.19.4 + * @category Constructors + * @experimental + */ +export const make = options => Effect.sync(() => makeUnsafe(options)); +//# sourceMappingURL=PartitionedSemaphore.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Pipeable.js.map b/backend/node_modules/effect/dist/esm/Pipeable.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a7c5f9a050c3bc54c3d16ff0f6e8173769198d5d --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Pipeable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Pipeable.js","names":["pipeArguments","self","args","length","ret","i","len","Prototype","pipe","arguments","Base","PipeableBase","prototype","Class","klass"],"sources":["../../src/Pipeable.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AA4eA;;;AAGA,OAAO,MAAMA,aAAa,GAAGA,CAAIC,IAAO,EAAEC,IAAgB,KAAa;EACrE,QAAQA,IAAI,CAACC,MAAM;IACjB,KAAK,CAAC;MACJ,OAAOF,IAAI;IACb,KAAK,CAAC;MACJ,OAAOC,IAAI,CAAC,CAAC,CAAC,CAACD,IAAI,CAAC;IACtB,KAAK,CAAC;MACJ,OAAOC,IAAI,CAAC,CAAC,CAAC,CAACA,IAAI,CAAC,CAAC,CAAC,CAACD,IAAI,CAAC,CAAC;IAC/B,KAAK,CAAC;MACJ,OAAOC,IAAI,CAAC,CAAC,CAAC,CAACA,IAAI,CAAC,CAAC,CAAC,CAACA,IAAI,CAAC,CAAC,CAAC,CAACD,IAAI,CAAC,CAAC,CAAC;IACxC,KAAK,CAAC;MACJ,OAAOC,IAAI,CAAC,CAAC,CAAC,CAACA,IAAI,CAAC,CAAC,CAAC,CAACA,IAAI,CAAC,CAAC,CAAC,CAACA,IAAI,CAAC,CAAC,CAAC,CAACD,IAAI,CAAC,CAAC,CAAC,CAAC;IACjD,KAAK,CAAC;MACJ,OAAOC,IAAI,CAAC,CAAC,CAAC,CAACA,IAAI,CAAC,CAAC,CAAC,CAACA,IAAI,CAAC,CAAC,CAAC,CAACA,IAAI,CAAC,CAAC,CAAC,CAACA,IAAI,CAAC,CA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CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9F;MAAS;QACP,IAAIG,GAAG,GAAGH,IAAI;QACd,KAAK,IAAII,CAAC,GAAG,CAAC,EAAEC,GAAG,GAAGJ,IAAI,CAACC,MAAM,EAAEE,CAAC,GAAGC,GAAG,EAAED,CAAC,EAAE,EAAE;UAC/CD,GAAG,GAAGF,IAAI,CAACG,CAAC,CAAC,CAACD,GAAG,CAAC;QACpB;QACA,OAAOA,GAAG;MACZ;EACF;AACF,CAAC;AAUD;;;;AAIA,OAAO,MAAMG,SAAS,GAAa;EACjCC,IAAIA,CAAA;IACF,OAAOR,aAAa,CAAC,IAAI,EAAES,SAAS,CAAC;EACvC;CACD;AAED,MAAMC,IAAI,gBAAyB;EACjC,SAASC,YAAYA,CAAA,GAAI;EACzBA,YAAY,CAACC,SAAS,GAAGL,SAAS;EAClC,OAAOI,YAAmB;AAC5B,CAAC,CAAC,CAAE;AAEJ;;;;AAIA,OAAO,MAAME,KAAK,GAWbC,KAAY,IACfA,KAAK,GACH,cAAcA,KAAK;EACjBN,IAAIA,CAAA;IACF,OAAOR,aAAa,CAAC,IAAI,EAAES,SAAS,CAAC;EACvC;CACD,GACCC,IAAI","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Pool.js.map b/backend/node_modules/effect/dist/esm/Pool.js.map new file mode 100644 index 0000000000000000000000000000000000000000..fe0fee589fe44b657376b66b211b10d5b9221185 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Pool.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Pool.js","names":["internal","PoolTypeId","isPool","make","makeWithTTL","get","invalidate"],"sources":["../../src/Pool.ts"],"sourcesContent":[null],"mappings":"AAKA,OAAO,KAAKA,QAAQ,MAAM,oBAAoB;AAM9C;;;;AAIA,OAAO,MAAMC,UAAU,GAAkBD,QAAQ,CAACC,UAAU;AAwE5D;;;;;;AAMA,OAAO,MAAMC,MAAM,GAAgDF,QAAQ,CAACE,MAAM;AAElF;;;;;;;;;;;;;;;;;;;AAmBA,OAAO,MAAMC,IAAI,GAOwCH,QAAQ,CAACG,IAAI;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,OAAO,MAAMC,WAAW,GAUiCJ,QAAQ,CAACI,WAAW;AAE7E;;;;;;;;AAQA,OAAO,MAAMC,GAAG,GAAiEL,QAAQ,CAACK,GAAG;AAE7F;;;;;;;;AAQA,OAAO,MAAMC,UAAU,GAmBnBN,QAAQ,CAACM,UAAU","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Predicate.js b/backend/node_modules/effect/dist/esm/Predicate.js new file mode 100644 index 0000000000000000000000000000000000000000..c27b1c38288f696488eb4467ae0d36ad86c52180 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Predicate.js @@ -0,0 +1,1117 @@ +/** + * This module provides a collection of functions for working with predicates and refinements. + * + * A `Predicate` is a function that takes a value of type `A` and returns a boolean. + * It is used to check if a value satisfies a certain condition. + * + * A `Refinement` is a special type of predicate that not only checks a condition + * but also provides a type guard, allowing TypeScript to narrow the type of the input + * value from `A` to a more specific type `B` within a conditional block. + * + * The module includes: + * - Basic predicates and refinements for common types (e.g., `isString`, `isNumber`). + * - Combinators to create new predicates from existing ones (e.g., `and`, `or`, `not`). + * - Advanced combinators for working with data structures (e.g., `tuple`, `struct`). + * - Type-level utilities for inspecting predicate and refinement types. + * + * @since 2.0.0 + */ +import { dual, isFunction as isFunction_ } from "./Function.js"; +/** + * Transforms a `Predicate` into a `Predicate` by applying a function `(b: B) => A` + * to the input before passing it to the predicate. This is also known as "contramap" or + * "pre-composition". + * + * @example + * ```ts + * import { Predicate, Number } from "effect" + * import * as assert from "node:assert" + * + * // A predicate on numbers + * const isPositive: Predicate.Predicate = Number.greaterThan(0) + * + * // A function from `string` to `number` + * const stringLength = (s: string): number => s.length + * + * // Create a new predicate on strings by mapping the input + * const hasPositiveLength = Predicate.mapInput(isPositive, stringLength) + * + * assert.strictEqual(hasPositiveLength("hello"), true) + * assert.strictEqual(hasPositiveLength(""), false) + * ``` + * + * @category combinators + * @since 2.0.0 + */ +export const mapInput = /*#__PURE__*/dual(2, (self, f) => b => self(f(b))); +/** + * A refinement that checks if a `ReadonlyArray` is a tuple with exactly `N` elements. + * If the check is successful, the type is narrowed to `TupleOf`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isTupleOf } from "effect/Predicate" + * + * const isTupleOf3 = isTupleOf(3) + * + * assert.strictEqual(isTupleOf3([1, 2, 3]), true); + * assert.strictEqual(isTupleOf3([1, 2]), false); + * + * const arr: number[] = [1, 2, 3]; + * if (isTupleOf(arr, 3)) { + * // The type of arr is now [number, number, number] + * const [a, b, c] = arr; + * assert.deepStrictEqual([a, b, c], [1, 2, 3]) + * } + * ``` + * + * @category guards + * @since 3.3.0 + */ +export const isTupleOf = /*#__PURE__*/dual(2, (self, n) => self.length === n); +/** + * A refinement that checks if a `ReadonlyArray` is a tuple with at least `N` elements. + * If the check is successful, the type is narrowed to `TupleOfAtLeast`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isTupleOfAtLeast } from "effect/Predicate" + * + * const isTupleOfAtLeast3 = isTupleOfAtLeast(3) + * + * assert.strictEqual(isTupleOfAtLeast3([1, 2, 3]), true); + * assert.strictEqual(isTupleOfAtLeast3([1, 2, 3, 4]), true); + * assert.strictEqual(isTupleOfAtLeast3([1, 2]), false); + * + * const arr: number[] = [1, 2, 3, 4]; + * if (isTupleOfAtLeast(arr, 3)) { + * // The type of arr is now [number, number, number, ...number[]] + * const [a, b, c] = arr; + * assert.deepStrictEqual([a, b, c], [1, 2, 3]) + * } + * ``` + * + * @category guards + * @since 3.3.0 + */ +export const isTupleOfAtLeast = /*#__PURE__*/dual(2, (self, n) => self.length >= n); +/** + * A predicate that checks if a value is "truthy" in JavaScript. + * Fails for `false`, `0`, `-0`, `0n`, `""`, `null`, `undefined`, and `NaN`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isTruthy } from "effect/Predicate" + * + * assert.strictEqual(isTruthy(1), true) + * assert.strictEqual(isTruthy("hello"), true) + * assert.strictEqual(isTruthy({}), true) + * + * assert.strictEqual(isTruthy(0), false) + * assert.strictEqual(isTruthy(""), false) + * assert.strictEqual(isTruthy(null), false) + * assert.strictEqual(isTruthy(undefined), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isTruthy = input => !!input; +/** + * A refinement that checks if a value is a `Set`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isSet } from "effect/Predicate" + * + * assert.strictEqual(isSet(new Set([1, 2])), true) + * assert.strictEqual(isSet(new Set()), true) + * + * assert.strictEqual(isSet({}), false) + * assert.strictEqual(isSet([1, 2]), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isSet = input => input instanceof Set; +/** + * A refinement that checks if a value is a `Map`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isMap } from "effect/Predicate" + * + * assert.strictEqual(isMap(new Map()), true) + * + * assert.strictEqual(isMap({}), false) + * assert.strictEqual(isMap(new Set()), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isMap = input => input instanceof Map; +/** + * A refinement that checks if a value is a `string`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isString } from "effect/Predicate" + * + * assert.strictEqual(isString("hello"), true) + * assert.strictEqual(isString(""), true) + * + * assert.strictEqual(isString(123), false) + * assert.strictEqual(isString(null), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isString = input => typeof input === "string"; +/** + * A refinement that checks if a value is a `number`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isNumber } from "effect/Predicate" + * + * assert.strictEqual(isNumber(123), true) + * assert.strictEqual(isNumber(0), true) + * assert.strictEqual(isNumber(-1.5), true) + * assert.strictEqual(isNumber(NaN), true) + * + * assert.strictEqual(isNumber("123"), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isNumber = input => typeof input === "number"; +/** + * A refinement that checks if a value is a `boolean`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isBoolean } from "effect/Predicate" + * + * assert.strictEqual(isBoolean(true), true) + * assert.strictEqual(isBoolean(false), true) + * + * assert.strictEqual(isBoolean("true"), false) + * assert.strictEqual(isBoolean(0), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isBoolean = input => typeof input === "boolean"; +/** + * A refinement that checks if a value is a `bigint`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isBigInt } from "effect/Predicate" + * + * assert.strictEqual(isBigInt(1n), true) + * + * assert.strictEqual(isBigInt(1), false) + * assert.strictEqual(isBigInt("1"), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isBigInt = input => typeof input === "bigint"; +/** + * A refinement that checks if a value is a `symbol`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isSymbol } from "effect/Predicate" + * + * assert.strictEqual(isSymbol(Symbol.for("a")), true) + * + * assert.strictEqual(isSymbol("a"), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isSymbol = input => typeof input === "symbol"; +// TODO: make public +/** + * A refinement that checks if a value is a valid `PropertyKey` (a `string`, `number`, or `symbol`). + * @internal + */ +export const isPropertyKey = u => isString(u) || isNumber(u) || isSymbol(u); +/** + * A refinement that checks if a value is a `Function`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isFunction } from "effect/Predicate" + * + * assert.strictEqual(isFunction(() => {}), true) + * assert.strictEqual(isFunction(isFunction), true) + * + * assert.strictEqual(isFunction("function"), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isFunction = isFunction_; +/** + * A refinement that checks if a value is `undefined`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isUndefined } from "effect/Predicate" + * + * assert.strictEqual(isUndefined(undefined), true) + * + * assert.strictEqual(isUndefined(null), false) + * assert.strictEqual(isUndefined("undefined"), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isUndefined = input => input === undefined; +/** + * A refinement that checks if a value is not `undefined`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isNotUndefined } from "effect/Predicate" + * + * assert.strictEqual(isNotUndefined(null), true) + * assert.strictEqual(isNotUndefined("value"), true) + * + * assert.strictEqual(isNotUndefined(undefined), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isNotUndefined = input => input !== undefined; +/** + * A refinement that checks if a value is `null`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isNull } from "effect/Predicate" + * + * assert.strictEqual(isNull(null), true) + * + * assert.strictEqual(isNull(undefined), false) + * assert.strictEqual(isNull("null"), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isNull = input => input === null; +/** + * A refinement that checks if a value is not `null`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isNotNull } from "effect/Predicate" + * + * assert.strictEqual(isNotNull(undefined), true) + * assert.strictEqual(isNotNull("value"), true) + * + * assert.strictEqual(isNotNull(null), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isNotNull = input => input !== null; +/** + * A refinement that always returns `false`. The type is narrowed to `never`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isNever } from "effect/Predicate" + * + * assert.strictEqual(isNever(1), false) + * assert.strictEqual(isNever(null), false) + * assert.strictEqual(isNever({}), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isNever = _ => false; +/** + * A refinement that always returns `true`. The type is narrowed to `unknown`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isUnknown } from "effect/Predicate" + * + * assert.strictEqual(isUnknown(1), true) + * assert.strictEqual(isUnknown(null), true) + * assert.strictEqual(isUnknown({}), true) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isUnknown = _ => true; +/** + * Checks if the input is an object or an array. + * @internal + */ +export const isRecordOrArray = input => typeof input === "object" && input !== null; +/** + * A refinement that checks if a value is an `object`. Note that in JavaScript, + * arrays and functions are also considered objects. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isObject } from "effect/Predicate" + * + * assert.strictEqual(isObject({}), true) + * assert.strictEqual(isObject([]), true) + * assert.strictEqual(isObject(() => {}), true) + * + * assert.strictEqual(isObject(null), false) + * assert.strictEqual(isObject("hello"), false) + * ``` + * + * @category guards + * @since 2.0.0 + * @see isRecord to check for plain objects (excluding arrays and functions). + */ +export const isObject = input => isRecordOrArray(input) || isFunction(input); +/** + * A refinement that checks if a value is an object-like value and has a specific property key. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { hasProperty } from "effect/Predicate" + * + * assert.strictEqual(hasProperty({ a: 1 }, "a"), true) + * assert.strictEqual(hasProperty({ a: 1 }, "b"), false) + * + * const value: unknown = { name: "Alice" }; + * if (hasProperty(value, "name")) { + * // The type of `value` is narrowed to `{ name: unknown }` + * // and we can safely access `value.name` + * console.log(value.name) + * } + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const hasProperty = /*#__PURE__*/dual(2, (self, property) => isObject(self) && property in self); +/** + * A refinement that checks if a value is an object with a `_tag` property + * that matches the given tag. This is a powerful tool for working with + * discriminated union types. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isTagged } from "effect/Predicate" + * + * type Shape = { _tag: "circle"; radius: number } | { _tag: "square"; side: number } + * + * const isCircle = isTagged("circle") + * + * const shape1: Shape = { _tag: "circle", radius: 10 } + * const shape2: Shape = { _tag: "square", side: 5 } + * + * assert.strictEqual(isCircle(shape1), true) + * assert.strictEqual(isCircle(shape2), false) + * + * if (isCircle(shape1)) { + * // shape1 is now narrowed to { _tag: "circle"; radius: number } + * assert.strictEqual(shape1.radius, 10) + * } + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isTagged = /*#__PURE__*/dual(2, (self, tag) => hasProperty(self, "_tag") && self["_tag"] === tag); +/** + * A refinement that checks if a value is either `null` or `undefined`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isNullable } from "effect/Predicate" + * + * assert.strictEqual(isNullable(null), true) + * assert.strictEqual(isNullable(undefined), true) + * + * assert.strictEqual(isNullable(0), false) + * assert.strictEqual(isNullable(""), false) + * ``` + * + * @category guards + * @since 2.0.0 + * @see isNotNullable + */ +export const isNullable = input => input === null || input === undefined; +/** + * A refinement that checks if a value is neither `null` nor `undefined`. + * The type is narrowed to `NonNullable`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isNotNullable } from "effect/Predicate" + * + * assert.strictEqual(isNotNullable(0), true) + * assert.strictEqual(isNotNullable("hello"), true) + * + * assert.strictEqual(isNotNullable(null), false) + * assert.strictEqual(isNotNullable(undefined), false) + * ``` + * + * @category guards + * @since 2.0.0 + * @see isNullable + */ +export const isNotNullable = input => input !== null && input !== undefined; +/** + * A refinement that checks if a value is an instance of `Error`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isError } from "effect/Predicate" + * + * assert.strictEqual(isError(new Error("boom")), true) + * assert.strictEqual(isError(new TypeError("boom")), true) + * + * assert.strictEqual(isError({ message: "boom" }), false) + * assert.strictEqual(isError("boom"), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isError = input => input instanceof Error; +/** + * A refinement that checks if a value is a `Uint8Array`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isUint8Array } from "effect/Predicate" + * + * assert.strictEqual(isUint8Array(new Uint8Array()), true) + * + * assert.strictEqual(isUint8Array(new Uint16Array()), false) + * assert.strictEqual(isUint8Array([1, 2, 3]), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isUint8Array = input => input instanceof Uint8Array; +/** + * A refinement that checks if a value is a `Date` object. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isDate } from "effect/Predicate" + * + * assert.strictEqual(isDate(new Date()), true) + * + * assert.strictEqual(isDate(Date.now()), false) // `Date.now()` returns a number + * assert.strictEqual(isDate("2023-01-01"), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isDate = input => input instanceof Date; +/** + * A refinement that checks if a value is an `Iterable`. + * Many built-in types are iterable, such as `Array`, `string`, `Map`, and `Set`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isIterable } from "effect/Predicate" + * + * assert.strictEqual(isIterable([]), true) + * assert.strictEqual(isIterable("hello"), true) + * assert.strictEqual(isIterable(new Set()), true) + * + * assert.strictEqual(isIterable({}), false) + * assert.strictEqual(isIterable(123), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isIterable = input => typeof input === "string" || hasProperty(input, Symbol.iterator); +/** + * A refinement that checks if a value is a record (i.e., a plain object). + * This check returns `false` for arrays, `null`, and functions. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isRecord } from "effect/Predicate" + * + * assert.strictEqual(isRecord({}), true) + * assert.strictEqual(isRecord({ a: 1 }), true) + * + * assert.strictEqual(isRecord([]), false) + * assert.strictEqual(isRecord(new Date()), false) + * assert.strictEqual(isRecord(null), false) + * assert.strictEqual(isRecord(() => null), false) + * ``` + * + * @category guards + * @since 2.0.0 + * @see isObject + */ +export const isRecord = input => isRecordOrArray(input) && !Array.isArray(input); +/** + * A refinement that checks if a value is a readonly record (i.e., a plain object). + * This check returns `false` for arrays, `null`, and functions. + * + * This is an alias for `isRecord`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isReadonlyRecord } from "effect/Predicate" + * + * assert.strictEqual(isReadonlyRecord({}), true) + * assert.strictEqual(isReadonlyRecord({ a: 1 }), true) + * + * assert.strictEqual(isReadonlyRecord([]), false) + * assert.strictEqual(isReadonlyRecord(null), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isReadonlyRecord = isRecord; +/** + * A refinement that checks if a value is a `Promise`. It performs a duck-typing check + * for `.then` and `.catch` methods. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isPromise } from "effect/Predicate" + * + * assert.strictEqual(isPromise(Promise.resolve(1)), true) + * assert.strictEqual(isPromise(new Promise(() => {})), true) + * + * assert.strictEqual(isPromise({ then() {} }), false) // Missing .catch + * assert.strictEqual(isPromise({}), false) + * ``` + * + * @category guards + * @since 2.0.0 + * @see isPromiseLike + */ +export const isPromise = input => hasProperty(input, "then") && "catch" in input && isFunction(input.then) && isFunction(input.catch); +/** + * A refinement that checks if a value is `PromiseLike`. It performs a duck-typing + * check for a `.then` method. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isPromiseLike } from "effect/Predicate" + * + * assert.strictEqual(isPromiseLike(Promise.resolve(1)), true) + * assert.strictEqual(isPromiseLike({ then: () => {} }), true) + * + * assert.strictEqual(isPromiseLike({}), false) + * ``` + * + * @category guards + * @since 2.0.0 + * @see isPromise + */ +export const isPromiseLike = input => hasProperty(input, "then") && isFunction(input.then); +/** + * A refinement that checks if a value is a `RegExp`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Predicate } from "effect" + * + * assert.strictEqual(Predicate.isRegExp(/a/), true) + * assert.strictEqual(Predicate.isRegExp(new RegExp("a")), true) + * + * assert.strictEqual(Predicate.isRegExp("/a/"), false) + * ``` + * + * @category guards + * @since 3.9.0 + */ +export const isRegExp = input => input instanceof RegExp; +/** + * Composes a `Refinement` with another `Refinement` or `Predicate`. + * + * This can be used to chain checks. The first refinement is applied, and if it + * passes, the second check is applied to the same value, potentially refining + * the type further. + * + * @example + * ```ts + * import { Predicate } from "effect" + * import * as assert from "node:assert" + * + * const isString = (u: unknown): u is string => typeof u === "string" + * const minLength = (n: number) => (s: string): boolean => s.length >= n + * + * // Create a refinement that checks for a string with a minimum length of 3 + * const isLongString = Predicate.compose(isString, minLength(3)) + * + * let value: unknown = "hello" + * + * assert.strictEqual(isLongString(value), true) + * if (isLongString(value)) { + * // value is narrowed to string + * assert.strictEqual(value.toUpperCase(), "HELLO") + * } + * assert.strictEqual(isLongString("hi"), false) + * ``` + * + * @since 2.0.0 + */ +export const compose = /*#__PURE__*/dual(2, (ab, bc) => a => ab(a) && bc(a)); +/** + * Combines two predicates to test a tuple of two values. The first predicate tests the + * first element of the tuple, and the second predicate tests the second element. + * + * @category combining + * @since 2.0.0 + */ +export const product = (self, that) => ([a, b]) => self(a) && that(b); +/** + * Takes an iterable of predicates and returns a new predicate that tests an array of values. + * The new predicate returns `true` if each predicate at a given index is satisfied by the + * value at the same index in the array. The check stops at the length of the shorter of + * the two iterables (predicates or values). + * + * @category combining + * @since 2.0.0 + * @see tuple for a more powerful, variadic version. + */ +export const all = collection => { + return as => { + let collectionIndex = 0; + for (const p of collection) { + if (collectionIndex >= as.length) { + break; + } + if (p(as[collectionIndex]) === false) { + return false; + } + collectionIndex++; + } + return true; + }; +}; +/** + * Combines a predicate for a single value and an iterable of predicates for the rest of an array. + * Useful for checking the head and tail of an array separately. + * + * @category combining + * @since 2.0.0 + */ +export const productMany = (self, collection) => { + const rest = all(collection); + return ([head, ...tail]) => self(head) === false ? false : rest(tail); +}; +/** + * Combines an array of predicates into a single predicate that tests an array of values. + * This function is highly type-aware and will produce a `Refinement` if any of the provided + * predicates are `Refinement`s, allowing for powerful type-narrowing of tuples. + * + * - If all predicates are `Predicate`, the result is `Predicate<[T, T, ...]>`. + * - If any predicate is a `Refinement`, the result is a `Refinement` that narrows + * the input tuple type to a more specific tuple type. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Predicate } from "effect" + * + * const isString = (u: unknown): u is string => typeof u === "string" + * const isNumber = (u: unknown): u is number => typeof u === "number" + * + * // Create a refinement for a [string, number] tuple + * const isStringNumberTuple = Predicate.tuple(isString, isNumber) + * + * const value: [unknown, unknown] = ["hello", 123] + * if (isStringNumberTuple(value)) { + * // value is narrowed to [string, number] + * const [s, n] = value + * assert.strictEqual(s.toUpperCase(), "HELLO") + * assert.strictEqual(n.toFixed(2), "123.00") + * } + * assert.strictEqual(isStringNumberTuple(["hello", "123"]), false) + * ``` + * + * @since 2.0.0 + */ +export const tuple = (...elements) => all(elements); +/** + * Combines a record of predicates into a single predicate that tests a record of values. + * This function is highly type-aware and will produce a `Refinement` if any of the provided + * predicates are `Refinement`s, allowing for powerful type-narrowing of structs. + * + * - If all predicates are `Predicate`, the result is `Predicate<{ k: T, ... }>`. + * - If any predicate is a `Refinement`, the result is a `Refinement` that narrows + * the input record type to a more specific record type. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Predicate } from "effect" + * + * const isString = (u: unknown): u is string => typeof u === "string" + * const isNumber = (u: unknown): u is number => typeof u === "number" + * + * const personPredicate = Predicate.struct({ + * name: isString, + * age: isNumber + * }) + * + * const value: { name: unknown; age: unknown } = { name: "Alice", age: 30 } + * if (personPredicate(value)) { + * // value is narrowed to { name: string; age: number } + * assert.strictEqual(value.name.toUpperCase(), "ALICE") + * assert.strictEqual(value.age.toFixed(0), "30") + * } + * assert.strictEqual(personPredicate({ name: "Bob", age: "40" }), false) + * ``` + * + * @since 2.0.0 + */ +export const struct = fields => { + const keys = Object.keys(fields); + return a => { + for (const key of keys) { + if (!fields[key](a[key])) { + return false; + } + } + return true; + }; +}; +/** + * Returns a new predicate that is the logical negation of the given predicate. + * + * **Note**: If the input is a `Refinement`, the resulting predicate will be a + * simple `Predicate`, as TypeScript cannot infer the negative type. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Predicate, Number } from "effect" + * + * const isNonPositive = Predicate.not(Number.greaterThan(0)) + * + * assert.strictEqual(isNonPositive(-1), true) + * assert.strictEqual(isNonPositive(0), true) + * assert.strictEqual(isNonPositive(1), false) + * ``` + * + * @category combinators + * @since 2.0.0 + */ +export const not = self => a => !self(a); +/** + * Combines two predicates with a logical "OR". The resulting predicate returns `true` + * if at least one of the predicates returns `true`. + * + * If both predicates are `Refinement`s, the resulting predicate is a `Refinement` to the + * union of their target types (`B | C`). + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Predicate } from "effect" + * + * const isString = (u: unknown): u is string => typeof u === "string" + * const isNumber = (u: unknown): u is number => typeof u === "number" + * + * const isStringOrNumber = Predicate.or(isString, isNumber) + * + * assert.strictEqual(isStringOrNumber("hello"), true) + * assert.strictEqual(isStringOrNumber(123), true) + * assert.strictEqual(isStringOrNumber(null), false) + * + * const value: unknown = "world" + * if (isStringOrNumber(value)) { + * // value is narrowed to string | number + * console.log(value) + * } + * ``` + * + * @category combinators + * @since 2.0.0 + */ +export const or = /*#__PURE__*/dual(2, (self, that) => a => self(a) || that(a)); +/** + * Combines two predicates with a logical "AND". The resulting predicate returns `true` + * only if both of the predicates return `true`. + * + * If both predicates are `Refinement`s, the resulting predicate is a `Refinement` to the + * intersection of their target types (`B & C`). + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Predicate } from "effect" + * + * type Person = { name: string } + * type Employee = { id: number } + * + * const hasName = (u: unknown): u is Person => Predicate.hasProperty(u, "name") && typeof (u as any).name === "string" + * const hasId = (u: unknown): u is Employee => Predicate.hasProperty(u, "id") && typeof (u as any).id === "number" + * + * const isPersonAndEmployee = Predicate.and(hasName, hasId) + * + * const val: unknown = { name: "Alice", id: 123 } + * if (isPersonAndEmployee(val)) { + * // val is narrowed to Person & Employee + * assert.strictEqual(val.name, "Alice") + * assert.strictEqual(val.id, 123) + * } + * + * assert.strictEqual(isPersonAndEmployee({ name: "Bob" }), false) // Missing id + * assert.strictEqual(isPersonAndEmployee({ id: 456 }), false) // Missing name + * ``` + * + * @category combinators + * @since 2.0.0 + */ +export const and = /*#__PURE__*/dual(2, (self, that) => a => self(a) && that(a)); +/** + * Combines two predicates with a logical "XOR" (exclusive OR). The resulting predicate + * returns `true` if one of the predicates returns `true`, but not both. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Predicate } from "effect" + * + * const isPositive = (n: number) => n > 0 + * const isEven = (n: number) => n % 2 === 0 + * + * const isPositiveXorEven = Predicate.xor(isPositive, isEven) + * + * assert.strictEqual(isPositiveXorEven(4), false) // both true -> false + * assert.strictEqual(isPositiveXorEven(3), true) // one true -> true + * assert.strictEqual(isPositiveXorEven(-2), true) // one true -> true + * assert.strictEqual(isPositiveXorEven(-1), false) // both false -> false + * ``` + * + * @category combinators + * @since 2.0.0 + */ +export const xor = /*#__PURE__*/dual(2, (self, that) => a => self(a) !== that(a)); +/** + * Combines two predicates with a logical "EQV" (equivalence). The resulting predicate + * returns `true` if both predicates return the same boolean value (both `true` or both `false`). + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Predicate } from "effect" + * + * const isPositive = (n: number) => n > 0 + * const isEven = (n: number) => n % 2 === 0 + * + * const isPositiveEqvEven = Predicate.eqv(isPositive, isEven) + * + * assert.strictEqual(isPositiveEqvEven(4), true) // both true -> true + * assert.strictEqual(isPositiveEqvEven(3), false) // different -> false + * assert.strictEqual(isPositiveEqvEven(-2), false) // different -> false + * assert.strictEqual(isPositiveEqvEven(-1), true) // both false -> true + * ``` + * + * @category combinators + * @since 2.0.0 + */ +export const eqv = /*#__PURE__*/dual(2, (self, that) => a => self(a) === that(a)); +/** + * Creates a predicate that represents a logical "if-then" rule. + * + * Think of it as a conditional promise: **"If `antecedent` holds true, then I promise `consequent` will also be true."** + * + * This function is invaluable for defining complex validation logic where one condition dictates another. + * + * ### How It Works + * + * The rule only fails (returns `false`) when the "if" part is `true`, but the "then" part is `false`. + * In all other cases, the promise is considered kept, and the result is `true`. + * + * This includes the concept of **"vacuous truth"**: if the "if" part is `false`, the rule doesn't apply, + * so the promise isn't broken, and the result is `true`. (e.g., "If it rains, I'll bring an umbrella." + * If it doesn't rain, you haven't broken your promise, no matter what). + * + * ### Key Details + * + * - **Logical Equivalence**: `implies(p, q)` is the same as `not(p).or(q)`, or simply `!p || q` + * in plain JavaScript. This can be a helpful way to reason about its behavior. + * + * - **Type-Safety Warning**: This function always returns a `Predicate`, never a type-narrowing + * `Refinement`. A `true` result doesn't guarantee the `consequent` passed (it could be `true` + * simply because the `antecedent` was `false`), so it cannot be used to safely narrow a type. + * + * @example + * ```ts + * // Rule: A user can only be an admin if they also belong to the "staff" group. + * import * as assert from "node:assert" + * import { Predicate } from "effect" + * + * type User = { + * isStaff: boolean + * isAdmin: boolean + * } + * + * const isValidUserPermission = Predicate.implies( + * // antecedent: "if" the user is an admin... + * (user: User) => user.isAdmin, + * // consequent: "then" they must be staff. + * (user: User) => user.isStaff + * ) + * + * // A non-admin who is not staff. Rule doesn't apply (antecedent is false). + * assert.strictEqual(isValidUserPermission({ isStaff: false, isAdmin: false }), true) + * + * // A staff member who is not an admin. Rule doesn't apply (antecedent is false). + * assert.strictEqual(isValidUserPermission({ isStaff: true, isAdmin: false }), true) + * + * // An admin who is also staff. The rule was followed. + * assert.strictEqual(isValidUserPermission({ isStaff: true, isAdmin: true }), true) + * + * // An admin who is NOT staff. The rule was broken! + * assert.strictEqual(isValidUserPermission({ isStaff: false, isAdmin: true }), false) + * ``` + * + * @category combinators + * @since 2.0.0 + */ +export const implies = /*#__PURE__*/dual(2, (antecedent, consequent) => a => antecedent(a) ? consequent(a) : true); +/** + * Combines two predicates with a logical "NOR" (negated OR). The resulting predicate + * returns `true` only if both predicates return `false`. + * This is equivalent to `not(or(p, q))`. + * + * @category combinators + * @since 2.0.0 + */ +export const nor = /*#__PURE__*/dual(2, (self, that) => a => !(self(a) || that(a))); +/** + * Combines two predicates with a logical "NAND" (negated AND). The resulting predicate + * returns `true` if at least one of the predicates returns `false`. + * This is equivalent to `not(and(p, q))`. + * + * @category combinators + * @since 2.0.0 + */ +export const nand = /*#__PURE__*/dual(2, (self, that) => a => !(self(a) && that(a))); +/** + * Takes an iterable of predicates and returns a new predicate. The new predicate + * returns `true` if all predicates in the collection return `true` for a given value. + * + * This is like `Array.prototype.every` but for a collection of predicates. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Predicate } from "effect" + * + * const isPositive = (n: number) => n > 0 + * const isEven = (n: number) => n % 2 === 0 + * + * const isPositiveAndEven = Predicate.every([isPositive, isEven]) + * + * assert.strictEqual(isPositiveAndEven(4), true) + * assert.strictEqual(isPositiveAndEven(3), false) + * assert.strictEqual(isPositiveAndEven(-2), false) + * ``` + * + * @category elements + * @since 2.0.0 + * @see some + */ +export const every = collection => a => { + for (const p of collection) { + if (!p(a)) { + return false; + } + } + return true; +}; +/** + * Takes an iterable of predicates and returns a new predicate. The new predicate + * returns `true` if at least one predicate in the collection returns `true` for a given value. + * + * This is like `Array.prototype.some` but for a collection of predicates. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Predicate } from "effect" + * + * const isNegative = (n: number) => n < 0 + * const isOdd = (n: number) => n % 2 !== 0 + * + * const isNegativeOrOdd = Predicate.some([isNegative, isOdd]) + * + * assert.strictEqual(isNegativeOrOdd(-2), true) // isNegative is true + * assert.strictEqual(isNegativeOrOdd(3), true) // isOdd is true + * assert.strictEqual(isNegativeOrOdd(4), false) // both are false + * ``` + * + * @category elements + * @since 2.0.0 + * @see every + */ +export const some = collection => a => { + for (const p of collection) { + if (p(a)) { + return true; + } + } + return false; +}; +//# sourceMappingURL=Predicate.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Pretty.js b/backend/node_modules/effect/dist/esm/Pretty.js new file mode 100644 index 0000000000000000000000000000000000000000..9f8bebe5dc3dcac6ebcab2575fc6ac11d3b4579b --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Pretty.js @@ -0,0 +1,174 @@ +/** + * @since 3.10.0 + */ +import * as Arr from "./Array.js"; +import * as Inspectable from "./Inspectable.js"; +import * as errors_ from "./internal/schema/errors.js"; +import * as util_ from "./internal/schema/util.js"; +import * as Option from "./Option.js"; +import * as ParseResult from "./ParseResult.js"; +import * as AST from "./SchemaAST.js"; +/** + * @category prettify + * @since 3.10.0 + */ +export const make = schema => compile(schema.ast, []); +const getPrettyAnnotation = /*#__PURE__*/AST.getAnnotation(AST.PrettyAnnotationId); +const getMatcher = defaultPretty => ast => Option.match(getPrettyAnnotation(ast), { + onNone: () => defaultPretty, + onSome: handler => handler() +}); +const toString = /*#__PURE__*/getMatcher(a => String(a)); +const stringify = /*#__PURE__*/getMatcher(a => JSON.stringify(a)); +const formatUnknown = /*#__PURE__*/getMatcher(Inspectable.formatUnknown); +/** + * @since 3.10.0 + */ +export const match = { + "Declaration": (ast, go, path) => { + const annotation = getPrettyAnnotation(ast); + if (Option.isSome(annotation)) { + return annotation.value(...ast.typeParameters.map(tp => go(tp, path))); + } + throw new Error(errors_.getPrettyMissingAnnotationErrorMessage(path, ast)); + }, + "VoidKeyword": /*#__PURE__*/getMatcher(() => "void(0)"), + "NeverKeyword": /*#__PURE__*/getMatcher(() => { + throw new Error(errors_.getPrettyNeverErrorMessage); + }), + "Literal": /*#__PURE__*/getMatcher(literal => typeof literal === "bigint" ? `${String(literal)}n` : JSON.stringify(literal)), + "SymbolKeyword": toString, + "UniqueSymbol": toString, + "TemplateLiteral": stringify, + "UndefinedKeyword": toString, + "UnknownKeyword": formatUnknown, + "AnyKeyword": formatUnknown, + "ObjectKeyword": formatUnknown, + "StringKeyword": stringify, + "NumberKeyword": toString, + "BooleanKeyword": toString, + "BigIntKeyword": /*#__PURE__*/getMatcher(a => `${String(a)}n`), + "Enums": stringify, + "TupleType": (ast, go, path) => { + const hook = getPrettyAnnotation(ast); + if (Option.isSome(hook)) { + return hook.value(); + } + const elements = ast.elements.map((e, i) => go(e.type, path.concat(i))); + const rest = ast.rest.map(annotatedAST => go(annotatedAST.type, path)); + return input => { + const output = []; + let i = 0; + // --------------------------------------------- + // handle elements + // --------------------------------------------- + for (; i < elements.length; i++) { + if (input.length < i + 1) { + if (ast.elements[i].isOptional) { + continue; + } + } else { + output.push(elements[i](input[i])); + } + } + // --------------------------------------------- + // handle rest element + // --------------------------------------------- + if (Arr.isNonEmptyReadonlyArray(rest)) { + const [head, ...tail] = rest; + for (; i < input.length - tail.length; i++) { + output.push(head(input[i])); + } + // --------------------------------------------- + // handle post rest elements + // --------------------------------------------- + for (let j = 0; j < tail.length; j++) { + i += j; + output.push(tail[j](input[i])); + } + } + return "[" + output.join(", ") + "]"; + }; + }, + "TypeLiteral": (ast, go, path) => { + const hook = getPrettyAnnotation(ast); + if (Option.isSome(hook)) { + return hook.value(); + } + const propertySignaturesTypes = ast.propertySignatures.map(ps => go(ps.type, path.concat(ps.name))); + const indexSignatureTypes = ast.indexSignatures.map(is => go(is.type, path)); + const expectedKeys = {}; + for (let i = 0; i < propertySignaturesTypes.length; i++) { + expectedKeys[ast.propertySignatures[i].name] = null; + } + return input => { + const output = []; + // --------------------------------------------- + // handle property signatures + // --------------------------------------------- + for (let i = 0; i < propertySignaturesTypes.length; i++) { + const ps = ast.propertySignatures[i]; + const name = ps.name; + if (ps.isOptional && !Object.prototype.hasOwnProperty.call(input, name)) { + continue; + } + output.push(`${Inspectable.formatPropertyKey(name)}: ${propertySignaturesTypes[i](input[name])}`); + } + // --------------------------------------------- + // handle index signatures + // --------------------------------------------- + if (indexSignatureTypes.length > 0) { + for (let i = 0; i < indexSignatureTypes.length; i++) { + const type = indexSignatureTypes[i]; + const keys = util_.getKeysForIndexSignature(input, ast.indexSignatures[i].parameter); + for (const key of keys) { + if (Object.prototype.hasOwnProperty.call(expectedKeys, key)) { + continue; + } + output.push(`${Inspectable.formatPropertyKey(key)}: ${type(input[key])}`); + } + } + } + return Arr.isNonEmptyReadonlyArray(output) ? "{ " + output.join(", ") + " }" : "{}"; + }; + }, + "Union": (ast, go, path) => { + const hook = getPrettyAnnotation(ast); + if (Option.isSome(hook)) { + return hook.value(); + } + const types = ast.types.map(ast => [ParseResult.is({ + ast + }), go(ast, path)]); + return a => { + const index = types.findIndex(([is]) => is(a)); + if (index === -1) { + throw new Error(errors_.getPrettyNoMatchingSchemaErrorMessage(a, path, ast)); + } + return types[index][1](a); + }; + }, + "Suspend": (ast, go, path) => { + return Option.match(getPrettyAnnotation(ast), { + onNone: () => { + const get = util_.memoizeThunk(() => go(ast.f(), path)); + return a => get()(a); + }, + onSome: handler => handler() + }); + }, + "Refinement": (ast, go, path) => { + return Option.match(getPrettyAnnotation(ast), { + onNone: () => go(ast.from, path), + onSome: handler => handler() + }); + }, + "Transformation": (ast, go, path) => { + return Option.match(getPrettyAnnotation(ast), { + onNone: () => go(ast.to, path), + onSome: handler => handler() + }); + } +}; +const compile = /*#__PURE__*/AST.getCompiler(match); +//# sourceMappingURL=Pretty.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Pretty.js.map b/backend/node_modules/effect/dist/esm/Pretty.js.map new file mode 100644 index 0000000000000000000000000000000000000000..3a165a39235f5bc50a2ebba4c7097b9f0823d56c --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Pretty.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Pretty.js","names":["Arr","Inspectable","errors_","util_","Option","ParseResult","AST","make","schema","compile","ast","getPrettyAnnotation","getAnnotation","PrettyAnnotationId","getMatcher","defaultPretty","match","onNone","onSome","handler","toString","a","String","stringify","JSON","formatUnknown","Declaration","go","path","annotation","isSome","value","typeParameters","map","tp","Error","getPrettyMissingAnnotationErrorMessage","getPrettyNeverErrorMessage","literal","TupleType","hook","elements","e","i","type","concat","rest","annotatedAST","input","output","length","isOptional","push","isNonEmptyReadonlyArray","head","tail","j","join","TypeLiteral","propertySignaturesTypes","propertySignatures","ps","name","indexSignatureTypes","indexSignatures","is","expectedKeys","Object","prototype","hasOwnProperty","call","formatPropertyKey","keys","getKeysForIndexSignature","parameter","key","Union","types","index","findIndex","getPrettyNoMatchingSchemaErrorMessage","Suspend","get","memoizeThunk","f","Refinement","from","Transformation","to","getCompiler"],"sources":["../../src/Pretty.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,GAAG,MAAM,YAAY;AACjC,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAC/C,OAAO,KAAKC,OAAO,MAAM,6BAA6B;AACtD,OAAO,KAAKC,KAAK,MAAM,2BAA2B;AAClD,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAE/C,OAAO,KAAKC,GAAG,MAAM,gBAAgB;AAkBrC;;;;AAIA,OAAO,MAAMC,IAAI,GAAaC,MAA8B,IAAuBC,OAAO,CAACD,MAAM,CAACE,GAAG,EAAE,EAAE,CAAC;AAE1G,MAAMC,mBAAmB,gBAAGL,GAAG,CAACM,aAAa,CAA6BN,GAAG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AO;KAC7B,CAAC;EACJ;CACD;AAED,MAAMV,OAAO,gBAAGH,GAAG,CAACmF,WAAW,CAACzE,KAAK,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/PubSub.js b/backend/node_modules/effect/dist/esm/PubSub.js new file mode 100644 index 0000000000000000000000000000000000000000..fb6d22c4fd0e1895662354926855b5c38f62f8ec --- /dev/null +++ b/backend/node_modules/effect/dist/esm/PubSub.js @@ -0,0 +1,120 @@ +import * as internal from "./internal/pubsub.js"; +/** + * Creates a bounded `PubSub` with the back pressure strategy. The `PubSub` will retain + * messages until they have been taken by all subscribers, applying back + * pressure to publishers if the `PubSub` is at capacity. + * + * For best performance use capacities that are powers of two. + * + * @since 2.0.0 + * @category constructors + */ +export const bounded = internal.bounded; +/** + * Creates a bounded `PubSub` with the dropping strategy. The `PubSub` will drop new + * messages if the `PubSub` is at capacity. + * + * For best performance use capacities that are powers of two. + * + * @since 2.0.0 + * @category constructors + */ +export const dropping = internal.dropping; +/** + * Creates a bounded `PubSub` with the sliding strategy. The `PubSub` will add new + * messages and drop old messages if the `PubSub` is at capacity. + * + * For best performance use capacities that are powers of two. + * + * @since 2.0.0 + * @category constructors + */ +export const sliding = internal.sliding; +/** + * Creates an unbounded `PubSub`. + * + * @since 2.0.0 + * @category constructors + */ +export const unbounded = internal.unbounded; +/** + * Returns the number of elements the queue can hold. + * + * @since 2.0.0 + * @category getters + */ +export const capacity = internal.capacity; +/** + * Retrieves the size of the queue, which is equal to the number of elements + * in the queue. This may be negative if fibers are suspended waiting for + * elements to be added to the queue. + * + * @since 2.0.0 + * @category getters + */ +export const size = internal.size; +/** + * Returns `true` if the `Queue` contains at least one element, `false` + * otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const isFull = internal.isFull; +/** + * Returns `true` if the `Queue` contains zero elements, `false` otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const isEmpty = internal.isEmpty; +/** + * Interrupts any fibers that are suspended on `offer` or `take`. Future calls + * to `offer*` and `take*` will be interrupted immediately. + * + * @since 2.0.0 + * @category utils + */ +export const shutdown = internal.shutdown; +/** + * Returns `true` if `shutdown` has been called, otherwise returns `false`. + * + * @since 2.0.0 + * @category getters + */ +export const isShutdown = internal.isShutdown; +/** + * Waits until the queue is shutdown. The `Effect` returned by this method will + * not resume until the queue has been shutdown. If the queue is already + * shutdown, the `Effect` will resume right away. + * + * @since 2.0.0 + * @category utils + */ +export const awaitShutdown = internal.awaitShutdown; +/** + * Publishes a message to the `PubSub`, returning whether the message was published + * to the `PubSub`. + * + * @since 2.0.0 + * @category utils + */ +export const publish = internal.publish; +/** + * Publishes all of the specified messages to the `PubSub`, returning whether they + * were published to the `PubSub`. + * + * @since 2.0.0 + * @category utils + */ +export const publishAll = internal.publishAll; +/** + * Subscribes to receive messages from the `PubSub`. The resulting subscription can + * be evaluated multiple times within the scope to take a message from the `PubSub` + * each time. + * + * @since 2.0.0 + * @category utils + */ +export const subscribe = internal.subscribe; +//# sourceMappingURL=PubSub.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Queue.js.map b/backend/node_modules/effect/dist/esm/Queue.js.map new file mode 100644 index 0000000000000000000000000000000000000000..55924fbba6ed7ca2162849a6be543956f337eb3b --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Queue.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Queue.js","names":["internal","EnqueueTypeId","DequeueTypeId","QueueStrategyTypeId","BackingQueueTypeId","isQueue","isDequeue","isEnqueue","backPressureStrategy","droppingStrategy","slidingStrategy","make","bounded","dropping","sliding","unbounded","capacity","size","isEmpty","isFull","isShutdown","awaitShutdown","shutdown","offer","unsafeOffer","offerAll","poll","take","takeAll","takeUpTo","takeBetween","takeN"],"sources":["../../src/Queue.ts"],"sourcesContent":[null],"mappings":"AAMA,OAAO,KAAKA,QAAQ,MAAM,qBAAqB;AAQ/C;;;;AAIA,OAAO,MAAMC,aAAa,GAAkBD,QAAQ,CAACC,aAAa;AAQlE;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nG;;;;;;AAMA,OAAO,MAAMC,UAAU,GAAiEpB,QAAQ,CAACoB,UAAU;AAE3G;;;;;;;;AAQA,OAAO,MAAMC,aAAa,GAA8DrB,QAAQ,CAACqB,aAAa;AAE9G;;;;;;;AAOA,OAAO,MAAMC,QAAQ,GAA8DtB,QAAQ,CAACsB,QAAQ;AAEpG;;;;;;AAMA,OAAO,MAAMC,KAAK,GAedvB,QAAQ,CAACuB,KAAK;AAElB;;;;;;AAMA,OAAO,MAAMC,WAAW,GAepBxB,QAAQ,CAACwB,WAAW;AAExB;;;;;;;;;;;;;;;;;;AAkBA,OAAO,MAAMC,QAAQ,GAuCjBzB,QAAQ,CAACyB,QAAQ;AAErB;;;;;;;AAOA,OAAO,MAAMC,IAAI,GAA6D1B,QAAQ,CAAC0B,IAAI;AAE3F;;;;;;;AAOA,OAAO,MAAMC,IAAI,GAA8C3B,QAAQ,CAAC2B,IAAI;AAE5E;;;;;;;AAOA,OAAO,MAAMC,OAAO,GAA2D5B,QAAQ,CAAC4B,OAAO;AAE/F;;;;;;AAMA,OAAO,MAAMC,QAAQ,GAejB7B,QAAQ,CAAC6B,QAAQ;AAErB;;;;;;;;AAQA,OAAO,MAAMC,WAAW,GAmBpB9B,QAAQ,CAAC8B,WAAW;AAExB;;;;;;;;AAQA,OAAO,MAAMC,KAAK,GAmBd/B,QAAQ,CAAC+B,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/RateLimiter.js b/backend/node_modules/effect/dist/esm/RateLimiter.js new file mode 100644 index 0000000000000000000000000000000000000000..bfc49d89b6ec3b7472ae465c8e3b33ebcdd0cc76 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/RateLimiter.js @@ -0,0 +1,77 @@ +import * as internal from "./internal/rateLimiter.js"; +/** + * Constructs a new `RateLimiter` which will utilize the specified algorithm + * to limit requests (defaults to `token-bucket`). + * + * Notes + * - Only the moment of starting the effect is rate limited. The number of concurrent executions is not bounded. + * - Instances of `RateLimiter` can be composed. + * - The "cost" per effect can be changed. See {@link withCost} + * + * @example + * ```ts + * import { Effect, RateLimiter } from "effect"; + * import { compose } from "effect/Function" + * + * const program = Effect.scoped( + * Effect.gen(function* ($) { + * const perMinuteRL = yield* $(RateLimiter.make({ limit: 30, interval: "1 minutes" })) + * const perSecondRL = yield* $(RateLimiter.make({ limit: 2, interval: "1 seconds" })) + * + * // This rate limiter respects both the 30 calls per minute + * // and the 2 calls per second constraints. + * const rateLimit = compose(perMinuteRL, perSecondRL) + * + * // simulate repeated calls + * for (let n = 0; n < 100; n++) { + * // wrap the effect we want to limit with rateLimit + * yield* $(rateLimit(Effect.log("Calling RateLimited Effect"))); + * } + * }) + * ); + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * Alters the per-effect cost of the rate-limiter. + * + * This can be used for "credit" based rate-limiting where different API endpoints + * cost a different number of credits within a time window. + * Eg: 1000 credits / hour, where a query costs 1 credit and a mutation costs 5 credits. + * + * @example + * ```ts + * import { Effect, RateLimiter } from "effect"; + * import { compose } from "effect/Function"; + * + * const program = Effect.scoped( + * Effect.gen(function* ($) { + * // Create a rate limiter that has an hourly limit of 1000 credits + * const rateLimiter = yield* $(RateLimiter.make({ limit: 1000, interval: "1 hours" })); + * // Query API costs 1 credit per call ( 1 is the default cost ) + * const queryAPIRL = compose(rateLimiter, RateLimiter.withCost(1)); + * // Mutation API costs 5 credits per call + * const mutationAPIRL = compose(rateLimiter, RateLimiter.withCost(5)); + + * // Use the pre-defined rate limiters + * yield* $(queryAPIRL(Effect.log("Sample Query"))); + * yield* $(mutationAPIRL(Effect.log("Sample Mutation"))); + * + * // Or set a cost on-the-fly + * yield* $( + * rateLimiter(Effect.log("Another query with a different cost")).pipe( + * RateLimiter.withCost(3) + * ) + * ); + * }) + * ); + * ``` + * + * @since 2.0.0 + * @category combinators + */ +export const withCost = internal.withCost; +//# sourceMappingURL=RateLimiter.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/RcMap.js.map b/backend/node_modules/effect/dist/esm/RcMap.js.map new file mode 100644 index 0000000000000000000000000000000000000000..6be700a8c7b4f69a4d1c3cbce44735c77b77d8b1 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/RcMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RcMap.js","names":["internal","TypeId","make","get","has","keys","invalidate","touch"],"sources":["../../src/RcMap.ts"],"sourcesContent":[null],"mappings":"AAMA,OAAO,KAAKA,QAAQ,MAAM,qBAAqB;AAK/C;;;;AAIA,OAAO,MAAMC,MAAM,GAAkBD,QAAQ,CAACC,MAAM;AAgCpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,OAAO,MAAMC,IAAI,GAyFbF,QAAQ,CAACE,IAAI;AAEjB;;;;AAIA,OAAO,MAAMC,GAAG,GAWZH,QAAQ,CAACG,GAAG;AAEhB;;;;AAIA,OAAO,MAAMC,GAAG,GAWZJ,QAAQ,CAACI,GAAG;AAEhB;;;;AAIA,OAAO,MAAMC,IAAI,GAA+DL,QAAQ,CAACK,IAAI;AAE7F;;;;AAIA,OAAO,MAAMC,UAAU,GAWnBN,QAAQ,CAACM,UAAU;AAEvB;;;;AAIA,OAAO,MAAMC,KAAK,GAWdP,QAAQ,CAACO,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Readable.js b/backend/node_modules/effect/dist/esm/Readable.js new file mode 100644 index 0000000000000000000000000000000000000000..485f09c29fb91dc0ab33037c2988496cf63226fb --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Readable.js @@ -0,0 +1,45 @@ +import { dual } from "./Function.js"; +import * as core from "./internal/core.js"; +import { pipeArguments } from "./Pipeable.js"; +import { hasProperty } from "./Predicate.js"; +/** + * @since 2.0.0 + * @category type ids + */ +export const TypeId = /*#__PURE__*/Symbol.for("effect/Readable"); +/** + * @since 2.0.0 + * @category refinements + */ +export const isReadable = u => hasProperty(u, TypeId); +const Proto = { + [TypeId]: TypeId, + pipe() { + return pipeArguments(this, arguments); + } +}; +/** + * @since 2.0.0 + * @category constructors + */ +export const make = get => { + const self = Object.create(Proto); + self.get = get; + return self; +}; +/** + * @since 2.0.0 + * @category combinators + */ +export const map = /*#__PURE__*/dual(2, (self, f) => make(core.map(self.get, f))); +/** + * @since 2.0.0 + * @category combinators + */ +export const mapEffect = /*#__PURE__*/dual(2, (self, f) => make(core.flatMap(self.get, f))); +/** + * @since 2.0.0 + * @category constructors + */ +export const unwrap = effect => make(core.flatMap(effect, s => s.get)); +//# sourceMappingURL=Readable.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Record.js b/backend/node_modules/effect/dist/esm/Record.js new file mode 100644 index 0000000000000000000000000000000000000000..9c28395d7c446ca540e583dcb88445780dd8446d --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Record.js @@ -0,0 +1,846 @@ +/** + * This module provides utility functions for working with records in TypeScript. + * + * @since 2.0.0 + */ +import * as E from "./Either.js"; +import * as Equal from "./Equal.js"; +import { dual, identity } from "./Function.js"; +import * as Option from "./Option.js"; +/** + * Creates a new, empty record. + * + * @category constructors + * @since 2.0.0 + */ +export const empty = () => ({}); +/** + * Determine if a record is empty. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isEmptyRecord } from "effect/Record" + * + * assert.deepStrictEqual(isEmptyRecord({}), true); + * assert.deepStrictEqual(isEmptyRecord({ a: 3 }), false); + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isEmptyRecord = self => keys(self).length === 0; +/** + * Determine if a record is empty. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isEmptyReadonlyRecord } from "effect/Record" + * + * assert.deepStrictEqual(isEmptyReadonlyRecord({}), true); + * assert.deepStrictEqual(isEmptyReadonlyRecord({ a: 3 }), false); + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isEmptyReadonlyRecord = isEmptyRecord; +/** + * Takes an iterable and a projection function and returns a record. + * The projection function maps each value of the iterable to a tuple of a key and a value, which is then added to the resulting record. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { fromIterableWith } from "effect/Record" + * + * const input = [1, 2, 3, 4] + * + * assert.deepStrictEqual( + * fromIterableWith(input, a => [String(a), a * 2]), + * { '1': 2, '2': 4, '3': 6, '4': 8 } + * ) + * ``` + * + * @category constructors + * @since 2.0.0 + */ +export const fromIterableWith = /*#__PURE__*/dual(2, (self, f) => { + const out = empty(); + for (const a of self) { + const [k, b] = f(a); + out[k] = b; + } + return out; +}); +/** + * Creates a new record from an iterable, utilizing the provided function to determine the key for each element. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { fromIterableBy } from "effect/Record" + * + * const users = [ + * { id: "2", name: "name2" }, + * { id: "1", name: "name1" } + * ] + * + * assert.deepStrictEqual( + * fromIterableBy(users, user => user.id), + * { + * "2": { id: "2", name: "name2" }, + * "1": { id: "1", name: "name1" } + * } + * ) + * ``` + * + * @category constructors + * @since 2.0.0 + */ +export const fromIterableBy = (items, f) => fromIterableWith(items, a => [f(a), a]); +/** + * Builds a record from an iterable of key-value pairs. + * + * If there are conflicting keys when using `fromEntries`, the last occurrence of the key/value pair will overwrite the + * previous ones. So the resulting record will only have the value of the last occurrence of each key. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { fromEntries } from "effect/Record" + * + * const input: Array<[string, number]> = [["a", 1], ["b", 2]] + * + * assert.deepStrictEqual(fromEntries(input), { a: 1, b: 2 }) + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const fromEntries = Object.fromEntries; +/** + * Transforms the values of a record into an `Array` with a custom mapping function. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { collect } from "effect/Record" + * + * const x = { a: 1, b: 2, c: 3 } + * assert.deepStrictEqual(collect(x, (key, n) => [key, n]), [["a", 1], ["b", 2], ["c", 3]]) + * ``` + * + * @category conversions + * @since 2.0.0 + */ +export const collect = /*#__PURE__*/dual(2, (self, f) => { + const out = []; + for (const key of keys(self)) { + out.push(f(key, self[key])); + } + return out; +}); +/** + * Takes a record and returns an array of tuples containing its keys and values. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { toEntries } from "effect/Record" + * + * const x = { a: 1, b: 2, c: 3 } + * assert.deepStrictEqual(toEntries(x), [["a", 1], ["b", 2], ["c", 3]]) + * ``` + * + * @category conversions + * @since 2.0.0 + */ +export const toEntries = /*#__PURE__*/collect((key, value) => [key, value]); +/** + * Returns the number of key/value pairs in a record. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { size } from "effect/Record"; + * + * assert.deepStrictEqual(size({ a: "a", b: 1, c: true }), 3); + * ``` + * + * @since 2.0.0 + */ +export const size = self => keys(self).length; +/** + * Check if a given `key` exists in a record. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { empty, has } from "effect/Record" + * + * assert.deepStrictEqual(has({ a: 1, b: 2 }, "a"), true); + * assert.deepStrictEqual(has(empty(), "c"), false); + * ``` + * + * @since 2.0.0 + */ +export const has = /*#__PURE__*/dual(2, (self, key) => Object.prototype.hasOwnProperty.call(self, key)); +/** + * Retrieve a value at a particular key from a record, returning it wrapped in an `Option`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Record as R, Option } from "effect" + * + * const person: Record = { name: "John Doe", age: 35 } + * + * assert.deepStrictEqual(R.get(person, "name"), Option.some("John Doe")) + * assert.deepStrictEqual(R.get(person, "email"), Option.none()) + * ``` + * + * @since 2.0.0 + */ +export const get = /*#__PURE__*/dual(2, (self, key) => has(self, key) ? Option.some(self[key]) : Option.none()); +/** + * Apply a function to the element at the specified key, creating a new record. + * If the key does not exist, the record is returned unchanged. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Record as R } from "effect" + * + * const f = (x: number) => x * 2 + * + * assert.deepStrictEqual( + * R.modify({ a: 3 }, 'a', f), + * { a: 6 } + * ) + * assert.deepStrictEqual( + * R.modify({ a: 3 } as Record, 'b', f), + * { a: 3 } + * ) + * ``` + * + * @since 2.0.0 + */ +export const modify = /*#__PURE__*/dual(3, (self, key, f) => { + if (!has(self, key)) { + return { + ...self + }; + } + return { + ...self, + [key]: f(self[key]) + }; +}); +/** + * Apply a function to the element at the specified key, creating a new record, + * or return `None` if the key doesn't exist. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Record as R, Option } from "effect" + * + * const f = (x: number) => x * 2 + * + * assert.deepStrictEqual( + * R.modifyOption({ a: 3 }, 'a', f), + * Option.some({ a: 6 }) + * ) + * assert.deepStrictEqual( + * R.modifyOption({ a: 3 } as Record, 'b', f), + * Option.none() + * ) + * ``` + * + * @since 2.0.0 + */ +export const modifyOption = /*#__PURE__*/dual(3, (self, key, f) => { + if (!has(self, key)) { + return Option.none(); + } + return Option.some({ + ...self, + [key]: f(self[key]) + }); +}); +/** + * Replaces a value in the record with the new value passed as parameter. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Record, Option } from "effect" + * + * assert.deepStrictEqual( + * Record.replaceOption({ a: 1, b: 2, c: 3 }, 'a', 10), + * Option.some({ a: 10, b: 2, c: 3 }) + * ) + * assert.deepStrictEqual(Record.replaceOption(Record.empty(), 'a', 10), Option.none()) + * ``` + * + * @since 2.0.0 + */ +export const replaceOption = /*#__PURE__*/dual(3, (self, key, b) => modifyOption(self, key, () => b)); +/** + * If the given key exists in the record, returns a new record with the key removed, + * otherwise returns a copy of the original record. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { remove } from "effect/Record" + * + * assert.deepStrictEqual(remove({ a: 1, b: 2 }, "a"), { b: 2 }) + * ``` + * + * @since 2.0.0 + */ +export const remove = /*#__PURE__*/dual(2, (self, key) => { + if (!has(self, key)) { + return { + ...self + }; + } + const out = { + ...self + }; + delete out[key]; + return out; +}); +/** + * Retrieves the value of the property with the given `key` from a record and returns an `Option` + * of a tuple with the value and the record with the removed property. + * If the key is not present, returns `O.none`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Record as R, Option } from "effect" + * + * assert.deepStrictEqual(R.pop({ a: 1, b: 2 }, "a"), Option.some([1, { b: 2 }])) + * assert.deepStrictEqual(R.pop({ a: 1, b: 2 } as Record, "c"), Option.none()) + * ``` + * + * @category record + * @since 2.0.0 + */ +export const pop = /*#__PURE__*/dual(2, (self, key) => has(self, key) ? Option.some([self[key], remove(self, key)]) : Option.none()); +/** + * Maps a record into another record by applying a transformation function to each of its values. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { map } from "effect/Record" + * + * const f = (n: number) => `-${n}` + * + * assert.deepStrictEqual(map({ a: 3, b: 5 }, f), { a: "-3", b: "-5" }) + * + * const g = (n: number, key: string) => `${key.toUpperCase()}-${n}` + * + * assert.deepStrictEqual(map({ a: 3, b: 5 }, g), { a: "A-3", b: "B-5" }) + * ``` + * + * @category mapping + * @since 2.0.0 + */ +export const map = /*#__PURE__*/dual(2, (self, f) => { + const out = { + ...self + }; + for (const key of keys(self)) { + out[key] = f(self[key], key); + } + return out; +}); +/** + * Maps the keys of a `ReadonlyRecord` while preserving the corresponding values. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { mapKeys } from "effect/Record" + * + * assert.deepStrictEqual(mapKeys({ a: 3, b: 5 }, (key) => key.toUpperCase()), { A: 3, B: 5 }) + * ``` + * + * @category mapping + * @since 2.0.0 + */ +export const mapKeys = /*#__PURE__*/dual(2, (self, f) => { + const out = {}; + for (const key of keys(self)) { + const a = self[key]; + out[f(key, a)] = a; + } + return out; +}); +/** + * Maps entries of a `ReadonlyRecord` using the provided function, allowing modification of both keys and corresponding values. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { mapEntries } from "effect/Record" + * + * assert.deepStrictEqual(mapEntries({ a: 3, b: 5 }, (a, key) => [key.toUpperCase(), a + 1]), { A: 4, B: 6 }) + * ``` + * + * @category mapping + * @since 2.0.0 + */ +export const mapEntries = /*#__PURE__*/dual(2, (self, f) => { + const out = {}; + for (const key of keys(self)) { + const [k, b] = f(self[key], key); + out[k] = b; + } + return out; +}); +/** + * Transforms a record into a record by applying the function `f` to each key and value in the original record. + * If the function returns `Some`, the key-value pair is included in the output record. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Record, Option } from "effect" + * + * const x = { a: 1, b: 2, c: 3 } + * const f = (a: number, key: string) => a > 2 ? Option.some(a * 2) : Option.none() + * assert.deepStrictEqual(Record.filterMap(x, f), { c: 6 }) + * ``` + * + * @since 2.0.0 + */ +export const filterMap = /*#__PURE__*/dual(2, (self, f) => { + const out = empty(); + for (const key of keys(self)) { + const o = f(self[key], key); + if (Option.isSome(o)) { + out[key] = o.value; + } + } + return out; +}); +/** + * Selects properties from a record whose values match the given predicate. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { filter } from "effect/Record" + * + * const x = { a: 1, b: 2, c: 3, d: 4 } + * assert.deepStrictEqual(filter(x, (n) => n > 2), { c: 3, d: 4 }) + * ``` + * + * @category filtering + * @since 2.0.0 + */ +export const filter = /*#__PURE__*/dual(2, (self, predicate) => { + const out = empty(); + for (const key of keys(self)) { + if (predicate(self[key], key)) { + out[key] = self[key]; + } + } + return out; +}); +/** + * Given a record with `Option` values, returns a new record containing only the `Some` values, preserving the original keys. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Record, Option } from "effect" + * + * assert.deepStrictEqual( + * Record.getSomes({ a: Option.some(1), b: Option.none(), c: Option.some(2) }), + * { a: 1, c: 2 } + * ) + * ``` + * + * @category filtering + * @since 2.0.0 + */ +export const getSomes = /*#__PURE__*/filterMap(identity); +/** + * Given a record with `Either` values, returns a new record containing only the `Left` values, preserving the original keys. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Record, Either } from "effect" + * + * assert.deepStrictEqual( + * Record.getLefts({ a: Either.right(1), b: Either.left("err"), c: Either.right(2) }), + * { b: "err" } + * ) + * ``` + * + * @category filtering + * @since 2.0.0 + */ +export const getLefts = self => { + const out = empty(); + for (const key of keys(self)) { + const value = self[key]; + if (E.isLeft(value)) { + out[key] = value.left; + } + } + return out; +}; +/** + * Given a record with `Either` values, returns a new record containing only the `Right` values, preserving the original keys. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Record, Either } from "effect" + * + * assert.deepStrictEqual( + * Record.getRights({ a: Either.right(1), b: Either.left("err"), c: Either.right(2) }), + * { a: 1, c: 2 } + * ) + * ``` + * + * @category filtering + * @since 2.0.0 + */ +export const getRights = self => { + const out = empty(); + for (const key of keys(self)) { + const value = self[key]; + if (E.isRight(value)) { + out[key] = value.right; + } + } + return out; +}; +/** + * Partitions the elements of a record into two groups: those that match a predicate, and those that don't. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Record, Either } from "effect" + * + * const x = { a: 1, b: 2, c: 3 } + * const f = (n: number) => (n % 2 === 0 ? Either.right(n) : Either.left(n)) + * assert.deepStrictEqual(Record.partitionMap(x, f), [{ a: 1, c: 3 }, { b: 2}]) + * ``` + * + * @category filtering + * @since 2.0.0 + */ +export const partitionMap = /*#__PURE__*/dual(2, (self, f) => { + const left = empty(); + const right = empty(); + for (const key of keys(self)) { + const e = f(self[key], key); + if (E.isLeft(e)) { + left[key] = e.left; + } else { + right[key] = e.right; + } + } + return [left, right]; +}); +/** + * Partitions a record of `Either` values into two separate records, + * one with the `Left` values and one with the `Right` values. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Record, Either } from "effect" + * + * assert.deepStrictEqual( + * Record.separate({ a: Either.left("e"), b: Either.right(1) }), + * [{ a: "e" }, { b: 1 }] + * ) + * ``` + * + * @category filtering + * @since 2.0.0 + */ +export const separate = /*#__PURE__*/partitionMap(identity); +/** + * Partitions a record into two separate records based on the result of a predicate function. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { partition } from "effect/Record" + * + * assert.deepStrictEqual( + * partition({ a: 1, b: 3 }, (n) => n > 2), + * [{ a: 1 }, { b: 3 }] + * ) + * ``` + * + * @category filtering + * @since 2.0.0 + */ +export const partition = /*#__PURE__*/dual(2, (self, predicate) => { + const left = empty(); + const right = empty(); + for (const key of keys(self)) { + if (predicate(self[key], key)) { + right[key] = self[key]; + } else { + left[key] = self[key]; + } + } + return [left, right]; +}); +/** + * Retrieve the keys of a given record as an array. + * + * @since 2.0.0 + */ +export const keys = self => Object.keys(self); +/** + * Retrieve the values of a given record as an array. + * + * @since 2.0.0 + */ +export const values = self => collect(self, (_, a) => a); +/** + * Add a new key-value pair or update an existing key's value in a record. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { set } from "effect/Record" + * + * assert.deepStrictEqual(set("a", 5)({ a: 1, b: 2 }), { a: 5, b: 2 }); + * assert.deepStrictEqual(set("c", 5)({ a: 1, b: 2 }), { a: 1, b: 2, c: 5 }); + * ``` + * + * @since 2.0.0 + */ +export const set = /*#__PURE__*/dual(3, (self, key, value) => { + return { + ...self, + [key]: value + }; +}); +/** + * Replace a key's value in a record and return the updated record. + * If the key does not exist in the record, a copy of the original record is returned. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Record } from "effect" + * + * assert.deepStrictEqual(Record.replace("a", 3)({ a: 1, b: 2 }), { a: 3, b: 2 }); + * assert.deepStrictEqual(Record.replace("c", 3)({ a: 1, b: 2 }), { a: 1, b: 2 }); + * ``` + * + * @since 2.0.0 + */ +export const replace = /*#__PURE__*/dual(3, (self, key, value) => { + if (has(self, key)) { + return { + ...self, + [key]: value + }; + } + return { + ...self + }; +}); +/** + * Check if all the keys and values in one record are also found in another record. + * + * @since 2.0.0 + */ +export const isSubrecordBy = equivalence => dual(2, (self, that) => { + for (const key of keys(self)) { + if (!has(that, key) || !equivalence(self[key], that[key])) { + return false; + } + } + return true; +}); +/** + * Check if one record is a subrecord of another, meaning it contains all the keys and values found in the second record. + * This comparison uses default equality checks (`Equal.equivalence()`). + * + * @since 2.0.0 + */ +export const isSubrecord = /*#__PURE__*/isSubrecordBy(/*#__PURE__*/Equal.equivalence()); +/** + * Reduce a record to a single value by combining its entries with a specified function. + * + * @category folding + * @since 2.0.0 + */ +export const reduce = /*#__PURE__*/dual(3, (self, zero, f) => { + let out = zero; + for (const key of keys(self)) { + out = f(out, self[key], key); + } + return out; +}); +/** + * Check if all entries in a record meet a specific condition. + * + * @since 2.0.0 + */ +export const every = /*#__PURE__*/dual(2, (self, refinement) => { + for (const key of keys(self)) { + if (!refinement(self[key], key)) { + return false; + } + } + return true; +}); +/** + * Check if any entry in a record meets a specific condition. + * + * @since 2.0.0 + */ +export const some = /*#__PURE__*/dual(2, (self, predicate) => { + for (const key of keys(self)) { + if (predicate(self[key], key)) { + return true; + } + } + return false; +}); +/** + * Merge two records, preserving entries that exist in either of the records. + * + * @since 2.0.0 + */ +export const union = /*#__PURE__*/dual(3, (self, that, combine) => { + if (isEmptyRecord(self)) { + return { + ...that + }; + } + if (isEmptyRecord(that)) { + return { + ...self + }; + } + const out = empty(); + for (const key of keys(self)) { + if (has(that, key)) { + out[key] = combine(self[key], that[key]); + } else { + out[key] = self[key]; + } + } + for (const key of keys(that)) { + if (!has(out, key)) { + out[key] = that[key]; + } + } + return out; +}); +/** + * Merge two records, retaining only the entries that exist in both records. + * + * @since 2.0.0 + */ +export const intersection = /*#__PURE__*/dual(3, (self, that, combine) => { + const out = empty(); + if (isEmptyRecord(self) || isEmptyRecord(that)) { + return out; + } + for (const key of keys(self)) { + if (has(that, key)) { + out[key] = combine(self[key], that[key]); + } + } + return out; +}); +/** + * Merge two records, preserving only the entries that are unique to each record. + * + * @since 2.0.0 + */ +export const difference = /*#__PURE__*/dual(2, (self, that) => { + if (isEmptyRecord(self)) { + return { + ...that + }; + } + if (isEmptyRecord(that)) { + return { + ...self + }; + } + const out = {}; + for (const key of keys(self)) { + if (!has(that, key)) { + out[key] = self[key]; + } + } + for (const key of keys(that)) { + if (!has(self, key)) { + out[key] = that[key]; + } + } + return out; +}); +/** + * Create an `Equivalence` for records using the provided `Equivalence` for values. + * + * @category instances + * @since 2.0.0 + */ +export const getEquivalence = equivalence => { + const is = isSubrecordBy(equivalence); + return (self, that) => is(self, that) && is(that, self); +}; +/** + * Create a non-empty record from a single element. + * + * @category constructors + * @since 2.0.0 + */ +export const singleton = (key, value) => ({ + [key]: value +}); +/** + * Returns the first entry that satisfies the specified + * predicate, or `None` if no such entry exists. + * + * @example + * ```ts + * import { Record, Option } from "effect" + * + * const record = { a: 1, b: 2, c: 3 } + * const result = Record.findFirst(record, (value, key) => value > 1 && key !== "b") + * console.log(result) // Option.Some(["c", 3]) + * ``` + * + * @category elements + * @since 3.14.0 + */ +export const findFirst = /*#__PURE__*/dual(2, (self, f) => { + const k = keys(self); + for (let i = 0; i < k.length; i++) { + const key = k[i]; + if (f(self[key], key)) { + return Option.some([key, self[key]]); + } + } + return Option.none(); +}); +//# sourceMappingURL=Record.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Redacted.js.map b/backend/node_modules/effect/dist/esm/Redacted.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5ca1b4ee768e6411ed44eab3bd63fbb4e0b49112 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Redacted.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Redacted.js","names":["Equivalence","redacted_","RedactedTypeId","isRedacted","make","value","unsafeWipe","getEquivalence","isEquivalent","x","y"],"sources":["../../src/Redacted.ts"],"sourcesContent":[null],"mappings":"AASA,OAAO,KAAKA,WAAW,MAAM,kBAAkB;AAC/C,OAAO,KAAKC,SAAS,MAAM,wBAAwB;AAInD;;;;AAIA,OAAO,MAAMC,cAAc,GAAkBD,SAAS,CAACC,cAAc;AAoCrE;;;;AAIA,OAAO,MAAMC,UAAU,GAA2CF,SAAS,CAACE,UAAU;AAEtF;;;;;;;;;;;;;;AAcA,OAAO,MAAMC,IAAI,GAAiCH,SAAS,CAACG,IAAI;AAEhE;;;;;;;;;;;;;;;;;AAiBA,OAAO,MAAMC,KAAK,GAAgCJ,SAAS,CAACI,KAAK;AAEjE;;;;;;;;;;;;;;;;;;;;;;AAsBA,OAAO,MAAMC,UAAU,GAAsCL,SAAS,CAACK,UAAU;AAEjF;;;;;;;;;;;;;;;;;;;;;;;AAuBA,OAAO,MAAMC,cAAc,GAAOC,YAAwC,IACxER,WAAW,CAACI,IAAI,CAAC,CAACK,CAAC,EAAEC,CAAC,KAAKF,YAAY,CAACH,KAAK,CAACI,CAAC,CAAC,EAAEJ,KAAK,CAACK,CAAC,CAAC,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Ref.js b/backend/node_modules/effect/dist/esm/Ref.js new file mode 100644 index 0000000000000000000000000000000000000000..bfb719667f0a72f7aa5da5ee47b838ce86a4d2a0 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Ref.js @@ -0,0 +1,77 @@ +import * as internal from "./internal/ref.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const RefTypeId = internal.RefTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * @since 2.0.0 + * @category getters + */ +export const get = internal.get; +/** + * @since 2.0.0 + * @category utils + */ +export const getAndSet = internal.getAndSet; +/** + * @since 2.0.0 + * @category utils + */ +export const getAndUpdate = internal.getAndUpdate; +/** + * @since 2.0.0 + * @category utils + */ +export const getAndUpdateSome = internal.getAndUpdateSome; +/** + * @since 2.0.0 + * @category utils + */ +export const modify = internal.modify; +/** + * @since 2.0.0 + * @category utils + */ +export const modifySome = internal.modifySome; +/** + * @since 2.0.0 + * @category utils + */ +export const set = internal.set; +/** + * @since 2.0.0 + * @category utils + */ +export const setAndGet = internal.setAndGet; +/** + * @since 2.0.0 + * @category utils + */ +export const update = internal.update; +/** + * @since 2.0.0 + * @category utils + */ +export const updateAndGet = internal.updateAndGet; +/** + * @since 2.0.0 + * @category utils + */ +export const updateSome = internal.updateSome; +/** + * @since 2.0.0 + * @category utils + */ +export const updateSomeAndGet = internal.updateSomeAndGet; +/** + * @since 2.0.0 + * @category unsafe + */ +export const unsafeMake = internal.unsafeMake; +//# sourceMappingURL=Ref.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/RegExp.js b/backend/node_modules/effect/dist/esm/RegExp.js new file mode 100644 index 0000000000000000000000000000000000000000..6d03d76b539e182b6146e425d86d31dd43500411 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/RegExp.js @@ -0,0 +1,37 @@ +/** + * This module provides utility functions for working with RegExp in TypeScript. + * + * @since 2.0.0 + */ +import * as predicate from "./Predicate.js"; +/** + * Tests if a value is a `RegExp`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { RegExp } from "effect" + * + * assert.deepStrictEqual(RegExp.isRegExp(/a/), true) + * assert.deepStrictEqual(RegExp.isRegExp("a"), false) + * ``` + * + * @category guards + * @since 3.9.0 + */ +export const isRegExp = predicate.isRegExp; +/** + * Escapes special characters in a regular expression pattern. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { RegExp } from "effect" + * + * assert.deepStrictEqual(RegExp.escape("a*b"), "a\\*b") + * ``` + * + * @since 2.0.0 + */ +export const escape = string => string.replace(/[/\\^$*+?.()|[\]{}]/g, "\\$&"); +//# sourceMappingURL=RegExp.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/RegExp.js.map b/backend/node_modules/effect/dist/esm/RegExp.js.map new file mode 100644 index 0000000000000000000000000000000000000000..7c29c1be3355e5edd5f78cbdd3ea36f68aa7500a --- /dev/null +++ b/backend/node_modules/effect/dist/esm/RegExp.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RegExp.js","names":["predicate","isRegExp","escape","string","replace"],"sources":["../../src/RegExp.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;AAKA,OAAO,KAAKA,SAAS,MAAM,gBAAgB;AAE3C;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,QAAQ,GAAwCD,SAAS,CAACC,QAAQ;AAE/E;;;;;;;;;;;;;AAaA,OAAO,MAAMC,MAAM,GAAIC,MAAc,IAAaA,MAAM,CAACC,OAAO,CAAC,sBAAsB,EAAE,MAAM,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Reloadable.js.map b/backend/node_modules/effect/dist/esm/Reloadable.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5b2aabfe89e2fa7487603239ffad94da335465c1 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Reloadable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Reloadable.js","names":["internal","ReloadableTypeId","auto","autoFromConfig","get","manual","reload","tag","reloadableTag","reloadFork"],"sources":["../../src/Reloadable.ts"],"sourcesContent":[null],"mappings":"AAKA,OAAO,KAAKA,QAAQ,MAAM,0BAA0B;AAMpD;;;;AAIA,OAAO,MAAMC,gBAAgB,GAAkBD,QAAQ,CAACC,gBAAgB;AAyCxE;;;;;;;;AAQA,OAAO,MAAMC,IAAI,GAG4BF,QAAQ,CAACE,IAAI;AAE1D;;;;;;;;AAQA,OAAO,MAAMC,cAAc,GAMkBH,QAAQ,CAACG,cAAc;AAEpE;;;;;;AAMA,OAAO,MAAMC,GAAG,GAA6EJ,QAAQ,CAACI,GAAG;AAEzG;;;;;;;AAOA,OAAO,MAAMC,MAAM,GAGsBL,QAAQ,CAACK,MAAM;AAExD;;;;;;AAMA,OAAO,MAAMC,MAAM,GAAkFN,QAAQ,CAACM,MAAM;AAEpH;;;;AAIA,OAAO,MAAMC,GAAG,GAAgFP,QAAQ,CAACQ,aAAa;AAEtH;;;;;;AAMA,OAAO,MAAMC,UAAU,GACrBT,QAAQ,CAACS,UAAU","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Request.js.map b/backend/node_modules/effect/dist/esm/Request.js.map new file mode 100644 index 0000000000000000000000000000000000000000..6940d2c68c446dcedbf14508885d7edb4f98f3df --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Request.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Request.js","names":["RequestBlock_","cache","core","fiberRuntime","internal","RequestTypeId","isRequest","of","tagged","Class","TaggedClass","complete","interruptWhenPossible","completeEffect","fail","failCause","succeed","makeCache","options","make","lookup","map","deferredMake","handle","listeners","Listeners","EntryTypeId","Symbol","for","isEntry","makeEntry"],"sources":["../../src/Request.ts"],"sources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,EAAGC,MAAM,KAAM;IAAEC,SAAS,EAAE,IAAIpB,QAAQ,CAACqB,SAAS,EAAE;IAAEF;EAAM,CAAE,CAAC;CAChH,CAAC;AAEJ;;;;AAIA,OAAO,MAAMG,WAAW,gBAAkBC,MAAM,CAACC,GAAG,CAAC,2BAA2B,CAAC;AA+CjF;;;;AAIA,OAAO,MAAMC,OAAO,GAAG7B,aAAa,CAAC6B,OAAO;AAE5C;;;;AAIA,OAAO,MAAMC,SAAS,GAAG9B,aAAa,CAAC8B,SAAS","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Runtime.js.map b/backend/node_modules/effect/dist/esm/Runtime.js.map new file mode 100644 index 0000000000000000000000000000000000000000..9a55774c0940b3b34db6c10c2cf8affa844d609a --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Runtime.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Runtime.js","names":["internal","runFork","unsafeFork","runSyncExit","unsafeRunSyncExit","runSync","unsafeRunSync","runCallback","unsafeRunCallback","runPromise","unsafeRunPromise","runPromiseExit","unsafeRunPromiseExit","defaultRuntime","defaultRuntimeFlags","make","FiberFailureId","Symbol","for","FiberFailureCauseId","isAsyncFiberException","isFiberFailure","makeFiberFailure","fiberFailure","updateRuntimeFlags","enableRuntimeFlag","disableRuntimeFlag","updateContext","provideService","updateFiberRefs","setFiberRef","deleteFiberRef"],"sources":["../../src/Runtime.ts"],"sourcesContent":[null],"mappings":"AAYA,OAAO,KAAKA,QAAQ,MAAM,uBAAuB;AAgEjD;;;;;;;AAOA,OAAO,MAAMC,OAAO,GAqBhBD,QAAQ,CAACE,UAAU;AAEvB;;;;;;;;;AASA,OAAO,MAAMC,WAAW,GAqBpBH,QAAQ,CAACI,iBAAiB;AAE9B;;;;;;;;;AASA,OAAO,MAAMC,OAAO,GAqBhBL,QAAQ,CAACM,aAAa;AAU1B;;;;;;;;;;AAUA,OAAO,MAAMC,WAAW,GA8BpBP,QAAQ,CAACQ,iBAAi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;;;;;;;;;;;;;AAkBA,OAAO,MAAMC,cAAc,GAuCvB/B,QAAQ,CAAC+B,cAAc","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/STM.js b/backend/node_modules/effect/dist/esm/STM.js new file mode 100644 index 0000000000000000000000000000000000000000..06ed48868d5d0d75686fc094d8bb8266397d7106 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/STM.js @@ -0,0 +1,1002 @@ +/** + * @since 2.0.0 + */ +import * as Cause from "./Cause.js"; +import * as Chunk from "./Chunk.js"; +import * as core from "./internal/stm/core.js"; +import * as stm from "./internal/stm/stm.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const STMTypeId = core.STMTypeId; +/** + * Returns `true` if the provided value is an `STM`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isSTM = core.isSTM; +/** + * Treats the specified `acquire` transaction as the acquisition of a + * resource. The `acquire` transaction will be executed interruptibly. If it + * is a success and is committed the specified `release` workflow will be + * executed uninterruptibly as soon as the `use` workflow completes execution. + * + * @since 2.0.0 + * @category constructors + */ +export const acquireUseRelease = stm.acquireUseRelease; +/** + * Runs all the provided transactional effects in sequence respecting the + * structure provided in input. + * + * Supports multiple arguments, a single argument tuple / array or record / + * struct. + * + * @since 2.0.0 + * @category constructors + */ +export const all = stm.all; +/** + * Maps the success value of this effect to the specified constant value. + * + * @since 2.0.0 + * @category mapping + */ +export const as = stm.as; +/** + * Maps the success value of this effect to an optional value. + * + * @since 2.0.0 + * @category mapping + */ +export const asSome = stm.asSome; +/** + * Maps the error value of this effect to an optional value. + * + * @since 2.0.0 + * @category mapping + */ +export const asSomeError = stm.asSomeError; +/** + * This function maps the success value of an `STM` to `void`. If the original + * `STM` succeeds, the returned `STM` will also succeed. If the original `STM` + * fails, the returned `STM` will fail with the same error. + * + * @since 2.0.0 + * @category mapping + */ +export const asVoid = stm.asVoid; +/** + * Creates an `STM` value from a partial (but pure) function. + * + * @since 2.0.0 + * @category constructors + */ +export const attempt = stm.attempt; +/** + * Recovers from all errors. + * + * @since 2.0.0 + * @category error handling + */ +export const catchAll = core.catchAll; +/** + * Recovers from some or all of the error cases. + * + * @since 2.0.0 + * @category error handling + */ +export const catchSome = stm.catchSome; +/** + * Recovers from the specified tagged error. + * + * @since 2.0.0 + * @category error handling + */ +export const catchTag = stm.catchTag; +/** + * Recovers from multiple tagged errors. + * + * @since 2.0.0 + * @category error handling + */ +export const catchTags = stm.catchTags; +/** + * Checks the condition, and if it's true, returns unit, otherwise, retries. + * + * @since 2.0.0 + * @category constructors + */ +export const check = stm.check; +/** + * Simultaneously filters and maps the value produced by this effect. + * + * @since 2.0.0 + * @category mutations + */ +export const collect = stm.collect; +/** + * Simultaneously filters and maps the value produced by this effect. + * + * @since 2.0.0 + * @category mutations + */ +export const collectSTM = stm.collectSTM; +/** + * Commits this transaction atomically. + * + * @since 2.0.0 + * @category destructors + */ +export const commit = core.commit; +/** + * Commits this transaction atomically, regardless of whether the transaction + * is a success or a failure. + * + * @since 2.0.0 + * @category destructors + */ +export const commitEither = stm.commitEither; +/** + * Similar to Either.cond, evaluate the predicate, return the given A as + * success if predicate returns true, and the given E as error otherwise + * + * @since 2.0.0 + * @category constructors + */ +export const cond = stm.cond; +/** + * Retrieves the environment inside an stm. + * + * @since 2.0.0 + * @category constructors + */ +export const context = core.context; +/** + * Accesses the environment of the transaction to perform a transaction. + * + * @since 2.0.0 + * @category constructors + */ +export const contextWith = core.contextWith; +/** + * Accesses the environment of the transaction to perform a transaction. + * + * @since 2.0.0 + * @category constructors + */ +export const contextWithSTM = core.contextWithSTM; +/** + * Transforms the environment being provided to this effect with the specified + * function. + * + * @since 2.0.0 + * @category context + */ +export const mapInputContext = core.mapInputContext; +/** + * Fails the transactional effect with the specified defect. + * + * @since 2.0.0 + * @category constructors + */ +export const die = core.die; +/** + * Kills the fiber running the effect with a `Cause.RuntimeException` that + * contains the specified message. + * + * @since 2.0.0 + * @category constructors + */ +export const dieMessage = core.dieMessage; +/** + * Fails the transactional effect with the specified lazily evaluated defect. + * + * @since 2.0.0 + * @category constructors + */ +export const dieSync = core.dieSync; +/** + * Converts the failure channel into an `Either`. + * + * @since 2.0.0 + * @category mutations + */ +export const either = stm.either; +/** + * Executes the specified finalization transaction whether or not this effect + * succeeds. Note that as with all STM transactions, if the full transaction + * fails, everything will be rolled back. + * + * @since 2.0.0 + * @category finalization + */ +export const ensuring = core.ensuring; +/** + * Returns an effect that ignores errors and runs repeatedly until it + * eventually succeeds. + * + * @since 2.0.0 + * @category mutations + */ +export const eventually = stm.eventually; +/** + * Determines whether all elements of the `Iterable` satisfy the effectual + * predicate. + * + * @since 2.0.0 + * @category constructors + */ +export const every = stm.every; +/** + * Determines whether any element of the `Iterable[A]` satisfies the effectual + * predicate `f`. + * + * @since 2.0.0 + * @category constructors + */ +export const exists = stm.exists; +/** + * Fails the transactional effect with the specified error. + * + * @since 2.0.0 + * @category constructors + */ +export const fail = core.fail; +/** + * Fails the transactional effect with the specified lazily evaluated error. + * + * @since 2.0.0 + * @category constructors + */ +export const failSync = core.failSync; +/** + * Returns the fiber id of the fiber committing the transaction. + * + * @since 2.0.0 + * @category constructors + */ +export const fiberId = stm.fiberId; +/** + * Filters the collection using the specified effectual predicate. + * + * @since 2.0.0 + * @category constructors + */ +export const filter = stm.filter; +/** + * Filters the collection using the specified effectual predicate, removing + * all elements that satisfy the predicate. + * + * @since 2.0.0 + * @category constructors + */ +export const filterNot = stm.filterNot; +/** + * Dies with specified defect if the predicate fails. + * + * @since 2.0.0 + * @category filtering + */ +export const filterOrDie = stm.filterOrDie; +/** + * Dies with a `Cause.RuntimeException` having the specified message if the + * predicate fails. + * + * @since 2.0.0 + * @category filtering + */ +export const filterOrDieMessage = stm.filterOrDieMessage; +/** + * Supplies `orElse` if the predicate fails. + * + * @since 2.0.0 + * @category filtering + */ +export const filterOrElse = stm.filterOrElse; +/** + * Fails with the specified error if the predicate fails. + * + * @since 2.0.0 + * @category filtering + */ +export const filterOrFail = stm.filterOrFail; +/** + * Feeds the value produced by this effect to the specified function, and then + * runs the returned effect as well to produce its results. + * + * @since 2.0.0 + * @category sequencing + */ +export const flatMap = core.flatMap; +/** + * Flattens out a nested `STM` effect. + * + * @since 2.0.0 + * @category sequencing + */ +export const flatten = stm.flatten; +/** + * Flips the success and failure channels of this transactional effect. This + * allows you to use all methods on the error channel, possibly before + * flipping back. + * + * @since 2.0.0 + * @category mutations + */ +export const flip = stm.flip; +/** + * Swaps the error/value parameters, applies the function `f` and flips the + * parameters back + * + * @since 2.0.0 + * @category mutations + */ +export const flipWith = stm.flipWith; +/** + * Folds over the `STM` effect, handling both failure and success, but not + * retry. + * + * @since 2.0.0 + * @category folding + */ +export const match = stm.match; +/** + * Effectfully folds over the `STM` effect, handling both failure and success. + * + * @since 2.0.0 + * @category folding + */ +export const matchSTM = core.matchSTM; +/** + * Applies the function `f` to each element of the `Iterable` and returns + * a transactional effect that produces a new `Chunk`. + * + * @since 2.0.0 + * @category traversing + */ +export const forEach = stm.forEach; +/** + * Lifts an `Either` into a `STM`. + * + * @since 2.0.0 + * @category constructors + */ +export const fromEither = stm.fromEither; +/** + * Lifts an `Option` into a `STM`. + * + * @since 2.0.0 + * @category constructors + */ +export const fromOption = stm.fromOption; +/** + * @since 2.0.0 + * @category constructors + */ +export const gen = stm.gen; +/** + * Returns a successful effect with the head of the list if the list is + * non-empty or fails with the error `None` if the list is empty. + * + * @since 2.0.0 + * @category getters + */ +export const head = stm.head; +const if_ = stm.if_; +export { +/** + * Runs `onTrue` if the result of `b` is `true` and `onFalse` otherwise. + * + * @since 2.0.0 + * @category mutations + */ +if_ as if }; +/** + * Returns a new effect that ignores the success or failure of this effect. + * + * @since 2.0.0 + * @category mutations + */ +export const ignore = stm.ignore; +/** + * Interrupts the fiber running the effect. + * + * @since 2.0.0 + * @category constructors + */ +export const interrupt = core.interrupt; +/** + * Interrupts the fiber running the effect with the specified `FiberId`. + * + * @since 2.0.0 + * @category constructors + */ +export const interruptAs = core.interruptAs; +/** + * Returns whether this transactional effect is a failure. + * + * @since 2.0.0 + * @category getters + */ +export const isFailure = stm.isFailure; +/** + * Returns whether this transactional effect is a success. + * + * @since 2.0.0 + * @category getters + */ +export const isSuccess = stm.isSuccess; +/** + * Iterates with the specified transactional function. The moral equivalent + * of: + * + * ```ts skip-type-checking + * const s = initial + * + * while (cont(s)) { + * s = body(s) + * } + * + * return s + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const iterate = stm.iterate; +/** + * Loops with the specified transactional function, collecting the results + * into a list. The moral equivalent of: + * + * ```ts skip-type-checking + * const as = [] + * let s = initial + * + * while (cont(s)) { + * as.push(body(s)) + * s = inc(s) + * } + * + * return as + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const loop = stm.loop; +/** + * Maps the value produced by the effect. + * + * @since 2.0.0 + * @category mapping + */ +export const map = core.map; +/** + * Maps the value produced by the effect with the specified function that may + * throw exceptions but is otherwise pure, translating any thrown exceptions + * into typed failed effects. + * + * @since 2.0.0 + * @category mapping + */ +export const mapAttempt = stm.mapAttempt; +/** + * Returns an `STM` effect whose failure and success channels have been mapped + * by the specified pair of functions, `f` and `g`. + * + * @since 2.0.0 + * @category mapping + */ +export const mapBoth = stm.mapBoth; +/** + * Maps from one error type to another. + * + * @since 2.0.0 + * @category mapping + */ +export const mapError = stm.mapError; +/** + * Returns a new effect where the error channel has been merged into the + * success channel to their common combined type. + * + * @since 2.0.0 + * @category mutations + */ +export const merge = stm.merge; +/** + * Merges an `Iterable` to a single `STM`, working sequentially. + * + * @since 2.0.0 + * @category constructors + */ +export const mergeAll = stm.mergeAll; +/** + * Returns a new effect where boolean value of this effect is negated. + * + * @since 2.0.0 + * @category mutations + */ +export const negate = stm.negate; +/** + * Requires the option produced by this value to be `None`. + * + * @since 2.0.0 + * @category mutations + */ +export const none = stm.none; +/** + * Converts the failure channel into an `Option`. + * + * @since 2.0.0 + * @category mutations + */ +export const option = stm.option; +/** + * Translates `STM` effect failure into death of the fiber, making all + * failures unchecked and not a part of the type of the effect. + * + * @since 2.0.0 + * @category error handling + */ +export const orDie = stm.orDie; +/** + * Keeps none of the errors, and terminates the fiber running the `STM` effect + * with them, using the specified function to convert the `E` into a defect. + * + * @since 2.0.0 + * @category error handling + */ +export const orDieWith = stm.orDieWith; +/** + * Tries this effect first, and if it fails or retries, tries the other + * effect. + * + * @since 2.0.0 + * @category error handling + */ +export const orElse = stm.orElse; +/** + * Returns a transactional effect that will produce the value of this effect + * in left side, unless it fails or retries, in which case, it will produce + * the value of the specified effect in right side. + * + * @since 2.0.0 + * @category error handling + */ +export const orElseEither = stm.orElseEither; +/** + * Tries this effect first, and if it fails or retries, fails with the + * specified error. + * + * @since 2.0.0 + * @category error handling + */ +export const orElseFail = stm.orElseFail; +/** + * Returns an effect that will produce the value of this effect, unless it + * fails with the `None` value, in which case it will produce the value of the + * specified effect. + * + * @since 2.0.0 + * @category error handling + */ +export const orElseOptional = stm.orElseOptional; +/** + * Tries this effect first, and if it fails or retries, succeeds with the + * specified value. + * + * @since 2.0.0 + * @category error handling + */ +export const orElseSucceed = stm.orElseSucceed; +/** + * Tries this effect first, and if it enters retry, then it tries the other + * effect. This is an equivalent of Haskell's orElse. + * + * @since 2.0.0 + * @category error handling + */ +export const orTry = core.orTry; +/** + * Feeds elements of type `A` to a function `f` that returns an effect. + * Collects all successes and failures in a tupled fashion. + * + * @since 2.0.0 + * @category traversing + */ +export const partition = stm.partition; +/** + * Provides the transaction its required environment, which eliminates its + * dependency on `R`. + * + * @since 2.0.0 + * @category context + */ +export const provideContext = stm.provideContext; +/** + * Splits the context into two parts, providing one part using the + * specified layer and leaving the remainder `R0`. + * + * @since 2.0.0 + * @category context + */ +export const provideSomeContext = stm.provideSomeContext; +/** + * Provides the effect with the single service it requires. If the transactional + * effect requires more than one service use `provideEnvironment` instead. + * + * @since 2.0.0 + * @category context + */ +export const provideService = stm.provideService; +/** + * Provides the effect with the single service it requires. If the transactional + * effect requires more than one service use `provideEnvironment` instead. + * + * @since 2.0.0 + * @category context + */ +export const provideServiceSTM = stm.provideServiceSTM; +/** + * Folds an `Iterable` using an effectual function f, working sequentially + * from left to right. + * + * @since 2.0.0 + * @category constructors + */ +export const reduce = stm.reduce; +/** + * Reduces an `Iterable` to a single `STM`, working sequentially. + * + * @since 2.0.0 + * @category constructors + */ +export const reduceAll = stm.reduceAll; +/** + * Folds an `Iterable` using an effectual function f, working sequentially + * from right to left. + * + * @since 2.0.0 + * @category constructors + */ +export const reduceRight = stm.reduceRight; +/** + * Keeps some of the errors, and terminates the fiber with the rest. + * + * @since 2.0.0 + * @category mutations + */ +export const refineOrDie = stm.refineOrDie; +/** + * Keeps some of the errors, and terminates the fiber with the rest, using the + * specified function to convert the `E` into a `Throwable`. + * + * @since 2.0.0 + * @category mutations + */ +export const refineOrDieWith = stm.refineOrDieWith; +/** + * Fail with the returned value if the `PartialFunction` matches, otherwise + * continue with our held value. + * + * @since 2.0.0 + * @category mutations + */ +export const reject = stm.reject; +/** + * Continue with the returned computation if the specified partial function + * matches, translating the successful match into a failure, otherwise continue + * with our held value. + * + * @since 2.0.0 + * @category mutations + */ +export const rejectSTM = stm.rejectSTM; +/** + * Repeats this `STM` effect until its result satisfies the specified + * predicate. + * + * **WARNING**: `repeatUntil` uses a busy loop to repeat the effect and will + * consume a thread until it completes (it cannot yield). This is because STM + * describes a single atomic transaction which must either complete, retry or + * fail a transaction before yielding back to the Effect runtime. + * - Use `retryUntil` instead if you don't need to maintain transaction + * state for repeats. + * - Ensure repeating the STM effect will eventually satisfy the predicate. + * + * @since 2.0.0 + * @category mutations + */ +export const repeatUntil = stm.repeatUntil; +/** + * Repeats this `STM` effect while its result satisfies the specified + * predicate. + * + * **WARNING**: `repeatWhile` uses a busy loop to repeat the effect and will + * consume a thread until it completes (it cannot yield). This is because STM + * describes a single atomic transaction which must either complete, retry or + * fail a transaction before yielding back to the Effect runtime. + * - Use `retryWhile` instead if you don't need to maintain transaction + * state for repeats. + * - Ensure repeating the STM effect will eventually not satisfy the + * predicate. + * + * @since 2.0.0 + * @category mutations + */ +export const repeatWhile = stm.repeatWhile; +/** + * Replicates the given effect n times. If 0 or negative numbers are given, an + * empty `Chunk` will be returned. + * + * @since 2.0.0 + * @category constructors + */ +export const replicate = stm.replicate; +/** + * Performs this transaction the specified number of times and collects the + * results. + * + * @since 2.0.0 + * @category constructors + */ +export const replicateSTM = stm.replicateSTM; +/** + * Performs this transaction the specified number of times, discarding the + * results. + * + * @since 2.0.0 + * @category constructors + */ +export const replicateSTMDiscard = stm.replicateSTMDiscard; +/** + * Abort and retry the whole transaction when any of the underlying + * transactional variables have changed. + * + * @since 2.0.0 + * @category error handling + */ +export const retry = core.retry; +/** + * Filters the value produced by this effect, retrying the transaction until + * the predicate returns `true` for the value. + * + * @since 2.0.0 + * @category mutations + */ +export const retryUntil = stm.retryUntil; +/** + * Filters the value produced by this effect, retrying the transaction while + * the predicate returns `true` for the value. + * + * @since 2.0.0 + * @category mutations + */ +export const retryWhile = stm.retryWhile; +/** + * Converts an option on values into an option on errors. + * + * @since 2.0.0 + * @category getters + */ +export const some = stm.some; +/** + * Returns an `STM` effect that succeeds with the specified value. + * + * @since 2.0.0 + * @category constructors + */ +export const succeed = core.succeed; +/** + * Returns an effect with the empty value. + * + * @since 2.0.0 + * @category constructors + */ +export const succeedNone = stm.succeedNone; +/** + * Returns an effect with the optional value. + * + * @since 2.0.0 + * @category constructors + */ +export const succeedSome = stm.succeedSome; +/** + * Summarizes a `STM` effect by computing a provided value before and after + * execution, and then combining the values to produce a summary, together + * with the result of execution. + * + * @since 2.0.0 + * @category mutations + */ +export const summarized = stm.summarized; +/** + * Suspends creation of the specified transaction lazily. + * + * @since 2.0.0 + * @category constructors + */ +export const suspend = stm.suspend; +/** + * Returns an `STM` effect that succeeds with the specified lazily evaluated + * value. + * + * @since 2.0.0 + * @category constructors + */ +export const sync = core.sync; +/** + * "Peeks" at the success of transactional effect. + * + * @since 2.0.0 + * @category sequencing + */ +export const tap = stm.tap; +/** + * "Peeks" at both sides of an transactional effect. + * + * @since 2.0.0 + * @category sequencing + */ +export const tapBoth = stm.tapBoth; +/** + * "Peeks" at the error of the transactional effect. + * + * @since 2.0.0 + * @category sequencing + */ +export const tapError = stm.tapError; +const try_ = stm.try_; +export { +/** + * Imports a synchronous side-effect into a pure value, translating any thrown + * exceptions into typed failed effects. + * + * @since 2.0.0 + * @category constructors + */ +try_ as try }; +/** + * The moral equivalent of `if (!p) exp` + * + * @since 2.0.0 + * @category mutations + */ +export const unless = stm.unless; +/** + * The moral equivalent of `if (!p) exp` when `p` has side-effects + * + * @since 2.0.0 + * @category mutations + */ +export const unlessSTM = stm.unlessSTM; +/** + * Converts an option on errors into an option on values. + * + * @since 2.0.0 + * @category getters + */ +export const unsome = stm.unsome; +const void_ = stm.void; +export { +/** + * Returns an `STM` effect that succeeds with `void`. + * + * @since 2.0.0 + * @category constructors + */ +void_ as void }; +/** + * Feeds elements of type `A` to `f` and accumulates all errors in error + * channel or successes in success channel. + * + * This combinator is lossy meaning that if there are errors all successes + * will be lost. To retain all information please use `STM.partition`. + * + * @since 2.0.0 + * @category mutations + */ +export const validateAll = stm.validateAll; +/** + * Feeds elements of type `A` to `f` until it succeeds. Returns first success + * or the accumulation of all errors. + * + * @since 2.0.0 + * @category mutations + */ +export const validateFirst = stm.validateFirst; +/** + * The moral equivalent of `if (p) exp`. + * + * @since 2.0.0 + * @category mutations + */ +export const when = stm.when; +/** + * The moral equivalent of `if (p) exp` when `p` has side-effects. + * + * @since 2.0.0 + * @category mutations + */ +export const whenSTM = stm.whenSTM; +/** + * Sequentially zips this value with the specified one. + * + * @since 2.0.0 + * @category zipping + */ +export const zip = core.zip; +/** + * Sequentially zips this value with the specified one, discarding the second + * element of the tuple. + * + * @since 2.0.0 + * @category zipping + */ +export const zipLeft = core.zipLeft; +/** + * Sequentially zips this value with the specified one, discarding the first + * element of the tuple. + * + * @since 2.0.0 + * @category zipping + */ +export const zipRight = core.zipRight; +/** + * Sequentially zips this value with the specified one, combining the values + * using the specified combiner function. + * + * @since 2.0.0 + * @category zipping + */ +export const zipWith = core.zipWith; +/** + * This function takes an iterable of `STM` values and returns a new + * `STM` value that represents the first `STM` value in the iterable + * that succeeds. If all of the `Effect` values in the iterable fail, then + * the resulting `STM` value will fail as well. + * + * This function is sequential, meaning that the `STM` values in the + * iterable will be executed in sequence, and the first one that succeeds + * will determine the outcome of the resulting `STM` value. + * + * Returns a new `STM` value that represents the first successful + * `STM` value in the iterable, or a failed `STM` value if all of the + * `STM` values in the iterable fail. + * + * @since 2.0.0 + * @category elements + */ +export const firstSuccessOf = effects => suspend(() => { + const list = Chunk.fromIterable(effects); + if (!Chunk.isNonEmpty(list)) { + return dieSync(() => new Cause.IllegalArgumentException(`Received an empty collection of effects`)); + } + return Chunk.reduce(Chunk.tailNonEmpty(list), Chunk.headNonEmpty(list), (left, right) => orElse(left, () => right)); +}); +/** + * @category do notation + * @since 2.0.0 + */ +export const Do = /*#__PURE__*/succeed({}); +/** + * @category do notation + * @since 2.0.0 + */ +export const bind = stm.bind; +const let_ = stm.let_; +export { +/** + * @category do notation + * @since 2.0.0 + */ +let_ as let }; +/** + * @category do notation + * @since 2.0.0 + */ +export const bindTo = stm.bindTo; +//# sourceMappingURL=STM.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Schedule.js b/backend/node_modules/effect/dist/esm/Schedule.js new file mode 100644 index 0000000000000000000000000000000000000000..0f8021a08c37c6e24254d9e39fc762e5165c7654 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Schedule.js @@ -0,0 +1,1595 @@ +import * as internal from "./internal/schedule.js"; +/** + * @since 2.0.0 + * @category Symbols + */ +export const ScheduleTypeId = internal.ScheduleTypeId; +/** + * @since 2.0.0 + * @category Symbols + */ +export const ScheduleDriverTypeId = internal.ScheduleDriverTypeId; +/** + * Creates a new schedule with a custom state and step function. + * + * **Details** + * + * This function constructs a `Schedule` by defining its initial state and a + * step function, which determines how the schedule progresses over time. The + * step function is called on each iteration with the current time, an input + * value, and the schedule's current state. It returns the next state, an output + * value, and a decision on whether the schedule should continue or stop. + * + * This function is useful for creating custom scheduling logic that goes beyond + * predefined schedules like fixed intervals or exponential backoff. It allows + * full control over how the schedule behaves at each step. + * + * @since 2.0.0 + * @category Constructors + */ +export const makeWithState = internal.makeWithState; +/** + * Checks whether a given value is a `Schedule`. + * + * @since 2.0.0 + * @category Guards + */ +export const isSchedule = internal.isSchedule; +/** + * Adds a delay to every interval in a schedule. + * + * **Details** + * + * This function modifies a given schedule by applying an additional delay to + * every interval it defines. The delay is determined by the provided function, + * which takes the schedule's output and returns a delay duration. + * + * @see {@link addDelayEffect} If you need to compute the delay using an effectful function. + * + * @since 2.0.0 + * @category Timing & Delay + */ +export const addDelay = internal.addDelay; +/** + * Adds an effectfully computed delay to every interval in a schedule. + * + * **Details** + * + * This function modifies a given schedule by applying an additional delay to + * each interval, where the delay is determined by an effectful function. The + * function takes the schedule’s output and returns an effect that produces a + * delay duration. + * + * @see {@link addDelay} If you need to compute the delay using a pure function. + * + * @since 2.0.0 + * @category Timing & Delay + */ +export const addDelayEffect = internal.addDelayEffect; +/** + * Runs two schedules sequentially, merging their outputs. + * + * **Details** + * + * This function executes two schedules one after the other. The first schedule + * runs to completion, and then the second schedule begins execution. Unlike + * {@link andThenEither}, this function merges the outputs instead of wrapping + * them in `Either`, allowing both schedules to contribute their results + * directly. + * + * This is useful when a workflow consists of two phases where the second phase + * should start only after the first one has fully completed. + * + * @see {@link andThenEither} If you need to keep track of which schedule + * produced each result. + * + * @since 2.0.0 + * @category Sequential Composition + */ +export const andThen = internal.andThen; +/** + * Runs two schedules sequentially, collecting results in an `Either`. + * + * **Details** + * + * This function combines two schedules in sequence. The first schedule runs to + * completion, and then the second schedule starts and runs to completion as + * well. The outputs of both schedules are collected into an `Either` structure: + * - `Either.Left` contains the output of the second schedule. + * - `Either.Right` contains the output of the first schedule. + * + * This is useful when you need to switch from one schedule to another after the + * first one finishes, while still keeping track of which schedule produced each + * result. + * + * @see {@link andThen} If you need to merge the outputs of both schedules. + * + * @since 2.0.0 + * @category Sequential Composition + */ +export const andThenEither = internal.andThenEither; +/** + * Transforms a schedule to always produce a constant output. + * + * **Details** + * + * This function modifies a given schedule so that instead of returning its + * computed outputs, it always returns a constant value. + * + * This is useful when you need a schedule for timing but don’t care about its + * actual output, or when you want to standardize results across different + * scheduling strategies. + * + * @since 2.0.0 + * @category Mapping + */ +export const as = internal.as; +/** + * Transforms a schedule to always return `void` instead of its output. + * + * **Details** + * + * This function modifies a given schedule so that it no longer returns + * meaningful output—each execution produces `void`. This is useful when the + * schedule is used only for timing purposes and the actual output of the + * schedule is irrelevant. + * + * The schedule still determines when executions should occur, but the results + * are discarded. + * + * @since 2.0.0 + * @category Mapping + */ +export const asVoid = internal.asVoid; +// TODO(4.0): rename to `zip`? +/** + * Combines two schedules, preserving both their inputs and outputs. + * + * **Details** + * + * This function merges two schedules so that both their input types and output + * types are retained. When executed, the resulting schedule will take inputs + * from both original schedules and produce a tuple containing both outputs. + * + * It recurs if either schedule wants to continue, using the shorter delay. + * + * This is useful when you want to track multiple schedules simultaneously, + * ensuring that both receive the same inputs and produce combined results. + * + * @since 2.0.0 + * @category Zipping + */ +export const bothInOut = internal.bothInOut; +/** + * Filters schedule executions based on a custom condition. + * + * **Details** + * + * This function modifies a schedule by applying a custom test function to each + * input-output pair. The test function determines whether the schedule should + * continue or stop. If the function returns `true`, the schedule proceeds as + * usual; if it returns `false`, the schedule terminates. + * + * This is useful for conditional retries, custom stop conditions, or + * dynamically controlling execution based on observed inputs and outputs. + * + * @see {@link checkEffect} If you need to use an effectful test function. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +export const check = internal.check; +/** + * Conditionally filters schedule executions using an effectful function. + * + * **Details** + * + * This function modifies a schedule by applying a custom effectful test + * function to each input-output pair. The test function determines whether the + * schedule should continue (`true`) or stop (`false`). + * + * This is useful when the decision to continue depends on external factors such + * as database lookups, API calls, or other asynchronous computations. + * + * @see {@link check} If you need to use a pure test function. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +export const checkEffect = internal.checkEffect; +/** + * A schedule that collects all inputs into a `Chunk`. + * + * **Details** + * + * This function creates a schedule that never terminates and continuously + * collects every input it receives into a `Chunk`. Each time the schedule runs, + * it appends the new input to the collected list. + * + * This is useful when you need to track all received inputs over time, such as + * logging user actions, recording retry attempts, or accumulating data for + * later processing. + * + * @see {@link collectAllOutputs} If you need to collect outputs instead of + * inputs. + * + * @since 2.0.0 + * @category Collecting + */ +export const collectAllInputs = internal.collectAllInputs; +/** + * Collects all outputs of a schedule into a `Chunk`. + * + * **Details** + * + * This function modifies a given schedule so that instead of returning + * individual outputs, it accumulates them into a `Chunk`. The schedule + * continues to run, appending each output to the collected list. + * + * This is useful when you need to track all results over time, such as logging + * outputs, aggregating data, or keeping a history of previous values. + * + * @see {@link collectAllInputs} If you need to collect inputs instead of + * outputs. + * + * @since 2.0.0 + * @category Collecting + */ +export const collectAllOutputs = internal.collectAllOutputs; +/** + * Collects all inputs into a `Chunk` until a condition fails. + * + * **Details** + * + * This function creates a schedule that continuously collects inputs into a + * `Chunk` until the given predicate function `f` evaluates to `false`. Once the + * condition fails, the schedule stops. + * + * @since 2.0.0 + * @category Collecting + */ +export const collectUntil = internal.collectUntil; +/** + * Collects all inputs into a `Chunk` until an effectful condition fails. + * + * **Details** + * + * This function creates a schedule that continuously collects inputs into a + * `Chunk` until the given effectful predicate `f` returns `false`. The + * predicate runs as an effect, meaning it can involve asynchronous computations + * like API calls, database lookups, or randomness. + * + * @since 2.0.0 + * @category Collecting + */ +export const collectUntilEffect = internal.collectUntilEffect; +/** + * Collects all inputs into a `Chunk` while a condition holds. + * + * **Details** + * + * This function creates a schedule that continuously collects inputs into a + * `Chunk` while the given predicate function `f` evaluates to `true`. As soon + * as the condition fails, the schedule stops. + * + * @since 2.0.0 + * @category Collecting + */ +export const collectWhile = internal.collectWhile; +/** + * Collects all inputs into a `Chunk` while an effectful condition holds. + * + * **Details** + * + * This function creates a schedule that continuously collects inputs into a + * `Chunk` while the given effectful predicate `f` returns `true`. The predicate + * returns an effect, meaning it can depend on external state, such as database + * queries, API responses, or real-time user conditions. + * + * As soon as the effectful condition returns `false`, the schedule stops. This + * is useful for dynamically controlled data collection, where stopping depends + * on an external or asynchronous factor. + * + * @since 2.0.0 + * @category Collecting + */ +export const collectWhileEffect = internal.collectWhileEffect; +/** + * Chains two schedules, passing the output of the first as the input to the + * second, while selecting the shorter delay between them. + * + * **Details** + * + * This function composes two schedules so that the output of the first schedule + * becomes the input of the second schedule. The first schedule executes first, + * and once it produces a result, the second schedule receives that result and + * continues execution based on it. + * + * This is useful for building complex scheduling workflows where one schedule's + * behavior determines how the next schedule behaves. + * + * @since 2.0.0 + * @category Composition + */ +export const compose = internal.compose; +/** + * Transforms the input type of a schedule. + * + * **Details** + * + * This function modifies a given schedule by applying a transformation function + * to its inputs. Instead of directly receiving values of type `In`, the + * schedule will now accept values of type `In2`, which are converted to `In` + * using the provided mapping function `f`. + * + * This is useful when you have a schedule that expects a specific input type + * but you need to adapt it to work with a different type. + * + * @see {@link mapInputEffect} If you need to use an effectful transformation function. + * + * @since 2.0.0 + * @category Mapping + */ +export const mapInput = internal.mapInput; +/** + * Transforms the input type of a schedule using an effectful function. + * + * **Details** + * + * This function modifies a schedule by applying an effectful transformation to + * its inputs. Instead of directly receiving values of type `In`, the schedule + * will now accept values of type `In2`, which are converted to `In` via an + * effectful function `f`. + * + * This is useful when the input transformation involves external dependencies, + * such as API calls, database lookups, or other asynchronous computations. + * + * @see {@link mapInput} If you need to use a pure transformation function. + * + * @since 2.0.0 + * @category Mapping + */ +export const mapInputEffect = internal.mapInputEffect; +/** + * Transforms the required context of a schedule. + * + * **Details** + * + * This function modifies a schedule by mapping its required context (`R`) into + * a new context (`R0`) using the provided function `f`. + * + * This is useful when you need to adapt a schedule to work with a different + * dependency environment without changing its core logic. + * + * @since 2.0.0 + * @category Mapping + */ +export const mapInputContext = internal.mapInputContext; +/** + * A schedule that recurs indefinitely, counting the number of recurrences. + * + * **Details** + * + * This schedule never stops and simply counts how many times it has executed. + * Each recurrence increases the count, starting from `0`. + * + * This is useful when tracking the number of attempts in retry policies, + * measuring execution loops, or implementing infinite polling scenarios. + * + * @since 2.0.0 + * @category Constructors + */ +export const count = internal.count; +/** + * Creates a schedule that recurs based on a cron expression. + * + * **Details** + * + * This schedule automatically executes at intervals defined by a cron + * expression. It triggers at the beginning of each matched interval and + * produces timestamps representing the start and end of the cron window. + * + * The cron `expression` is validated lazily, meaning errors may only be + * detected when the schedule is executed. + * + * @since 2.0.0 + * @category Cron + */ +export const cron = internal.cron; +/** + * Cron-like schedule that recurs at a specific second of each minute. + * + * **Details** + * + * This schedule triggers at the specified `second` of each minute, + * starting at zero nanoseconds. It produces a count of executions + * (0, 1, 2, ...). The `second` parameter is validated lazily, meaning + * invalid values will only be caught at runtime. + * + * @since 2.0.0 + * @category Cron + */ +export const secondOfMinute = internal.secondOfMinute; +/** + * Creates a schedule that recurs every specified minute of each hour. + * + * **Details** + * + * This schedule triggers once per hour at the specified `minute`, starting + * exactly at `minute:00` (zero seconds). The schedule produces a count of + * executions (`0, 1, 2, ...`), representing how many times it has run. + * + * The `minute` parameter must be between `0` and `59`. It is validated lazily, + * meaning an invalid value will cause errors only when the schedule is + * executed. + * + * @since 2.0.0 + * @category Cron + */ +export const minuteOfHour = internal.minuteOfHour; +/** + * Creates a schedule that recurs at a specific hour of each day. + * + * **Details** + * + * This schedule triggers once per day at the specified `hour`, starting at zero + * minutes of that hour. The schedule produces a count of executions (`0, 1, 2, + * ...`), indicating how many times it has been triggered. + * + * The `hour` parameter must be between `0` (midnight) and `23` (11 PM). It is + * validated lazily, meaning an invalid value will cause errors only when the + * schedule is executed. + * + * This is useful for scheduling daily recurring tasks at a fixed time, such as + * running batch jobs or refreshing data. + * + * @since 2.0.0 + * @category Cron + */ +export const hourOfDay = internal.hourOfDay; +/** + * Creates a schedule that recurs on a specific day of the month. + * + * **Details** + * + * This schedule triggers at midnight on the specified day of each month. It + * will not execute in months that have fewer days than the given day. For + * example, if the schedule is set to run on the 31st, it will not execute in + * months with only 30 days. + * + * The schedule produces a count of executions, starting at 0 and incrementing + * with each recurrence. + * + * The `day` parameter is validated lazily, meaning errors may only be detected + * when the schedule is executed. + * + * @since 2.0.0 + * @category Cron + */ +export const dayOfMonth = internal.dayOfMonth; +/** + * Creates a schedule that recurs on a specific day of the week. + * + * **Details** + * + * This schedule triggers at midnight on the specified day of the week. The + * `day` parameter follows the standard convention where `Monday = 1` and + * `Sunday = 7`. The schedule produces a count of executions, starting at 0 and + * incrementing with each recurrence. + * + * The `day` parameter is validated lazily, meaning errors may only be detected + * when the schedule is executed. + * + * @since 2.0.0 + * @category Cron + */ +export const dayOfWeek = internal.dayOfWeek; +/** + * Modifies a schedule by adding a computed delay before each execution. + * + * **Details** + * + * This function adjusts an existing schedule by applying a transformation to + * its delays. Instead of using the default interval, each delay is modified + * using the provided function `f`, which takes the current delay and returns a + * new delay. + * + * This is useful for dynamically adjusting wait times between executions, such + * as introducing jitter, exponential backoff, or custom delay logic. + * + * @see {@link delayedEffect} If you need to compute the delay using an effectful function. + * + * @since 2.0.0 + * @category Timing & Delay + */ +export const delayed = internal.delayed; +/** + * Modifies a schedule by adding an effectfully computed delay before each + * execution. + * + * **Details** + * + * This function adjusts an existing schedule by introducing a delay that is + * computed via an effect. Instead of using a fixed delay, each interval is + * dynamically adjusted based on an effectful function `f`, which takes the + * current delay and returns a new delay wrapped in an `Effect`. + * + * This is useful for adaptive scheduling where delays depend on external + * factors, such as API calls, database queries, or dynamic system conditions. + * + * @see {@link delayed} If you need to compute the delay using a pure function. + * + * @since 2.0.0 + * @category Timing & Delay + */ +export const delayedEffect = internal.delayedEffect; +/** + * Uses the delays produced by a schedule to further delay its intervals. + * + * **Details** + * + * This function modifies a schedule by using its own output delays to control + * its execution timing. Instead of executing immediately at each interval, the + * schedule will be delayed by the duration it produces. + * + * @since 2.0.0 + * @category Timing & Delay + */ +export const delayedSchedule = internal.delayedSchedule; +/** + * Transforms a schedule to output the delay between each occurrence. + * + * **Details** + * + * This function modifies an existing schedule so that instead of producing its + * original output, it now returns the delay between each scheduled execution. + * + * @since 2.0.0 + * @category Monitoring + */ +export const delays = internal.delays; +/** + * Transforms both the input and output of a schedule. + * + * **Details** + * + * This function modifies an existing schedule by applying a transformation to + * both its input values and its output values. The provided transformation + * functions `onInput` and `onOutput` allow you to map the schedule to work with + * a different input type while modifying its outputs as well. + * + * @see {@link mapBothEffect} If you need to use effectful transformation functions. + * + * @since 2.0.0 + * @category Mapping + */ +export const mapBoth = internal.mapBoth; +/** + * Transforms both the input and output of a schedule using effectful + * computations. + * + * **Details** + * + * This function modifies an existing schedule by applying effectful + * transformations to both its input values and its output values. The provided + * effectful functions `onInput` and `onOutput` allow you to transform inputs + * and outputs using computations that may involve additional logic, resource + * access, or side effects. + * + * @see {@link mapBoth} If you need to use pure transformation functions. + * + * @since 2.0.0 + * @category Mapping + */ +export const mapBothEffect = internal.mapBothEffect; +/** + * Creates a driver to manually control the execution of a schedule. + * + * **Details** + * + * This function returns a `ScheduleDriver`, which allows stepping through a + * schedule manually while handling delays and sleeping appropriately. A driver + * is useful when you need fine-grained control over how a schedule progresses, + * rather than relying on automatic execution. + * + * The returned driver exposes methods for retrieving the current state, + * executing the next step, and resetting the schedule when needed. + * + * @since 2.0.0 + * @category getter + */ +export const driver = internal.driver; +// TODO(4.0): remove? +/** + * Alias of {@link fromDelay}. + * + * @since 2.0.0 + * @category Constructors + */ +export const duration = internal.duration; +// TODO(4.0): remove? +/** + * Alias of {@link union}. + * + * @since 2.0.0 + * @category Alternatives + */ +export const either = internal.either; +// TODO(4.0): remove? +/** + * Alias of {@link unionWith}. + * + * @since 2.0.0 + * @category Alternatives + */ +export const eitherWith = internal.eitherWith; +/** + * Creates a schedule that tracks the total elapsed duration since it started. + * + * **Details** + * + * This schedule executes continuously and returns the total time that has + * passed since the first execution. The duration keeps increasing with each + * step, providing a way to measure elapsed time. + * + * This is useful for tracking execution time, monitoring delays, or + * implementing logic based on how long a process has been running. + * + * @since 2.0.0 + * @category Constructors + */ +export const elapsed = internal.elapsed; +/** + * Attaches a finalizer to a schedule that runs when the schedule completes. + * + * **Details** + * + * This function returns a new schedule that executes a given finalizer when the + * schedule reaches completion. Unlike `Effect.ensuring`, this method does not + * guarantee the finalizer will run in all cases. If the schedule never + * initializes or is not driven to completion, the finalizer may not execute. + * However, if the schedule decides not to continue, the finalizer will be + * invoked. + * + * This is useful for cleaning up resources, logging, or executing other side + * effects when a schedule completes. + * + * @since 2.0.0 + * @category Finalization + */ +export const ensuring = internal.ensuring; +/** + * Creates a schedule that recurs indefinitely with exponentially increasing + * delays. + * + * **Details** + * + * This schedule starts with an initial delay of `base` and increases the delay + * exponentially on each repetition using the formula `base * factor^n`, where + * `n` is the number of times the schedule has executed so far. If no `factor` + * is provided, it defaults to `2`, causing the delay to double after each + * execution. + * + * @since 2.0.0 + * @category Constructors + */ +export const exponential = internal.exponential; +/** + * Creates a schedule that recurs indefinitely with Fibonacci-based increasing + * delays. + * + * **Details** + * + * This schedule starts with an initial delay of `one` and increases subsequent + * delays by summing the two previous delays, following the Fibonacci sequence. + * The delay pattern follows: `one, one, one + one, (one + one) + one, ...`, + * resulting in `1s, 1s, 2s, 3s, 5s, 8s, 13s, ...` if `one = 1s`. + * + * This is useful for progressive backoff strategies, where delays grow + * naturally over time without increasing as aggressively as an exponential + * schedule. + * + * @since 2.0.0 + * @category Constructors + */ +export const fibonacci = internal.fibonacci; +/** + * Creates a schedule that recurs at a fixed interval. + * + * **Details** + * + * This schedule executes at regular, evenly spaced intervals, returning the + * number of times it has run so far. If the action being executed takes longer + * than the interval, the next execution will happen immediately to prevent + * "pile-ups," ensuring that the schedule remains consistent without overlapping + * executions. + * + * ```text + * |-----interval-----|-----interval-----|-----interval-----| + * |---------action--------||action|-----|action|-----------| + * ``` + * + * @see {@link spaced} If you need to run from the end of the last execution. + * + * @since 2.0.0 + * @category Constructors + */ +export const fixed = internal.fixed; +/** + * Creates a schedule that recurs indefinitely, producing a count of + * repetitions. + * + * **Details** + * + * This schedule runs indefinitely, returning an increasing count of executions + * (`0, 1, 2, 3, ...`). Each step increments the count by one, allowing tracking + * of how many times it has executed. + * + * @since 2.0.0 + * @category Constructors + */ +export const forever = internal.forever; +/** + * Creates a schedule that recurs once after a specified duration. + * + * **Details** + * + * This schedule executes a single time after waiting for the given duration. + * Once it has executed, it does not repeat. + * + * @see {@link fromDelays} If you need to create a schedule with multiple delays. + * + * @since 2.0.0 + * @category Constructors + */ +export const fromDelay = internal.fromDelay; +/** + * Creates a schedule that recurs once for each specified duration, applying the + * given delays sequentially. + * + * **Details** + * + * This schedule executes multiple times, each time waiting for the + * corresponding duration from the provided list of delays. The first execution + * waits for `delay`, the next for the second value in `delays`, and so on. Once + * all delays have been used, the schedule stops executing. + * + * This is useful for defining a custom delay sequence that does not follow a + * fixed pattern like exponential or Fibonacci backoff. + * + * @since 2.0.0 + * @category Constructors + */ +export const fromDelays = internal.fromDelays; +/** + * Creates a schedule that always recurs, transforming input values using the + * specified function. + * + * **Details** + * + * This schedule continuously executes and applies the given function `f` to + * each input value, producing a transformed output. The schedule itself does + * not control delays or stopping conditions; it simply transforms the input + * values as they are processed. + * + * This is useful when defining schedules that map inputs to outputs, allowing + * dynamic transformations of incoming data. + * + * @since 2.0.0 + * @category Constructors + */ +export const fromFunction = internal.fromFunction; +/** + * Creates a schedule that always recurs, passing inputs directly as outputs. + * + * **Details** + * + * This schedule runs indefinitely, returning each input value as its output + * without modification. It effectively acts as a pass-through that simply + * echoes its input values at each step. + * + * @since 2.0.0 + * @category Constructors + */ +export const identity = internal.identity; +/** + * Transforms a schedule to pass through its inputs as outputs. + * + * **Details** + * + * This function modifies an existing schedule so that it returns its input + * values instead of its original output values. The schedule's timing remains + * unchanged, but its outputs are replaced with whatever inputs it receives. + * + * @since 2.0.0 + */ +export const passthrough = internal.passthrough; +/** + * Combines two schedules, continuing only if both schedules want to continue, + * using the longer delay. + * + * **Details** + * + * This function takes two schedules and creates a new schedule that only + * continues execution if both schedules allow it. The interval between + * recurrences is determined by the longer delay between the two schedules. + * + * The output of the resulting schedule is a tuple containing the outputs of + * both schedules. The input type is the intersection of both schedules' input + * types. + * + * This is useful when coordinating multiple scheduling conditions where + * execution should proceed only when both schedules permit it. + * + * @see {@link intersectWith} If you need to use a custom merge function. + * + * @since 2.0.0 + * @category Composition + */ +export const intersect = internal.intersect; +/** + * Combines two schedules, continuing only if both want to continue, merging + * intervals using a custom function. + * + * **Details** + * + * This function takes two schedules and creates a new schedule that only + * continues execution if both schedules allow it. Instead of automatically + * using the longer delay (like {@link intersect}), this function applies a + * user-provided merge function `f` to determine the next interval between + * executions. + * + * The output of the resulting schedule is a tuple containing the outputs of + * both schedules, and the input type is the intersection of both schedules' + * input types. + * + * @since 2.0.0 + * @category Composition + */ +export const intersectWith = internal.intersectWith; +/** + * Returns a new schedule that randomly adjusts the interval size within a + * range. + * + * **Details** + * + * This function modifies a schedule so that its delay between executions is + * randomly varied within a range. By default, the delay is adjusted between + * `80%` (`0.8 * interval`) and `120%` (`1.2 * interval`) of the original + * interval size. + * + * This is useful for adding randomness to repeated executions, reducing + * contention in distributed systems, and avoiding synchronized execution + * patterns that can cause bottlenecks. + * + * @see {@link jitteredWith} If you need to specify custom min/max values. + * + * @since 2.0.0 + * @category Timing & Delay + */ +export const jittered = internal.jittered; +/** + * Returns a new schedule that randomly adjusts the interval size within a + * user-defined range. + * + * **Details** + * + * This function modifies a schedule so that its delay between executions is + * randomly varied within a specified range. Instead of using the default `0.8 - + * 1.2` range like {@link jittered}, this function allows customizing the `min` + * and `max` multipliers. + * + * The delay for each step will be adjusted within `min * original_interval` and + * `max * original_interval`. If `min` and `max` are not provided, the defaults + * are `0.8` and `1.2`, respectively. + * + * This is useful for introducing randomness into scheduling behavior while + * having precise control over the jitter range. + * + * @since 2.0.0 + * @category Timing & Delay + */ +export const jitteredWith = internal.jitteredWith; +/** + * Creates a schedule that recurs indefinitely, increasing the delay linearly. + * + * **Details** + * + * This schedule starts with an initial delay of `base` and increases the delay + * on each recurrence in a linear fashion, following the formula: + * + * `delay = base * n` + * + * where `n` is the number of times the schedule has executed so far. This + * results in increasing intervals between executions. + * + * This is useful for implementing linear backoff strategies where the wait time + * between retries increases at a steady rate. + * + * @since 2.0.0 + * @category Constructors + */ +export const linear = internal.linear; +/** + * Returns a new schedule that transforms its output using the specified + * function. + * + * **Details** + * + * This function modifies an existing schedule so that its outputs are + * transformed by the provided function `f`. The timing and recurrence behavior + * of the schedule remain unchanged, but the values it produces are mapped to + * new values. + * + * This is useful when composing schedules where you need to adjust the output + * format or apply additional processing. + * + * @see {@link mapEffect} If you need to use an effectful transformation + * function. + * + * @since 2.0.0 + * @category Mapping + */ +export const map = internal.map; +/** + * Returns a new schedule that applies an effectful transformation to its + * output. + * + * **Details** + * + * This function modifies an existing schedule by applying an effectful function + * `f` to its output values. The timing and recurrence behavior of the schedule + * remain unchanged, but each output is mapped to a new value within an + * `Effect`. + * + * This is useful when you need to perform side effects or asynchronous + * transformations before passing the output forward. + * + * @see {@link map} If you need to use a pure transformation function. + * + * @since 2.0.0 + * @category Mapping + */ +export const mapEffect = internal.mapEffect; +/** + * Returns a new schedule that modifies the delay between executions using a + * custom function. + * + * **Details** + * + * This function transforms an existing schedule by applying `f` to modify the + * delay before each execution. The function receives both the schedule's output + * (`out`) and the originally computed delay (`duration`), and returns a new + * adjusted delay. + * + * @see {@link modifyDelayEffect} If you need to use an effectful function. + * + * @since 2.0.0 + * @category Timing & Delay + */ +export const modifyDelay = internal.modifyDelay; +/** + * Returns a new schedule that modifies the delay before execution using an + * effectful function. + * + * **Details** + * + * This function takes an existing schedule and applies an effectful function + * `f` to dynamically adjust the delay before each execution. The function + * receives both the schedule's output (`out`) and the originally computed delay + * (`duration`), returning a new adjusted delay wrapped in an `Effect`. + * + * @see {@link modifyDelay} If you need to use a pure function. + * + * @since 2.0.0 + * @category Timing & Delay + */ +export const modifyDelayEffect = internal.modifyDelayEffect; +/** + * Returns a new schedule that executes an effect every time the schedule makes + * a decision. + * + * **Details** + * + * This function enhances an existing schedule by running an effectful function + * `f` whenever a scheduling decision is made. The function receives the current + * schedule output (`out`) and the decision (`ScheduleDecision`), allowing + * additional logic to be executed, such as logging, monitoring, or side + * effects. + * + * @since 2.0.0 + */ +export const onDecision = internal.onDecision; +/** + * A schedule that executes only once and then stops. + * + * **Details** + * + * This schedule triggers a single execution and then terminates. It does not + * repeat or apply any additional logic. + * + * @since 2.0.0 + * @category Constructors + */ +export const once = internal.once; +/** + * Returns a new schedule with a provided context, eliminating the need for + * external dependencies. + * + * **Details** + * + * This function supplies a required `context` to a schedule, allowing it to run + * without requiring external dependencies. After calling this function, the + * schedule can be used freely without needing to pass a context at execution + * time. + * + * This is useful when working with schedules that rely on contextual + * information, such as logging services, database connections, or configuration + * settings. + * + * @since 2.0.0 + * @category Context + */ +export const provideContext = internal.provideContext; +/** + * Returns a new schedule with a single required service provided, eliminating + * the need for external dependencies. + * + * **Details** + * + * This function supplies a single service dependency to a schedule, allowing it + * to run without requiring that service externally. If a schedule depends on + * multiple services, consider using `provideContext` instead. + * + * This is useful when working with schedules that require a specific service, + * such as logging, metrics, or configuration retrieval. + * + * @since 2.0.0 + * @category Context + */ +export const provideService = internal.provideService; +/** + * A schedule that recurs until the given predicate evaluates to true. + * + * **Details** + * + * This schedule will continue executing as long as the provided predicate `f` + * returns `false` for the input value. Once `f` evaluates to `true`, the + * schedule stops recurring. + * + * This is useful for defining schedules that should stop when a certain + * condition is met, such as detecting a success state, reaching a threshold, or + * avoiding unnecessary retries. + * + * @see {@link recurUntilEffect} If you need to use an effectful predicate. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +export const recurUntil = internal.recurUntil; +/** + * A schedule that recurs until the given effectful predicate evaluates to true. + * + * **Details** + * + * This schedule continues executing as long as the provided effectful predicate + * `f` returns `false`. Once `f` evaluates to `true`, the schedule stops + * recurring. Unlike {@link recurUntil}, this function allows the stopping + * condition to be computed asynchronously or based on external dependencies. + * + * This is useful when the stopping condition depends on an effectful + * computation, such as checking a database, making an API call, or retrieving + * system state dynamically. + * + * @see {@link recurUntil} If you need to use a pure predicate. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +export const recurUntilEffect = internal.recurUntilEffect; +/** + * A schedule that recurs until the input value matches a partial function, then + * maps the value. + * + * **Details** + * + * This schedule continues executing until the provided partial function `pf` + * returns `Some(value)`. At that point, it stops and maps the resulting value + * to an `Option`. If `pf` returns `None`, the schedule continues. + * + * This is useful when defining schedules that should stop once a certain + * condition is met and transform the final value before completion. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +export const recurUntilOption = internal.recurUntilOption; +/** + * A schedule that recurs until the specified duration has elapsed. + * + * **Details** + * + * This schedule continues executing for the given `duration`, after which it + * stops. The schedule outputs the elapsed time on each recurrence. + * + * This is useful for limiting the duration of retries, enforcing time-based + * constraints, or ensuring that an operation does not run indefinitely. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +export const recurUpTo = internal.recurUpTo; +/** + * A schedule that recurs as long as the given predicate evaluates to true. + * + * **Details* + * + * This schedule continues executing as long as the provided predicate `f` + * returns `true` for the input value. Once `f` evaluates to `false`, the + * schedule stops recurring. + * + * @see {@link recurWhileEffect} If you need to use an effectful predicate. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +export const recurWhile = internal.recurWhile; +/** + * A schedule that recurs as long as the given effectful predicate evaluates to + * true. + * + * **Details** + * + * This schedule continues executing as long as the provided effectful predicate + * `f` returns `true`. Once `f` evaluates to `false`, the schedule stops + * recurring. Unlike {@link recurWhile}, this function allows the condition to + * be computed dynamically using an effectful computation. + * + * @see {@link recurWhile} If you need to use a pure predicate. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +export const recurWhileEffect = internal.recurWhileEffect; +/** + * A schedule that recurs a fixed number of times before terminating. + * + * **Details** + * + * This schedule will continue executing until it has been stepped `n` times, + * after which it will stop. The output of the schedule is the current count of + * recurrences. + * + * @category Constructors + * @since 2.0.0 + */ +export const recurs = internal.recurs; +/** + * Returns a new schedule that folds over the outputs of this one. + * + * **Details** + * + * This schedule transforms the output by accumulating values over time using a + * reducer function `f`. It starts with an initial value `zero` and updates it + * each time the schedule produces an output. + * + * This is useful for tracking statistics, aggregating results, or summarizing + * data across multiple executions. + * + * @see {@link reduceEffect} If you need to use an effectful reducer function. + * + * @since 2.0.0 + * @category Reducing + */ +export const reduce = internal.reduce; +/** + * Returns a new schedule that effectfully folds over the outputs of this one. + * + * **Details** + * + * This schedule accumulates outputs over time using an effectful reducer + * function `f`. It starts with an initial value `zero` and updates it + * asynchronously or based on external dependencies. + * + * This is useful for asynchronous state tracking, logging, external metrics + * aggregation, or any scenario where accumulation needs to involve an effectful + * computation. + * + * @see {@link reduce} If you need to use a pure reducer function. + * + * @since 2.0.0 + * @category Reducing + */ +export const reduceEffect = internal.reduceEffect; +// TODO(4.0): remove? +/** + * Alias of {@link forever}. + * + * @since 2.0.0 + * @category Constructors + */ +export const repeatForever = internal.forever; +/** + * Returns a new schedule that outputs the number of repetitions of this one. + * + * **Details** + * + * This schedule tracks how many times the given schedule has executed and + * outputs the count instead of the original values. The first execution starts + * at `0`, and the count increases with each recurrence. + * + * @since 2.0.0 + * @category Monitoring + */ +export const repetitions = internal.repetitions; +/** + * Returns a new schedule that automatically resets to its initial state after a + * period of inactivity defined by `duration`. + * + * **Details** + * + * This function modifies a schedule so that if no inputs are received for the + * specified `duration`, the schedule resets as if it were new. + * + * @see {@link resetWhen} If you need to reset based on output values. + * + * @since 2.0.0 + * @category State Management + */ +export const resetAfter = internal.resetAfter; +/** + * Resets the schedule when the specified predicate on the schedule output + * evaluates to `true`. + * + * **Details** + * + * This function modifies a schedule so that it resets to its initial state + * whenever the provided predicate `f` returns `true` for an output value. + * + * @see {@link resetAfter} If you need to reset based on inactivity. + * + * @since 2.0.0 + * @category State Management + */ +export const resetWhen = internal.resetWhen; +/** + * Runs a schedule using the provided inputs and collects all outputs. + * + * **Details** + * + * This function executes a given schedule with a sequence of input values and + * accumulates all outputs into a `Chunk`. The schedule starts execution at the + * specified `now` timestamp and proceeds according to its defined behavior. + * + * This is useful for batch processing, simulating execution, or testing + * schedules with predefined input sequences. + * + * @since 2.0.0 + * @category Execution + */ +export const run = internal.run; +/** + * Returns a schedule that recurs continuously, with each repetition + * spaced by the specified `duration` from the last run. + * + * **Details** + * + * This schedule ensures that executions occur at a fixed interval, + * maintaining a consistent delay between repetitions. The delay starts + * from the end of the last execution, not from the schedule start time. + * + * @see {@link fixed} If you need to run at a fixed interval from the start. + * + * @since 2.0.0 + * @category Constructors + */ +export const spaced = internal.spaced; +/** + * A schedule that does not recur and stops immediately. + * + * @since 2.0.0 + * @category Constructors + */ +export const stop = internal.stop; +/** + * Returns a schedule that recurs indefinitely, always producing the specified + * constant value. + * + * @since 2.0.0 + * @category Constructors + */ +export const succeed = internal.succeed; +/** + * Returns a schedule that recurs indefinitely, evaluating the given function to + * produce a constant value. + * + * @category Constructors + * @since 2.0.0 + */ +export const sync = internal.sync; +/** + * Returns a new schedule that runs the given effectful function for each input + * before continuing execution. + * + * **Details** + * + * This function allows side effects to be performed on each input processed by + * the schedule. It does not modify the schedule’s behavior but ensures that the + * provided function `f` runs before each step. + * + * @since 2.0.0 + * @category Tapping + */ +export const tapInput = internal.tapInput; +/** + * Returns a new schedule that runs the given effectful function for each output + * before continuing execution. + * + * **Details** + * + * This function allows side effects to be performed on each output produced by + * the schedule. It does not modify the schedule’s behavior but ensures that the + * provided function `f` runs after each step. + * + * @since 2.0.0 + * @category Tapping + */ +export const tapOutput = internal.tapOutput; +/** + * Creates a schedule that repeatedly applies a function to transform a state + * value, producing a sequence of values. + * + * **Details** + * + * This function starts with an `initial` value and applies `f` recursively to + * generate the next state at each step. The schedule continues indefinitely, + * producing a stream of values by unfolding the state over time. + * + * @since 2.0.0 + * @category Constructors + */ +export const unfold = internal.unfold; +/** + * Combines two schedules, continuing execution as long as at least one of them + * allows it, using the shorter delay. + * + * **Details** + * + * This function combines two schedules into a single schedule that executes in + * parallel. If either schedule allows continuation, the merged schedule + * continues. When both schedules produce delays, the schedule selects the + * shorter delay to determine the next step. + * + * The output of the new schedule is a tuple containing the outputs of both + * schedules. The input type is the intersection of both schedules' input types. + * + * This is useful for scenarios where multiple scheduling conditions should be + * considered, ensuring execution proceeds if at least one schedule permits it. + * + * @see {@link unionWith} If you need to use a custom merge function. + * + * @since 2.0.0 + * @category Composition + */ +export const union = internal.union; +/** + * Combines two schedules, continuing execution as long as at least one of them + * wants to continue, merging their intervals using a custom merge function. + * + * **Details** + * + * This function allows you to combine two schedules while defining how their + * intervals should be merged. Unlike {@link union}, which simply selects the + * shorter delay, this function lets you specify a custom merging strategy for + * the schedules’ intervals. + * + * The merged schedule continues execution as long as at least one of the input + * schedules allows it. The next interval is determined by applying the provided + * merge function to the intervals of both schedules. + * + * The output of the resulting schedule is a tuple containing the outputs of + * both schedules. The input type is the intersection of both schedules' input + * types. + * + * @see {@link union} If you need to use the shorter delay. + * + * @since 2.0.0 + * @category Composition + */ +export const unionWith = internal.unionWith; +/** + * Returns a new schedule that stops execution when the given predicate on the + * input evaluates to `true`. + * + * **Details** + * + * This function modifies an existing schedule so that it continues executing + * only while the provided predicate returns `false` for incoming inputs. Once + * an input satisfies the condition, the schedule terminates immediately. + * + * @see {@link untilInputEffect} If you need to use an effectful predicate. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +export const untilInput = internal.untilInput; +/** + * Returns a new schedule that stops execution when the given effectful + * predicate on the input evaluates to `true`. + * + * **Details** + * + * This function modifies an existing schedule so that it continues executing + * only while the provided effectful predicate returns `false` for incoming + * inputs. The predicate is an `Effect`, meaning it can involve asynchronous + * computations or dependency-based logic. + * + * @see {@link untilInput} If you need to use a pure predicate. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +export const untilInputEffect = internal.untilInputEffect; +/** + * Returns a new schedule that stops execution when the given predicate on the + * output evaluates to `true`. + * + * **Details** + * + * This function modifies an existing schedule so that it only continues + * executing while the given predicate returns false for its output values. Once + * the predicate evaluates to `true`, execution stops. + * + * The output of the resulting schedule remains the same, but its duration is + * now constrained by a stopping condition based on its own output. + * + * @see {@link untilOutputEffect} If you need to use an effectful predicate. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +export const untilOutput = internal.untilOutput; +/** + * Returns a new schedule that stops execution when the given effectful + * predicate on the output evaluates to `true`. + * + * **Details** + * + * This function modifies an existing schedule so that it only continues + * executing while the provided effectful predicate returns `false` for its + * output values. Once the predicate returns `true`, execution stops. + * + * @see {@link untilOutput} If you need to use a pure predicate. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +export const untilOutputEffect = internal.untilOutputEffect; +/** + * Returns a new schedule that limits execution to a fixed duration. + * + * **Details** + * + * This function modifies an existing schedule to stop execution after a + * specified duration has passed. The schedule continues as normal until the + * duration is reached, at which point it stops automatically. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +export const upTo = internal.upTo; +/** + * Returns a new schedule that continues execution as long as the given + * predicate on the input is true. + * + * **Details** + * + * This function modifies an existing schedule so that it only continues + * execution while a specified predicate holds true for its input. If the + * predicate evaluates to `false` at any step, the schedule stops. + * + * @see {@link whileInputEffect} If you need to use an effectful predicate. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +export const whileInput = internal.whileInput; +/** + * Returns a new schedule that continues execution for as long as the given + * effectful predicate on the input evaluates to `true`. + * + * **Details** + * + * This function modifies an existing schedule so that it only continues + * execution while an effectful predicate holds true for its input. If the + * predicate evaluates to `false` at any step, the schedule stops. + * + * @see {@link whileInput} If you need to use a pure predicate. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +export const whileInputEffect = internal.whileInputEffect; +/** + * Returns a new schedule that continues execution for as long as the given + * predicate on the output evaluates to `true`. + * + * **Details** + * + * This function modifies an existing schedule so that it only continues + * execution while a provided condition holds true for its output. If the + * predicate returns `false`, the schedule stops. + * + * @see {@link whileOutputEffect} If you need to use an effectful predicate. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +export const whileOutput = internal.whileOutput; +/** + * Returns a new schedule that continues execution for as long as the given + * effectful predicate on the output evaluates to `true`. + * + * **Details** + * + * This function modifies an existing schedule so that it only continues + * execution while an effectful condition holds true for its output. If the + * effectful predicate returns `false`, the schedule stops. + * + * @see {@link whileOutput} If you need to use a pure predicate. + * + * @since 2.0.0 + * @category Recurrence Conditions + */ +export const whileOutputEffect = internal.whileOutputEffect; +/** + * Creates a schedule that divides time into fixed `interval`-long windows, + * triggering execution at the start of each new window. + * + * **Details** + * + * This function produces a schedule that waits until the next time window + * boundary before executing. Each window spans a fixed duration specified by + * `interval`. If an action completes midway through a window, the schedule + * waits until the next full window starts before proceeding. + * + * For example, `windowed(Duration.seconds(10))` would produce a schedule as + * follows: + * + * ```text + * 10s 10s 10s 10s + * |----------|----------|----------|----------| + * |action------|sleep---|act|-sleep|action----| + * ``` + * + * @since 2.0.0 + * @category Constructors + */ +export const windowed = internal.windowed; +/** + * The same as {@link intersect} but ignores the right output. + * + * @since 2.0.0 + * @category Composition + */ +export const zipLeft = internal.zipLeft; +/** + * The same as {@link intersect} but ignores the left output. + * + * @since 2.0.0 + * @category Composition + */ +export const zipRight = internal.zipRight; +/** + * Equivalent to {@link intersect} followed by {@link map}. + * + * @since 2.0.0 + * @category Composition + */ +export const zipWith = internal.zipWith; +/** + * @since 3.15.0 + * @category models + */ +export const CurrentIterationMetadata = internal.CurrentIterationMetadata; +//# sourceMappingURL=Schedule.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ScheduleIntervals.js b/backend/node_modules/effect/dist/esm/ScheduleIntervals.js new file mode 100644 index 0000000000000000000000000000000000000000..a4afa0b707432b62b9d7d09dc131486ac700ca1e --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ScheduleIntervals.js @@ -0,0 +1,78 @@ +import * as internal from "./internal/schedule/intervals.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const IntervalsTypeId = internal.IntervalsTypeId; +/** + * Creates a new `Intervals` from a `List` of `Interval`s. + * + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * Constructs an empty list of `Interval`s. + * + * @since 2.0.0 + * @category constructors + */ +export const empty = internal.empty; +/** + * Creates `Intervals` from the specified `Iterable`. + * + * @since 2.0.0 + * @category constructors + */ +export const fromIterable = internal.fromIterable; +/** + * Computes the union of this `Intervals` and that `Intervals` + * + * @since 2.0.0 + * @category utils + */ +export const union = internal.union; +/** + * Produces the intersection of this `Intervals` and that `Intervals`. + * + * @since 2.0.0 + * @category utils + */ +export const intersect = internal.intersect; +/** + * The start of the earliest interval in the specified `Intervals`. + * + * @since 2.0.0 + * @category getters + */ +export const start = internal.start; +/** + * The end of the latest interval in the specified `Intervals`. + * + * @since 2.0.0 + * @category getters + */ +export const end = internal.end; +/** + * Returns `true` if the start of this `Intervals` is before the start of that + * `Intervals`, `false` otherwise. + * + * @since 2.0.0 + * @category ordering + */ +export const lessThan = internal.lessThan; +/** + * Returns `true` if this `Intervals` is non-empty, `false` otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const isNonEmpty = internal.isNonEmpty; +/** + * Returns the maximum of the two `Intervals` (i.e. which has the latest start). + * + * @since 2.0.0 + * @category ordering + */ +export const max = internal.max; +//# sourceMappingURL=ScheduleIntervals.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Scheduler.js b/backend/node_modules/effect/dist/esm/Scheduler.js new file mode 100644 index 0000000000000000000000000000000000000000..296f684d7cb9a19d6885c286a8e2c81b76efd00d --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Scheduler.js @@ -0,0 +1,289 @@ +/** + * @since 2.0.0 + */ +import { dual } from "./Function.js"; +import { globalValue } from "./GlobalValue.js"; +import * as core from "./internal/core.js"; +/** + * @since 3.20.0 + * @category models + */ +export class SchedulerRunner { + scheduleDrain; + running = false; + tasks = /*#__PURE__*/new PriorityBuckets(); + constructor(scheduleDrain) { + this.scheduleDrain = scheduleDrain; + } + starveInternal = depth => { + const tasks = this.tasks.buckets; + this.tasks.buckets = []; + for (const [_, toRun] of tasks) { + for (let i = 0; i < toRun.length; i++) { + toRun[i](); + } + } + if (this.tasks.buckets.length === 0) { + this.running = false; + } else { + this.starve(depth); + } + }; + starve(depth = 0) { + this.scheduleDrain(depth, this.starveInternal); + } + scheduleTask(task, priority) { + this.tasks.scheduleTask(task, priority); + if (!this.running) { + this.running = true; + this.starve(); + } + } + /** + * @since 3.20.0 + * @category constructors + */ + static cached(scheduleDrain) { + const fallback = new SchedulerRunner(scheduleDrain); + const runners = new WeakMap(); + return fiber => { + if (fiber === undefined) { + return fallback; + } + let runner = runners.get(fiber); + if (runner === undefined) { + runner = new SchedulerRunner(scheduleDrain); + runners.set(fiber, runner); + } + return runner; + }; + } +} +/** + * @since 2.0.0 + * @category utils + */ +export class PriorityBuckets { + /** + * @since 2.0.0 + */ + buckets = []; + /** + * @since 2.0.0 + */ + scheduleTask(task, priority) { + const length = this.buckets.length; + let bucket = undefined; + let index = 0; + for (; index < length; index++) { + if (this.buckets[index][0] <= priority) { + bucket = this.buckets[index]; + } else { + break; + } + } + if (bucket && bucket[0] === priority) { + bucket[1].push(task); + } else if (index === length) { + this.buckets.push([priority, [task]]); + } else { + this.buckets.splice(index, 0, [priority, [task]]); + } + } +} +/** + * @since 2.0.0 + * @category constructors + */ +export class MixedScheduler { + maxNextTickBeforeTimer; + getRunner = /*#__PURE__*/SchedulerRunner.cached((depth, drain) => { + if (depth >= this.maxNextTickBeforeTimer) { + setTimeout(() => drain(0), 0); + } else { + Promise.resolve(void 0).then(() => drain(depth + 1)); + } + }); + constructor( + /** + * @since 2.0.0 + */ + maxNextTickBeforeTimer) { + this.maxNextTickBeforeTimer = maxNextTickBeforeTimer; + } + /** + * @since 2.0.0 + */ + shouldYield(fiber) { + return fiber.currentOpCount > fiber.getFiberRef(core.currentMaxOpsBeforeYield) ? fiber.getFiberRef(core.currentSchedulingPriority) : false; + } + /** + * @since 2.0.0 + */ + scheduleTask(task, priority, fiber) { + this.getRunner(fiber).scheduleTask(task, priority); + } +} +/** + * @since 2.0.0 + * @category schedulers + */ +export const defaultScheduler = /*#__PURE__*/globalValue(/*#__PURE__*/Symbol.for("effect/Scheduler/defaultScheduler"), () => new MixedScheduler(2048)); +/** + * @since 2.0.0 + * @category constructors + */ +export class SyncScheduler { + /** + * @since 2.0.0 + */ + tasks = /*#__PURE__*/new PriorityBuckets(); + /** + * @since 2.0.0 + */ + deferred = false; + /** + * @since 2.0.0 + */ + scheduleTask(task, priority, fiber) { + if (this.deferred) { + defaultScheduler.scheduleTask(task, priority, fiber); + } else { + this.tasks.scheduleTask(task, priority); + } + } + /** + * @since 2.0.0 + */ + shouldYield(fiber) { + return fiber.currentOpCount > fiber.getFiberRef(core.currentMaxOpsBeforeYield) ? fiber.getFiberRef(core.currentSchedulingPriority) : false; + } + /** + * @since 2.0.0 + */ + flush() { + while (this.tasks.buckets.length > 0) { + const tasks = this.tasks.buckets; + this.tasks.buckets = []; + for (const [_, toRun] of tasks) { + for (let i = 0; i < toRun.length; i++) { + toRun[i](); + } + } + } + this.deferred = true; + } +} +/** + * @since 2.0.0 + * @category constructors + */ +export class ControlledScheduler { + /** + * @since 2.0.0 + */ + tasks = /*#__PURE__*/new PriorityBuckets(); + /** + * @since 2.0.0 + */ + deferred = false; + /** + * @since 2.0.0 + */ + scheduleTask(task, priority, fiber) { + if (this.deferred) { + defaultScheduler.scheduleTask(task, priority, fiber); + } else { + this.tasks.scheduleTask(task, priority); + } + } + /** + * @since 2.0.0 + */ + shouldYield(fiber) { + return fiber.currentOpCount > fiber.getFiberRef(core.currentMaxOpsBeforeYield) ? fiber.getFiberRef(core.currentSchedulingPriority) : false; + } + /** + * @since 2.0.0 + */ + step() { + const tasks = this.tasks.buckets; + this.tasks.buckets = []; + for (const [_, toRun] of tasks) { + for (let i = 0; i < toRun.length; i++) { + toRun[i](); + } + } + } +} +/** + * @since 2.0.0 + * @category constructors + */ +export const makeMatrix = (...record) => { + const index = record.sort(([p0], [p1]) => p0 < p1 ? -1 : p0 > p1 ? 1 : 0); + return { + shouldYield(fiber) { + for (const scheduler of record) { + const priority = scheduler[1].shouldYield(fiber); + if (priority !== false) { + return priority; + } + } + return false; + }, + scheduleTask(task, priority, fiber) { + let scheduler = undefined; + for (const i of index) { + if (priority >= i[0]) { + scheduler = i[1]; + } else { + return (scheduler ?? defaultScheduler).scheduleTask(task, priority, fiber); + } + } + return (scheduler ?? defaultScheduler).scheduleTask(task, priority, fiber); + } + }; +}; +/** + * @since 2.0.0 + * @category utilities + */ +export const defaultShouldYield = fiber => { + return fiber.currentOpCount > fiber.getFiberRef(core.currentMaxOpsBeforeYield) ? fiber.getFiberRef(core.currentSchedulingPriority) : false; +}; +/** + * @since 2.0.0 + * @category constructors + */ +export const make = (scheduleTask, shouldYield = defaultShouldYield) => ({ + scheduleTask, + shouldYield +}); +/** + * @since 2.0.0 + * @category constructors + */ +export const makeBatched = (callback, shouldYield = defaultShouldYield) => { + const getRunner = SchedulerRunner.cached((_, drain) => { + callback(() => drain(0)); + }); + return make((task, priority, fiber) => { + getRunner(fiber).scheduleTask(task, priority); + }, shouldYield); +}; +/** + * @since 2.0.0 + * @category constructors + */ +export const timer = (ms, shouldYield = defaultShouldYield) => make(task => setTimeout(task, ms), shouldYield); +/** + * @since 2.0.0 + * @category constructors + */ +export const timerBatched = (ms, shouldYield = defaultShouldYield) => makeBatched(task => setTimeout(task, ms), shouldYield); +/** @internal */ +export const currentScheduler = /*#__PURE__*/globalValue(/*#__PURE__*/Symbol.for("effect/FiberRef/currentScheduler"), () => core.fiberRefUnsafeMake(defaultScheduler)); +/** @internal */ +export const withScheduler = /*#__PURE__*/dual(2, (self, scheduler) => core.fiberRefLocally(self, currentScheduler, scheduler)); +//# sourceMappingURL=Scheduler.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Schema.js b/backend/node_modules/effect/dist/esm/Schema.js new file mode 100644 index 0000000000000000000000000000000000000000..80c52e398bf7a478d5398075a998724213ca739b --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Schema.js @@ -0,0 +1,6035 @@ +/** + * @since 3.10.0 + */ +import * as array_ from "./Array.js"; +import * as bigDecimal_ from "./BigDecimal.js"; +import * as bigInt_ from "./BigInt.js"; +import * as boolean_ from "./Boolean.js"; +import * as cause_ from "./Cause.js"; +import * as chunk_ from "./Chunk.js"; +import * as config_ from "./Config.js"; +import * as configError_ from "./ConfigError.js"; +import * as data_ from "./Data.js"; +import * as dateTime from "./DateTime.js"; +import * as duration_ from "./Duration.js"; +import * as Effect from "./Effect.js"; +import * as either_ from "./Either.js"; +import * as Encoding from "./Encoding.js"; +import * as Equal from "./Equal.js"; +import * as Equivalence from "./Equivalence.js"; +import * as exit_ from "./Exit.js"; +import * as fastCheck_ from "./FastCheck.js"; +import * as fiberId_ from "./FiberId.js"; +import { dual, identity } from "./Function.js"; +import { globalValue } from "./GlobalValue.js"; +import * as hashMap_ from "./HashMap.js"; +import * as hashSet_ from "./HashSet.js"; +import * as Inspectable from "./Inspectable.js"; +import * as internalCause_ from "./internal/cause.js"; +import * as errors_ from "./internal/schema/errors.js"; +import * as schemaId_ from "./internal/schema/schemaId.js"; +import * as util_ from "./internal/schema/util.js"; +import * as list_ from "./List.js"; +import * as number_ from "./Number.js"; +import * as option_ from "./Option.js"; +import * as ParseResult from "./ParseResult.js"; +import { pipeArguments } from "./Pipeable.js"; +import * as Predicate from "./Predicate.js"; +import * as redacted_ from "./Redacted.js"; +import * as Request from "./Request.js"; +import * as scheduler_ from "./Scheduler.js"; +import * as AST from "./SchemaAST.js"; +import * as sortedSet_ from "./SortedSet.js"; +import * as string_ from "./String.js"; +import * as struct_ from "./Struct.js"; +/** + * @since 3.10.0 + * @category symbol + */ +export const TypeId = /*#__PURE__*/Symbol.for("effect/Schema"); +/** + * @category constructors + * @since 3.10.0 + */ +export function make(ast) { + return class SchemaClass { + [TypeId] = variance; + static ast = ast; + static annotations(annotations) { + return make(mergeSchemaAnnotations(this.ast, annotations)); + } + static pipe() { + return pipeArguments(this, arguments); + } + static toString() { + return String(ast); + } + static Type; + static Encoded; + static Context; + static [TypeId] = variance; + }; +} +const variance = { + /* c8 ignore next */ + _A: _ => _, + /* c8 ignore next */ + _I: _ => _, + /* c8 ignore next */ + _R: _ => _ +}; +const makeStandardResult = exit => exit_.isSuccess(exit) ? exit.value : makeStandardFailureResult(cause_.pretty(exit.cause)); +const makeStandardFailureResult = message => ({ + issues: [{ + message + }] +}); +const makeStandardFailureFromParseIssue = issue => Effect.map(ParseResult.ArrayFormatter.formatIssue(issue), issues => ({ + issues: issues.map(issue => ({ + path: issue.path, + message: issue.message + })) +})); +/** + * Returns a "Standard Schema" object conforming to the [Standard Schema + * v1](https://standardschema.dev/) specification. + * + * This function creates a schema whose `validate` method attempts to decode and + * validate the provided input synchronously. If the underlying `Schema` + * includes any asynchronous components (e.g., asynchronous message resolutions + * or checks), then validation will necessarily return a `Promise` instead. + * + * Any detected defects will be reported via a single issue containing no + * `path`. + * + * @example + * ```ts + * import { Schema } from "effect" + * + * const schema = Schema.Struct({ + * name: Schema.String + * }) + * + * // ┌─── StandardSchemaV1<{ readonly name: string; }> + * // ▼ + * const standardSchema = Schema.standardSchemaV1(schema) + * ``` + * + * @category Standard Schema + * @since 3.13.0 + */ +export const standardSchemaV1 = (schema, overrideOptions) => { + const decodeUnknown = ParseResult.decodeUnknown(schema, { + errors: "all" + }); + return class StandardSchemaV1Class extends make(schema.ast) { + static "~standard" = { + version: 1, + vendor: "effect", + validate(value) { + const scheduler = new scheduler_.SyncScheduler(); + const fiber = Effect.runFork(Effect.matchEffect(decodeUnknown(value, overrideOptions), { + onFailure: makeStandardFailureFromParseIssue, + onSuccess: value => Effect.succeed({ + value + }) + }), { + scheduler + }); + scheduler.flush(); + const exit = fiber.unsafePoll(); + if (exit) { + return makeStandardResult(exit); + } + return new Promise(resolve => { + fiber.addObserver(exit => { + resolve(makeStandardResult(exit)); + }); + }); + } + }; + }; +}; +const builtInAnnotations = { + typeConstructor: AST.TypeConstructorAnnotationId, + schemaId: AST.SchemaIdAnnotationId, + message: AST.MessageAnnotationId, + missingMessage: AST.MissingMessageAnnotationId, + identifier: AST.IdentifierAnnotationId, + title: AST.TitleAnnotationId, + description: AST.DescriptionAnnotationId, + examples: AST.ExamplesAnnotationId, + default: AST.DefaultAnnotationId, + documentation: AST.DocumentationAnnotationId, + jsonSchema: AST.JSONSchemaAnnotationId, + arbitrary: AST.ArbitraryAnnotationId, + pretty: AST.PrettyAnnotationId, + equivalence: AST.EquivalenceAnnotationId, + concurrency: AST.ConcurrencyAnnotationId, + batching: AST.BatchingAnnotationId, + parseIssueTitle: AST.ParseIssueTitleAnnotationId, + parseOptions: AST.ParseOptionsAnnotationId, + decodingFallback: AST.DecodingFallbackAnnotationId +}; +const toASTAnnotations = annotations => { + if (!annotations) { + return {}; + } + const out = { + ...annotations + }; + for (const key in builtInAnnotations) { + if (key in annotations) { + const id = builtInAnnotations[key]; + out[id] = annotations[key]; + delete out[key]; + } + } + return out; +}; +const mergeSchemaAnnotations = (ast, annotations) => AST.annotations(ast, toASTAnnotations(annotations)); +/** + * @since 3.10.0 + */ +export function asSchema(schema) { + return schema; +} +/** + * @category formatting + * @since 3.10.0 + */ +export const format = schema => String(schema.ast); +/** + * The `encodedSchema` function allows you to extract the `Encoded` portion of a + * schema, creating a new schema that conforms to the properties defined in the + * original schema without retaining any refinements or transformations that + * were applied previously. + * + * @since 3.10.0 + */ +export const encodedSchema = schema => make(AST.encodedAST(schema.ast)); +/** + * The `encodedBoundSchema` function is similar to `encodedSchema` but preserves + * the refinements up to the first transformation point in the original schema. + * + * @since 3.10.0 + */ +export const encodedBoundSchema = schema => make(AST.encodedBoundAST(schema.ast)); +/** + * The `typeSchema` function allows you to extract the `Type` portion of a + * schema, creating a new schema that conforms to the properties defined in the + * original schema without considering the initial encoding or transformation + * processes. + * + * @since 3.10.0 + */ +export const typeSchema = schema => make(AST.typeAST(schema.ast)); +/* c8 ignore start */ +export { +/** + * By default the option `exact` is set to `true`. + * + * @throws `ParseError` + * @category validation + * @since 3.10.0 + */ +asserts, +/** + * @category decoding + * @since 3.10.0 + */ +decodeOption, +/** + * @throws `ParseError` + * @category decoding + * @since 3.10.0 + */ +decodeSync, +/** + * @category decoding + * @since 3.10.0 + */ +decodeUnknownOption, +/** + * @throws `ParseError` + * @category decoding + * @since 3.10.0 + */ +decodeUnknownSync, +/** + * @category encoding + * @since 3.10.0 + */ +encodeOption, +/** + * @throws `ParseError` + * @category encoding + * @since 3.10.0 + */ +encodeSync, +/** + * @category encoding + * @since 3.10.0 + */ +encodeUnknownOption, +/** + * @throws `ParseError` + * @category encoding + * @since 3.10.0 + */ +encodeUnknownSync, +/** + * By default the option `exact` is set to `true`. + * + * @category validation + * @since 3.10.0 + */ +is, +/** + * @category validation + * @since 3.10.0 + */ +validateOption, +/** + * @throws `ParseError` + * @category validation + * @since 3.10.0 + */ +validateSync } from "./ParseResult.js"; +/* c8 ignore end */ +/** + * @category encoding + * @since 3.10.0 + */ +export const encodeUnknown = (schema, options) => { + const encodeUnknown = ParseResult.encodeUnknown(schema, options); + return (u, overrideOptions) => ParseResult.mapError(encodeUnknown(u, overrideOptions), ParseResult.parseError); +}; +/** + * @category encoding + * @since 3.10.0 + */ +export const encodeUnknownEither = (schema, options) => { + const encodeUnknownEither = ParseResult.encodeUnknownEither(schema, options); + return (u, overrideOptions) => either_.mapLeft(encodeUnknownEither(u, overrideOptions), ParseResult.parseError); +}; +/** + * @category encoding + * @since 3.10.0 + */ +export const encodeUnknownPromise = (schema, options) => { + const parser = encodeUnknown(schema, options); + return (u, overrideOptions) => Effect.runPromise(parser(u, overrideOptions)); +}; +/** + * @category encoding + * @since 3.10.0 + */ +export const encode = encodeUnknown; +/** + * @category encoding + * @since 3.10.0 + */ +export const encodeEither = encodeUnknownEither; +/** + * @category encoding + * @since 3.10.0 + */ +export const encodePromise = encodeUnknownPromise; +/** + * @category decoding + * @since 3.10.0 + */ +export const decodeUnknown = (schema, options) => { + const decodeUnknown = ParseResult.decodeUnknown(schema, options); + return (u, overrideOptions) => ParseResult.mapError(decodeUnknown(u, overrideOptions), ParseResult.parseError); +}; +/** + * @category decoding + * @since 3.10.0 + */ +export const decodeUnknownEither = (schema, options) => { + const decodeUnknownEither = ParseResult.decodeUnknownEither(schema, options); + return (u, overrideOptions) => either_.mapLeft(decodeUnknownEither(u, overrideOptions), ParseResult.parseError); +}; +/** + * @category decoding + * @since 3.10.0 + */ +export const decodeUnknownPromise = (schema, options) => { + const parser = decodeUnknown(schema, options); + return (u, overrideOptions) => Effect.runPromise(parser(u, overrideOptions)); +}; +/** + * @category decoding + * @since 3.10.0 + */ +export const decode = decodeUnknown; +/** + * @category decoding + * @since 3.10.0 + */ +export const decodeEither = decodeUnknownEither; +/** + * @category decoding + * @since 3.10.0 + */ +export const decodePromise = decodeUnknownPromise; +/** + * @category validation + * @since 3.10.0 + */ +export const validate = (schema, options) => { + const validate = ParseResult.validate(schema, options); + return (u, overrideOptions) => ParseResult.mapError(validate(u, overrideOptions), ParseResult.parseError); +}; +/** + * @category validation + * @since 3.10.0 + */ +export const validateEither = (schema, options) => { + const validateEither = ParseResult.validateEither(schema, options); + return (u, overrideOptions) => either_.mapLeft(validateEither(u, overrideOptions), ParseResult.parseError); +}; +/** + * @category validation + * @since 3.10.0 + */ +export const validatePromise = (schema, options) => { + const parser = validate(schema, options); + return (u, overrideOptions) => Effect.runPromise(parser(u, overrideOptions)); +}; +/** + * Tests if a value is a `Schema`. + * + * @category guards + * @since 3.10.0 + */ +export const isSchema = u => Predicate.hasProperty(u, TypeId) && Predicate.isObject(u[TypeId]); +function getDefaultLiteralAST(literals) { + return AST.isMembers(literals) ? AST.Union.make(AST.mapMembers(literals, literal => new AST.Literal(literal))) : new AST.Literal(literals[0]); +} +function makeLiteralClass(literals, ast = getDefaultLiteralAST(literals)) { + return class LiteralClass extends make(ast) { + static annotations(annotations) { + return makeLiteralClass(this.literals, mergeSchemaAnnotations(this.ast, annotations)); + } + static literals = [...literals]; + }; +} +export function Literal(...literals) { + return array_.isNonEmptyReadonlyArray(literals) ? makeLiteralClass(literals) : Never; +} +/** + * Creates a new `Schema` from a literal schema. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either, Schema } from "effect" + * + * const schema = Schema.Literal("a", "b", "c").pipe(Schema.pickLiteral("a", "b")) + * + * assert.deepStrictEqual(Schema.decodeSync(schema)("a"), "a") + * assert.deepStrictEqual(Schema.decodeSync(schema)("b"), "b") + * assert.strictEqual(Either.isLeft(Schema.decodeUnknownEither(schema)("c")), true) + * ``` + * + * @category constructors + * @since 3.10.0 + */ +export const pickLiteral = (...literals) => _schema => Literal(...literals); +/** + * @category constructors + * @since 3.10.0 + */ +export const UniqueSymbolFromSelf = symbol => make(new AST.UniqueSymbol(symbol)); +const getDefaultEnumsAST = enums => new AST.Enums(Object.keys(enums).filter(key => typeof enums[enums[key]] !== "number").map(key => [key, enums[key]])); +const makeEnumsClass = (enums, ast = getDefaultEnumsAST(enums)) => class EnumsClass extends make(ast) { + static annotations(annotations) { + return makeEnumsClass(this.enums, mergeSchemaAnnotations(this.ast, annotations)); + } + static enums = { + ...enums + }; +}; +/** + * @category constructors + * @since 3.10.0 + */ +export const Enums = enums => makeEnumsClass(enums); +/** + * @category template literal + * @since 3.10.0 + */ +export const TemplateLiteral = (...[head, ...tail]) => { + const spans = []; + let h = ""; + let ts = tail; + if (isSchema(head)) { + if (AST.isLiteral(head.ast)) { + h = String(head.ast.literal); + } else { + ts = [head, ...ts]; + } + } else { + h = String(head); + } + for (let i = 0; i < ts.length; i++) { + const item = ts[i]; + if (isSchema(item)) { + if (i < ts.length - 1) { + const next = ts[i + 1]; + if (isSchema(next)) { + if (AST.isLiteral(next.ast)) { + spans.push(new AST.TemplateLiteralSpan(item.ast, String(next.ast.literal))); + i++; + continue; + } + } else { + spans.push(new AST.TemplateLiteralSpan(item.ast, String(next))); + i++; + continue; + } + } + spans.push(new AST.TemplateLiteralSpan(item.ast, "")); + } else { + spans.push(new AST.TemplateLiteralSpan(new AST.Literal(item), "")); + } + } + if (array_.isNonEmptyArray(spans)) { + return make(new AST.TemplateLiteral(h, spans)); + } else { + return make(new AST.TemplateLiteral("", [new AST.TemplateLiteralSpan(new AST.Literal(h), "")])); + } +}; +function getTemplateLiteralParserCoercedElement(encoded, schema) { + const ast = encoded.ast; + switch (ast._tag) { + case "Literal": + { + const literal = ast.literal; + if (!Predicate.isString(literal)) { + const s = String(literal); + return transform(Literal(s), schema, { + strict: true, + decode: () => literal, + encode: () => s + }); + } + break; + } + case "NumberKeyword": + return compose(NumberFromString, schema); + case "Union": + { + const members = []; + let hasCoercions = false; + for (const member of ast.types) { + const schema = make(member); + const encoded = encodedSchema(schema); + const coerced = getTemplateLiteralParserCoercedElement(encoded, schema); + if (coerced) { + hasCoercions = true; + } + members.push(coerced ?? schema); + } + return hasCoercions ? compose(Union(...members), schema) : schema; + } + } +} +/** + * @category template literal + * @since 3.10.0 + */ +export const TemplateLiteralParser = (...params) => { + const encodedSchemas = []; + const elements = []; + const schemas = []; + let coerced = false; + for (let i = 0; i < params.length; i++) { + const param = params[i]; + const schema = isSchema(param) ? param : Literal(param); + schemas.push(schema); + const encoded = encodedSchema(schema); + encodedSchemas.push(encoded); + const element = getTemplateLiteralParserCoercedElement(encoded, schema); + if (element) { + elements.push(element); + coerced = true; + } else { + elements.push(schema); + } + } + const from = TemplateLiteral(...encodedSchemas); + const re = AST.getTemplateLiteralCapturingRegExp(from.ast); + let to = Tuple(...elements); + if (coerced) { + to = to.annotations({ + [AST.AutoTitleAnnotationId]: format(Tuple(...schemas)) + }); + } + return class TemplateLiteralParserClass extends transformOrFail(from, to, { + strict: false, + decode: (i, _, ast) => { + const match = re.exec(i); + return match ? ParseResult.succeed(match.slice(1, params.length + 1)) : ParseResult.fail(new ParseResult.Type(ast, i, `${re.source}: no match for ${JSON.stringify(i)}`)); + }, + encode: tuple => ParseResult.succeed(tuple.join("")) + }) { + static params = params.slice(); + }; +}; +const declareConstructor = (typeParameters, options, annotations) => makeDeclareClass(typeParameters, new AST.Declaration(typeParameters.map(tp => tp.ast), (...typeParameters) => options.decode(...typeParameters.map(make)), (...typeParameters) => options.encode(...typeParameters.map(make)), toASTAnnotations(annotations))); +const declarePrimitive = (is, annotations) => { + const decodeUnknown = () => (input, _, ast) => is(input) ? ParseResult.succeed(input) : ParseResult.fail(new ParseResult.Type(ast, input)); + const encodeUnknown = decodeUnknown; + return makeDeclareClass([], new AST.Declaration([], decodeUnknown, encodeUnknown, toASTAnnotations(annotations))); +}; +function makeDeclareClass(typeParameters, ast) { + return class DeclareClass extends make(ast) { + static annotations(annotations) { + return makeDeclareClass(this.typeParameters, mergeSchemaAnnotations(this.ast, annotations)); + } + static typeParameters = [...typeParameters]; + }; +} +/** + * The constraint `R extends Schema.Context` enforces dependencies solely from `typeParameters`. + * This ensures that when you call `Schema.to` or `Schema.from`, you receive a schema with a `never` context. + * + * @category constructors + * @since 3.10.0 + */ +export const declare = function () { + if (Array.isArray(arguments[0])) { + const typeParameters = arguments[0]; + const options = arguments[1]; + const annotations = arguments[2]; + return declareConstructor(typeParameters, options, annotations); + } + const is = arguments[0]; + const annotations = arguments[1]; + return declarePrimitive(is, annotations); +}; +/** + * @category schema id + * @since 3.10.0 + */ +export const BrandSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/Brand"); +/** + * @category constructors + * @since 3.10.0 + */ +export const fromBrand = (constructor, annotations) => self => { + const out = makeBrandClass(self, new AST.Refinement(self.ast, function predicate(a, _, ast) { + const either = constructor.either(a); + return either_.isLeft(either) ? option_.some(new ParseResult.Type(ast, a, either.left.map(v => v.message).join(", "))) : option_.none(); + }, toASTAnnotations({ + schemaId: BrandSchemaId, + [BrandSchemaId]: { + constructor + }, + ...annotations + }))); + return out; +}; +/** + * @category schema id + * @since 3.10.0 + */ +export const InstanceOfSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/InstanceOf"); +/** + * @category constructors + * @since 3.10.0 + */ +export const instanceOf = (constructor, annotations) => declare(u => u instanceof constructor, { + title: constructor.name, + description: `an instance of ${constructor.name}`, + pretty: () => String, + schemaId: InstanceOfSchemaId, + [InstanceOfSchemaId]: { + constructor + }, + ...annotations +}); +/** + * @category primitives + * @since 3.10.0 + */ +export class Undefined extends /*#__PURE__*/make(AST.undefinedKeyword) {} +/** + * @category primitives + * @since 3.10.0 + */ +export class Void extends /*#__PURE__*/make(AST.voidKeyword) {} +/** + * @category primitives + * @since 3.10.0 + */ +export class Null extends /*#__PURE__*/make(AST.null) {} +/** + * @category primitives + * @since 3.10.0 + */ +export class Never extends /*#__PURE__*/make(AST.neverKeyword) {} +/** + * @category primitives + * @since 3.10.0 + */ +export class Unknown extends /*#__PURE__*/make(AST.unknownKeyword) {} +/** + * @category primitives + * @since 3.10.0 + */ +export class Any extends /*#__PURE__*/make(AST.anyKeyword) {} +/** + * @category primitives + * @since 3.10.0 + */ +export class BigIntFromSelf extends /*#__PURE__*/make(AST.bigIntKeyword) {} +/** + * @category primitives + * @since 3.10.0 + */ +export class SymbolFromSelf extends /*#__PURE__*/make(AST.symbolKeyword) {} +/** @ignore */ +class String$ extends /*#__PURE__*/make(AST.stringKeyword) {} +/** @ignore */ +class Number$ extends /*#__PURE__*/make(AST.numberKeyword) {} +/** @ignore */ +class Boolean$ extends /*#__PURE__*/make(AST.booleanKeyword) {} +/** @ignore */ +class Object$ extends /*#__PURE__*/make(AST.objectKeyword) {} +export { +/** + * @category primitives + * @since 3.10.0 + */ +Boolean$ as Boolean, +/** + * @category primitives + * @since 3.10.0 + */ +Number$ as Number, +/** + * @category primitives + * @since 3.10.0 + */ +Object$ as Object, +/** + * @category primitives + * @since 3.10.0 + */ +String$ as String }; +const getDefaultUnionAST = members => AST.Union.make(members.map(m => m.ast)); +function makeUnionClass(members, ast = getDefaultUnionAST(members)) { + return class UnionClass extends make(ast) { + static annotations(annotations) { + return makeUnionClass(this.members, mergeSchemaAnnotations(this.ast, annotations)); + } + static members = [...members]; + }; +} +export function Union(...members) { + return AST.isMembers(members) ? makeUnionClass(members) : array_.isNonEmptyReadonlyArray(members) ? members[0] : Never; +} +/** + * @category combinators + * @since 3.10.0 + */ +export const NullOr = self => Union(self, Null); +/** + * @category combinators + * @since 3.10.0 + */ +export const UndefinedOr = self => Union(self, Undefined); +/** + * @category combinators + * @since 3.10.0 + */ +export const NullishOr = self => Union(self, Null, Undefined); +/** + * @category combinators + * @since 3.10.0 + */ +export const keyof = self => make(AST.keyof(self.ast)); +/** + * @since 3.10.0 + */ +export const element = self => new ElementImpl(new AST.OptionalType(self.ast, false), self); +/** + * @since 3.10.0 + */ +export const optionalElement = self => new ElementImpl(new AST.OptionalType(self.ast, true), self); +class ElementImpl { + ast; + from; + [TypeId]; + _Token; + constructor(ast, from) { + this.ast = ast; + this.from = from; + } + annotations(annotations) { + return new ElementImpl(new AST.OptionalType(this.ast.type, this.ast.isOptional, { + ...this.ast.annotations, + ...toASTAnnotations(annotations) + }), this.from); + } + toString() { + return `${this.ast.type}${this.ast.isOptional ? "?" : ""}`; + } +} +const getDefaultTupleTypeAST = (elements, rest) => new AST.TupleType(elements.map(el => isSchema(el) ? new AST.OptionalType(el.ast, false) : el.ast), rest.map(el => isSchema(el) ? new AST.Type(el.ast) : el.ast), true); +function makeTupleTypeClass(elements, rest, ast = getDefaultTupleTypeAST(elements, rest)) { + return class TupleTypeClass extends make(ast) { + static annotations(annotations) { + return makeTupleTypeClass(this.elements, this.rest, mergeSchemaAnnotations(this.ast, annotations)); + } + static elements = [...elements]; + static rest = [...rest]; + }; +} +export function Tuple(...args) { + return Array.isArray(args[0]) ? makeTupleTypeClass(args[0], args.slice(1)) : makeTupleTypeClass(args, []); +} +function makeArrayClass(value, ast) { + return class ArrayClass extends makeTupleTypeClass([], [value], ast) { + static annotations(annotations) { + return makeArrayClass(this.value, mergeSchemaAnnotations(this.ast, annotations)); + } + static value = value; + }; +} +const Array$ = value => makeArrayClass(value); +export { +/** + * @category constructors + * @since 3.10.0 + */ +Array$ as Array }; +function makeNonEmptyArrayClass(value, ast) { + return class NonEmptyArrayClass extends makeTupleTypeClass([value], [value], ast) { + static annotations(annotations) { + return makeNonEmptyArrayClass(this.value, mergeSchemaAnnotations(this.ast, annotations)); + } + static value = value; + }; +} +/** + * @category constructors + * @since 3.10.0 + */ +export const NonEmptyArray = value => makeNonEmptyArrayClass(value); +/** + * @category constructors + * @since 3.10.0 + */ +export function ArrayEnsure(value) { + return transform(Union(value, Array$(value)), Array$(typeSchema(asSchema(value))), { + strict: true, + decode: i => array_.ensure(i), + encode: a => a.length === 1 ? a[0] : a + }); +} +/** + * @category constructors + * @since 3.10.0 + */ +export function NonEmptyArrayEnsure(value) { + return transform(Union(value, NonEmptyArray(value)), NonEmptyArray(typeSchema(asSchema(value))), { + strict: true, + decode: i => array_.isNonEmptyReadonlyArray(i) ? i : array_.of(i), + encode: a => a.length === 1 ? a[0] : a + }); +} +const formatPropertySignatureToken = isOptional => isOptional ? "\"?:\"" : "\":\""; +/** + * @category PropertySignature + * @since 3.10.0 + */ +export class PropertySignatureDeclaration extends AST.OptionalType { + isReadonly; + defaultValue; + /** + * @since 3.10.0 + */ + _tag = "PropertySignatureDeclaration"; + constructor(type, isOptional, isReadonly, annotations, defaultValue) { + super(type, isOptional, annotations); + this.isReadonly = isReadonly; + this.defaultValue = defaultValue; + } + /** + * @since 3.10.0 + */ + toString() { + const token = formatPropertySignatureToken(this.isOptional); + const type = String(this.type); + return `PropertySignature<${token}, ${type}, never, ${token}, ${type}>`; + } +} +/** + * @category PropertySignature + * @since 3.10.0 + */ +export class FromPropertySignature extends AST.OptionalType { + isReadonly; + fromKey; + constructor(type, isOptional, isReadonly, annotations, fromKey) { + super(type, isOptional, annotations); + this.isReadonly = isReadonly; + this.fromKey = fromKey; + } +} +/** + * @category PropertySignature + * @since 3.10.0 + */ +export class ToPropertySignature extends AST.OptionalType { + isReadonly; + defaultValue; + constructor(type, isOptional, isReadonly, annotations, defaultValue) { + super(type, isOptional, annotations); + this.isReadonly = isReadonly; + this.defaultValue = defaultValue; + } +} +const formatPropertyKey = p => { + if (p === undefined) { + return "never"; + } + if (Predicate.isString(p)) { + return JSON.stringify(p); + } + return String(p); +}; +/** + * @category PropertySignature + * @since 3.10.0 + */ +export class PropertySignatureTransformation { + from; + to; + decode; + encode; + /** + * @since 3.10.0 + */ + _tag = "PropertySignatureTransformation"; + constructor(from, to, decode, encode) { + this.from = from; + this.to = to; + this.decode = decode; + this.encode = encode; + } + /** + * @since 3.10.0 + */ + toString() { + return `PropertySignature<${formatPropertySignatureToken(this.to.isOptional)}, ${this.to.type}, ${formatPropertyKey(this.from.fromKey)}, ${formatPropertySignatureToken(this.from.isOptional)}, ${this.from.type}>`; + } +} +const mergeSignatureAnnotations = (ast, annotations) => { + switch (ast._tag) { + case "PropertySignatureDeclaration": + { + return new PropertySignatureDeclaration(ast.type, ast.isOptional, ast.isReadonly, { + ...ast.annotations, + ...annotations + }, ast.defaultValue); + } + case "PropertySignatureTransformation": + { + return new PropertySignatureTransformation(ast.from, new ToPropertySignature(ast.to.type, ast.to.isOptional, ast.to.isReadonly, { + ...ast.to.annotations, + ...annotations + }, ast.to.defaultValue), ast.decode, ast.encode); + } + } +}; +/** + * @since 3.10.0 + * @category symbol + */ +export const PropertySignatureTypeId = /*#__PURE__*/Symbol.for("effect/PropertySignature"); +/** + * @since 3.10.0 + * @category guards + */ +export const isPropertySignature = u => Predicate.hasProperty(u, PropertySignatureTypeId); +class PropertySignatureImpl { + ast; + [TypeId]; + [PropertySignatureTypeId] = null; + _TypeToken; + _Key; + _EncodedToken; + _HasDefault; + constructor(ast) { + this.ast = ast; + } + pipe() { + return pipeArguments(this, arguments); + } + annotations(annotations) { + return new PropertySignatureImpl(mergeSignatureAnnotations(this.ast, toASTAnnotations(annotations))); + } + toString() { + return String(this.ast); + } +} +/** + * @category PropertySignature + * @since 3.10.0 + */ +export const makePropertySignature = ast => new PropertySignatureImpl(ast); +class PropertySignatureWithFromImpl extends PropertySignatureImpl { + from; + constructor(ast, from) { + super(ast); + this.from = from; + } + annotations(annotations) { + return new PropertySignatureWithFromImpl(mergeSignatureAnnotations(this.ast, toASTAnnotations(annotations)), this.from); + } +} +/** + * Lifts a `Schema` into a `PropertySignature`. + * + * @category PropertySignature + * @since 3.10.0 + */ +export const propertySignature = self => new PropertySignatureWithFromImpl(new PropertySignatureDeclaration(self.ast, false, true, {}, undefined), self); +/** + * Enhances a property signature with a default constructor value. + * + * @category PropertySignature + * @since 3.10.0 + */ +export const withConstructorDefault = /*#__PURE__*/dual(2, (self, defaultValue) => { + const ast = self.ast; + switch (ast._tag) { + case "PropertySignatureDeclaration": + return makePropertySignature(new PropertySignatureDeclaration(ast.type, ast.isOptional, ast.isReadonly, ast.annotations, defaultValue)); + case "PropertySignatureTransformation": + return makePropertySignature(new PropertySignatureTransformation(ast.from, new ToPropertySignature(ast.to.type, ast.to.isOptional, ast.to.isReadonly, ast.to.annotations, defaultValue), ast.decode, ast.encode)); + } +}); +const applyDefaultValue = (o, defaultValue) => option_.match(o, { + onNone: () => option_.some(defaultValue()), + onSome: value => option_.some(value === undefined ? defaultValue() : value) +}); +const pruneUndefined = ast => AST.pruneUndefined(ast, pruneUndefined, ast => { + const pruned = pruneUndefined(ast.to); + if (pruned) { + return new AST.Transformation(ast.from, pruned, ast.transformation); + } +}); +/** + * Enhances a property signature with a default decoding value. + * + * @category PropertySignature + * @since 3.10.0 + */ +export const withDecodingDefault = /*#__PURE__*/dual(2, (self, defaultValue) => { + const ast = self.ast; + switch (ast._tag) { + case "PropertySignatureDeclaration": + { + const to = AST.typeAST(ast.type); + return makePropertySignature(new PropertySignatureTransformation(new FromPropertySignature(ast.type, ast.isOptional, ast.isReadonly, ast.annotations), new ToPropertySignature(pruneUndefined(to) ?? to, false, true, {}, ast.defaultValue), o => applyDefaultValue(o, defaultValue), identity)); + } + case "PropertySignatureTransformation": + { + const to = ast.to.type; + return makePropertySignature(new PropertySignatureTransformation(ast.from, new ToPropertySignature(pruneUndefined(to) ?? to, false, ast.to.isReadonly, ast.to.annotations, ast.to.defaultValue), o => applyDefaultValue(ast.decode(o), defaultValue), ast.encode)); + } + } +}); +/** + * Enhances a property signature with a default decoding value and a default constructor value. + * + * @category PropertySignature + * @since 3.10.0 + */ +export const withDefaults = /*#__PURE__*/dual(2, (self, defaults) => self.pipe(withDecodingDefault(defaults.decoding), withConstructorDefault(defaults.constructor))); +/** + * Enhances a property signature by specifying a different key for it in the Encoded type. + * + * @category PropertySignature + * @since 3.10.0 + */ +export const fromKey = /*#__PURE__*/dual(2, (self, key) => { + const ast = self.ast; + switch (ast._tag) { + case "PropertySignatureDeclaration": + { + return makePropertySignature(new PropertySignatureTransformation(new FromPropertySignature(ast.type, ast.isOptional, ast.isReadonly, ast.annotations, key), new ToPropertySignature(AST.typeAST(ast.type), ast.isOptional, ast.isReadonly, {}, ast.defaultValue), identity, identity)); + } + case "PropertySignatureTransformation": + return makePropertySignature(new PropertySignatureTransformation(new FromPropertySignature(ast.from.type, ast.from.isOptional, ast.from.isReadonly, ast.from.annotations, key), ast.to, ast.decode, ast.encode)); + } +}); +/** + * Converts an optional property to a required one through a transformation `Option -> Type`. + * + * - `decode`: `none` as argument means the value is missing in the input. + * - `encode`: `none` as return value means the value will be missing in the output. + * + * @category PropertySignature + * @since 3.10.0 + */ +export const optionalToRequired = (from, to, options) => makePropertySignature(new PropertySignatureTransformation(new FromPropertySignature(from.ast, true, true, {}, undefined), new ToPropertySignature(to.ast, false, true, {}, undefined), o => option_.some(options.decode(o)), option_.flatMap(options.encode))); +/** + * Converts an optional property to a required one through a transformation `Type -> Option`. + * + * - `decode`: `none` as return value means the value will be missing in the output. + * - `encode`: `none` as argument means the value is missing in the input. + * + * @category PropertySignature + * @since 3.10.0 + */ +export const requiredToOptional = (from, to, options) => makePropertySignature(new PropertySignatureTransformation(new FromPropertySignature(from.ast, false, true, {}, undefined), new ToPropertySignature(to.ast, true, true, {}, undefined), option_.flatMap(options.decode), o => option_.some(options.encode(o)))); +/** + * Converts an optional property to another optional property through a transformation `Option -> Option`. + * + * - `decode`: + * - `none` as argument means the value is missing in the input. + * - `none` as return value means the value will be missing in the output. + * - `encode`: + * - `none` as argument means the value is missing in the input. + * - `none` as return value means the value will be missing in the output. + * + * @category PropertySignature + * @since 3.10.0 + */ +export const optionalToOptional = (from, to, options) => makePropertySignature(new PropertySignatureTransformation(new FromPropertySignature(from.ast, true, true, {}, undefined), new ToPropertySignature(to.ast, true, true, {}, undefined), options.decode, options.encode)); +const optionalPropertySignatureAST = (self, options) => { + const isExact = options?.exact; + const defaultValue = options?.default; + const isNullable = options?.nullable; + const asOption = options?.as == "Option"; + const asOptionEncode = options?.onNoneEncoding ? option_.orElse(options.onNoneEncoding) : identity; + if (isExact) { + if (defaultValue) { + if (isNullable) { + return withConstructorDefault(optionalToRequired(NullOr(self), typeSchema(self), { + decode: option_.match({ + onNone: defaultValue, + onSome: a => a === null ? defaultValue() : a + }), + encode: option_.some + }), defaultValue).ast; + } else { + return withConstructorDefault(optionalToRequired(self, typeSchema(self), { + decode: option_.match({ + onNone: defaultValue, + onSome: identity + }), + encode: option_.some + }), defaultValue).ast; + } + } else if (asOption) { + const to = OptionFromSelf_(typeSchema(self)); + if (isNullable) { + return optionalToRequired(NullOr(self), to, { + decode: option_.filter(Predicate.isNotNull), + encode: asOptionEncode + }).ast; + } else { + return optionalToRequired(self, to, { + decode: identity, + encode: identity + }).ast; + } + } else { + if (isNullable) { + return optionalToOptional(NullOr(self), typeSchema(self), { + decode: option_.filter(Predicate.isNotNull), + encode: identity + }).ast; + } else { + return new PropertySignatureDeclaration(self.ast, true, true, {}, undefined); + } + } + } else { + if (defaultValue) { + if (isNullable) { + return withConstructorDefault(optionalToRequired(NullishOr(self), typeSchema(self), { + decode: option_.match({ + onNone: defaultValue, + onSome: a => a == null ? defaultValue() : a + }), + encode: option_.some + }), defaultValue).ast; + } else { + return withConstructorDefault(optionalToRequired(UndefinedOr(self), typeSchema(self), { + decode: option_.match({ + onNone: defaultValue, + onSome: a => a === undefined ? defaultValue() : a + }), + encode: option_.some + }), defaultValue).ast; + } + } else if (asOption) { + const to = OptionFromSelf_(typeSchema(self)); + if (isNullable) { + return optionalToRequired(NullishOr(self), to, { + decode: option_.filter(a => a != null), + encode: asOptionEncode + }).ast; + } else { + return optionalToRequired(UndefinedOr(self), to, { + decode: option_.filter(Predicate.isNotUndefined), + encode: asOptionEncode + }).ast; + } + } else { + if (isNullable) { + return optionalToOptional(NullishOr(self), UndefinedOr(typeSchema(self)), { + decode: option_.filter(Predicate.isNotNull), + encode: identity + }).ast; + } else { + return new PropertySignatureDeclaration(UndefinedOr(self).ast, true, true, {}, undefined); + } + } + } +}; +/** + * @category PropertySignature + * @since 3.10.0 + */ +export const optional = self => { + const ast = self.ast === AST.undefinedKeyword || self.ast === AST.neverKeyword ? AST.undefinedKeyword : UndefinedOr(self).ast; + return new PropertySignatureWithFromImpl(new PropertySignatureDeclaration(ast, true, true, {}, undefined), self); +}; +/** + * @category PropertySignature + * @since 3.10.0 + */ +export const optionalWith = /*#__PURE__*/dual(args => isSchema(args[0]), (self, options) => { + return new PropertySignatureWithFromImpl(optionalPropertySignatureAST(self, options), self); +}); +const preserveMissingMessageAnnotation = /*#__PURE__*/AST.pickAnnotations([AST.MissingMessageAnnotationId]); +const getDefaultTypeLiteralAST = (fields, records) => { + const ownKeys = Reflect.ownKeys(fields); + const pss = []; + if (ownKeys.length > 0) { + const from = []; + const to = []; + const transformations = []; + for (let i = 0; i < ownKeys.length; i++) { + const key = ownKeys[i]; + const field = fields[key]; + if (isPropertySignature(field)) { + const ast = field.ast; + switch (ast._tag) { + case "PropertySignatureDeclaration": + { + const type = ast.type; + const isOptional = ast.isOptional; + const toAnnotations = ast.annotations; + from.push(new AST.PropertySignature(key, type, isOptional, true, preserveMissingMessageAnnotation(ast))); + to.push(new AST.PropertySignature(key, AST.typeAST(type), isOptional, true, toAnnotations)); + pss.push(new AST.PropertySignature(key, type, isOptional, true, toAnnotations)); + break; + } + case "PropertySignatureTransformation": + { + const fromKey = ast.from.fromKey ?? key; + from.push(new AST.PropertySignature(fromKey, ast.from.type, ast.from.isOptional, true, ast.from.annotations)); + to.push(new AST.PropertySignature(key, ast.to.type, ast.to.isOptional, true, ast.to.annotations)); + transformations.push(new AST.PropertySignatureTransformation(fromKey, key, ast.decode, ast.encode)); + break; + } + } + } else { + from.push(new AST.PropertySignature(key, field.ast, false, true)); + to.push(new AST.PropertySignature(key, AST.typeAST(field.ast), false, true)); + pss.push(new AST.PropertySignature(key, field.ast, false, true)); + } + } + if (array_.isNonEmptyReadonlyArray(transformations)) { + const issFrom = []; + const issTo = []; + for (const r of records) { + const { + indexSignatures, + propertySignatures + } = AST.record(r.key.ast, r.value.ast); + propertySignatures.forEach(ps => { + from.push(ps); + to.push(new AST.PropertySignature(ps.name, AST.typeAST(ps.type), ps.isOptional, ps.isReadonly, ps.annotations)); + }); + indexSignatures.forEach(is => { + issFrom.push(is); + issTo.push(new AST.IndexSignature(is.parameter, AST.typeAST(is.type), is.isReadonly)); + }); + } + return new AST.Transformation(new AST.TypeLiteral(from, issFrom, { + [AST.AutoTitleAnnotationId]: "Struct (Encoded side)" + }), new AST.TypeLiteral(to, issTo, { + [AST.AutoTitleAnnotationId]: "Struct (Type side)" + }), new AST.TypeLiteralTransformation(transformations)); + } + } + const iss = []; + for (const r of records) { + const { + indexSignatures, + propertySignatures + } = AST.record(r.key.ast, r.value.ast); + propertySignatures.forEach(ps => pss.push(ps)); + indexSignatures.forEach(is => iss.push(is)); + } + return new AST.TypeLiteral(pss, iss); +}; +const lazilyMergeDefaults = (fields, out) => { + const ownKeys = Reflect.ownKeys(fields); + for (const key of ownKeys) { + const field = fields[key]; + if (out[key] === undefined && isPropertySignature(field)) { + const ast = field.ast; + const defaultValue = ast._tag === "PropertySignatureDeclaration" ? ast.defaultValue : ast.to.defaultValue; + if (defaultValue !== undefined) { + out[key] = defaultValue(); + } + } + } + return out; +}; +function makeTypeLiteralClass(fields, records, ast = getDefaultTypeLiteralAST(fields, records)) { + return class TypeLiteralClass extends make(ast) { + static annotations(annotations) { + return makeTypeLiteralClass(this.fields, this.records, mergeSchemaAnnotations(this.ast, annotations)); + } + static fields = { + ...fields + }; + static records = [...records]; + static make = (props, options) => { + const propsWithDefaults = lazilyMergeDefaults(fields, { + ...props + }); + return getDisableValidationMakeOption(options) ? propsWithDefaults : ParseResult.validateSync(this)(propsWithDefaults); + }; + static pick(...keys) { + return Struct(struct_.pick(fields, ...keys)); + } + static omit(...keys) { + return Struct(struct_.omit(fields, ...keys)); + } + }; +} +export function Struct(fields, ...records) { + return makeTypeLiteralClass(fields, records); +} +/** + * Returns a property signature that represents a tag. + * A tag is a literal value that is used to distinguish between different types of objects. + * The tag is optional when using the `make` method. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Schema } from "effect" + * + * const User = Schema.Struct({ + * _tag: Schema.tag("User"), + * name: Schema.String, + * age: Schema.Number + * }) + * + * assert.deepStrictEqual(User.make({ name: "John", age: 44 }), { _tag: "User", name: "John", age: 44 }) + * ``` + * + * @see {@link TaggedStruct} + * + * @since 3.10.0 + */ +export const tag = tag => Literal(tag).pipe(propertySignature, withConstructorDefault(() => tag)); +/** + * A tagged struct is a struct that has a tag property that is used to distinguish between different types of objects. + * + * The tag is optional when using the `make` method. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Schema } from "effect" + * + * const User = Schema.TaggedStruct("User", { + * name: Schema.String, + * age: Schema.Number + * }) + * + * assert.deepStrictEqual(User.make({ name: "John", age: 44 }), { _tag: "User", name: "John", age: 44 }) + * ``` + * + * @category constructors + * @since 3.10.0 + */ +export const TaggedStruct = (value, fields) => Struct({ + _tag: tag(value), + ...fields +}); +function makeRecordClass(key, value, ast) { + return class RecordClass extends makeTypeLiteralClass({}, [{ + key, + value + }], ast) { + static annotations(annotations) { + return makeRecordClass(key, value, mergeSchemaAnnotations(this.ast, annotations)); + } + static key = key; + static value = value; + }; +} +/** + * @category constructors + * @since 3.10.0 + */ +export const Record = options => makeRecordClass(options.key, options.value); +/** + * @category struct transformations + * @since 3.10.0 + */ +export const pick = (...keys) => self => make(AST.pick(self.ast, keys)); +/** + * @category struct transformations + * @since 3.10.0 + */ +export const omit = (...keys) => self => make(AST.omit(self.ast, keys)); +/** + * Given a schema `Schema` and a key `key: K`, this function extracts a specific field from the `A` type, + * producing a new schema that represents a transformation from the `{ readonly [key]: I[K] }` type to `A[K]`. + * + * @example + * ```ts + * import * as Schema from "effect/Schema" + * + * // --------------------------------------------- + * // use case: pull out a single field from a + * // struct through a transformation + * // --------------------------------------------- + * + * const mytable = Schema.Struct({ + * column1: Schema.NumberFromString, + * column2: Schema.Number + * }) + * + * // const pullOutColumn: S.Schema + * const pullOutColumn = mytable.pipe(Schema.pluck("column1")) + * + * console.log(Schema.decodeUnknownEither(Schema.Array(pullOutColumn))([{ column1: "1", column2: 100 }, { column1: "2", column2: 300 }])) + * // Output: { _id: 'Either', _tag: 'Right', right: [ 1, 2 ] } + * ``` + * + * @category struct transformations + * @since 3.10.0 + */ +export const pluck = /*#__PURE__*/dual(2, (schema, key) => { + const ps = AST.getPropertyKeyIndexedAccess(AST.typeAST(schema.ast), key); + const value = make(ps.isOptional ? AST.orUndefined(ps.type) : ps.type); + const out = transform(schema.pipe(pick(key)), value, { + strict: true, + decode: i => i[key], + encode: a => ps.isOptional && a === undefined ? {} : { + [key]: a + } + }); + return out; +}); +function makeBrandClass(from, ast) { + return class BrandClass extends make(ast) { + static annotations(annotations) { + return makeBrandClass(this.from, mergeSchemaAnnotations(this.ast, annotations)); + } + static make = (a, options) => { + return getDisableValidationMakeOption(options) ? a : ParseResult.validateSync(this)(a); + }; + static from = from; + }; +} +/** + * Returns a nominal branded schema by applying a brand to a given schema. + * + * ``` + * Schema + B -> Schema> + * ``` + * + * @example + * ```ts + * import * as Schema from "effect/Schema" + * + * const Int = Schema.Number.pipe(Schema.int(), Schema.brand("Int")) + * type Int = Schema.Schema.Type // number & Brand<"Int"> + * ``` + * + * @category branding + * @since 3.10.0 + */ +export const brand = (brand, annotations) => self => { + const annotation = option_.match(AST.getBrandAnnotation(self.ast), { + onNone: () => [brand], + onSome: brands => [...brands, brand] + }); + const ast = AST.annotations(self.ast, toASTAnnotations({ + [AST.BrandAnnotationId]: annotation, + ...annotations + })); + return makeBrandClass(self, ast); +}; +/** + * @category combinators + * @since 3.10.0 + */ +export const partial = self => make(AST.partial(self.ast)); +/** + * @category combinators + * @since 3.10.0 + */ +export const partialWith = /*#__PURE__*/dual(args => isSchema(args[0]), (self, options) => make(AST.partial(self.ast, options))); +/** + * @category combinators + * @since 3.10.0 + */ +export const required = self => make(AST.required(self.ast)); +/** + * Creates a new schema with shallow mutability applied to its properties. + * + * @category combinators + * @since 3.10.0 + */ +export const mutable = schema => make(AST.mutable(schema.ast)); +const intersectTypeLiterals = (x, y, path) => { + if (AST.isTypeLiteral(x) && AST.isTypeLiteral(y)) { + const propertySignatures = [...x.propertySignatures]; + for (const ps of y.propertySignatures) { + const name = ps.name; + const i = propertySignatures.findIndex(ps => ps.name === name); + if (i === -1) { + propertySignatures.push(ps); + } else { + const { + isOptional, + type + } = propertySignatures[i]; + propertySignatures[i] = new AST.PropertySignature(name, extendAST(type, ps.type, path.concat(name)), isOptional, true); + } + } + return new AST.TypeLiteral(propertySignatures, x.indexSignatures.concat(y.indexSignatures)); + } + throw new Error(errors_.getSchemaExtendErrorMessage(x, y, path)); +}; +const preserveRefinementAnnotations = /*#__PURE__*/AST.omitAnnotations([AST.IdentifierAnnotationId]); +const addRefinementToMembers = (refinement, asts) => asts.map(ast => new AST.Refinement(ast, refinement.filter, preserveRefinementAnnotations(refinement))); +const extendAST = (x, y, path) => AST.Union.make(intersectUnionMembers([x], [y], path)); +const getTypes = ast => AST.isUnion(ast) ? ast.types : [ast]; +const intersectUnionMembers = (xs, ys, path) => array_.flatMap(xs, x => array_.flatMap(ys, y => { + switch (y._tag) { + case "Literal": + { + if (Predicate.isString(y.literal) && AST.isStringKeyword(x) || Predicate.isNumber(y.literal) && AST.isNumberKeyword(x) || Predicate.isBoolean(y.literal) && AST.isBooleanKeyword(x)) { + return [y]; + } + break; + } + case "StringKeyword": + { + if (y === AST.stringKeyword) { + if (AST.isStringKeyword(x) || AST.isLiteral(x) && Predicate.isString(x.literal)) { + return [x]; + } else if (AST.isRefinement(x)) { + return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path)); + } + } else if (x === AST.stringKeyword) { + return [y]; + } + break; + } + case "NumberKeyword": + { + if (y === AST.numberKeyword) { + if (AST.isNumberKeyword(x) || AST.isLiteral(x) && Predicate.isNumber(x.literal)) { + return [x]; + } else if (AST.isRefinement(x)) { + return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path)); + } + } else if (x === AST.numberKeyword) { + return [y]; + } + break; + } + case "BooleanKeyword": + { + if (y === AST.booleanKeyword) { + if (AST.isBooleanKeyword(x) || AST.isLiteral(x) && Predicate.isBoolean(x.literal)) { + return [x]; + } else if (AST.isRefinement(x)) { + return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path)); + } + } else if (x === AST.booleanKeyword) { + return [y]; + } + break; + } + case "Union": + return intersectUnionMembers(getTypes(x), y.types, path); + case "Suspend": + return [new AST.Suspend(() => extendAST(x, y.f(), path))]; + case "Refinement": + return addRefinementToMembers(y, intersectUnionMembers(getTypes(x), getTypes(y.from), path)); + case "TypeLiteral": + { + switch (x._tag) { + case "Union": + return intersectUnionMembers(x.types, [y], path); + case "Suspend": + return [new AST.Suspend(() => extendAST(x.f(), y, path))]; + case "Refinement": + return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path)); + case "TypeLiteral": + return [intersectTypeLiterals(x, y, path)]; + case "Transformation": + { + const transformation = x.transformation; + const from = intersectTypeLiterals(x.from, y, path); + const to = intersectTypeLiterals(x.to, AST.typeAST(y), path); + switch (transformation._tag) { + case "TypeLiteralTransformation": + return [new AST.Transformation(from, to, new AST.TypeLiteralTransformation(transformation.propertySignatureTransformations))]; + case "ComposeTransformation": + return [new AST.Transformation(from, to, AST.composeTransformation)]; + case "FinalTransformation": + return [new AST.Transformation(from, to, new AST.FinalTransformation((fromA, options, ast, fromI) => ParseResult.map(transformation.decode(fromA, options, ast, fromI), partial => ({ + ...fromA, + ...partial + })), (toI, options, ast, toA) => ParseResult.map(transformation.encode(toI, options, ast, toA), partial => ({ + ...toI, + ...partial + }))))]; + } + } + } + break; + } + case "Transformation": + { + if (AST.isTransformation(x)) { + if (AST.isTypeLiteralTransformation(y.transformation) && AST.isTypeLiteralTransformation(x.transformation)) { + return [new AST.Transformation(intersectTypeLiterals(x.from, y.from, path), intersectTypeLiterals(x.to, y.to, path), new AST.TypeLiteralTransformation(y.transformation.propertySignatureTransformations.concat(x.transformation.propertySignatureTransformations)))]; + } + } else { + return intersectUnionMembers([y], [x], path); + } + break; + } + } + throw new Error(errors_.getSchemaExtendErrorMessage(x, y, path)); +})); +/** + * Extends a schema with another schema. + * + * Not all extensions are supported, and their support depends on the nature of + * the involved schemas. + * + * Possible extensions include: + * - `Schema.String` with another `Schema.String` refinement or a string literal + * - `Schema.Number` with another `Schema.Number` refinement or a number literal + * - `Schema.Boolean` with another `Schema.Boolean` refinement or a boolean + * literal + * - A struct with another struct where overlapping fields support extension + * - A struct with in index signature + * - A struct with a union of supported schemas + * - A refinement of a struct with a supported schema + * - A suspend of a struct with a supported schema + * - A transformation between structs where the “from” and “to” sides have no + * overlapping fields with the target struct + * + * @example + * ```ts + * import * as Schema from "effect/Schema" + * + * const schema = Schema.Struct({ + * a: Schema.String, + * b: Schema.String + * }) + * + * // const extended: Schema< + * // { + * // readonly a: string + * // readonly b: string + * // } & { + * // readonly c: string + * // } & { + * // readonly [x: string]: string + * // } + * // > + * const extended = Schema.asSchema(schema.pipe( + * Schema.extend(Schema.Struct({ c: Schema.String })), // <= you can add more fields + * Schema.extend(Schema.Record({ key: Schema.String, value: Schema.String })) // <= you can add index signatures + * )) + * ``` + * + * @category combinators + * @since 3.10.0 + */ +export const extend = /*#__PURE__*/dual(2, (self, that) => make(extendAST(self.ast, that.ast, []))); +/** + * @category combinators + * @since 3.10.0 + */ +export const compose = /*#__PURE__*/dual(args => isSchema(args[1]), (from, to) => makeTransformationClass(from, to, AST.compose(from.ast, to.ast))); +/** + * @category constructors + * @since 3.10.0 + */ +export const suspend = f => make(new AST.Suspend(() => f().ast)); +/** + * @since 3.10.0 + * @category symbol + */ +export const RefineSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/Refine"); +function makeRefineClass(from, filter, ast) { + return class RefineClass extends make(ast) { + static annotations(annotations) { + return makeRefineClass(this.from, this.filter, mergeSchemaAnnotations(this.ast, annotations)); + } + static [RefineSchemaId] = from; + static from = from; + static filter = filter; + static make = (a, options) => { + return getDisableValidationMakeOption(options) ? a : ParseResult.validateSync(this)(a); + }; + }; +} +const fromFilterPredicateReturnTypeItem = (item, ast, input) => { + if (Predicate.isBoolean(item)) { + return item ? option_.none() : option_.some(new ParseResult.Type(ast, input)); + } + if (Predicate.isString(item)) { + return option_.some(new ParseResult.Type(ast, input, item)); + } + if (item !== undefined) { + if ("_tag" in item) { + return option_.some(item); + } + const issue = new ParseResult.Type(ast, input, item.message); + return option_.some(array_.isNonEmptyReadonlyArray(item.path) ? new ParseResult.Pointer(item.path, input, issue) : issue); + } + return option_.none(); +}; +const toFilterParseIssue = (out, ast, input) => { + if (util_.isSingle(out)) { + return fromFilterPredicateReturnTypeItem(out, ast, input); + } + if (array_.isNonEmptyReadonlyArray(out)) { + const issues = array_.filterMap(out, issue => fromFilterPredicateReturnTypeItem(issue, ast, input)); + if (array_.isNonEmptyReadonlyArray(issues)) { + return option_.some(issues.length === 1 ? issues[0] : new ParseResult.Composite(ast, input, issues)); + } + } + return option_.none(); +}; +export function filter(predicate, annotations) { + return self => { + function filter(input, options, ast) { + return toFilterParseIssue(predicate(input, options, ast), ast, input); + } + const ast = new AST.Refinement(self.ast, filter, toASTAnnotations(annotations)); + return makeRefineClass(self, filter, ast); + }; +} +/** + * @category transformations + * @since 3.10.0 + */ +export const filterEffect = /*#__PURE__*/dual(2, (self, f) => transformOrFail(self, typeSchema(self), { + strict: true, + decode: (i, options, ast) => ParseResult.flatMap(f(i, options, ast), filterReturnType => option_.match(toFilterParseIssue(filterReturnType, ast, i), { + onNone: () => ParseResult.succeed(i), + onSome: ParseResult.fail + })), + encode: a => ParseResult.succeed(a) +})); +function makeTransformationClass(from, to, ast) { + return class TransformationClass extends make(ast) { + static annotations(annotations) { + return makeTransformationClass(this.from, this.to, mergeSchemaAnnotations(this.ast, annotations)); + } + static from = from; + static to = to; + }; +} +/** + * Create a new `Schema` by transforming the input and output of an existing `Schema` + * using the provided decoding functions. + * + * @category transformations + * @since 3.10.0 + */ +export const transformOrFail = /*#__PURE__*/dual(args => isSchema(args[0]) && isSchema(args[1]), (from, to, options) => makeTransformationClass(from, to, new AST.Transformation(from.ast, to.ast, new AST.FinalTransformation(options.decode, options.encode)))); +/** + * Create a new `Schema` by transforming the input and output of an existing `Schema` + * using the provided mapping functions. + * + * @category transformations + * @since 3.10.0 + */ +export const transform = /*#__PURE__*/dual(args => isSchema(args[0]) && isSchema(args[1]), (from, to, options) => transformOrFail(from, to, { + strict: true, + decode: (fromA, _options, _ast, toA) => ParseResult.succeed(options.decode(fromA, toA)), + encode: (toI, _options, _ast, toA) => ParseResult.succeed(options.encode(toI, toA)) +})); +/** + * Creates a new `Schema` which transforms literal values. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import * as S from "effect/Schema" + * + * const schema = S.transformLiteral(0, "a") + * + * assert.deepStrictEqual(S.decodeSync(schema)(0), "a") + * ``` + * + * @category constructors + * @since 3.10.0 + */ +export function transformLiteral(from, to) { + return transform(Literal(from), Literal(to), { + strict: true, + decode: () => to, + encode: () => from + }); +} +export function transformLiterals(...pairs) { + return Union(...pairs.map(([from, to]) => transformLiteral(from, to))); +} +/** + * Attaches a property signature with the specified key and value to the schema. + * This API is useful when you want to add a property to your schema which doesn't describe the shape of the input, + * but rather maps to another schema, for example when you want to add a discriminant to a simple union. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import * as S from "effect/Schema" + * import { pipe } from "effect/Function" + * + * const Circle = S.Struct({ radius: S.Number }) + * const Square = S.Struct({ sideLength: S.Number }) + * const Shape = S.Union( + * Circle.pipe(S.attachPropertySignature("kind", "circle")), + * Square.pipe(S.attachPropertySignature("kind", "square")) + * ) + * + * assert.deepStrictEqual(S.decodeSync(Shape)({ radius: 10 }), { + * kind: "circle", + * radius: 10 + * }) + * ``` + * + * @category combinators + * @since 3.10.0 + */ +export const attachPropertySignature = /*#__PURE__*/dual(args => isSchema(args[0]), (schema, key, value, annotations) => { + const ast = extend(typeSchema(schema), Struct({ + [key]: Predicate.isSymbol(value) ? UniqueSymbolFromSelf(value) : Literal(value) + })).ast; + return make(new AST.Transformation(schema.ast, annotations ? mergeSchemaAnnotations(ast, annotations) : ast, new AST.TypeLiteralTransformation([new AST.PropertySignatureTransformation(key, key, () => option_.some(value), () => option_.none())]))); +}); +/** + * Merges a set of new annotations with existing ones, potentially overwriting + * any duplicates. + * + * @category annotations + * @since 3.10.0 + */ +export const annotations = /*#__PURE__*/dual(2, (self, annotations) => self.annotations(annotations)); +/** + * @category renaming + * @since 3.10.0 + */ +export const rename = /*#__PURE__*/dual(2, (self, mapping) => make(AST.rename(self.ast, mapping))); +/** + * @category schema id + * @since 3.10.0 + */ +export const TrimmedSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/Trimmed"); +/** + * Verifies that a string contains no leading or trailing whitespaces. + * + * Note. This combinator does not make any transformations, it only validates. + * If what you were looking for was a combinator to trim strings, then check out the `trim` combinator. + * + * @category string filters + * @since 3.10.0 + */ +export const trimmed = annotations => self => self.pipe(filter(a => a === a.trim(), { + schemaId: TrimmedSchemaId, + title: "trimmed", + description: "a string with no leading or trailing whitespace", + jsonSchema: { + pattern: "^\\S[\\s\\S]*\\S$|^\\S$|^$" + }, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const MaxLengthSchemaId = schemaId_.MaxLengthSchemaId; +/** + * @category string filters + * @since 3.10.0 + */ +export const maxLength = (maxLength, annotations) => self => self.pipe(filter(a => a.length <= maxLength, { + schemaId: MaxLengthSchemaId, + title: `maxLength(${maxLength})`, + description: `a string at most ${maxLength} character(s) long`, + jsonSchema: { + maxLength + }, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const MinLengthSchemaId = schemaId_.MinLengthSchemaId; +/** + * @category string filters + * @since 3.10.0 + */ +export const minLength = (minLength, annotations) => self => self.pipe(filter(a => a.length >= minLength, { + schemaId: MinLengthSchemaId, + title: `minLength(${minLength})`, + description: `a string at least ${minLength} character(s) long`, + jsonSchema: { + minLength + }, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const LengthSchemaId = schemaId_.LengthSchemaId; +/** + * @category string filters + * @since 3.10.0 + */ +export const length = (length, annotations) => self => { + const minLength = Predicate.isObject(length) ? Math.max(0, Math.floor(length.min)) : Math.max(0, Math.floor(length)); + const maxLength = Predicate.isObject(length) ? Math.max(minLength, Math.floor(length.max)) : minLength; + if (minLength !== maxLength) { + return self.pipe(filter(a => a.length >= minLength && a.length <= maxLength, { + schemaId: LengthSchemaId, + title: `length({ min: ${minLength}, max: ${maxLength})`, + description: `a string at least ${minLength} character(s) and at most ${maxLength} character(s) long`, + jsonSchema: { + minLength, + maxLength + }, + ...annotations + })); + } + return self.pipe(filter(a => a.length === minLength, { + schemaId: LengthSchemaId, + title: `length(${minLength})`, + description: minLength === 1 ? `a single character` : `a string ${minLength} character(s) long`, + jsonSchema: { + minLength, + maxLength: minLength + }, + ...annotations + })); +}; +/** + * @category schema id + * @since 3.10.0 + */ +export const PatternSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/Pattern"); +/** + * @category string filters + * @since 3.10.0 + */ +export const pattern = (regex, annotations) => self => { + const source = regex.source; + return self.pipe(filter(a => { + // The following line ensures that `lastIndex` is reset to `0` in case the user has specified the `g` flag + regex.lastIndex = 0; + return regex.test(a); + }, { + schemaId: PatternSchemaId, + [PatternSchemaId]: { + regex + }, + // title: `pattern(/${source}/)`, // avoiding this because it can be very long + description: `a string matching the pattern ${source}`, + jsonSchema: { + pattern: source + }, + ...annotations + })); +}; +/** + * @category schema id + * @since 3.10.0 + */ +export const StartsWithSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/StartsWith"); +/** + * @category string filters + * @since 3.10.0 + */ +export const startsWith = (startsWith, annotations) => self => { + const formatted = JSON.stringify(startsWith); + return self.pipe(filter(a => a.startsWith(startsWith), { + schemaId: StartsWithSchemaId, + [StartsWithSchemaId]: { + startsWith + }, + title: `startsWith(${formatted})`, + description: `a string starting with ${formatted}`, + jsonSchema: { + pattern: `^${startsWith}` + }, + ...annotations + })); +}; +/** + * @category schema id + * @since 3.10.0 + */ +export const EndsWithSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/EndsWith"); +/** + * @category string filters + * @since 3.10.0 + */ +export const endsWith = (endsWith, annotations) => self => { + const formatted = JSON.stringify(endsWith); + return self.pipe(filter(a => a.endsWith(endsWith), { + schemaId: EndsWithSchemaId, + [EndsWithSchemaId]: { + endsWith + }, + title: `endsWith(${formatted})`, + description: `a string ending with ${formatted}`, + jsonSchema: { + pattern: `^.*${endsWith}$` + }, + ...annotations + })); +}; +/** + * @category schema id + * @since 3.10.0 + */ +export const IncludesSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/Includes"); +/** + * @category string filters + * @since 3.10.0 + */ +export const includes = (searchString, annotations) => self => { + const formatted = JSON.stringify(searchString); + return self.pipe(filter(a => a.includes(searchString), { + schemaId: IncludesSchemaId, + [IncludesSchemaId]: { + includes: searchString + }, + title: `includes(${formatted})`, + description: `a string including ${formatted}`, + jsonSchema: { + pattern: `.*${searchString}.*` + }, + ...annotations + })); +}; +/** + * @category schema id + * @since 3.10.0 + */ +export const LowercasedSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/Lowercased"); +/** + * Verifies that a string is lowercased. + * + * @category string filters + * @since 3.10.0 + */ +export const lowercased = annotations => self => self.pipe(filter(a => a === a.toLowerCase(), { + schemaId: LowercasedSchemaId, + title: "lowercased", + description: "a lowercase string", + jsonSchema: { + pattern: "^[^A-Z]*$" + }, + ...annotations +})); +/** + * @category string constructors + * @since 3.10.0 + */ +export class Lowercased extends /*#__PURE__*/String$.pipe(/*#__PURE__*/lowercased({ + identifier: "Lowercased" +})) {} +/** + * @category schema id + * @since 3.10.0 + */ +export const UppercasedSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/Uppercased"); +/** + * Verifies that a string is uppercased. + * + * @category string filters + * @since 3.10.0 + */ +export const uppercased = annotations => self => self.pipe(filter(a => a === a.toUpperCase(), { + schemaId: UppercasedSchemaId, + title: "uppercased", + description: "an uppercase string", + jsonSchema: { + pattern: "^[^a-z]*$" + }, + ...annotations +})); +/** + * @category string constructors + * @since 3.10.0 + */ +export class Uppercased extends /*#__PURE__*/String$.pipe(/*#__PURE__*/uppercased({ + identifier: "Uppercased" +})) {} +/** + * @category schema id + * @since 3.10.0 + */ +export const CapitalizedSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/Capitalized"); +/** + * Verifies that a string is capitalized. + * + * @category string filters + * @since 3.10.0 + */ +export const capitalized = annotations => self => self.pipe(filter(a => a[0]?.toUpperCase() === a[0], { + schemaId: CapitalizedSchemaId, + title: "capitalized", + description: "a capitalized string", + jsonSchema: { + pattern: "^[^a-z]?.*$" + }, + ...annotations +})); +/** + * @category string constructors + * @since 3.10.0 + */ +export class Capitalized extends /*#__PURE__*/String$.pipe(/*#__PURE__*/capitalized({ + identifier: "Capitalized" +})) {} +/** + * @category schema id + * @since 3.10.0 + */ +export const UncapitalizedSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/Uncapitalized"); +/** + * Verifies that a string is uncapitalized. + * + * @category string filters + * @since 3.10.0 + */ +export const uncapitalized = annotations => self => self.pipe(filter(a => a[0]?.toLowerCase() === a[0], { + schemaId: UncapitalizedSchemaId, + title: "uncapitalized", + description: "a uncapitalized string", + jsonSchema: { + pattern: "^[^A-Z]?.*$" + }, + ...annotations +})); +/** + * @category string constructors + * @since 3.10.0 + */ +export class Uncapitalized extends /*#__PURE__*/String$.pipe(/*#__PURE__*/uncapitalized({ + identifier: "Uncapitalized" +})) {} +/** + * A schema representing a single character. + * + * @category string constructors + * @since 3.10.0 + */ +export class Char extends /*#__PURE__*/String$.pipe(/*#__PURE__*/length(1, { + identifier: "Char" +})) {} +/** + * @category string filters + * @since 3.10.0 + */ +export const nonEmptyString = annotations => minLength(1, { + title: "nonEmptyString", + description: "a non empty string", + ...annotations +}); +/** + * This schema converts a string to lowercase. + * + * @category string transformations + * @since 3.10.0 + */ +export class Lowercase extends /*#__PURE__*/transform(String$.annotations({ + description: "a string that will be converted to lowercase" +}), Lowercased, { + strict: true, + decode: i => i.toLowerCase(), + encode: identity +}).annotations({ + identifier: "Lowercase" +}) {} +/** + * This schema converts a string to uppercase. + * + * @category string transformations + * @since 3.10.0 + */ +export class Uppercase extends /*#__PURE__*/transform(String$.annotations({ + description: "a string that will be converted to uppercase" +}), Uppercased, { + strict: true, + decode: i => i.toUpperCase(), + encode: identity +}).annotations({ + identifier: "Uppercase" +}) {} +/** + * This schema converts a string to capitalized one. + * + * @category string transformations + * @since 3.10.0 + */ +export class Capitalize extends /*#__PURE__*/transform(String$.annotations({ + description: "a string that will be converted to a capitalized format" +}), Capitalized, { + strict: true, + decode: i => string_.capitalize(i), + encode: identity +}).annotations({ + identifier: "Capitalize" +}) {} +/** + * This schema converts a string to uncapitalized one. + * + * @category string transformations + * @since 3.10.0 + */ +export class Uncapitalize extends /*#__PURE__*/transform(String$.annotations({ + description: "a string that will be converted to an uncapitalized format" +}), Uncapitalized, { + strict: true, + decode: i => string_.uncapitalize(i), + encode: identity +}).annotations({ + identifier: "Uncapitalize" +}) {} +/** + * @category string constructors + * @since 3.10.0 + */ +export class Trimmed extends /*#__PURE__*/String$.pipe(/*#__PURE__*/trimmed({ + identifier: "Trimmed" +})) {} +/** + * Useful for validating strings that must contain meaningful characters without + * leading or trailing whitespace. + * + * @example + * ```ts + * import { Schema } from "effect" + * + * console.log(Schema.decodeOption(Schema.NonEmptyTrimmedString)("")) // Option.none() + * console.log(Schema.decodeOption(Schema.NonEmptyTrimmedString)(" a ")) // Option.none() + * console.log(Schema.decodeOption(Schema.NonEmptyTrimmedString)("a")) // Option.some("a") + * ``` + * + * @category string constructors + * @since 3.10.0 + */ +export class NonEmptyTrimmedString extends /*#__PURE__*/Trimmed.pipe(/*#__PURE__*/nonEmptyString({ + identifier: "NonEmptyTrimmedString" +})) {} +/** + * This schema allows removing whitespaces from the beginning and end of a string. + * + * @category string transformations + * @since 3.10.0 + */ +export class Trim extends /*#__PURE__*/transform(String$.annotations({ + description: "a string that will be trimmed" +}), Trimmed, { + strict: true, + decode: i => i.trim(), + encode: identity +}).annotations({ + identifier: "Trim" +}) {} +/** + * Returns a schema that allows splitting a string into an array of strings. + * + * @category string transformations + * @since 3.10.0 + */ +export const split = separator => transform(String$.annotations({ + description: "a string that will be split" +}), Array$(String$), { + strict: true, + decode: i => i.split(separator), + encode: a => a.join(separator) +}); +const getErrorMessage = e => e instanceof Error ? e.message : String(e); +const getParseJsonTransformation = options => transformOrFail(String$.annotations({ + description: "a string to be decoded into JSON" +}), Unknown, { + strict: true, + decode: (i, _, ast) => ParseResult.try({ + try: () => JSON.parse(i, options?.reviver), + catch: e => new ParseResult.Type(ast, i, getErrorMessage(e)) + }), + encode: (a, _, ast) => ParseResult.try({ + try: () => JSON.stringify(a, options?.replacer, options?.space), + catch: e => new ParseResult.Type(ast, a, getErrorMessage(e)) + }) +}).annotations({ + title: "parseJson", + schemaId: AST.ParseJsonSchemaId +}); +/** + * The `ParseJson` combinator provides a method to convert JSON strings into the `unknown` type using the underlying + * functionality of `JSON.parse`. It also utilizes `JSON.stringify` for encoding. + * + * You can optionally provide a `ParseJsonOptions` to configure both `JSON.parse` and `JSON.stringify` executions. + * + * Optionally, you can pass a schema `Schema` to obtain an `A` type instead of `unknown`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import * as Schema from "effect/Schema" + * + * assert.deepStrictEqual(Schema.decodeUnknownSync(Schema.parseJson())(`{"a":"1"}`), { a: "1" }) + * assert.deepStrictEqual(Schema.decodeUnknownSync(Schema.parseJson(Schema.Struct({ a: Schema.NumberFromString })))(`{"a":"1"}`), { a: 1 }) + * ``` + * + * @category string transformations + * @since 3.10.0 + */ +export const parseJson = (schemaOrOptions, o) => isSchema(schemaOrOptions) ? compose(parseJson(o), schemaOrOptions) : getParseJsonTransformation(schemaOrOptions); +/** + * @category string constructors + * @since 3.10.0 + */ +export class NonEmptyString extends /*#__PURE__*/String$.pipe(/*#__PURE__*/nonEmptyString({ + identifier: "NonEmptyString" +})) {} +/** + * @category schema id + * @since 3.10.0 + */ +export const UUIDSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/UUID"); +const uuidRegexp = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i; +/** + * Represents a Universally Unique Identifier (UUID). + * + * This schema ensures that the provided string adheres to the standard UUID format. + * + * @category string constructors + * @since 3.10.0 + */ +export class UUID extends /*#__PURE__*/String$.pipe(/*#__PURE__*/pattern(uuidRegexp, { + schemaId: UUIDSchemaId, + identifier: "UUID", + jsonSchema: { + format: "uuid", + pattern: uuidRegexp.source + }, + description: "a Universally Unique Identifier", + arbitrary: () => fc => fc.uuid() +})) {} +/** + * @category schema id + * @since 3.10.0 + */ +export const ULIDSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/ULID"); +const ulidRegexp = /^[0-7][0-9A-HJKMNP-TV-Z]{25}$/i; +/** + * Represents a Universally Unique Lexicographically Sortable Identifier (ULID). + * + * ULIDs are designed to be compact, URL-safe, and ordered, making them suitable for use as identifiers. + * This schema ensures that the provided string adheres to the standard ULID format. + * + * @category string constructors + * @since 3.10.0 + */ +export class ULID extends /*#__PURE__*/String$.pipe(/*#__PURE__*/pattern(ulidRegexp, { + schemaId: ULIDSchemaId, + identifier: "ULID", + description: "a Universally Unique Lexicographically Sortable Identifier", + arbitrary: () => fc => fc.ulid() +})) {} +/** + * Defines a schema that represents a `URL` object. + * + * @category URL constructors + * @since 3.11.0 + */ +export class URLFromSelf extends /*#__PURE__*/instanceOf(URL, { + typeConstructor: { + _tag: "URL" + }, + identifier: "URLFromSelf", + arbitrary: () => fc => fc.webUrl().map(s => new URL(s)), + pretty: () => url => url.toString() +}) {} +/** @ignore */ +class URL$ extends /*#__PURE__*/transformOrFail(String$.annotations({ + description: "a string to be decoded into a URL" +}), URLFromSelf, { + strict: true, + decode: (i, _, ast) => ParseResult.try({ + try: () => new URL(i), + catch: e => new ParseResult.Type(ast, i, `Unable to decode ${JSON.stringify(i)} into a URL. ${getErrorMessage(e)}`) + }), + encode: a => ParseResult.succeed(a.toString()) +}).annotations({ + identifier: "URL", + pretty: () => url => url.toString() +}) {} +export { +/** + * Defines a schema that attempts to convert a `string` to a `URL` object using + * the `new URL` constructor. + * + * @category URL transformations + * @since 3.11.0 + */ +URL$ as URL }; +/** + * @category schema id + * @since 3.10.0 + */ +export const FiniteSchemaId = schemaId_.FiniteSchemaId; +/** + * Ensures that the provided value is a finite number (excluding NaN, +Infinity, and -Infinity). + * + * @category number filters + * @since 3.10.0 + */ +export const finite = annotations => self => self.pipe(filter(Number.isFinite, { + schemaId: FiniteSchemaId, + title: "finite", + description: "a finite number", + jsonSchema: {}, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const GreaterThanSchemaId = schemaId_.GreaterThanSchemaId; +/** + * This filter checks whether the provided number is greater than the specified minimum. + * + * @category number filters + * @since 3.10.0 + */ +export const greaterThan = (exclusiveMinimum, annotations) => self => self.pipe(filter(a => a > exclusiveMinimum, { + schemaId: GreaterThanSchemaId, + title: `greaterThan(${exclusiveMinimum})`, + description: exclusiveMinimum === 0 ? "a positive number" : `a number greater than ${exclusiveMinimum}`, + jsonSchema: { + exclusiveMinimum + }, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const GreaterThanOrEqualToSchemaId = schemaId_.GreaterThanOrEqualToSchemaId; +/** + * This filter checks whether the provided number is greater than or equal to the specified minimum. + * + * @category number filters + * @since 3.10.0 + */ +export const greaterThanOrEqualTo = (minimum, annotations) => self => self.pipe(filter(a => a >= minimum, { + schemaId: GreaterThanOrEqualToSchemaId, + title: `greaterThanOrEqualTo(${minimum})`, + description: minimum === 0 ? "a non-negative number" : `a number greater than or equal to ${minimum}`, + jsonSchema: { + minimum + }, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const MultipleOfSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/MultipleOf"); +/** + * @category number filters + * @since 3.10.0 + */ +export const multipleOf = (divisor, annotations) => self => { + const positiveDivisor = Math.abs(divisor); // spec requires positive divisor + return self.pipe(filter(a => number_.remainder(a, divisor) === 0, { + schemaId: MultipleOfSchemaId, + title: `multipleOf(${positiveDivisor})`, + description: `a number divisible by ${positiveDivisor}`, + jsonSchema: { + multipleOf: positiveDivisor + }, + ...annotations + })); +}; +/** + * @category schema id + * @since 3.10.0 + */ +export const IntSchemaId = schemaId_.IntSchemaId; +/** + * Ensures that the provided value is an integer number (excluding NaN, +Infinity, and -Infinity). + * + * @category number filters + * @since 3.10.0 + */ +export const int = annotations => self => self.pipe(filter(a => Number.isSafeInteger(a), { + schemaId: IntSchemaId, + title: "int", + description: "an integer", + jsonSchema: { + type: "integer" + }, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const LessThanSchemaId = schemaId_.LessThanSchemaId; +/** + * This filter checks whether the provided number is less than the specified maximum. + * + * @category number filters + * @since 3.10.0 + */ +export const lessThan = (exclusiveMaximum, annotations) => self => self.pipe(filter(a => a < exclusiveMaximum, { + schemaId: LessThanSchemaId, + title: `lessThan(${exclusiveMaximum})`, + description: exclusiveMaximum === 0 ? "a negative number" : `a number less than ${exclusiveMaximum}`, + jsonSchema: { + exclusiveMaximum + }, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const LessThanOrEqualToSchemaId = schemaId_.LessThanOrEqualToSchemaId; +/** + * This schema checks whether the provided number is less than or equal to the specified maximum. + * + * @category number filters + * @since 3.10.0 + */ +export const lessThanOrEqualTo = (maximum, annotations) => self => self.pipe(filter(a => a <= maximum, { + schemaId: LessThanOrEqualToSchemaId, + title: `lessThanOrEqualTo(${maximum})`, + description: maximum === 0 ? "a non-positive number" : `a number less than or equal to ${maximum}`, + jsonSchema: { + maximum + }, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const BetweenSchemaId = schemaId_.BetweenSchemaId; +/** + * This filter checks whether the provided number falls within the specified minimum and maximum values. + * + * @category number filters + * @since 3.10.0 + */ +export const between = (minimum, maximum, annotations) => self => self.pipe(filter(a => a >= minimum && a <= maximum, { + schemaId: BetweenSchemaId, + title: `between(${minimum}, ${maximum})`, + description: `a number between ${minimum} and ${maximum}`, + jsonSchema: { + minimum, + maximum + }, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const NonNaNSchemaId = schemaId_.NonNaNSchemaId; +/** + * @category number filters + * @since 3.10.0 + */ +export const nonNaN = annotations => self => self.pipe(filter(a => !Number.isNaN(a), { + schemaId: NonNaNSchemaId, + title: "nonNaN", + description: "a number excluding NaN", + ...annotations +})); +/** + * @category number filters + * @since 3.10.0 + */ +export const positive = annotations => greaterThan(0, { + title: "positive", + ...annotations +}); +/** + * @category number filters + * @since 3.10.0 + */ +export const negative = annotations => lessThan(0, { + title: "negative", + ...annotations +}); +/** + * @category number filters + * @since 3.10.0 + */ +export const nonPositive = annotations => lessThanOrEqualTo(0, { + title: "nonPositive", + ...annotations +}); +/** + * @category number filters + * @since 3.10.0 + */ +export const nonNegative = annotations => greaterThanOrEqualTo(0, { + title: "nonNegative", + ...annotations +}); +/** + * Clamps a number between a minimum and a maximum value. + * + * @category number transformations + * @since 3.10.0 + */ +export const clamp = (minimum, maximum) => self => { + return transform(self, typeSchema(self).pipe(between(minimum, maximum)), { + strict: false, + decode: i => number_.clamp(i, { + minimum, + maximum + }), + encode: identity + }); +}; +/** + * Transforms a `string` into a `number` by parsing the string using the `parse` + * function of the `effect/Number` module. + * + * It returns an error if the value can't be converted (for example when + * non-numeric characters are provided). + * + * The following special string values are supported: "NaN", "Infinity", + * "-Infinity". + * + * @category number transformations + * @since 3.10.0 + */ +export function parseNumber(self) { + return transformOrFail(self, Number$, { + strict: false, + decode: (i, _, ast) => ParseResult.fromOption(number_.parse(i), () => new ParseResult.Type(ast, i, `Unable to decode ${JSON.stringify(i)} into a number`)), + encode: a => ParseResult.succeed(String(a)) + }); +} +/** + * This schema transforms a `string` into a `number` by parsing the string using the `parse` function of the `effect/Number` module. + * + * It returns an error if the value can't be converted (for example when non-numeric characters are provided). + * + * The following special string values are supported: "NaN", "Infinity", "-Infinity". + * + * @category number transformations + * @since 3.10.0 + */ +export class NumberFromString extends /*#__PURE__*/parseNumber(String$.annotations({ + description: "a string to be decoded into a number" +})).annotations({ + identifier: "NumberFromString" +}) {} +/** + * @category number constructors + * @since 3.10.0 + */ +export class Finite extends /*#__PURE__*/Number$.pipe(/*#__PURE__*/finite({ + identifier: "Finite" +})) {} +/** + * @category number constructors + * @since 3.10.0 + */ +export class Int extends /*#__PURE__*/Number$.pipe(/*#__PURE__*/int({ + identifier: "Int" +})) {} +/** + * @category number constructors + * @since 3.10.0 + */ +export class NonNaN extends /*#__PURE__*/Number$.pipe(/*#__PURE__*/nonNaN({ + identifier: "NonNaN" +})) {} +/** + * @category number constructors + * @since 3.10.0 + */ +export class Positive extends /*#__PURE__*/Number$.pipe(/*#__PURE__*/positive({ + identifier: "Positive" +})) {} +/** + * @category number constructors + * @since 3.10.0 + */ +export class Negative extends /*#__PURE__*/Number$.pipe(/*#__PURE__*/negative({ + identifier: "Negative" +})) {} +/** + * @category number constructors + * @since 3.10.0 + */ +export class NonPositive extends /*#__PURE__*/Number$.pipe(/*#__PURE__*/nonPositive({ + identifier: "NonPositive" +})) {} +/** + * @category number constructors + * @since 3.10.0 + */ +export class NonNegative extends /*#__PURE__*/Number$.pipe(/*#__PURE__*/nonNegative({ + identifier: "NonNegative" +})) {} +/** + * @category schema id + * @since 3.10.0 + */ +export const JsonNumberSchemaId = schemaId_.JsonNumberSchemaId; +/** + * The `JsonNumber` is a schema for representing JSON numbers. It ensures that the provided value is a valid + * number by filtering out `NaN` and `(+/-) Infinity`. This is useful when you want to validate and represent numbers in JSON + * format. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import * as Schema from "effect/Schema" + * + * const is = Schema.is(Schema.JsonNumber) + * + * assert.deepStrictEqual(is(42), true) + * assert.deepStrictEqual(is(Number.NaN), false) + * assert.deepStrictEqual(is(Number.POSITIVE_INFINITY), false) + * assert.deepStrictEqual(is(Number.NEGATIVE_INFINITY), false) + * ``` + * + * @category number constructors + * @since 3.10.0 + */ +export class JsonNumber extends /*#__PURE__*/Number$.pipe(/*#__PURE__*/finite({ + schemaId: JsonNumberSchemaId, + identifier: "JsonNumber" +})) {} +/** + * @category boolean transformations + * @since 3.10.0 + */ +export class Not extends /*#__PURE__*/transform(/*#__PURE__*/Boolean$.annotations({ + description: "a boolean that will be negated" +}), Boolean$, { + strict: true, + decode: i => boolean_.not(i), + encode: a => boolean_.not(a) +}) {} +const encodeSymbol = (sym, ast) => { + const key = Symbol.keyFor(sym); + return key === undefined ? ParseResult.fail(new ParseResult.Type(ast, sym, `Unable to encode a unique symbol ${String(sym)} into a string`)) : ParseResult.succeed(key); +}; +const decodeSymbol = s => ParseResult.succeed(Symbol.for(s)); +/** @ignore */ +class Symbol$ extends /*#__PURE__*/transformOrFail(String$.annotations({ + description: "a string to be decoded into a globally shared symbol" +}), SymbolFromSelf, { + strict: false, + decode: i => decodeSymbol(i), + encode: (a, _, ast) => encodeSymbol(a, ast) +}).annotations({ + identifier: "Symbol" +}) {} +export { +/** + * Converts a string key into a globally shared symbol. + * + * @category symbol transformations + * @since 3.10.0 + */ +Symbol$ as Symbol }; +/** + * @category schema id + * @since 3.10.0 + */ +export const GreaterThanBigIntSchemaId = schemaId_.GreaterThanBigintSchemaId; +/** + * @category bigint filters + * @since 3.10.0 + */ +export const greaterThanBigInt = (min, annotations) => self => self.pipe(filter(a => a > min, { + schemaId: GreaterThanBigIntSchemaId, + [GreaterThanBigIntSchemaId]: { + min + }, + title: `greaterThanBigInt(${min})`, + description: min === 0n ? "a positive bigint" : `a bigint greater than ${min}n`, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const GreaterThanOrEqualToBigIntSchemaId = schemaId_.GreaterThanOrEqualToBigIntSchemaId; +/** + * @category bigint filters + * @since 3.10.0 + */ +export const greaterThanOrEqualToBigInt = (min, annotations) => self => self.pipe(filter(a => a >= min, { + schemaId: GreaterThanOrEqualToBigIntSchemaId, + [GreaterThanOrEqualToBigIntSchemaId]: { + min + }, + title: `greaterThanOrEqualToBigInt(${min})`, + description: min === 0n ? "a non-negative bigint" : `a bigint greater than or equal to ${min}n`, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const LessThanBigIntSchemaId = schemaId_.LessThanBigIntSchemaId; +/** + * @category bigint filters + * @since 3.10.0 + */ +export const lessThanBigInt = (max, annotations) => self => self.pipe(filter(a => a < max, { + schemaId: LessThanBigIntSchemaId, + [LessThanBigIntSchemaId]: { + max + }, + title: `lessThanBigInt(${max})`, + description: max === 0n ? "a negative bigint" : `a bigint less than ${max}n`, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const LessThanOrEqualToBigIntSchemaId = schemaId_.LessThanOrEqualToBigIntSchemaId; +/** + * @category bigint filters + * @since 3.10.0 + */ +export const lessThanOrEqualToBigInt = (max, annotations) => self => self.pipe(filter(a => a <= max, { + schemaId: LessThanOrEqualToBigIntSchemaId, + [LessThanOrEqualToBigIntSchemaId]: { + max + }, + title: `lessThanOrEqualToBigInt(${max})`, + description: max === 0n ? "a non-positive bigint" : `a bigint less than or equal to ${max}n`, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const BetweenBigIntSchemaId = schemaId_.BetweenBigintSchemaId; +/** + * @category bigint filters + * @since 3.10.0 + */ +export const betweenBigInt = (min, max, annotations) => self => self.pipe(filter(a => a >= min && a <= max, { + schemaId: BetweenBigIntSchemaId, + [BetweenBigIntSchemaId]: { + min, + max + }, + title: `betweenBigInt(${min}, ${max})`, + description: `a bigint between ${min}n and ${max}n`, + ...annotations +})); +/** + * @category bigint filters + * @since 3.10.0 + */ +export const positiveBigInt = annotations => greaterThanBigInt(0n, { + title: "positiveBigInt", + ...annotations +}); +/** + * @category bigint filters + * @since 3.10.0 + */ +export const negativeBigInt = annotations => lessThanBigInt(0n, { + title: "negativeBigInt", + ...annotations +}); +/** + * @category bigint filters + * @since 3.10.0 + */ +export const nonNegativeBigInt = annotations => greaterThanOrEqualToBigInt(0n, { + title: "nonNegativeBigInt", + ...annotations +}); +/** + * @category bigint filters + * @since 3.10.0 + */ +export const nonPositiveBigInt = annotations => lessThanOrEqualToBigInt(0n, { + title: "nonPositiveBigInt", + ...annotations +}); +/** + * Clamps a bigint between a minimum and a maximum value. + * + * @category bigint transformations + * @since 3.10.0 + */ +export const clampBigInt = (minimum, maximum) => self => transform(self, self.pipe(typeSchema, betweenBigInt(minimum, maximum)), { + strict: false, + decode: i => bigInt_.clamp(i, { + minimum, + maximum + }), + encode: identity +}); +/** @ignore */ +class BigInt$ extends /*#__PURE__*/transformOrFail(String$.annotations({ + description: "a string to be decoded into a bigint" +}), BigIntFromSelf, { + strict: true, + decode: (i, _, ast) => ParseResult.fromOption(bigInt_.fromString(i), () => new ParseResult.Type(ast, i, `Unable to decode ${JSON.stringify(i)} into a bigint`)), + encode: a => ParseResult.succeed(String(a)) +}).annotations({ + identifier: "BigInt" +}) {} +export { +/** + * This schema transforms a `string` into a `bigint` by parsing the string using the `BigInt` function. + * + * It returns an error if the value can't be converted (for example when non-numeric characters are provided). + * + * @category bigint transformations + * @since 3.10.0 + */ +BigInt$ as BigInt }; +/** + * @category bigint constructors + * @since 3.10.0 + */ +export const PositiveBigIntFromSelf = /*#__PURE__*/BigIntFromSelf.pipe(/*#__PURE__*/positiveBigInt({ + identifier: "PositiveBigintFromSelf" +})); +/** + * @category bigint constructors + * @since 3.10.0 + */ +export const PositiveBigInt = /*#__PURE__*/BigInt$.pipe(/*#__PURE__*/positiveBigInt({ + identifier: "PositiveBigint" +})); +/** + * @category bigint constructors + * @since 3.10.0 + */ +export const NegativeBigIntFromSelf = /*#__PURE__*/BigIntFromSelf.pipe(/*#__PURE__*/negativeBigInt({ + identifier: "NegativeBigintFromSelf" +})); +/** + * @category bigint constructors + * @since 3.10.0 + */ +export const NegativeBigInt = /*#__PURE__*/BigInt$.pipe(/*#__PURE__*/negativeBigInt({ + identifier: "NegativeBigint" +})); +/** + * @category bigint constructors + * @since 3.10.0 + */ +export const NonPositiveBigIntFromSelf = /*#__PURE__*/BigIntFromSelf.pipe(/*#__PURE__*/nonPositiveBigInt({ + identifier: "NonPositiveBigintFromSelf" +})); +/** + * @category bigint constructors + * @since 3.10.0 + */ +export const NonPositiveBigInt = /*#__PURE__*/BigInt$.pipe(/*#__PURE__*/nonPositiveBigInt({ + identifier: "NonPositiveBigint" +})); +/** + * @category bigint constructors + * @since 3.10.0 + */ +export const NonNegativeBigIntFromSelf = /*#__PURE__*/BigIntFromSelf.pipe(/*#__PURE__*/nonNegativeBigInt({ + identifier: "NonNegativeBigintFromSelf" +})); +/** + * @category bigint constructors + * @since 3.10.0 + */ +export const NonNegativeBigInt = /*#__PURE__*/BigInt$.pipe(/*#__PURE__*/nonNegativeBigInt({ + identifier: "NonNegativeBigint" +})); +/** + * This schema transforms a `number` into a `bigint` by parsing the number using the `BigInt` function. + * + * It returns an error if the value can't be safely encoded as a `number` due to being out of range. + * + * @category bigint transformations + * @since 3.10.0 + */ +export class BigIntFromNumber extends /*#__PURE__*/transformOrFail(Number$.annotations({ + description: "a number to be decoded into a bigint" +}), BigIntFromSelf.pipe(betweenBigInt(BigInt(Number.MIN_SAFE_INTEGER), BigInt(Number.MAX_SAFE_INTEGER))), { + strict: true, + decode: (i, _, ast) => ParseResult.fromOption(bigInt_.fromNumber(i), () => new ParseResult.Type(ast, i, `Unable to decode ${i} into a bigint`)), + encode: (a, _, ast) => ParseResult.fromOption(bigInt_.toNumber(a), () => new ParseResult.Type(ast, a, `Unable to encode ${a}n into a number`)) +}).annotations({ + identifier: "BigIntFromNumber" +}) {} +const redactedArbitrary = value => fc => value(fc).map(redacted_.make); +const toComposite = (eff, onSuccess, ast, actual) => ParseResult.mapBoth(eff, { + onFailure: e => new ParseResult.Composite(ast, actual, e), + onSuccess +}); +const redactedParse = decodeUnknown => (u, options, ast) => redacted_.isRedacted(u) ? toComposite(decodeUnknown(redacted_.value(u), options), redacted_.make, ast, u) : ParseResult.fail(new ParseResult.Type(ast, u)); +/** + * @category Redacted constructors + * @since 3.10.0 + */ +export const RedactedFromSelf = value => declare([value], { + decode: value => redactedParse(ParseResult.decodeUnknown(value)), + encode: value => redactedParse(ParseResult.encodeUnknown(value)) +}, { + typeConstructor: { + _tag: "effect/Redacted" + }, + description: "Redacted()", + pretty: () => () => "Redacted()", + arbitrary: redactedArbitrary, + equivalence: redacted_.getEquivalence +}); +/** + * A transformation that transform a `Schema` into a + * `RedactedFromSelf`. + * + * @category Redacted transformations + * @since 3.10.0 + */ +export function Redacted(value) { + return transform(value, RedactedFromSelf(typeSchema(asSchema(value))), { + strict: true, + decode: i => redacted_.make(i), + encode: a => redacted_.value(a) + }); +} +/** + * @category Duration constructors + * @since 3.10.0 + */ +export class DurationFromSelf extends /*#__PURE__*/declare(duration_.isDuration, { + typeConstructor: { + _tag: "effect/Duration" + }, + identifier: "DurationFromSelf", + pretty: () => String, + arbitrary: () => fc => fc.oneof(fc.constant(duration_.infinity), fc.bigInt({ + min: 0n + }).map(_ => duration_.nanos(_)), fc.maxSafeNat().map(_ => duration_.millis(_))), + equivalence: () => duration_.Equivalence +}) {} +/** + * A schema that transforms a non negative `bigint` into a `Duration`. Treats + * the value as the number of nanoseconds. + * + * @category Duration transformations + * @since 3.10.0 + */ +export class DurationFromNanos extends /*#__PURE__*/transformOrFail(NonNegativeBigIntFromSelf.annotations({ + description: "a bigint to be decoded into a Duration" +}), DurationFromSelf.pipe(filter(duration => duration_.isFinite(duration), { + description: "a finite duration" +})), { + strict: true, + decode: i => ParseResult.succeed(duration_.nanos(i)), + encode: (a, _, ast) => option_.match(duration_.toNanos(a), { + onNone: () => ParseResult.fail(new ParseResult.Type(ast, a, `Unable to encode ${a} into a bigint`)), + onSome: nanos => ParseResult.succeed(nanos) + }) +}).annotations({ + identifier: "DurationFromNanos" +}) {} +/** + * A non-negative integer. +Infinity is excluded. + * + * @category number constructors + * @since 3.11.10 + */ +export const NonNegativeInt = /*#__PURE__*/NonNegative.pipe(int()).annotations({ + identifier: "NonNegativeInt" +}); +/** + * A schema that transforms a (possibly Infinite) non negative number into a + * `Duration`. Treats the value as the number of milliseconds. + * + * @category Duration transformations + * @since 3.10.0 + */ +export class DurationFromMillis extends /*#__PURE__*/transform(NonNegative.annotations({ + description: "a non-negative number to be decoded into a Duration" +}), DurationFromSelf, { + strict: true, + decode: i => duration_.millis(i), + encode: a => duration_.toMillis(a) +}).annotations({ + identifier: "DurationFromMillis" +}) {} +const DurationValueMillis = /*#__PURE__*/TaggedStruct("Millis", { + millis: NonNegativeInt +}); +const DurationValueNanos = /*#__PURE__*/TaggedStruct("Nanos", { + nanos: BigInt$ +}); +const DurationValueInfinity = /*#__PURE__*/TaggedStruct("Infinity", {}); +const durationValueInfinity = /*#__PURE__*/DurationValueInfinity.make({}); +const DurationValue = /*#__PURE__*/Union(DurationValueMillis, DurationValueNanos, DurationValueInfinity).annotations({ + identifier: "DurationValue", + description: "an JSON-compatible tagged union to be decoded into a Duration" +}); +const FiniteHRTime = /*#__PURE__*/Tuple(element(NonNegativeInt).annotations({ + title: "seconds" +}), element(NonNegativeInt).annotations({ + title: "nanos" +})).annotations({ + identifier: "FiniteHRTime" +}); +const InfiniteHRTime = /*#__PURE__*/Tuple(Literal(-1), Literal(0)).annotations({ + identifier: "InfiniteHRTime" +}); +const HRTime = /*#__PURE__*/Union(FiniteHRTime, InfiniteHRTime).annotations({ + identifier: "HRTime", + description: "a tuple of seconds and nanos to be decoded into a Duration" +}); +const isDurationValue = u => typeof u === "object"; +// TODO(4.0): remove HRTime union member +/** + * A schema that converts a JSON-compatible tagged union into a `Duration`. + * + * @category Duration transformations + * @since 3.10.0 + */ +export class Duration extends /*#__PURE__*/transform(Union(DurationValue, HRTime), DurationFromSelf, { + strict: true, + decode: i => { + if (isDurationValue(i)) { + switch (i._tag) { + case "Millis": + return duration_.millis(i.millis); + case "Nanos": + return duration_.nanos(i.nanos); + case "Infinity": + return duration_.infinity; + } + } + const [seconds, nanos] = i; + return seconds === -1 ? duration_.infinity : duration_.nanos(BigInt(seconds) * BigInt(1e9) + BigInt(nanos)); + }, + encode: a => { + switch (a.value._tag) { + case "Millis": + return DurationValueMillis.make({ + millis: a.value.millis + }); + case "Nanos": + return DurationValueNanos.make({ + nanos: a.value.nanos + }); + case "Infinity": + return durationValueInfinity; + } + } +}).annotations({ + identifier: "Duration" +}) {} +/** + * Clamps a `Duration` between a minimum and a maximum value. + * + * @category Duration transformations + * @since 3.10.0 + */ +export const clampDuration = (minimum, maximum) => self => transform(self, self.pipe(typeSchema, betweenDuration(minimum, maximum)), { + strict: false, + decode: i => duration_.clamp(i, { + minimum, + maximum + }), + encode: identity +}); +/** + * @category schema id + * @since 3.10.0 + */ +export const LessThanDurationSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/LessThanDuration"); +/** + * @category Duration filters + * @since 3.10.0 + */ +export const lessThanDuration = (max, annotations) => self => self.pipe(filter(a => duration_.lessThan(a, max), { + schemaId: LessThanDurationSchemaId, + [LessThanDurationSchemaId]: { + max + }, + title: `lessThanDuration(${max})`, + description: `a Duration less than ${duration_.decode(max)}`, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const LessThanOrEqualToDurationSchemaId = /*#__PURE__*/Symbol.for("effect/schema/LessThanOrEqualToDuration"); +/** + * @category Duration filters + * @since 3.10.0 + */ +export const lessThanOrEqualToDuration = (max, annotations) => self => self.pipe(filter(a => duration_.lessThanOrEqualTo(a, max), { + schemaId: LessThanDurationSchemaId, + [LessThanDurationSchemaId]: { + max + }, + title: `lessThanOrEqualToDuration(${max})`, + description: `a Duration less than or equal to ${duration_.decode(max)}`, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const GreaterThanDurationSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/GreaterThanDuration"); +/** + * @category Duration filters + * @since 3.10.0 + */ +export const greaterThanDuration = (min, annotations) => self => self.pipe(filter(a => duration_.greaterThan(a, min), { + schemaId: GreaterThanDurationSchemaId, + [GreaterThanDurationSchemaId]: { + min + }, + title: `greaterThanDuration(${min})`, + description: `a Duration greater than ${duration_.decode(min)}`, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const GreaterThanOrEqualToDurationSchemaId = /*#__PURE__*/Symbol.for("effect/schema/GreaterThanOrEqualToDuration"); +/** + * @category Duration filters + * @since 3.10.0 + */ +export const greaterThanOrEqualToDuration = (min, annotations) => self => self.pipe(filter(a => duration_.greaterThanOrEqualTo(a, min), { + schemaId: GreaterThanOrEqualToDurationSchemaId, + [GreaterThanOrEqualToDurationSchemaId]: { + min + }, + title: `greaterThanOrEqualToDuration(${min})`, + description: `a Duration greater than or equal to ${duration_.decode(min)}`, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const BetweenDurationSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/BetweenDuration"); +/** + * @category Duration filters + * @since 3.10.0 + */ +export const betweenDuration = (minimum, maximum, annotations) => self => self.pipe(filter(a => duration_.between(a, { + minimum, + maximum +}), { + schemaId: BetweenDurationSchemaId, + [BetweenDurationSchemaId]: { + maximum, + minimum + }, + title: `betweenDuration(${minimum}, ${maximum})`, + description: `a Duration between ${duration_.decode(minimum)} and ${duration_.decode(maximum)}`, + ...annotations +})); +/** + * @category Uint8Array constructors + * @since 3.10.0 + */ +export class Uint8ArrayFromSelf extends /*#__PURE__*/declare(Predicate.isUint8Array, { + typeConstructor: { + _tag: "Uint8Array" + }, + identifier: "Uint8ArrayFromSelf", + pretty: () => u8arr => `new Uint8Array(${JSON.stringify(Array.from(u8arr))})`, + arbitrary: () => fc => fc.uint8Array(), + equivalence: () => array_.getEquivalence(Equal.equals) +}) {} +/** + * @category number constructors + * @since 3.11.10 + */ +export class Uint8 extends /*#__PURE__*/Number$.pipe(/*#__PURE__*/between(0, 255, { + identifier: "Uint8", + description: "a 8-bit unsigned integer" +})) {} +/** @ignore */ +class Uint8Array$ extends /*#__PURE__*/transform(Array$(Uint8).annotations({ + description: "an array of 8-bit unsigned integers to be decoded into a Uint8Array" +}), Uint8ArrayFromSelf, { + strict: true, + decode: i => Uint8Array.from(i), + encode: a => Array.from(a) +}).annotations({ + identifier: "Uint8Array" +}) {} +export { +/** + * A schema that transforms an array of numbers into a `Uint8Array`. + * + * @category Uint8Array transformations + * @since 3.10.0 + */ +Uint8Array$ as Uint8Array }; +const makeUint8ArrayTransformation = (id, decode, encode) => transformOrFail(String$.annotations({ + description: "a string to be decoded into a Uint8Array" +}), Uint8ArrayFromSelf, { + strict: true, + decode: (i, _, ast) => either_.mapLeft(decode(i), decodeException => new ParseResult.Type(ast, i, decodeException.message)), + encode: a => ParseResult.succeed(encode(a)) +}).annotations({ + identifier: id +}); +/** + * Decodes a base64 (RFC4648) encoded string into a `Uint8Array`. + * + * @category Uint8Array transformations + * @since 3.10.0 + */ +export const Uint8ArrayFromBase64 = /*#__PURE__*/makeUint8ArrayTransformation("Uint8ArrayFromBase64", Encoding.decodeBase64, Encoding.encodeBase64); +/** + * Decodes a base64 (URL) encoded string into a `Uint8Array`. + * + * @category Uint8Array transformations + * @since 3.10.0 + */ +export const Uint8ArrayFromBase64Url = /*#__PURE__*/makeUint8ArrayTransformation("Uint8ArrayFromBase64Url", Encoding.decodeBase64Url, Encoding.encodeBase64Url); +/** + * Decodes a hex encoded string into a `Uint8Array`. + * + * @category Uint8Array transformations + * @since 3.10.0 + */ +export const Uint8ArrayFromHex = /*#__PURE__*/makeUint8ArrayTransformation("Uint8ArrayFromHex", Encoding.decodeHex, Encoding.encodeHex); +const makeEncodingTransformation = (id, decode, encode) => transformOrFail(String$.annotations({ + description: `A string that is interpreted as being ${id}-encoded and will be decoded into a UTF-8 string` +}), String$, { + strict: true, + decode: (i, _, ast) => either_.mapLeft(decode(i), decodeException => new ParseResult.Type(ast, i, decodeException.message)), + encode: a => ParseResult.succeed(encode(a)) +}).annotations({ + identifier: `StringFrom${id}` +}); +/** + * Decodes a base64 (RFC4648) encoded string into a UTF-8 string. + * + * @category string transformations + * @since 3.10.0 + */ +export const StringFromBase64 = /*#__PURE__*/makeEncodingTransformation("Base64", Encoding.decodeBase64String, Encoding.encodeBase64); +/** + * Decodes a base64 (URL) encoded string into a UTF-8 string. + * + * @category string transformations + * @since 3.10.0 + */ +export const StringFromBase64Url = /*#__PURE__*/makeEncodingTransformation("Base64Url", Encoding.decodeBase64UrlString, Encoding.encodeBase64Url); +/** + * Decodes a hex encoded string into a UTF-8 string. + * + * @category string transformations + * @since 3.10.0 + */ +export const StringFromHex = /*#__PURE__*/makeEncodingTransformation("Hex", Encoding.decodeHexString, Encoding.encodeHex); +/** + * Decodes a URI component encoded string into a UTF-8 string. + * Can be used to store data in a URL. + * + * @example + * ```ts + * import { Schema } from "effect" + * + * const PaginationSchema = Schema.Struct({ + * maxItemPerPage: Schema.Number, + * page: Schema.Number + * }) + * + * const UrlSchema = Schema.compose(Schema.StringFromUriComponent, Schema.parseJson(PaginationSchema)) + * + * console.log(Schema.encodeSync(UrlSchema)({ maxItemPerPage: 10, page: 1 })) + * // Output: %7B%22maxItemPerPage%22%3A10%2C%22page%22%3A1%7D + * ``` + * + * @category string transformations + * @since 3.12.0 + */ +export const StringFromUriComponent = /*#__PURE__*/transformOrFail(String$.annotations({ + description: `A string that is interpreted as being UriComponent-encoded and will be decoded into a UTF-8 string` +}), String$, { + strict: true, + decode: (i, _, ast) => either_.mapLeft(Encoding.decodeUriComponent(i), decodeException => new ParseResult.Type(ast, i, decodeException.message)), + encode: (a, _, ast) => either_.mapLeft(Encoding.encodeUriComponent(a), encodeException => new ParseResult.Type(ast, a, encodeException.message)) +}).annotations({ + identifier: `StringFromUriComponent` +}); +/** + * @category schema id + * @since 3.10.0 + */ +export const MinItemsSchemaId = schemaId_.MinItemsSchemaId; +/** + * @category ReadonlyArray filters + * @since 3.10.0 + */ +export const minItems = (n, annotations) => self => { + const minItems = Math.floor(n); + if (minItems < 1) { + throw new Error(errors_.getInvalidArgumentErrorMessage(`Expected an integer greater than or equal to 1, actual ${n}`)); + } + return self.pipe(filter(a => a.length >= minItems, { + schemaId: MinItemsSchemaId, + title: `minItems(${minItems})`, + description: `an array of at least ${minItems} item(s)`, + jsonSchema: { + minItems + }, + [AST.StableFilterAnnotationId]: true, + ...annotations + })); +}; +/** + * @category schema id + * @since 3.10.0 + */ +export const MaxItemsSchemaId = schemaId_.MaxItemsSchemaId; +/** + * @category ReadonlyArray filters + * @since 3.10.0 + */ +export const maxItems = (n, annotations) => self => { + const maxItems = Math.floor(n); + if (maxItems < 1) { + throw new Error(errors_.getInvalidArgumentErrorMessage(`Expected an integer greater than or equal to 1, actual ${n}`)); + } + return self.pipe(filter(a => a.length <= maxItems, { + schemaId: MaxItemsSchemaId, + title: `maxItems(${maxItems})`, + description: `an array of at most ${maxItems} item(s)`, + jsonSchema: { + maxItems + }, + [AST.StableFilterAnnotationId]: true, + ...annotations + })); +}; +/** + * @category schema id + * @since 3.10.0 + */ +export const ItemsCountSchemaId = schemaId_.ItemsCountSchemaId; +/** + * @category ReadonlyArray filters + * @since 3.10.0 + */ +export const itemsCount = (n, annotations) => self => { + const itemsCount = Math.floor(n); + if (itemsCount < 0) { + throw new Error(errors_.getInvalidArgumentErrorMessage(`Expected an integer greater than or equal to 0, actual ${n}`)); + } + return self.pipe(filter(a => a.length === itemsCount, { + schemaId: ItemsCountSchemaId, + title: `itemsCount(${itemsCount})`, + description: `an array of exactly ${itemsCount} item(s)`, + jsonSchema: { + minItems: itemsCount, + maxItems: itemsCount + }, + [AST.StableFilterAnnotationId]: true, + ...annotations + })); +}; +/** + * @category ReadonlyArray transformations + * @since 3.10.0 + */ +export const getNumberIndexedAccess = self => make(AST.getNumberIndexedAccess(self.ast)); +/** + * Get the first element of a `ReadonlyArray`, or `None` if the array is empty. + * + * @category ReadonlyArray transformations + * @since 3.10.0 + */ +export function head(self) { + return transform(self, OptionFromSelf(getNumberIndexedAccess(typeSchema(self))), { + strict: false, + decode: i => array_.head(i), + encode: a => option_.match(a, { + onNone: () => [], + onSome: array_.of + }) + }); +} +/** + * Get the first element of a `NonEmptyReadonlyArray`. + * + * @category NonEmptyReadonlyArray transformations + * @since 3.12.0 + */ +export function headNonEmpty(self) { + return transform(self, getNumberIndexedAccess(typeSchema(self)), { + strict: false, + decode: i => array_.headNonEmpty(i), + encode: a => array_.of(a) + }); +} +/** + * Retrieves the first element of a `ReadonlyArray`. + * + * If the array is empty, it returns the `fallback` argument if provided; otherwise, it fails. + * + * @category ReadonlyArray transformations + * @since 3.10.0 + */ +export const headOrElse = /*#__PURE__*/dual(args => isSchema(args[0]), (self, fallback) => transformOrFail(self, getNumberIndexedAccess(typeSchema(self)), { + strict: true, + decode: (i, _, ast) => i.length > 0 ? ParseResult.succeed(i[0]) : fallback ? ParseResult.succeed(fallback()) : ParseResult.fail(new ParseResult.Type(ast, i, "Unable to retrieve the first element of an empty array")), + encode: a => ParseResult.succeed(array_.of(a)) +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const ValidDateSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/ValidDate"); +/** + * Defines a filter that specifically rejects invalid dates, such as `new + * Date("Invalid Date")`. This filter ensures that only properly formatted and + * valid date objects are accepted, enhancing data integrity by preventing + * erroneous date values from being processed. + * + * @category Date filters + * @since 3.10.0 + */ +export const validDate = annotations => self => self.pipe(filter(a => !Number.isNaN(a.getTime()), { + schemaId: ValidDateSchemaId, + [ValidDateSchemaId]: { + noInvalidDate: true + }, + title: "validDate", + description: "a valid Date", + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const LessThanDateSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/LessThanDate"); +/** + * @category Date filters + * @since 3.10.0 + */ +export const lessThanDate = (max, annotations) => self => self.pipe(filter(a => a < max, { + schemaId: LessThanDateSchemaId, + [LessThanDateSchemaId]: { + max + }, + title: `lessThanDate(${Inspectable.formatDate(max)})`, + description: `a date before ${Inspectable.formatDate(max)}`, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const LessThanOrEqualToDateSchemaId = /*#__PURE__*/Symbol.for("effect/schema/LessThanOrEqualToDate"); +/** + * @category Date filters + * @since 3.10.0 + */ +export const lessThanOrEqualToDate = (max, annotations) => self => self.pipe(filter(a => a <= max, { + schemaId: LessThanOrEqualToDateSchemaId, + [LessThanOrEqualToDateSchemaId]: { + max + }, + title: `lessThanOrEqualToDate(${Inspectable.formatDate(max)})`, + description: `a date before or equal to ${Inspectable.formatDate(max)}`, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const GreaterThanDateSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/GreaterThanDate"); +/** + * @category Date filters + * @since 3.10.0 + */ +export const greaterThanDate = (min, annotations) => self => self.pipe(filter(a => a > min, { + schemaId: GreaterThanDateSchemaId, + [GreaterThanDateSchemaId]: { + min + }, + title: `greaterThanDate(${Inspectable.formatDate(min)})`, + description: `a date after ${Inspectable.formatDate(min)}`, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const GreaterThanOrEqualToDateSchemaId = /*#__PURE__*/Symbol.for("effect/schema/GreaterThanOrEqualToDate"); +/** + * @category Date filters + * @since 3.10.0 + */ +export const greaterThanOrEqualToDate = (min, annotations) => self => self.pipe(filter(a => a >= min, { + schemaId: GreaterThanOrEqualToDateSchemaId, + [GreaterThanOrEqualToDateSchemaId]: { + min + }, + title: `greaterThanOrEqualToDate(${Inspectable.formatDate(min)})`, + description: `a date after or equal to ${Inspectable.formatDate(min)}`, + ...annotations +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const BetweenDateSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/BetweenDate"); +/** + * @category Date filters + * @since 3.10.0 + */ +export const betweenDate = (min, max, annotations) => self => self.pipe(filter(a => a <= max && a >= min, { + schemaId: BetweenDateSchemaId, + [BetweenDateSchemaId]: { + max, + min + }, + title: `betweenDate(${Inspectable.formatDate(min)}, ${Inspectable.formatDate(max)})`, + description: `a date between ${Inspectable.formatDate(min)} and ${Inspectable.formatDate(max)}`, + ...annotations +})); +/** + * @category schema id + * @since 3.11.8 + */ +export const DateFromSelfSchemaId = schemaId_.DateFromSelfSchemaId; +/** + * Describes a schema that accommodates potentially invalid `Date` instances, + * such as `new Date("Invalid Date")`, without rejection. + * + * @category Date constructors + * @since 3.10.0 + */ +export class DateFromSelf extends /*#__PURE__*/declare(Predicate.isDate, { + typeConstructor: { + _tag: "Date" + }, + identifier: "DateFromSelf", + schemaId: DateFromSelfSchemaId, + [DateFromSelfSchemaId]: { + noInvalidDate: false + }, + description: "a potentially invalid Date instance", + pretty: () => date => `new Date(${JSON.stringify(date)})`, + arbitrary: () => fc => fc.date({ + noInvalidDate: false + }), + equivalence: () => Equivalence.Date +}) {} +/** + * Defines a schema that ensures only valid dates are accepted. This schema + * rejects values like `new Date("Invalid Date")`, which, despite being a `Date` + * instance, represents an invalid date. Such stringent validation ensures that + * all date objects processed through this schema are properly formed and + * represent real dates. + * + * @category Date constructors + * @since 3.10.0 + */ +export class ValidDateFromSelf extends /*#__PURE__*/DateFromSelf.pipe(/*#__PURE__*/validDate({ + identifier: "ValidDateFromSelf", + description: "a valid Date instance" +})) {} +/** + * Defines a schema that attempts to convert a `string` to a `Date` object using + * the `new Date` constructor. This conversion is lenient, meaning it does not + * reject strings that do not form valid dates (e.g., using `new Date("Invalid + * Date")` results in a `Date` object, despite being invalid). + * + * @category Date transformations + * @since 3.10.0 + */ +export class DateFromString extends /*#__PURE__*/transform(String$.annotations({ + description: "a string to be decoded into a Date" +}), DateFromSelf, { + strict: true, + decode: i => new Date(i), + encode: a => Inspectable.formatDate(a) +}).annotations({ + identifier: "DateFromString" +}) {} +/** @ignore */ +class Date$ extends /*#__PURE__*/DateFromString.pipe(/*#__PURE__*/validDate({ + identifier: "Date" +})) {} +export { +/** + * This schema converts a `string` into a `Date` object using the `new Date` + * constructor. It ensures that only valid date strings are accepted, + * rejecting any strings that would result in an invalid date, such as `new + * Date("Invalid Date")`. + * + * @category Date transformations + * @since 3.10.0 + */ +Date$ as Date }; +/** + * Defines a schema that converts a `number` into a `Date` object using the `new + * Date` constructor. This schema does not validate the numerical input, + * allowing potentially invalid values such as `NaN`, `Infinity`, and + * `-Infinity` to be converted into `Date` objects. During the encoding process, + * any invalid `Date` object will be encoded to `NaN`. + * + * @category Date transformations + * @since 3.10.0 + */ +export class DateFromNumber extends /*#__PURE__*/transform(Number$.annotations({ + description: "a number to be decoded into a Date" +}), DateFromSelf, { + strict: true, + decode: i => new Date(i), + encode: a => a.getTime() +}).annotations({ + identifier: "DateFromNumber" +}) {} +/** + * Describes a schema that represents a `DateTime.Utc` instance. + * + * @category DateTime.Utc constructors + * @since 3.10.0 + */ +export class DateTimeUtcFromSelf extends /*#__PURE__*/declare(u => dateTime.isDateTime(u) && dateTime.isUtc(u), { + typeConstructor: { + _tag: "effect/DateTime.Utc" + }, + identifier: "DateTimeUtcFromSelf", + description: "a DateTime.Utc instance", + pretty: () => dateTime => dateTime.toString(), + arbitrary: () => fc => fc.date({ + noInvalidDate: true + }).map(date => dateTime.unsafeFromDate(date)), + equivalence: () => dateTime.Equivalence +}) {} +const decodeDateTimeUtc = (input, ast) => ParseResult.try({ + try: () => dateTime.unsafeMake(input), + catch: () => new ParseResult.Type(ast, input, `Unable to decode ${Inspectable.formatUnknown(input)} into a DateTime.Utc`) +}); +/** + * Defines a schema that attempts to convert a `number` to a `DateTime.Utc` instance using the `DateTime.unsafeMake` constructor. + * + * @category DateTime.Utc transformations + * @since 3.10.0 + */ +export class DateTimeUtcFromNumber extends /*#__PURE__*/transformOrFail(Number$.annotations({ + description: "a number to be decoded into a DateTime.Utc" +}), DateTimeUtcFromSelf, { + strict: true, + decode: (i, _, ast) => decodeDateTimeUtc(i, ast), + encode: a => ParseResult.succeed(dateTime.toEpochMillis(a)) +}).annotations({ + identifier: "DateTimeUtcFromNumber" +}) {} +/** + * Defines a schema that attempts to convert a `Date` to a `DateTime.Utc` instance using the `DateTime.unsafeMake` constructor. + * + * @category DateTime.Utc transformations + * @since 3.12.0 + */ +export class DateTimeUtcFromDate extends /*#__PURE__*/transformOrFail(DateFromSelf.annotations({ + description: "a Date to be decoded into a DateTime.Utc" +}), DateTimeUtcFromSelf, { + strict: true, + decode: (i, _, ast) => decodeDateTimeUtc(i, ast), + encode: a => ParseResult.succeed(dateTime.toDateUtc(a)) +}).annotations({ + identifier: "DateTimeUtcFromDate" +}) {} +/** + * Defines a schema that attempts to convert a `string` to a `DateTime.Utc` instance using the `DateTime.unsafeMake` constructor. + * + * @category DateTime.Utc transformations + * @since 3.10.0 + */ +export class DateTimeUtc extends /*#__PURE__*/transformOrFail(String$.annotations({ + description: "a string to be decoded into a DateTime.Utc" +}), DateTimeUtcFromSelf, { + strict: true, + decode: (i, _, ast) => decodeDateTimeUtc(i, ast), + encode: a => ParseResult.succeed(dateTime.formatIso(a)) +}).annotations({ + identifier: "DateTimeUtc" +}) {} +const timeZoneOffsetArbitrary = () => fc => fc.integer({ + min: -12 * 60 * 60 * 1000, + max: 14 * 60 * 60 * 1000 +}).map(dateTime.zoneMakeOffset); +/** + * Describes a schema that represents a `TimeZone.Offset` instance. + * + * @category TimeZone constructors + * @since 3.10.0 + */ +export class TimeZoneOffsetFromSelf extends /*#__PURE__*/declare(dateTime.isTimeZoneOffset, { + typeConstructor: { + _tag: "effect/DateTime.TimeZone.Offset" + }, + identifier: "TimeZoneOffsetFromSelf", + description: "a TimeZone.Offset instance", + pretty: () => zone => zone.toString(), + arbitrary: timeZoneOffsetArbitrary +}) {} +/** + * Defines a schema that converts a `number` to a `TimeZone.Offset` instance using the `DateTime.zoneMakeOffset` constructor. + * + * @category TimeZone transformations + * @since 3.10.0 + */ +export class TimeZoneOffset extends /*#__PURE__*/transform(Number$.annotations({ + description: "a number to be decoded into a TimeZone.Offset" +}), TimeZoneOffsetFromSelf, { + strict: true, + decode: i => dateTime.zoneMakeOffset(i), + encode: a => a.offset +}).annotations({ + identifier: "TimeZoneOffset" +}) {} +const timeZoneNamedArbitrary = () => fc => fc.constantFrom(...Intl.supportedValuesOf("timeZone")).map(dateTime.zoneUnsafeMakeNamed); +/** + * Describes a schema that represents a `TimeZone.Named` instance. + * + * @category TimeZone constructors + * @since 3.10.0 + */ +export class TimeZoneNamedFromSelf extends /*#__PURE__*/declare(dateTime.isTimeZoneNamed, { + typeConstructor: { + _tag: "effect/DateTime.TimeZone.Named" + }, + identifier: "TimeZoneNamedFromSelf", + description: "a TimeZone.Named instance", + pretty: () => zone => zone.toString(), + arbitrary: timeZoneNamedArbitrary +}) {} +/** + * Defines a schema that attempts to convert a `string` to a `TimeZone.Named` instance using the `DateTime.zoneUnsafeMakeNamed` constructor. + * + * @category TimeZone transformations + * @since 3.10.0 + */ +export class TimeZoneNamed extends /*#__PURE__*/transformOrFail(String$.annotations({ + description: "a string to be decoded into a TimeZone.Named" +}), TimeZoneNamedFromSelf, { + strict: true, + decode: (i, _, ast) => ParseResult.try({ + try: () => dateTime.zoneUnsafeMakeNamed(i), + catch: () => new ParseResult.Type(ast, i, `Unable to decode ${JSON.stringify(i)} into a TimeZone.Named`) + }), + encode: a => ParseResult.succeed(a.id) +}).annotations({ + identifier: "TimeZoneNamed" +}) {} +/** + * @category TimeZone constructors + * @since 3.10.0 + */ +export class TimeZoneFromSelf extends /*#__PURE__*/Union(TimeZoneOffsetFromSelf, TimeZoneNamedFromSelf) {} +/** + * Defines a schema that attempts to convert a `string` to a `TimeZone` using the `DateTime.zoneFromString` constructor. + * + * @category TimeZone transformations + * @since 3.10.0 + */ +export class TimeZone extends /*#__PURE__*/transformOrFail(String$.annotations({ + description: "a string to be decoded into a TimeZone" +}), TimeZoneFromSelf, { + strict: true, + decode: (i, _, ast) => option_.match(dateTime.zoneFromString(i), { + onNone: () => ParseResult.fail(new ParseResult.Type(ast, i, `Unable to decode ${JSON.stringify(i)} into a TimeZone`)), + onSome: ParseResult.succeed + }), + encode: a => ParseResult.succeed(dateTime.zoneToString(a)) +}).annotations({ + identifier: "TimeZone" +}) {} +const timeZoneArbitrary = fc => fc.oneof(timeZoneOffsetArbitrary()(fc), timeZoneNamedArbitrary()(fc)); +/** + * Describes a schema that represents a `DateTime.Zoned` instance. + * + * @category DateTime.Zoned constructors + * @since 3.10.0 + */ +export class DateTimeZonedFromSelf extends /*#__PURE__*/declare(u => dateTime.isDateTime(u) && dateTime.isZoned(u), { + typeConstructor: { + _tag: "effect/DateTime.Zoned" + }, + identifier: "DateTimeZonedFromSelf", + description: "a DateTime.Zoned instance", + pretty: () => dateTime => dateTime.toString(), + arbitrary: () => fc => fc.tuple(fc.integer({ + // time zone db supports +/- 1000 years or so + min: -31536000000000, + max: 31536000000000 + }), timeZoneArbitrary(fc)).map(([millis, timeZone]) => dateTime.unsafeMakeZoned(millis, { + timeZone + })), + equivalence: () => dateTime.Equivalence +}) {} +/** + * Defines a schema that attempts to convert a `string` to a `DateTime.Zoned` instance. + * + * @category DateTime.Zoned transformations + * @since 3.10.0 + */ +export class DateTimeZoned extends /*#__PURE__*/transformOrFail(String$.annotations({ + description: "a string to be decoded into a DateTime.Zoned" +}), DateTimeZonedFromSelf, { + strict: true, + decode: (i, _, ast) => option_.match(dateTime.makeZonedFromString(i), { + onNone: () => ParseResult.fail(new ParseResult.Type(ast, i, `Unable to decode ${JSON.stringify(i)} into a DateTime.Zoned`)), + onSome: ParseResult.succeed + }), + encode: a => ParseResult.succeed(dateTime.formatIsoZoned(a)) +}).annotations({ + identifier: "DateTimeZoned" +}) {} +const OptionNoneEncoded = /*#__PURE__*/Struct({ + _tag: Literal("None") +}).annotations({ + description: "NoneEncoded" +}); +const optionSomeEncoded = value => Struct({ + _tag: Literal("Some"), + value +}).annotations({ + description: `SomeEncoded<${format(value)}>` +}); +const optionEncoded = value => Union(OptionNoneEncoded, optionSomeEncoded(value)).annotations({ + description: `OptionEncoded<${format(value)}>` +}); +const optionDecode = input => input._tag === "None" ? option_.none() : option_.some(input.value); +const optionArbitrary = (value, ctx) => fc => fc.oneof(ctx, fc.record({ + _tag: fc.constant("None") +}), fc.record({ + _tag: fc.constant("Some"), + value: value(fc) +})).map(optionDecode); +const optionPretty = value => option_.match({ + onNone: () => "none()", + onSome: a => `some(${value(a)})` +}); +const optionParse = decodeUnknown => (u, options, ast) => option_.isOption(u) ? option_.isNone(u) ? ParseResult.succeed(option_.none()) : toComposite(decodeUnknown(u.value, options), option_.some, ast, u) : ParseResult.fail(new ParseResult.Type(ast, u)); +const OptionFromSelf_ = value => { + return declare([value], { + decode: value => optionParse(ParseResult.decodeUnknown(value)), + encode: value => optionParse(ParseResult.encodeUnknown(value)) + }, { + typeConstructor: { + _tag: "effect/Option" + }, + pretty: optionPretty, + arbitrary: optionArbitrary, + equivalence: option_.getEquivalence + }); +}; +/** + * @category Option transformations + * @since 3.10.0 + */ +export const OptionFromSelf = value => { + return OptionFromSelf_(value).annotations({ + description: `Option<${format(value)}>` + }); +}; +const makeNoneEncoded = { + _tag: "None" +}; +const makeSomeEncoded = value => ({ + _tag: "Some", + value +}); +/** + * @category Option transformations + * @since 3.10.0 + */ +export function Option(value) { + const value_ = asSchema(value); + const out = transform(optionEncoded(value_), OptionFromSelf(typeSchema(value_)), { + strict: true, + decode: i => optionDecode(i), + encode: a => option_.match(a, { + onNone: () => makeNoneEncoded, + onSome: makeSomeEncoded + }) + }); + return out; +} +/** + * @category Option transformations + * @since 3.10.0 + */ +export function OptionFromNullOr(value) { + return transform(NullOr(value), OptionFromSelf(typeSchema(asSchema(value))), { + strict: true, + decode: i => option_.fromNullable(i), + encode: a => option_.getOrNull(a) + }); +} +/** + * @category Option transformations + * @since 3.10.0 + */ +export function OptionFromNullishOr(value, onNoneEncoding) { + return transform(NullishOr(value), OptionFromSelf(typeSchema(asSchema(value))), { + strict: true, + decode: i => option_.fromNullable(i), + encode: onNoneEncoding === null ? a => option_.getOrNull(a) : a => option_.getOrUndefined(a) + }); +} +/** + * @category Option transformations + * @since 3.10.0 + */ +export function OptionFromUndefinedOr(value) { + return transform(UndefinedOr(value), OptionFromSelf(typeSchema(asSchema(value))), { + strict: true, + decode: i => option_.fromNullable(i), + encode: a => option_.getOrUndefined(a) + }); +} +/** + * Transforms strings into an Option type, effectively filtering out empty or + * whitespace-only strings by trimming them and checking their length. Returns + * `none` for invalid inputs and `some` for valid non-empty strings. + * + * @example + * ```ts + * import { Schema } from "effect" + * + * console.log(Schema.decodeSync(Schema.OptionFromNonEmptyTrimmedString)("")) // Option.none() + * console.log(Schema.decodeSync(Schema.OptionFromNonEmptyTrimmedString)(" a ")) // Option.some("a") + * console.log(Schema.decodeSync(Schema.OptionFromNonEmptyTrimmedString)("a")) // Option.some("a") + * ``` + * + * @category Option transformations + * @since 3.10.0 + */ +export class OptionFromNonEmptyTrimmedString extends /*#__PURE__*/transform(String$, /*#__PURE__*/OptionFromSelf(NonEmptyTrimmedString), { + strict: true, + decode: i => option_.filter(option_.some(i.trim()), string_.isNonEmpty), + encode: a => option_.getOrElse(a, () => "") +}) {} +const rightEncoded = right => Struct({ + _tag: Literal("Right"), + right +}).annotations({ + description: `RightEncoded<${format(right)}>` +}); +const leftEncoded = left => Struct({ + _tag: Literal("Left"), + left +}).annotations({ + description: `LeftEncoded<${format(left)}>` +}); +const eitherEncoded = (right, left) => Union(rightEncoded(right), leftEncoded(left)).annotations({ + description: `EitherEncoded<${format(left)}, ${format(right)}>` +}); +const eitherDecode = input => input._tag === "Left" ? either_.left(input.left) : either_.right(input.right); +const eitherArbitrary = (right, left) => fc => fc.oneof(fc.record({ + _tag: fc.constant("Left"), + left: left(fc) +}), fc.record({ + _tag: fc.constant("Right"), + right: right(fc) +})).map(eitherDecode); +const eitherPretty = (right, left) => either_.match({ + onLeft: e => `left(${left(e)})`, + onRight: a => `right(${right(a)})` +}); +const eitherParse = (parseRight, decodeUnknownLeft) => (u, options, ast) => either_.isEither(u) ? either_.match(u, { + onLeft: left => toComposite(decodeUnknownLeft(left, options), either_.left, ast, u), + onRight: right => toComposite(parseRight(right, options), either_.right, ast, u) +}) : ParseResult.fail(new ParseResult.Type(ast, u)); +/** + * @category Either transformations + * @since 3.10.0 + */ +export const EitherFromSelf = ({ + left, + right +}) => { + return declare([right, left], { + decode: (right, left) => eitherParse(ParseResult.decodeUnknown(right), ParseResult.decodeUnknown(left)), + encode: (right, left) => eitherParse(ParseResult.encodeUnknown(right), ParseResult.encodeUnknown(left)) + }, { + typeConstructor: { + _tag: "effect/Either" + }, + description: `Either<${format(right)}, ${format(left)}>`, + pretty: eitherPretty, + arbitrary: eitherArbitrary, + equivalence: (right, left) => either_.getEquivalence({ + left, + right + }) + }); +}; +const makeLeftEncoded = left => ({ + _tag: "Left", + left +}); +const makeRightEncoded = right => ({ + _tag: "Right", + right +}); +/** + * @category Either transformations + * @since 3.10.0 + */ +export const Either = ({ + left, + right +}) => { + const right_ = asSchema(right); + const left_ = asSchema(left); + const out = transform(eitherEncoded(right_, left_), EitherFromSelf({ + left: typeSchema(left_), + right: typeSchema(right_) + }), { + strict: true, + decode: i => eitherDecode(i), + encode: a => either_.match(a, { + onLeft: makeLeftEncoded, + onRight: makeRightEncoded + }) + }); + return out; +}; +/** + * @example + * ```ts + * import * as Schema from "effect/Schema" + * + * // Schema> + * Schema.EitherFromUnion({ left: Schema.String, right: Schema.Number }) + * ``` + * + * @category Either transformations + * @since 3.10.0 + */ +export const EitherFromUnion = ({ + left, + right +}) => { + const right_ = asSchema(right); + const left_ = asSchema(left); + const toright = typeSchema(right_); + const toleft = typeSchema(left_); + const fromRight = transform(right_, rightEncoded(toright), { + strict: true, + decode: i => makeRightEncoded(i), + encode: a => a.right + }); + const fromLeft = transform(left_, leftEncoded(toleft), { + strict: true, + decode: i => makeLeftEncoded(i), + encode: a => a.left + }); + const out = transform(Union(fromRight, fromLeft), EitherFromSelf({ + left: toleft, + right: toright + }), { + strict: true, + decode: i => i._tag === "Left" ? either_.left(i.left) : either_.right(i.right), + encode: a => either_.match(a, { + onLeft: makeLeftEncoded, + onRight: makeRightEncoded + }) + }); + return out; +}; +const mapArbitrary = (key, value, ctx) => { + return fc => { + const items = fc.array(fc.tuple(key(fc), value(fc))); + return (ctx.depthIdentifier !== undefined ? fc.oneof(ctx, fc.constant([]), items) : items).map(as => new Map(as)); + }; +}; +const readonlyMapPretty = (key, value) => map => `new Map([${Array.from(map.entries()).map(([k, v]) => `[${key(k)}, ${value(v)}]`).join(", ")}])`; +const readonlyMapEquivalence = (key, value) => { + const arrayEquivalence = array_.getEquivalence(Equivalence.make(([ka, va], [kb, vb]) => key(ka, kb) && value(va, vb))); + return Equivalence.make((a, b) => arrayEquivalence(Array.from(a.entries()), Array.from(b.entries()))); +}; +const readonlyMapParse = decodeUnknown => (u, options, ast) => Predicate.isMap(u) ? toComposite(decodeUnknown(Array.from(u.entries()), options), as => new Map(as), ast, u) : ParseResult.fail(new ParseResult.Type(ast, u)); +const mapFromSelf_ = (key, value, description) => declare([key, value], { + decode: (Key, Value) => readonlyMapParse(ParseResult.decodeUnknown(Array$(Tuple(Key, Value)))), + encode: (Key, Value) => readonlyMapParse(ParseResult.encodeUnknown(Array$(Tuple(Key, Value)))) +}, { + typeConstructor: { + _tag: "ReadonlyMap" + }, + description, + pretty: readonlyMapPretty, + arbitrary: mapArbitrary, + equivalence: readonlyMapEquivalence +}); +/** + * @category ReadonlyMap + * @since 3.10.0 + */ +export const ReadonlyMapFromSelf = ({ + key, + value +}) => mapFromSelf_(key, value, `ReadonlyMap<${format(key)}, ${format(value)}>`); +/** + * @category Map + * @since 3.10.0 + */ +export const MapFromSelf = ({ + key, + value +}) => mapFromSelf_(key, value, `Map<${format(key)}, ${format(value)}>`); +/** + * @category ReadonlyMap transformations + * @since 3.10.0 + */ +export function ReadonlyMap({ + key, + value +}) { + return transform(Array$(Tuple(key, value)), ReadonlyMapFromSelf({ + key: typeSchema(asSchema(key)), + value: typeSchema(asSchema(value)) + }), { + strict: true, + decode: i => new Map(i), + encode: a => Array.from(a.entries()) + }); +} +/** @ignore */ +function map({ + key, + value +}) { + return transform(Array$(Tuple(key, value)), MapFromSelf({ + key: typeSchema(asSchema(key)), + value: typeSchema(asSchema(value)) + }), { + strict: true, + decode: i => new Map(i), + encode: a => Array.from(a.entries()) + }); +} +export { +/** + * @category Map transformations + * @since 3.10.0 + */ +map as Map }; +/** + * @category ReadonlyMap transformations + * @since 3.10.0 + */ +export const ReadonlyMapFromRecord = ({ + key, + value +}) => transform(Record({ + key: encodedBoundSchema(key), + value +}).annotations({ + description: "a record to be decoded into a ReadonlyMap" +}), ReadonlyMapFromSelf({ + key, + value: typeSchema(value) +}), { + strict: true, + decode: i => new Map(Object.entries(i)), + encode: a => Object.fromEntries(a) +}); +/** + * @category Map transformations + * @since 3.10.0 + */ +export const MapFromRecord = ({ + key, + value +}) => transform(Record({ + key: encodedBoundSchema(key), + value +}).annotations({ + description: "a record to be decoded into a Map" +}), MapFromSelf({ + key, + value: typeSchema(value) +}), { + strict: true, + decode: i => new Map(Object.entries(i)), + encode: a => Object.fromEntries(a) +}); +const setArbitrary = (item, ctx) => fc => { + const items = fc.array(item(fc)); + return (ctx.depthIdentifier !== undefined ? fc.oneof(ctx, fc.constant([]), items) : items).map(as => new Set(as)); +}; +const readonlySetPretty = item => set => `new Set([${Array.from(set.values()).map(a => item(a)).join(", ")}])`; +const readonlySetEquivalence = item => { + const arrayEquivalence = array_.getEquivalence(item); + return Equivalence.make((a, b) => arrayEquivalence(Array.from(a.values()), Array.from(b.values()))); +}; +const readonlySetParse = decodeUnknown => (u, options, ast) => Predicate.isSet(u) ? toComposite(decodeUnknown(Array.from(u.values()), options), as => new Set(as), ast, u) : ParseResult.fail(new ParseResult.Type(ast, u)); +const setFromSelf_ = (value, description) => declare([value], { + decode: item => readonlySetParse(ParseResult.decodeUnknown(Array$(item))), + encode: item => readonlySetParse(ParseResult.encodeUnknown(Array$(item))) +}, { + typeConstructor: { + _tag: "ReadonlySet" + }, + description, + pretty: readonlySetPretty, + arbitrary: setArbitrary, + equivalence: readonlySetEquivalence +}); +/** + * @category ReadonlySet + * @since 3.10.0 + */ +export const ReadonlySetFromSelf = value => setFromSelf_(value, `ReadonlySet<${format(value)}>`); +/** + * @category Set + * @since 3.10.0 + */ +export const SetFromSelf = value => setFromSelf_(value, `Set<${format(value)}>`); +/** + * @category ReadonlySet transformations + * @since 3.10.0 + */ +export function ReadonlySet(value) { + return transform(Array$(value), ReadonlySetFromSelf(typeSchema(asSchema(value))), { + strict: true, + decode: i => new Set(i), + encode: a => Array.from(a) + }); +} +/** @ignore */ +function set(value) { + return transform(Array$(value), SetFromSelf(typeSchema(asSchema(value))), { + strict: true, + decode: i => new Set(i), + encode: a => Array.from(a) + }); +} +export { +/** + * @category Set transformations + * @since 3.10.0 + */ +set as Set }; +const bigDecimalPretty = () => val => `BigDecimal(${bigDecimal_.format(bigDecimal_.normalize(val))})`; +const bigDecimalArbitrary = () => fc => fc.tuple(fc.bigInt(), fc.integer({ + min: -18, + max: 18 +})).map(([value, scale]) => bigDecimal_.make(value, scale)); +/** + * @category BigDecimal constructors + * @since 3.10.0 + */ +export class BigDecimalFromSelf extends /*#__PURE__*/declare(bigDecimal_.isBigDecimal, { + typeConstructor: { + _tag: "effect/BigDecimal" + }, + identifier: "BigDecimalFromSelf", + pretty: bigDecimalPretty, + arbitrary: bigDecimalArbitrary, + equivalence: () => bigDecimal_.Equivalence +}) {} +/** + * @category BigDecimal transformations + * @since 3.10.0 + */ +export class BigDecimal extends /*#__PURE__*/transformOrFail(String$.annotations({ + description: "a string to be decoded into a BigDecimal" +}), BigDecimalFromSelf, { + strict: true, + decode: (i, _, ast) => bigDecimal_.fromString(i).pipe(option_.match({ + onNone: () => ParseResult.fail(new ParseResult.Type(ast, i, `Unable to decode ${JSON.stringify(i)} into a BigDecimal`)), + onSome: val => ParseResult.succeed(bigDecimal_.normalize(val)) + })), + encode: a => ParseResult.succeed(bigDecimal_.format(bigDecimal_.normalize(a))) +}).annotations({ + identifier: "BigDecimal" +}) {} +/** + * A schema that transforms a `number` into a `BigDecimal`. + * When encoding, this Schema will produce incorrect results if the BigDecimal exceeds the 64-bit range of a number. + * + * @category BigDecimal transformations + * @since 3.10.0 + */ +export class BigDecimalFromNumber extends /*#__PURE__*/transform(Number$.annotations({ + description: "a number to be decoded into a BigDecimal" +}), BigDecimalFromSelf, { + strict: true, + decode: i => bigDecimal_.unsafeFromNumber(i), + encode: a => bigDecimal_.unsafeToNumber(a) +}).annotations({ + identifier: "BigDecimalFromNumber" +}) {} +/** + * @category schema id + * @since 3.10.0 + */ +export const GreaterThanBigDecimalSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/GreaterThanBigDecimal"); +/** + * @category BigDecimal filters + * @since 3.10.0 + */ +export const greaterThanBigDecimal = (min, annotations) => self => { + const formatted = bigDecimal_.format(min); + return self.pipe(filter(a => bigDecimal_.greaterThan(a, min), { + schemaId: GreaterThanBigDecimalSchemaId, + [GreaterThanBigDecimalSchemaId]: { + min + }, + title: `greaterThanBigDecimal(${formatted})`, + description: `a BigDecimal greater than ${formatted}`, + ...annotations + })); +}; +/** + * @category schema id + * @since 3.10.0 + */ +export const GreaterThanOrEqualToBigDecimalSchemaId = /*#__PURE__*/Symbol.for("effect/schema/GreaterThanOrEqualToBigDecimal"); +/** + * @category BigDecimal filters + * @since 3.10.0 + */ +export const greaterThanOrEqualToBigDecimal = (min, annotations) => self => { + const formatted = bigDecimal_.format(min); + return self.pipe(filter(a => bigDecimal_.greaterThanOrEqualTo(a, min), { + schemaId: GreaterThanOrEqualToBigDecimalSchemaId, + [GreaterThanOrEqualToBigDecimalSchemaId]: { + min + }, + title: `greaterThanOrEqualToBigDecimal(${formatted})`, + description: `a BigDecimal greater than or equal to ${formatted}`, + ...annotations + })); +}; +/** + * @category schema id + * @since 3.10.0 + */ +export const LessThanBigDecimalSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/LessThanBigDecimal"); +/** + * @category BigDecimal filters + * @since 3.10.0 + */ +export const lessThanBigDecimal = (max, annotations) => self => { + const formatted = bigDecimal_.format(max); + return self.pipe(filter(a => bigDecimal_.lessThan(a, max), { + schemaId: LessThanBigDecimalSchemaId, + [LessThanBigDecimalSchemaId]: { + max + }, + title: `lessThanBigDecimal(${formatted})`, + description: `a BigDecimal less than ${formatted}`, + ...annotations + })); +}; +/** + * @category schema id + * @since 3.10.0 + */ +export const LessThanOrEqualToBigDecimalSchemaId = /*#__PURE__*/Symbol.for("effect/schema/LessThanOrEqualToBigDecimal"); +/** + * @category BigDecimal filters + * @since 3.10.0 + */ +export const lessThanOrEqualToBigDecimal = (max, annotations) => self => { + const formatted = bigDecimal_.format(max); + return self.pipe(filter(a => bigDecimal_.lessThanOrEqualTo(a, max), { + schemaId: LessThanOrEqualToBigDecimalSchemaId, + [LessThanOrEqualToBigDecimalSchemaId]: { + max + }, + title: `lessThanOrEqualToBigDecimal(${formatted})`, + description: `a BigDecimal less than or equal to ${formatted}`, + ...annotations + })); +}; +/** + * @category schema id + * @since 3.10.0 + */ +export const PositiveBigDecimalSchemaId = /*#__PURE__*/Symbol.for("effect/schema/PositiveBigDecimal"); +/** + * @category BigDecimal filters + * @since 3.10.0 + */ +export const positiveBigDecimal = annotations => self => self.pipe(filter(a => bigDecimal_.isPositive(a), { + schemaId: PositiveBigDecimalSchemaId, + title: "positiveBigDecimal", + description: `a positive BigDecimal`, + ...annotations +})); +/** + * @category BigDecimal constructors + * @since 3.10.0 + */ +export const PositiveBigDecimalFromSelf = /*#__PURE__*/BigDecimalFromSelf.pipe(/*#__PURE__*/positiveBigDecimal({ + identifier: "PositiveBigDecimalFromSelf" +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const NonNegativeBigDecimalSchemaId = /*#__PURE__*/Symbol.for("effect/schema/NonNegativeBigDecimal"); +/** + * @category BigDecimal filters + * @since 3.10.0 + */ +export const nonNegativeBigDecimal = annotations => self => self.pipe(filter(a => a.value >= 0n, { + schemaId: NonNegativeBigDecimalSchemaId, + title: "nonNegativeBigDecimal", + description: `a non-negative BigDecimal`, + ...annotations +})); +/** + * @category BigDecimal constructors + * @since 3.10.0 + */ +export const NonNegativeBigDecimalFromSelf = /*#__PURE__*/BigDecimalFromSelf.pipe(/*#__PURE__*/nonNegativeBigDecimal({ + identifier: "NonNegativeBigDecimalFromSelf" +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const NegativeBigDecimalSchemaId = /*#__PURE__*/Symbol.for("effect/schema/NegativeBigDecimal"); +/** + * @category BigDecimal filters + * @since 3.10.0 + */ +export const negativeBigDecimal = annotations => self => self.pipe(filter(a => bigDecimal_.isNegative(a), { + schemaId: NegativeBigDecimalSchemaId, + title: "negativeBigDecimal", + description: `a negative BigDecimal`, + ...annotations +})); +/** + * @category BigDecimal constructors + * @since 3.10.0 + */ +export const NegativeBigDecimalFromSelf = /*#__PURE__*/BigDecimalFromSelf.pipe(/*#__PURE__*/negativeBigDecimal({ + identifier: "NegativeBigDecimalFromSelf" +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const NonPositiveBigDecimalSchemaId = /*#__PURE__*/Symbol.for("effect/schema/NonPositiveBigDecimal"); +/** + * @category BigDecimal filters + * @since 3.10.0 + */ +export const nonPositiveBigDecimal = annotations => self => self.pipe(filter(a => a.value <= 0n, { + schemaId: NonPositiveBigDecimalSchemaId, + title: "nonPositiveBigDecimal", + description: `a non-positive BigDecimal`, + ...annotations +})); +/** + * @category BigDecimal constructors + * @since 3.10.0 + */ +export const NonPositiveBigDecimalFromSelf = /*#__PURE__*/BigDecimalFromSelf.pipe(/*#__PURE__*/nonPositiveBigDecimal({ + identifier: "NonPositiveBigDecimalFromSelf" +})); +/** + * @category schema id + * @since 3.10.0 + */ +export const BetweenBigDecimalSchemaId = /*#__PURE__*/Symbol.for("effect/SchemaId/BetweenBigDecimal"); +/** + * @category BigDecimal filters + * @since 3.10.0 + */ +export const betweenBigDecimal = (minimum, maximum, annotations) => self => { + const formattedMinimum = bigDecimal_.format(minimum); + const formattedMaximum = bigDecimal_.format(maximum); + return self.pipe(filter(a => bigDecimal_.between(a, { + minimum, + maximum + }), { + schemaId: BetweenBigDecimalSchemaId, + [BetweenBigDecimalSchemaId]: { + maximum, + minimum + }, + title: `betweenBigDecimal(${formattedMinimum}, ${formattedMaximum})`, + description: `a BigDecimal between ${formattedMinimum} and ${formattedMaximum}`, + ...annotations + })); +}; +/** + * Clamps a `BigDecimal` between a minimum and a maximum value. + * + * @category BigDecimal transformations + * @since 3.10.0 + */ +export const clampBigDecimal = (minimum, maximum) => self => transform(self, self.pipe(typeSchema, betweenBigDecimal(minimum, maximum)), { + strict: false, + decode: i => bigDecimal_.clamp(i, { + minimum, + maximum + }), + encode: identity +}); +const chunkArbitrary = (item, ctx) => fc => { + const items = fc.array(item(fc)); + return (ctx.depthIdentifier !== undefined ? fc.oneof(ctx, fc.constant([]), items) : items).map(chunk_.fromIterable); +}; +const chunkPretty = item => c => `Chunk(${chunk_.toReadonlyArray(c).map(item).join(", ")})`; +const chunkParse = decodeUnknown => (u, options, ast) => chunk_.isChunk(u) ? chunk_.isEmpty(u) ? ParseResult.succeed(chunk_.empty()) : toComposite(decodeUnknown(chunk_.toReadonlyArray(u), options), chunk_.fromIterable, ast, u) : ParseResult.fail(new ParseResult.Type(ast, u)); +/** + * @category Chunk + * @since 3.10.0 + */ +export const ChunkFromSelf = value => { + return declare([value], { + decode: item => chunkParse(ParseResult.decodeUnknown(Array$(item))), + encode: item => chunkParse(ParseResult.encodeUnknown(Array$(item))) + }, { + typeConstructor: { + _tag: "effect/Chunk" + }, + description: `Chunk<${format(value)}>`, + pretty: chunkPretty, + arbitrary: chunkArbitrary, + equivalence: chunk_.getEquivalence + }); +}; +/** + * @category Chunk transformations + * @since 3.10.0 + */ +export function Chunk(value) { + return transform(Array$(value), ChunkFromSelf(typeSchema(asSchema(value))), { + strict: true, + decode: i => i.length === 0 ? chunk_.empty() : chunk_.fromIterable(i), + encode: a => chunk_.toReadonlyArray(a) + }); +} +const nonEmptyChunkArbitrary = item => fc => fastCheck_.array(item(fc), { + minLength: 1 +}).map(as => chunk_.unsafeFromNonEmptyArray(as)); +const nonEmptyChunkPretty = item => c => `NonEmptyChunk(${chunk_.toReadonlyArray(c).map(item).join(", ")})`; +const nonEmptyChunkParse = decodeUnknown => (u, options, ast) => chunk_.isChunk(u) && chunk_.isNonEmpty(u) ? toComposite(decodeUnknown(chunk_.toReadonlyArray(u), options), chunk_.unsafeFromNonEmptyArray, ast, u) : ParseResult.fail(new ParseResult.Type(ast, u)); +/** + * @category Chunk + * @since 3.10.0 + */ +export const NonEmptyChunkFromSelf = value => { + return declare([value], { + decode: item => nonEmptyChunkParse(ParseResult.decodeUnknown(NonEmptyArray(item))), + encode: item => nonEmptyChunkParse(ParseResult.encodeUnknown(NonEmptyArray(item))) + }, { + typeConstructor: { + _tag: "effect/Chunk.NonEmptyChunk" + }, + description: `NonEmptyChunk<${format(value)}>`, + pretty: nonEmptyChunkPretty, + arbitrary: nonEmptyChunkArbitrary, + equivalence: chunk_.getEquivalence + }); +}; +/** + * @category Chunk transformations + * @since 3.10.0 + */ +export function NonEmptyChunk(value) { + return transform(NonEmptyArray(value), NonEmptyChunkFromSelf(typeSchema(asSchema(value))), { + strict: true, + decode: i => chunk_.unsafeFromNonEmptyArray(i), + encode: a => chunk_.toReadonlyArray(a) + }); +} +const decodeData = a => Array.isArray(a) ? data_.array(a) : data_.struct(a); +const dataArbitrary = item => fc => item(fc).map(decodeData); +const dataPretty = item => d => `Data(${item(d)})`; +const dataParse = decodeUnknown => (u, options, ast) => Equal.isEqual(u) ? toComposite(decodeUnknown(u, options), decodeData, ast, u) : ParseResult.fail(new ParseResult.Type(ast, u)); +/** + * Type and Encoded must extend `Readonly> | + * ReadonlyArray` to be compatible with this API. + * + * @category Data transformations + * @since 3.10.0 + */ +export const DataFromSelf = value => { + return declare([value], { + decode: item => dataParse(ParseResult.decodeUnknown(item)), + encode: item => dataParse(ParseResult.encodeUnknown(item)) + }, { + description: `Data<${format(value)}>`, + pretty: dataPretty, + arbitrary: dataArbitrary + }); +}; +/** + * Type and Encoded must extend `Readonly> | + * ReadonlyArray` to be compatible with this API. + * + * @category Data transformations + * @since 3.10.0 + */ +export const Data = value => { + return transform(value, DataFromSelf(typeSchema(value)), { + strict: false, + decode: i => decodeData(i), + encode: a => Array.isArray(a) ? Array.from(a) : Object.assign({}, a) + }); +}; +const isField = u => isSchema(u) || isPropertySignature(u); +const isFields = fields => Reflect.ownKeys(fields).every(key => isField(fields[key])); +const getFields = hasFields => "fields" in hasFields ? hasFields.fields : getFields(hasFields[RefineSchemaId]); +const getSchemaFromFieldsOr = fieldsOr => isFields(fieldsOr) ? Struct(fieldsOr) : isSchema(fieldsOr) ? fieldsOr : Struct(getFields(fieldsOr)); +const getFieldsFromFieldsOr = fieldsOr => isFields(fieldsOr) ? fieldsOr : getFields(fieldsOr); +/** + * @example + * ```ts + * import { Schema } from "effect" + * + * class MyClass extends Schema.Class("MyClass")({ + * someField: Schema.String + * }) { + * someMethod() { + * return this.someField + "bar" + * } + * } + * ``` + * + * @category classes + * @since 3.10.0 + */ +export const Class = identifier => (fieldsOr, annotations) => makeClass({ + kind: "Class", + identifier, + schema: getSchemaFromFieldsOr(fieldsOr), + fields: getFieldsFromFieldsOr(fieldsOr), + Base: data_.Class, + annotations +}); +/** @internal */ +export const getClassTag = tag => withConstructorDefault(propertySignature(Literal(tag)), () => tag); +/** + * @example + * ```ts + * import { Schema } from "effect" + * + * class MyClass extends Schema.TaggedClass("MyClass")("MyClass", { + * a: Schema.String + * }) {} + * ``` + * + * @category classes + * @since 3.10.0 + */ +export const TaggedClass = identifier => (tag, fieldsOr, annotations) => { + const fields = getFieldsFromFieldsOr(fieldsOr); + const schema = getSchemaFromFieldsOr(fieldsOr); + const newFields = { + _tag: getClassTag(tag) + }; + const taggedFields = extendFields(newFields, fields); + return class TaggedClass extends makeClass({ + kind: "TaggedClass", + identifier: identifier ?? tag, + schema: extend(schema, Struct(newFields)), + fields: taggedFields, + Base: data_.Class, + annotations + }) { + static _tag = tag; + }; +}; +/** + * @example + * ```ts + * import { Schema } from "effect" + * + * class MyError extends Schema.TaggedError("MyError")( + * "MyError", + * { + * module: Schema.String, + * method: Schema.String, + * description: Schema.String + * } + * ) { + * get message(): string { + * return `${this.module}.${this.method}: ${this.description}` + * } + * } + * ``` + * @category classes + * @since 3.10.0 + */ +export const TaggedError = identifier => (tag, fieldsOr, annotations) => { + class Base extends data_.Error {} + ; + Base.prototype.name = tag; + const fields = getFieldsFromFieldsOr(fieldsOr); + const schema = getSchemaFromFieldsOr(fieldsOr); + const newFields = { + _tag: getClassTag(tag) + }; + const taggedFields = extendFields(newFields, fields); + const hasMessageField = "message" in taggedFields; + class TaggedErrorClass extends makeClass({ + kind: "TaggedError", + identifier: identifier ?? tag, + schema: extend(schema, Struct(newFields)), + fields: taggedFields, + Base, + annotations, + disableToString: true + }) { + static _tag = tag; + } + if (!hasMessageField) { + Object.defineProperty(TaggedErrorClass.prototype, "message", { + get() { + return `{ ${Reflect.ownKeys(fields).map(p => `${Inspectable.formatPropertyKey(p)}: ${Inspectable.formatUnknown(this[p])}`).join(", ")} }`; + }, + enumerable: false, + // mirrors the built-in Error.prototype.message, whose descriptor is also non-enumerable + configurable: true + }); + } + return TaggedErrorClass; +}; +const extendFields = (a, b) => { + const out = { + ...a + }; + for (const key of Reflect.ownKeys(b)) { + if (key in a) { + throw new Error(errors_.getASTDuplicatePropertySignatureErrorMessage(key)); + } + out[key] = b[key]; + } + return out; +}; +function getDisableValidationMakeOption(options) { + return Predicate.isBoolean(options) ? options : options?.disableValidation ?? false; +} +const astCache = /*#__PURE__*/globalValue("effect/Schema/astCache", () => new WeakMap()); +const getClassAnnotations = annotations => { + if (annotations === undefined) { + return []; + } else if (Array.isArray(annotations)) { + return annotations; + } else { + return [annotations]; + } +}; +const makeClass = ({ + Base, + annotations, + disableToString, + fields, + identifier, + kind, + schema +}) => { + const classSymbol = Symbol.for(`effect/Schema/${kind}/${identifier}`); + const [typeAnnotations, transformationAnnotations, encodedAnnotations] = getClassAnnotations(annotations); + const typeSchema_ = typeSchema(schema); + const declarationSurrogate = typeSchema_.annotations({ + identifier, + ...typeAnnotations + }); + const typeSide = typeSchema_.annotations({ + [AST.AutoTitleAnnotationId]: `${identifier} (Type side)`, + ...typeAnnotations + }); + const constructorSchema = schema.annotations({ + [AST.AutoTitleAnnotationId]: `${identifier} (Constructor)`, + ...typeAnnotations + }); + const encodedSide = schema.annotations({ + [AST.AutoTitleAnnotationId]: `${identifier} (Encoded side)`, + ...encodedAnnotations + }); + const transformationSurrogate = schema.annotations({ + ...encodedAnnotations, + ...typeAnnotations, + ...transformationAnnotations + }); + const fallbackInstanceOf = u => Predicate.hasProperty(u, classSymbol) && ParseResult.is(typeSide)(u); + const klass = class extends Base { + constructor(props = {}, options = false) { + props = { + ...props + }; + if (kind !== "Class") { + delete props["_tag"]; + } + props = lazilyMergeDefaults(fields, props); + if (!getDisableValidationMakeOption(options)) { + props = ParseResult.validateSync(constructorSchema)(props); + } + super(props, true); + } + // ---------------- + // Schema interface + // ---------------- + static [TypeId] = variance; + static get ast() { + let out = astCache.get(this); + if (out) { + return out; + } + const declaration = declare([schema], { + decode: () => (input, _, ast) => input instanceof this || fallbackInstanceOf(input) ? ParseResult.succeed(input) : ParseResult.fail(new ParseResult.Type(ast, input)), + encode: () => (input, options) => input instanceof this ? ParseResult.succeed(input) : ParseResult.map(ParseResult.encodeUnknown(typeSide)(input, options), props => new this(props, true)) + }, { + identifier, + pretty: pretty => self => `${identifier}(${pretty(self)})`, + // @ts-expect-error + arbitrary: arb => fc => arb(fc).map(props => new this(props)), + equivalence: identity, + [AST.SurrogateAnnotationId]: declarationSurrogate.ast, + ...typeAnnotations + }); + out = transform(encodedSide, declaration, { + strict: true, + decode: i => new this(i, true), + encode: identity + }).annotations({ + [AST.SurrogateAnnotationId]: transformationSurrogate.ast, + ...transformationAnnotations + }).ast; + astCache.set(this, out); + return out; + } + static pipe() { + return pipeArguments(this, arguments); + } + static annotations(annotations) { + return make(this.ast).annotations(annotations); + } + static toString() { + return `(${String(encodedSide)} <-> ${identifier})`; + } + // ---------------- + // Class interface + // ---------------- + static make(...args) { + return new this(...args); + } + static fields = { + ...fields + }; + static identifier = identifier; + static extend(identifier) { + return (newFieldsOr, annotations) => { + const newFields = getFieldsFromFieldsOr(newFieldsOr); + const newSchema = getSchemaFromFieldsOr(newFieldsOr); + const extendedFields = extendFields(fields, newFields); + return makeClass({ + kind, + identifier, + schema: extend(schema, newSchema), + fields: extendedFields, + Base: this, + annotations + }); + }; + } + static transformOrFail(identifier) { + return (newFieldsOr, options, annotations) => { + const transformedFields = extendFields(fields, newFieldsOr); + return makeClass({ + kind, + identifier, + schema: transformOrFail(schema, typeSchema(Struct(transformedFields)), options), + fields: transformedFields, + Base: this, + annotations + }); + }; + } + static transformOrFailFrom(identifier) { + return (newFields, options, annotations) => { + const transformedFields = extendFields(fields, newFields); + return makeClass({ + kind, + identifier, + schema: transformOrFail(encodedSchema(schema), Struct(transformedFields), options), + fields: transformedFields, + Base: this, + annotations + }); + }; + } + // ---------------- + // other + // ---------------- + get [classSymbol]() { + return classSymbol; + } + }; + if (disableToString !== true) { + Object.defineProperty(klass.prototype, "toString", { + value() { + return `${identifier}({ ${Reflect.ownKeys(fields).map(p => `${Inspectable.formatPropertyKey(p)}: ${Inspectable.formatUnknown(this[p])}`).join(", ")} })`; + }, + configurable: true, + writable: true + }); + } + return klass; +}; +const FiberIdNoneEncoded = /*#__PURE__*/Struct({ + _tag: Literal("None") +}).annotations({ + identifier: "FiberIdNoneEncoded" +}); +const FiberIdRuntimeEncoded = /*#__PURE__*/Struct({ + _tag: Literal("Runtime"), + id: Int, + startTimeMillis: Int +}).annotations({ + identifier: "FiberIdRuntimeEncoded" +}); +const FiberIdCompositeEncoded = /*#__PURE__*/Struct({ + _tag: Literal("Composite"), + left: suspend(() => FiberIdEncoded), + right: suspend(() => FiberIdEncoded) +}).annotations({ + identifier: "FiberIdCompositeEncoded" +}); +const FiberIdEncoded = /*#__PURE__*/Union(FiberIdNoneEncoded, FiberIdRuntimeEncoded, FiberIdCompositeEncoded).annotations({ + identifier: "FiberIdEncoded" +}); +const fiberIdArbitrary = fc => fc.letrec(tie => ({ + None: fc.record({ + _tag: fc.constant("None") + }), + Runtime: fc.record({ + _tag: fc.constant("Runtime"), + id: fc.integer(), + startTimeMillis: fc.integer() + }), + Composite: fc.record({ + _tag: fc.constant("Composite"), + left: tie("FiberId"), + right: tie("FiberId") + }), + FiberId: fc.oneof(tie("None"), tie("Runtime"), tie("Composite")) +})).FiberId.map(fiberIdDecode); +const fiberIdPretty = fiberId => { + switch (fiberId._tag) { + case "None": + return "FiberId.none"; + case "Runtime": + return `FiberId.runtime(${fiberId.id}, ${fiberId.startTimeMillis})`; + case "Composite": + return `FiberId.composite(${fiberIdPretty(fiberId.right)}, ${fiberIdPretty(fiberId.left)})`; + } +}; +/** + * @category FiberId constructors + * @since 3.10.0 + */ +export class FiberIdFromSelf extends /*#__PURE__*/declare(fiberId_.isFiberId, { + typeConstructor: { + _tag: "effect/FiberId" + }, + identifier: "FiberIdFromSelf", + pretty: () => fiberIdPretty, + arbitrary: () => fiberIdArbitrary +}) {} +const fiberIdDecode = input => { + switch (input._tag) { + case "None": + return fiberId_.none; + case "Runtime": + return fiberId_.runtime(input.id, input.startTimeMillis); + case "Composite": + return fiberId_.composite(fiberIdDecode(input.left), fiberIdDecode(input.right)); + } +}; +const fiberIdEncode = input => { + switch (input._tag) { + case "None": + return { + _tag: "None" + }; + case "Runtime": + return { + _tag: "Runtime", + id: input.id, + startTimeMillis: input.startTimeMillis + }; + case "Composite": + return { + _tag: "Composite", + left: fiberIdEncode(input.left), + right: fiberIdEncode(input.right) + }; + } +}; +/** + * @category FiberId transformations + * @since 3.10.0 + */ +export class FiberId extends /*#__PURE__*/transform(FiberIdEncoded, FiberIdFromSelf, { + strict: true, + decode: i => fiberIdDecode(i), + encode: a => fiberIdEncode(a) +}).annotations({ + identifier: "FiberId" +}) {} +const causeDieEncoded = defect => Struct({ + _tag: Literal("Die"), + defect +}); +const CauseEmptyEncoded = /*#__PURE__*/Struct({ + _tag: /*#__PURE__*/Literal("Empty") +}); +const causeFailEncoded = error => Struct({ + _tag: Literal("Fail"), + error +}); +const CauseInterruptEncoded = /*#__PURE__*/Struct({ + _tag: /*#__PURE__*/Literal("Interrupt"), + fiberId: FiberIdEncoded +}); +let causeEncodedId = 0; +const causeEncoded = (error, defect) => { + const error_ = asSchema(error); + const defect_ = asSchema(defect); + const suspended = suspend(() => out); + const out = Union(CauseEmptyEncoded, causeFailEncoded(error_), causeDieEncoded(defect_), CauseInterruptEncoded, Struct({ + _tag: Literal("Sequential"), + left: suspended, + right: suspended + }), Struct({ + _tag: Literal("Parallel"), + left: suspended, + right: suspended + })).annotations({ + title: `CauseEncoded<${format(error)}>`, + [AST.JSONIdentifierAnnotationId]: `CauseEncoded${causeEncodedId++}` + }); + return out; +}; +const causeArbitrary = (error, defect) => fc => fc.letrec(tie => ({ + Empty: fc.record({ + _tag: fc.constant("Empty") + }), + Fail: fc.record({ + _tag: fc.constant("Fail"), + error: error(fc) + }), + Die: fc.record({ + _tag: fc.constant("Die"), + defect: defect(fc) + }), + Interrupt: fc.record({ + _tag: fc.constant("Interrupt"), + fiberId: fiberIdArbitrary(fc) + }), + Sequential: fc.record({ + _tag: fc.constant("Sequential"), + left: tie("Cause"), + right: tie("Cause") + }), + Parallel: fc.record({ + _tag: fc.constant("Parallel"), + left: tie("Cause"), + right: tie("Cause") + }), + Cause: fc.oneof(tie("Empty"), tie("Fail"), tie("Die"), tie("Interrupt"), tie("Sequential"), tie("Parallel")) +})).Cause.map(causeDecode); +const causePretty = error => cause => { + const f = cause => { + switch (cause._tag) { + case "Empty": + return "Cause.empty"; + case "Fail": + return `Cause.fail(${error(cause.error)})`; + case "Die": + return `Cause.die(${cause_.pretty(cause)})`; + case "Interrupt": + return `Cause.interrupt(${fiberIdPretty(cause.fiberId)})`; + case "Sequential": + return `Cause.sequential(${f(cause.left)}, ${f(cause.right)})`; + case "Parallel": + return `Cause.parallel(${f(cause.left)}, ${f(cause.right)})`; + } + }; + return f(cause); +}; +const causeParse = decodeUnknown => (u, options, ast) => cause_.isCause(u) ? toComposite(decodeUnknown(causeEncode(u), options), causeDecode, ast, u) : ParseResult.fail(new ParseResult.Type(ast, u)); +/** + * @category Cause transformations + * @since 3.10.0 + */ +export const CauseFromSelf = ({ + defect, + error +}) => { + return declare([error, defect], { + decode: (error, defect) => causeParse(ParseResult.decodeUnknown(causeEncoded(error, defect))), + encode: (error, defect) => causeParse(ParseResult.encodeUnknown(causeEncoded(error, defect))) + }, { + typeConstructor: { + _tag: "effect/Cause" + }, + title: `Cause<${error.ast}>`, + pretty: causePretty, + arbitrary: causeArbitrary + }); +}; +function causeDecode(cause) { + switch (cause._tag) { + case "Empty": + return cause_.empty; + case "Fail": + return cause_.fail(cause.error); + case "Die": + return cause_.die(cause.defect); + case "Interrupt": + return cause_.interrupt(fiberIdDecode(cause.fiberId)); + case "Sequential": + return cause_.sequential(causeDecode(cause.left), causeDecode(cause.right)); + case "Parallel": + return cause_.parallel(causeDecode(cause.left), causeDecode(cause.right)); + } +} +function causeEncode(cause) { + switch (cause._tag) { + case "Empty": + return { + _tag: "Empty" + }; + case "Fail": + return { + _tag: "Fail", + error: cause.error + }; + case "Die": + return { + _tag: "Die", + defect: cause.defect + }; + case "Interrupt": + return { + _tag: "Interrupt", + fiberId: cause.fiberId + }; + case "Sequential": + return { + _tag: "Sequential", + left: causeEncode(cause.left), + right: causeEncode(cause.right) + }; + case "Parallel": + return { + _tag: "Parallel", + left: causeEncode(cause.left), + right: causeEncode(cause.right) + }; + } +} +/** + * @category Cause transformations + * @since 3.10.0 + */ +export const Cause = ({ + defect, + error +}) => { + const error_ = asSchema(error); + const defect_ = asSchema(defect); + const out = transform(causeEncoded(error_, defect_), CauseFromSelf({ + error: typeSchema(error_), + defect: typeSchema(defect_) + }), { + strict: false, + decode: i => causeDecode(i), + encode: a => causeEncode(a) + }); + return out; +}; +/** + * Defines a schema for handling JavaScript errors (`Error` instances) and other types of defects. + * It decodes objects into Error instances if they match the expected structure (i.e., have a `message` and optionally a `name` and `stack`), + * or converts other values to their string representations. + * + * When encoding, it converts `Error` instances back into plain objects containing only the error's name and message, + * or other values into their string forms. + * + * This is useful for serializing and deserializing errors across network boundaries where error objects do not natively serialize. + * + * @category defect + * @since 3.10.0 + */ +export class Defect extends /*#__PURE__*/transform(Unknown, Unknown, { + strict: true, + decode: i => { + if (Predicate.isObject(i) && "message" in i && typeof i.message === "string") { + const err = new Error(i.message, { + cause: i + }); + if ("name" in i && typeof i.name === "string") { + err.name = i.name; + } + err.stack = "stack" in i && typeof i.stack === "string" ? i.stack : ""; + return err; + } + return internalCause_.prettyErrorMessage(i); + }, + encode: a => { + if (a instanceof Error) { + return { + name: a.name, + message: a.message + // no stack because of security reasons + }; + } + return internalCause_.prettyErrorMessage(a); + } +}).annotations({ + identifier: "Defect" +}) {} +const exitFailureEncoded = (error, defect) => Struct({ + _tag: Literal("Failure"), + cause: causeEncoded(error, defect) +}); +const exitSuccessEncoded = value => Struct({ + _tag: Literal("Success"), + value +}); +const exitEncoded = (value, error, defect) => { + return Union(exitFailureEncoded(error, defect), exitSuccessEncoded(value)).annotations({ + title: `ExitEncoded<${format(value)}, ${format(error)}, ${format(defect)}>` + }); +}; +const exitDecode = input => { + switch (input._tag) { + case "Failure": + return exit_.failCause(causeDecode(input.cause)); + case "Success": + return exit_.succeed(input.value); + } +}; +const exitArbitrary = (value, error, defect) => fc => fc.oneof(fc.record({ + _tag: fc.constant("Failure"), + cause: causeArbitrary(error, defect)(fc) +}), fc.record({ + _tag: fc.constant("Success"), + value: value(fc) +})).map(exitDecode); +const exitPretty = (value, error) => exit => exit._tag === "Failure" ? `Exit.failCause(${causePretty(error)(exit.cause)})` : `Exit.succeed(${value(exit.value)})`; +const exitParse = (decodeUnknownValue, decodeUnknownCause) => (u, options, ast) => exit_.isExit(u) ? exit_.match(u, { + onFailure: cause => toComposite(decodeUnknownCause(cause, options), exit_.failCause, ast, u), + onSuccess: value => toComposite(decodeUnknownValue(value, options), exit_.succeed, ast, u) +}) : ParseResult.fail(new ParseResult.Type(ast, u)); +/** + * @category Exit transformations + * @since 3.10.0 + */ +export const ExitFromSelf = ({ + defect, + failure, + success +}) => declare([success, failure, defect], { + decode: (success, failure, defect) => exitParse(ParseResult.decodeUnknown(success), ParseResult.decodeUnknown(CauseFromSelf({ + error: failure, + defect + }))), + encode: (success, failure, defect) => exitParse(ParseResult.encodeUnknown(success), ParseResult.encodeUnknown(CauseFromSelf({ + error: failure, + defect + }))) +}, { + typeConstructor: { + _tag: "effect/Exit" + }, + title: `Exit<${success.ast}, ${failure.ast}>`, + pretty: exitPretty, + arbitrary: exitArbitrary +}); +/** + * @category Exit transformations + * @since 3.10.0 + */ +export const Exit = ({ + defect, + failure, + success +}) => { + const success_ = asSchema(success); + const failure_ = asSchema(failure); + const defect_ = asSchema(defect); + const out = transform(exitEncoded(success_, failure_, defect_), ExitFromSelf({ + failure: typeSchema(failure_), + success: typeSchema(success_), + defect: typeSchema(defect_) + }), { + strict: false, + decode: i => exitDecode(i), + encode: a => a._tag === "Failure" ? { + _tag: "Failure", + cause: a.cause + } : { + _tag: "Success", + value: a.value + } + }); + return out; +}; +const hashSetArbitrary = (item, ctx) => fc => { + const items = fc.array(item(fc)); + return (ctx.depthIdentifier !== undefined ? fc.oneof(ctx, fc.constant([]), items) : items).map(hashSet_.fromIterable); +}; +const hashSetPretty = item => set => `HashSet(${Array.from(set).map(a => item(a)).join(", ")})`; +const hashSetEquivalence = item => { + const arrayEquivalence = array_.getEquivalence(item); + return Equivalence.make((a, b) => arrayEquivalence(Array.from(a), Array.from(b))); +}; +const hashSetParse = decodeUnknown => (u, options, ast) => hashSet_.isHashSet(u) ? toComposite(decodeUnknown(Array.from(u), options), hashSet_.fromIterable, ast, u) : ParseResult.fail(new ParseResult.Type(ast, u)); +/** + * @category HashSet transformations + * @since 3.10.0 + */ +export const HashSetFromSelf = value => { + return declare([value], { + decode: item => hashSetParse(ParseResult.decodeUnknown(Array$(item))), + encode: item => hashSetParse(ParseResult.encodeUnknown(Array$(item))) + }, { + typeConstructor: { + _tag: "effect/HashSet" + }, + description: `HashSet<${format(value)}>`, + pretty: hashSetPretty, + arbitrary: hashSetArbitrary, + equivalence: hashSetEquivalence + }); +}; +/** + * @category HashSet transformations + * @since 3.10.0 + */ +export function HashSet(value) { + return transform(Array$(value), HashSetFromSelf(typeSchema(asSchema(value))), { + strict: true, + decode: i => hashSet_.fromIterable(i), + encode: a => Array.from(a) + }); +} +const hashMapArbitrary = (key, value, ctx) => fc => { + const items = fc.array(fc.tuple(key(fc), value(fc))); + return (ctx.depthIdentifier !== undefined ? fc.oneof(ctx, fc.constant([]), items) : items).map(hashMap_.fromIterable); +}; +const hashMapPretty = (key, value) => map => `HashMap([${Array.from(map).map(([k, v]) => `[${key(k)}, ${value(v)}]`).join(", ")}])`; +const hashMapEquivalence = (key, value) => { + const arrayEquivalence = array_.getEquivalence(Equivalence.make(([ka, va], [kb, vb]) => key(ka, kb) && value(va, vb))); + return Equivalence.make((a, b) => arrayEquivalence(Array.from(a), Array.from(b))); +}; +const hashMapParse = decodeUnknown => (u, options, ast) => hashMap_.isHashMap(u) ? toComposite(decodeUnknown(Array.from(u), options), hashMap_.fromIterable, ast, u) : ParseResult.fail(new ParseResult.Type(ast, u)); +/** + * @category HashMap transformations + * @since 3.10.0 + */ +export const HashMapFromSelf = ({ + key, + value +}) => { + return declare([key, value], { + decode: (key, value) => hashMapParse(ParseResult.decodeUnknown(Array$(Tuple(key, value)))), + encode: (key, value) => hashMapParse(ParseResult.encodeUnknown(Array$(Tuple(key, value)))) + }, { + typeConstructor: { + _tag: "effect/HashMap" + }, + description: `HashMap<${format(key)}, ${format(value)}>`, + pretty: hashMapPretty, + arbitrary: hashMapArbitrary, + equivalence: hashMapEquivalence + }); +}; +/** + * @category HashMap transformations + * @since 3.10.0 + */ +export const HashMap = ({ + key, + value +}) => { + return transform(Array$(Tuple(key, value)), HashMapFromSelf({ + key: typeSchema(asSchema(key)), + value: typeSchema(asSchema(value)) + }), { + strict: true, + decode: i => hashMap_.fromIterable(i), + encode: a => Array.from(a) + }); +}; +const listArbitrary = (item, ctx) => fc => { + const items = fc.array(item(fc)); + return (ctx.depthIdentifier !== undefined ? fc.oneof(ctx, fc.constant([]), items) : items).map(list_.fromIterable); +}; +const listPretty = item => set => `List(${Array.from(set).map(a => item(a)).join(", ")})`; +const listEquivalence = item => { + const arrayEquivalence = array_.getEquivalence(item); + return Equivalence.make((a, b) => arrayEquivalence(Array.from(a), Array.from(b))); +}; +const listParse = decodeUnknown => (u, options, ast) => list_.isList(u) ? toComposite(decodeUnknown(Array.from(u), options), list_.fromIterable, ast, u) : ParseResult.fail(new ParseResult.Type(ast, u)); +/** + * @category List transformations + * @since 3.10.0 + */ +export const ListFromSelf = value => { + return declare([value], { + decode: item => listParse(ParseResult.decodeUnknown(Array$(item))), + encode: item => listParse(ParseResult.encodeUnknown(Array$(item))) + }, { + typeConstructor: { + _tag: "effect/List" + }, + description: `List<${format(value)}>`, + pretty: listPretty, + arbitrary: listArbitrary, + equivalence: listEquivalence + }); +}; +/** + * @category List transformations + * @since 3.10.0 + */ +export function List(value) { + return transform(Array$(value), ListFromSelf(typeSchema(asSchema(value))), { + strict: true, + decode: i => list_.fromIterable(i), + encode: a => Array.from(a) + }); +} +const sortedSetArbitrary = (item, ord, ctx) => fc => { + const items = fc.array(item(fc)); + return (ctx.depthIdentifier !== undefined ? fc.oneof(ctx, fc.constant([]), items) : items).map(as => sortedSet_.fromIterable(as, ord)); +}; +const sortedSetPretty = item => set => `new SortedSet([${Array.from(sortedSet_.values(set)).map(a => item(a)).join(", ")}])`; +const sortedSetParse = (decodeUnknown, ord) => (u, options, ast) => sortedSet_.isSortedSet(u) ? toComposite(decodeUnknown(Array.from(sortedSet_.values(u)), options), as => sortedSet_.fromIterable(as, ord), ast, u) : ParseResult.fail(new ParseResult.Type(ast, u)); +/** + * @category SortedSet transformations + * @since 3.10.0 + */ +export const SortedSetFromSelf = (value, ordA, ordI) => { + return declare([value], { + decode: item => sortedSetParse(ParseResult.decodeUnknown(Array$(item)), ordA), + encode: item => sortedSetParse(ParseResult.encodeUnknown(Array$(item)), ordI) + }, { + typeConstructor: { + _tag: "effect/SortedSet" + }, + description: `SortedSet<${format(value)}>`, + pretty: sortedSetPretty, + arbitrary: (arb, ctx) => sortedSetArbitrary(arb, ordA, ctx), + equivalence: () => sortedSet_.getEquivalence() + }); +}; +/** + * @category SortedSet transformations + * @since 3.10.0 + */ +export function SortedSet(value, ordA) { + const to = typeSchema(asSchema(value)); + return transform(Array$(value), SortedSetFromSelf(to, ordA, ordA), { + strict: true, + decode: i => sortedSet_.fromIterable(i, ordA), + encode: a => Array.from(sortedSet_.values(a)) + }); +} +/** + * Converts an arbitrary value to a `boolean` by testing whether it is truthy. + * Uses `!!val` to coerce the value to a `boolean`. + * + * @see https://developer.mozilla.org/docs/Glossary/Truthy + * + * @category boolean constructors + * @since 3.10.0 + */ +export class BooleanFromUnknown extends /*#__PURE__*/transform(Unknown, Boolean$, { + strict: true, + decode: i => Predicate.isTruthy(i), + encode: identity +}).annotations({ + identifier: "BooleanFromUnknown" +}) {} +/** + * Converts an `string` value into its corresponding `boolean` + * ("true" as `true` and "false" as `false`). + * + * @category boolean transformations + * @since 3.11.0 + */ +export class BooleanFromString extends /*#__PURE__*/transform(Literal("true", "false").annotations({ + description: "a string to be decoded into a boolean" +}), Boolean$, { + strict: true, + decode: i => i === "true", + encode: a => a ? "true" : "false" +}).annotations({ + identifier: "BooleanFromString" +}) {} +/** + * @category Config validations + * @since 3.10.0 + */ +export const Config = (name, schema) => { + const decodeUnknownEither = ParseResult.decodeUnknownEither(schema); + return config_.string(name).pipe(config_.mapOrFail(s => decodeUnknownEither(s).pipe(either_.mapLeft(error => configError_.InvalidData([], ParseResult.TreeFormatter.formatIssueSync(error)))))); +}; +// --------------------------------------------- +// Serializable +// --------------------------------------------- +/** + * @since 3.10.0 + * @category symbol + */ +export const symbolSerializable = /*#__PURE__*/Symbol.for("effect/Schema/Serializable/symbol"); +/** + * @since 3.10.0 + */ +export const asSerializable = serializable => serializable; +/** + * @since 3.10.0 + * @category accessor + */ +export const serializableSchema = self => self[symbolSerializable]; +/** + * @since 3.10.0 + * @category encoding + */ +export const serialize = self => encodeUnknown(self[symbolSerializable])(self); +/** + * @since 3.10.0 + * @category decoding + */ +export const deserialize = /*#__PURE__*/dual(2, (self, value) => decodeUnknown(self[symbolSerializable])(value)); +/** + * @since 3.10.0 + * @category symbol + */ +export const symbolWithResult = /*#__PURE__*/Symbol.for("effect/Schema/Serializable/symbolResult"); +/** + * @since 3.10.0 + */ +export const asWithResult = withExit => withExit; +/** + * @since 3.10.0 + * @category accessor + */ +export const failureSchema = self => self[symbolWithResult].failure; +/** + * @since 3.10.0 + * @category accessor + */ +export const successSchema = self => self[symbolWithResult].success; +const exitSchemaCache = /*#__PURE__*/globalValue("effect/Schema/Serializable/exitSchemaCache", () => new WeakMap()); +/** + * @since 3.10.0 + * @category accessor + */ +export const exitSchema = self => { + const proto = Object.getPrototypeOf(self); + if (!(symbolWithResult in proto)) { + return Exit({ + failure: failureSchema(self), + success: successSchema(self), + defect: Defect + }); + } + let schema = exitSchemaCache.get(proto); + if (schema === undefined) { + schema = Exit({ + failure: failureSchema(self), + success: successSchema(self), + defect: Defect + }); + exitSchemaCache.set(proto, schema); + } + return schema; +}; +/** + * @since 3.10.0 + * @category encoding + */ +export const serializeFailure = /*#__PURE__*/dual(2, (self, value) => encode(self[symbolWithResult].failure)(value)); +/** + * @since 3.10.0 + * @category decoding + */ +export const deserializeFailure = /*#__PURE__*/dual(2, (self, value) => decodeUnknown(self[symbolWithResult].failure)(value)); +/** + * @since 3.10.0 + * @category encoding + */ +export const serializeSuccess = /*#__PURE__*/dual(2, (self, value) => encode(self[symbolWithResult].success)(value)); +/** + * @since 3.10.0 + * @category decoding + */ +export const deserializeSuccess = /*#__PURE__*/dual(2, (self, value) => decodeUnknown(self[symbolWithResult].success)(value)); +/** + * @since 3.10.0 + * @category encoding + */ +export const serializeExit = /*#__PURE__*/dual(2, (self, value) => encode(exitSchema(self))(value)); +/** + * @since 3.10.0 + * @category decoding + */ +export const deserializeExit = /*#__PURE__*/dual(2, (self, value) => decodeUnknown(exitSchema(self))(value)); +/** + * @since 3.10.0 + */ +export const asSerializableWithResult = procedure => procedure; +/** + * @example + * ```ts + * import { Schema } from "effect" + * + * class MyRequest extends Schema.TaggedRequest("MyRequest")("MyRequest", { + * failure: Schema.String, + * success: Schema.Number, + * payload: { id: Schema.String } + * }) {} + * ``` + * + * @category classes + * @since 3.10.0 + */ +export const TaggedRequest = identifier => (tag, options, annotations) => { + const taggedFields = extendFields({ + _tag: getClassTag(tag) + }, options.payload); + return class TaggedRequestClass extends makeClass({ + kind: "TaggedRequest", + identifier: identifier ?? tag, + schema: Struct(taggedFields), + fields: taggedFields, + Base: Request.Class, + annotations + }) { + static _tag = tag; + static success = options.success; + static failure = options.failure; + get [symbolSerializable]() { + return this.constructor; + } + get [symbolWithResult]() { + return { + failure: options.failure, + success: options.success + }; + } + }; +}; +// ------------------------------------------------------------------------------------------------- +// Equivalence compiler +// ------------------------------------------------------------------------------------------------- +/** + * Given a schema `Schema`, returns an `Equivalence` instance for `A`. + * + * @category Equivalence + * @since 3.10.0 + */ +export const equivalence = schema => go(schema.ast, []); +const getEquivalenceAnnotation = /*#__PURE__*/AST.getAnnotation(AST.EquivalenceAnnotationId); +const go = (ast, path) => { + const hook = getEquivalenceAnnotation(ast); + if (option_.isSome(hook)) { + switch (ast._tag) { + case "Declaration": + return hook.value(...ast.typeParameters.map(tp => go(tp, path))); + case "Refinement": + return hook.value(go(ast.from, path)); + default: + return hook.value(); + } + } + switch (ast._tag) { + case "NeverKeyword": + throw new Error(errors_.getEquivalenceUnsupportedErrorMessage(ast, path)); + case "Transformation": + return go(ast.to, path); + case "Declaration": + case "Literal": + case "StringKeyword": + case "TemplateLiteral": + case "UniqueSymbol": + case "SymbolKeyword": + case "UnknownKeyword": + case "AnyKeyword": + case "NumberKeyword": + case "BooleanKeyword": + case "BigIntKeyword": + case "UndefinedKeyword": + case "VoidKeyword": + case "Enums": + case "ObjectKeyword": + return Equal.equals; + case "Refinement": + return go(ast.from, path); + case "Suspend": + { + const get = util_.memoizeThunk(() => go(ast.f(), path)); + return (a, b) => get()(a, b); + } + case "TupleType": + { + const elements = ast.elements.map((element, i) => go(element.type, path.concat(i))); + const rest = ast.rest.map(annotatedAST => go(annotatedAST.type, path)); + return Equivalence.make((a, b) => { + if (!Array.isArray(a) || !Array.isArray(b)) { + return false; + } + const len = a.length; + if (len !== b.length) { + return false; + } + // --------------------------------------------- + // handle elements + // --------------------------------------------- + let i = 0; + for (; i < Math.min(len, ast.elements.length); i++) { + if (!elements[i](a[i], b[i])) { + return false; + } + } + // --------------------------------------------- + // handle rest element + // --------------------------------------------- + if (array_.isNonEmptyReadonlyArray(rest)) { + const [head, ...tail] = rest; + for (; i < len - tail.length; i++) { + if (!head(a[i], b[i])) { + return false; + } + } + // --------------------------------------------- + // handle post rest elements + // --------------------------------------------- + for (let j = 0; j < tail.length; j++) { + i += j; + if (!tail[j](a[i], b[i])) { + return false; + } + } + } + return true; + }); + } + case "TypeLiteral": + { + if (ast.propertySignatures.length === 0 && ast.indexSignatures.length === 0) { + return Equal.equals; + } + const propertySignatures = ast.propertySignatures.map(ps => go(ps.type, path.concat(ps.name))); + const indexSignatures = ast.indexSignatures.map(is => go(is.type, path)); + return Equivalence.make((a, b) => { + if (!Predicate.isRecord(a) || !Predicate.isRecord(b)) { + return false; + } + const aStringKeys = Object.keys(a); + const aSymbolKeys = Object.getOwnPropertySymbols(a); + // --------------------------------------------- + // handle property signatures + // --------------------------------------------- + for (let i = 0; i < propertySignatures.length; i++) { + const ps = ast.propertySignatures[i]; + const name = ps.name; + const aHas = Object.prototype.hasOwnProperty.call(a, name); + const bHas = Object.prototype.hasOwnProperty.call(b, name); + if (ps.isOptional) { + if (aHas !== bHas) { + return false; + } + } + if (aHas && bHas && !propertySignatures[i](a[name], b[name])) { + return false; + } + } + // --------------------------------------------- + // handle index signatures + // --------------------------------------------- + let bSymbolKeys; + let bStringKeys; + for (let i = 0; i < indexSignatures.length; i++) { + const is = ast.indexSignatures[i]; + const encodedParameter = AST.getEncodedParameter(is.parameter); + const isSymbol = AST.isSymbolKeyword(encodedParameter); + if (isSymbol) { + bSymbolKeys = bSymbolKeys || Object.getOwnPropertySymbols(b); + if (aSymbolKeys.length !== bSymbolKeys.length) { + return false; + } + } else { + bStringKeys = bStringKeys || Object.keys(b); + if (aStringKeys.length !== bStringKeys.length) { + return false; + } + } + const aKeys = isSymbol ? aSymbolKeys : aStringKeys; + for (let j = 0; j < aKeys.length; j++) { + const key = aKeys[j]; + if (!Object.prototype.hasOwnProperty.call(b, key) || !indexSignatures[i](a[key], b[key])) { + return false; + } + } + } + return true; + }); + } + case "Union": + { + const searchTree = ParseResult.getSearchTree(ast.types, true); + const ownKeys = Reflect.ownKeys(searchTree.keys); + const len = ownKeys.length; + return Equivalence.make((a, b) => { + let candidates = []; + if (len > 0 && Predicate.isRecordOrArray(a)) { + for (let i = 0; i < len; i++) { + const name = ownKeys[i]; + const buckets = searchTree.keys[name].buckets; + if (Object.prototype.hasOwnProperty.call(a, name)) { + const literal = String(a[name]); + if (Object.prototype.hasOwnProperty.call(buckets, literal)) { + candidates = candidates.concat(buckets[literal]); + } + } + } + } + if (searchTree.otherwise.length > 0) { + candidates = candidates.concat(searchTree.otherwise); + } + const tuples = candidates.map(ast => [go(ast, path), ParseResult.is({ + ast + })]); + for (let i = 0; i < tuples.length; i++) { + const [equivalence, is] = tuples[i]; + if (is(a) && is(b)) { + if (equivalence(a, b)) { + return true; + } + } + } + return false; + }); + } + } +}; +const SymbolStruct = /*#__PURE__*/TaggedStruct("symbol", { + key: String$ +}).annotations({ + description: "an object to be decoded into a globally shared symbol" +}); +const SymbolFromStruct = /*#__PURE__*/transformOrFail(SymbolStruct, SymbolFromSelf, { + strict: true, + decode: i => decodeSymbol(i.key), + encode: (a, _, ast) => ParseResult.map(encodeSymbol(a, ast), key => SymbolStruct.make({ + key + })) +}); +/** @ignore */ +class PropertyKey$ extends /*#__PURE__*/Union(String$, Number$, SymbolFromStruct).annotations({ + identifier: "PropertyKey" +}) {} +export { +/** + * @since 3.12.5 + */ +PropertyKey$ as PropertyKey }; +/** + * @category ArrayFormatter + * @since 3.12.5 + */ +export class ArrayFormatterIssue extends /*#__PURE__*/Struct({ + _tag: propertySignature(Literal("Pointer", "Unexpected", "Missing", "Composite", "Refinement", "Transformation", "Type", "Forbidden")).annotations({ + description: "The tag identifying the type of parse issue" + }), + path: propertySignature(Array$(PropertyKey$)).annotations({ + description: "The path to the property where the issue occurred" + }), + message: propertySignature(String$).annotations({ + description: "A descriptive message explaining the issue" + }) +}).annotations({ + identifier: "ArrayFormatterIssue", + description: "Represents an issue returned by the ArrayFormatter formatter" +}) {} +//# sourceMappingURL=Schema.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Schema.js.map b/backend/node_modules/effect/dist/esm/Schema.js.map new file mode 100644 index 0000000000000000000000000000000000000000..871a7679a8b70da4a76e0528ba73aa412edd4311 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Schema.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Schema.js","names":["array_","bigDecimal_","bigInt_","boolean_","cause_","chunk_","config_","configError_","data_","dateTime","duration_","Effect","either_","Encoding","Equal","Equivalence","exit_","fastCheck_","fiberId_","dual","identity","globalValue","hashMap_","hashSet_","Inspectable","internalCause_","errors_","schemaId_","util_","list_","number_","option_","ParseResult","pipeArguments","Predicate","redacted_","Request","scheduler_","AST","sortedSet_","string_","struct_","TypeId","Symbol","for","make","ast","SchemaClass","variance","annotations","mergeSchemaAnnotations","pipe","arguments","toString","String","Type","Encoded","Context","_A","_","_I","_R","makeStandardResult","exit","isSuccess","value","makeStandardFailureResult","pretty","cause","message","issues","makeStandardFailureFromParseIssue","issue","map","ArrayFormatter","formatIssue","path","standardSchemaV1","schema","overrideOptions","decodeUnknown","errors","StandardSchemaV1Class","version","vendor","validate","scheduler","SyncScheduler","fiber","runFork","matchEffect","onFailure","onSuccess","succeed","flush","unsafePoll","Promise","resolve","addObserver","builtInAnnotations","typeConstructor","TypeConstructorAnnotationId","schemaId","SchemaIdAnnotationId","MessageAnnotationId","missingMessage","MissingMessageAnnotationId","identifier","IdentifierAnnotationId","title","TitleAnnotationId","description","DescriptionAnnotationId","examples","ExamplesAnnotationId","default","DefaultAnnotationId","documentation","DocumentationAnnotationId","jsonSchema","JSONSchemaAnnotationId","arbitrary","ArbitraryAnnotationId","PrettyAnnotationId","equivalence","EquivalenceAnnotationId","concurrency","ConcurrencyAnnotationId","batching","BatchingAnnotationId","parseIssueTitle","ParseIssueTitleAnnotationId","parseOptions","ParseOptionsAnnotationId","decodingFallback","DecodingFallbackAnnotationId","toASTAnnotations","out","key","id","asSchema","format","encodedSchema","encodedAST","encodedBoundSchema","encodedBoundAST","typeSchema","typeAST","asserts","decodeOption","decodeSync","decodeUnknownOption","decodeUnknownSync","encodeOption","encodeSync","encodeUnknownOption","encodeUnknownSync","is","validateOption","validateSync","encodeUnknown","options","u","mapError","parseError","encodeUnknownEither","mapLeft","encodeUnknownPromise","parser","runPromise","encode","encodeEither","encodePromise","decodeUnknownEither","decodeUnknownPromise","decode","decodeEither","decodePromise","validateEither","validatePromise","isSchema","hasProperty","isObject","getDefaultLiteralAST","literals","isMembers","Union","mapMembers","literal","Literal","makeLiteralClass","LiteralClass","isNonEmptyReadonlyArray","Never","pickLiteral","_schema","UniqueSymbolFromSelf","symbol","UniqueSymbol","getDefaultEnumsAST","enums","Enums","Object","keys","filter","makeEnumsClass","EnumsClass","TemplateLiteral","head","tail","spans","h","ts","isLiteral","i","length","item","next","push","TemplateLiteralSpan","isNonEmptyArray","getTemplateLiteralParserCoercedElement","encoded","_tag","isString","s","transform","strict","compose","NumberFromString","members","hasCoercions","member","types","coerced","TemplateLiteralParser","params","encodedSchemas","elements","schemas","param","element","from","re","getTemplateLiteralCapturingRegExp","to","Tuple","AutoTitleAnnotationId","TemplateLiteralParserClass","transformOrFail","match","exec","slice","fail","source","JSON","stringify","tuple","join","declareConstructor","typeParameters","makeDeclareClass","Declaration","tp","declarePrimitive","input","DeclareClass","declare","Array","isArray","BrandSchemaId","fromBrand","constructor","self","makeBrandClass","Refinement","predicate","a","either","isLeft","some","left","v","none","InstanceOfSchemaId","instanceOf","name","Undefined","undefinedKeyword","Void","voidKeyword","Null","null","neverKeyword","Unknown","unknownKeyword","Any","anyKeyword","BigIntFromSelf","bigIntKeyword","SymbolFromSelf","symbolKeyword","String$","stringKeyword","Number$","numberKeyword","Boolean$","booleanKeyword","Object$","objectKeyword","Boolean","Number","getDefaultUnionAST","m","makeUnionClass","UnionClass","NullOr","UndefinedOr","NullishOr","keyof","ElementImpl","OptionalType","optionalElement","_Token","type","isOptional","getDefaultTupleTypeAST","rest","TupleType","el","makeTupleTypeClass","TupleTypeClass","args","makeArrayClass","ArrayClass","Array$","makeNonEmptyArrayClass","NonEmptyArrayClass","NonEmptyArray","ArrayEnsure","ensure","NonEmptyArrayEnsure","of","formatPropertySignatureToken","PropertySignatureDeclaration","isReadonly","defaultValue","token","FromPropertySignature","fromKey","ToPropertySignature","formatPropertyKey","p","undefined","PropertySignatureTransformation","mergeSignatureAnnotations","PropertySignatureTypeId","isPropertySignature","PropertySignatureImpl","_TypeToken","_Key","_EncodedToken","_HasDefault","makePropertySignature","PropertySignatureWithFromImpl","propertySignature","withConstructorDefault","applyDefaultValue","o","onNone","onSome","pruneUndefined","pruned","Transformation","transformation","withDecodingDefault","withDefaults","defaults","decoding","optionalToRequired","flatMap","requiredToOptional","optionalToOptional","optionalPropertySignatureAST","isExact","exact","isNullable","nullable","asOption","as","asOptionEncode","onNoneEncoding","orElse","OptionFromSelf_","isNotNull","isNotUndefined","optional","optionalWith","preserveMissingMessageAnnotation","pickAnnotations","getDefaultTypeLiteralAST","fields","records","ownKeys","Reflect","pss","transformations","field","toAnnotations","PropertySignature","issFrom","issTo","r","indexSignatures","propertySignatures","record","forEach","ps","IndexSignature","parameter","TypeLiteral","TypeLiteralTransformation","iss","lazilyMergeDefaults","makeTypeLiteralClass","TypeLiteralClass","props","propsWithDefaults","getDisableValidationMakeOption","pick","Struct","omit","tag","TaggedStruct","makeRecordClass","RecordClass","Record","pluck","getPropertyKeyIndexedAccess","orUndefined","BrandClass","brand","annotation","getBrandAnnotation","brands","BrandAnnotationId","partial","partialWith","required","mutable","intersectTypeLiterals","x","y","isTypeLiteral","findIndex","extendAST","concat","Error","getSchemaExtendErrorMessage","preserveRefinementAnnotations","omitAnnotations","addRefinementToMembers","refinement","asts","intersectUnionMembers","getTypes","isUnion","xs","ys","isStringKeyword","isNumber","isNumberKeyword","isBoolean","isBooleanKeyword","isRefinement","Suspend","f","propertySignatureTransformations","composeTransformation","FinalTransformation","fromA","fromI","toI","toA","isTransformation","isTypeLiteralTransformation","extend","that","makeTransformationClass","suspend","RefineSchemaId","makeRefineClass","RefineClass","fromFilterPredicateReturnTypeItem","Pointer","toFilterParseIssue","isSingle","filterMap","Composite","filterEffect","filterReturnType","TransformationClass","_options","_ast","transformLiteral","transformLiterals","pairs","attachPropertySignature","isSymbol","rename","mapping","TrimmedSchemaId","trimmed","trim","pattern","MaxLengthSchemaId","maxLength","MinLengthSchemaId","minLength","LengthSchemaId","Math","max","floor","min","PatternSchemaId","regex","lastIndex","test","StartsWithSchemaId","startsWith","formatted","EndsWithSchemaId","endsWith","IncludesSchemaId","includes","searchString","LowercasedSchemaId","lowercased","toLowerCase","Lowercased","UppercasedSchemaId","uppercased","toUpperCase","Uppercased","CapitalizedSchemaId","capitalized","Capitalized","UncapitalizedSchemaId","uncapitalized","Uncapitalized","Char","nonEmptyString","Lowercase","Uppercase","Capitalize","capitalize","Uncapitalize","uncapitalize","Trimmed","NonEmptyTrimmedString","Trim","split","separator","getErrorMessage","e","getParseJsonTransformation","try","parse","reviver","catch","replacer","space","ParseJsonSchemaId","parseJson","schemaOrOptions","NonEmptyString","UUIDSchemaId","uuidRegexp","UUID","fc","uuid","ULIDSchemaId","ulidRegexp","ULID","ulid","URLFromSelf","URL","webUrl","url","URL$","FiniteSchemaId","finite","isFinite","GreaterThanSchemaId","greaterThan","exclusiveMinimum","GreaterThanOrEqualToSchemaId","greaterThanOrEqualTo","minimum","MultipleOfSchemaId","multipleOf","divisor","positiveDivisor","abs","remainder","IntSchemaId","int","isSafeInteger","LessThanSchemaId","lessThan","exclusiveMaximum","LessThanOrEqualToSchemaId","lessThanOrEqualTo","maximum","BetweenSchemaId","between","NonNaNSchemaId","nonNaN","isNaN","positive","negative","nonPositive","nonNegative","clamp","parseNumber","fromOption","Finite","Int","NonNaN","Positive","Negative","NonPositive","NonNegative","JsonNumberSchemaId","JsonNumber","Not","not","encodeSymbol","sym","keyFor","decodeSymbol","Symbol$","GreaterThanBigIntSchemaId","GreaterThanBigintSchemaId","greaterThanBigInt","GreaterThanOrEqualToBigIntSchemaId","greaterThanOrEqualToBigInt","LessThanBigIntSchemaId","lessThanBigInt","LessThanOrEqualToBigIntSchemaId","lessThanOrEqualToBigInt","BetweenBigIntSchemaId","BetweenBigintSchemaId","betweenBigInt","positiveBigInt","negativeBigInt","nonNegativeBigInt","nonPositiveBigInt","clampBigInt","BigInt$","fromString","BigInt","PositiveBigIntFromSelf","PositiveBigInt","NegativeBigIntFromSelf","NegativeBigInt","NonPositiveBigIntFromSelf","NonPositiveBigInt","NonNegativeBigIntFromSelf","NonNegativeBigInt","BigIntFromNumber","MIN_SAFE_INTEGER","MAX_SAFE_INTEGER","fromNumber","toNumber","redactedArbitrary","toComposite","eff","actual","mapBoth","redactedParse","isRedacted","RedactedFromSelf","getEquivalence","Redacted","DurationFromSelf","isDuration","oneof","constant","infinity","bigInt","nanos","maxSafeNat","millis","DurationFromNanos","duration","toNanos","NonNegativeInt","DurationFromMillis","toMillis","DurationValueMillis","DurationValueNanos","DurationValueInfinity","durationValueInfinity","DurationValue","FiniteHRTime","InfiniteHRTime","HRTime","isDurationValue","Duration","seconds","clampDuration","betweenDuration","LessThanDurationSchemaId","lessThanDuration","LessThanOrEqualToDurationSchemaId","lessThanOrEqualToDuration","GreaterThanDurationSchemaId","greaterThanDuration","GreaterThanOrEqualToDurationSchemaId","greaterThanOrEqualToDuration","BetweenDurationSchemaId","Uint8ArrayFromSelf","isUint8Array","u8arr","uint8Array","equals","Uint8","Uint8Array$","Uint8Array","makeUint8ArrayTransformation","decodeException","Uint8ArrayFromBase64","decodeBase64","encodeBase64","Uint8ArrayFromBase64Url","decodeBase64Url","encodeBase64Url","Uint8ArrayFromHex","decodeHex","encodeHex","makeEncodingTransformation","StringFromBase64","decodeBase64String","StringFromBase64Url","decodeBase64UrlString","StringFromHex","decodeHexString","StringFromUriComponent","decodeUriComponent","encodeUriComponent","encodeException","MinItemsSchemaId","minItems","n","getInvalidArgumentErrorMessage","StableFilterAnnotationId","MaxItemsSchemaId","maxItems","ItemsCountSchemaId","itemsCount","getNumberIndexedAccess","OptionFromSelf","headNonEmpty","headOrElse","fallback","ValidDateSchemaId","validDate","getTime","noInvalidDate","LessThanDateSchemaId","lessThanDate","formatDate","LessThanOrEqualToDateSchemaId","lessThanOrEqualToDate","GreaterThanDateSchemaId","greaterThanDate","GreaterThanOrEqualToDateSchemaId","greaterThanOrEqualToDate","BetweenDateSchemaId","betweenDate","DateFromSelfSchemaId","DateFromSelf","isDate","date","Date","ValidDateFromSelf","DateFromString","Date$","DateFromNumber","DateTimeUtcFromSelf","isDateTime","isUtc","unsafeFromDate","decodeDateTimeUtc","unsafeMake","formatUnknown","DateTimeUtcFromNumber","toEpochMillis","DateTimeUtcFromDate","toDateUtc","DateTimeUtc","formatIso","timeZoneOffsetArbitrary","integer","zoneMakeOffset","TimeZoneOffsetFromSelf","isTimeZoneOffset","zone","TimeZoneOffset","offset","timeZoneNamedArbitrary","constantFrom","Intl","supportedValuesOf","zoneUnsafeMakeNamed","TimeZoneNamedFromSelf","isTimeZoneNamed","TimeZoneNamed","TimeZoneFromSelf","TimeZone","zoneFromString","zoneToString","timeZoneArbitrary","DateTimeZonedFromSelf","isZoned","timeZone","unsafeMakeZoned","DateTimeZoned","makeZonedFromString","formatIsoZoned","OptionNoneEncoded","optionSomeEncoded","optionEncoded","optionDecode","optionArbitrary","ctx","optionPretty","optionParse","isOption","isNone","makeNoneEncoded","makeSomeEncoded","Option","value_","OptionFromNullOr","fromNullable","getOrNull","OptionFromNullishOr","getOrUndefined","OptionFromUndefinedOr","OptionFromNonEmptyTrimmedString","isNonEmpty","getOrElse","rightEncoded","right","leftEncoded","eitherEncoded","eitherDecode","eitherArbitrary","eitherPretty","onLeft","onRight","eitherParse","parseRight","decodeUnknownLeft","isEither","EitherFromSelf","makeLeftEncoded","makeRightEncoded","Either","right_","left_","EitherFromUnion","toright","toleft","fromRight","fromLeft","mapArbitrary","items","array","depthIdentifier","Map","readonlyMapPretty","entries","k","readonlyMapEquivalence","arrayEquivalence","ka","va","kb","vb","b","readonlyMapParse","isMap","mapFromSelf_","Key","Value","ReadonlyMapFromSelf","MapFromSelf","ReadonlyMap","ReadonlyMapFromRecord","fromEntries","MapFromRecord","setArbitrary","Set","readonlySetPretty","set","values","readonlySetEquivalence","readonlySetParse","isSet","setFromSelf_","ReadonlySetFromSelf","SetFromSelf","ReadonlySet","bigDecimalPretty","val","normalize","bigDecimalArbitrary","scale","BigDecimalFromSelf","isBigDecimal","BigDecimal","BigDecimalFromNumber","unsafeFromNumber","unsafeToNumber","GreaterThanBigDecimalSchemaId","greaterThanBigDecimal","GreaterThanOrEqualToBigDecimalSchemaId","greaterThanOrEqualToBigDecimal","LessThanBigDecimalSchemaId","lessThanBigDecimal","LessThanOrEqualToBigDecimalSchemaId","lessThanOrEqualToBigDecimal","PositiveBigDecimalSchemaId","positiveBigDecimal","isPositive","PositiveBigDecimalFromSelf","NonNegativeBigDecimalSchemaId","nonNegativeBigDecimal","NonNegativeBigDecimalFromSelf","NegativeBigDecimalSchemaId","negativeBigDecimal","isNegative","NegativeBigDecimalFromSelf","NonPositiveBigDecimalSchemaId","nonPositiveBigDecimal","NonPositiveBigDecimalFromSelf","BetweenBigDecimalSchemaId","betweenBigDecimal","formattedMinimum","formattedMaximum","clampBigDecimal","chunkArbitrary","fromIterable","chunkPretty","c","toReadonlyArray","chunkParse","isChunk","isEmpty","empty","ChunkFromSelf","Chunk","nonEmptyChunkArbitrary","unsafeFromNonEmptyArray","nonEmptyChunkPretty","nonEmptyChunkParse","NonEmptyChunkFromSelf","NonEmptyChunk","decodeData","struct","dataArbitrary","dataPretty","d","dataParse","isEqual","DataFromSelf","Data","assign","isField","isFields","every","getFields","hasFields","getSchemaFromFieldsOr","fieldsOr","getFieldsFromFieldsOr","Class","makeClass","kind","Base","getClassTag","TaggedClass","newFields","taggedFields","extendFields","TaggedError","prototype","hasMessageField","TaggedErrorClass","disableToString","defineProperty","get","enumerable","configurable","getASTDuplicatePropertySignatureErrorMessage","disableValidation","astCache","WeakMap","getClassAnnotations","classSymbol","typeAnnotations","transformationAnnotations","encodedAnnotations","typeSchema_","declarationSurrogate","typeSide","constructorSchema","encodedSide","transformationSurrogate","fallbackInstanceOf","klass","declaration","arb","SurrogateAnnotationId","newFieldsOr","newSchema","extendedFields","transformedFields","transformOrFailFrom","writable","FiberIdNoneEncoded","FiberIdRuntimeEncoded","startTimeMillis","FiberIdCompositeEncoded","FiberIdEncoded","fiberIdArbitrary","letrec","tie","None","Runtime","FiberId","fiberIdDecode","fiberIdPretty","fiberId","FiberIdFromSelf","isFiberId","runtime","composite","fiberIdEncode","causeDieEncoded","defect","CauseEmptyEncoded","causeFailEncoded","error","CauseInterruptEncoded","causeEncodedId","causeEncoded","error_","defect_","suspended","JSONIdentifierAnnotationId","causeArbitrary","Empty","Fail","Die","Interrupt","Sequential","Parallel","Cause","causeDecode","causePretty","causeParse","isCause","causeEncode","CauseFromSelf","die","interrupt","sequential","parallel","Defect","err","stack","prettyErrorMessage","exitFailureEncoded","exitSuccessEncoded","exitEncoded","exitDecode","failCause","exitArbitrary","exitPretty","exitParse","decodeUnknownValue","decodeUnknownCause","isExit","ExitFromSelf","failure","success","Exit","success_","failure_","hashSetArbitrary","hashSetPretty","hashSetEquivalence","hashSetParse","isHashSet","HashSetFromSelf","HashSet","hashMapArbitrary","hashMapPretty","hashMapEquivalence","hashMapParse","isHashMap","HashMapFromSelf","HashMap","listArbitrary","listPretty","listEquivalence","listParse","isList","ListFromSelf","List","sortedSetArbitrary","ord","sortedSetPretty","sortedSetParse","isSortedSet","SortedSetFromSelf","ordA","ordI","SortedSet","BooleanFromUnknown","isTruthy","BooleanFromString","Config","string","mapOrFail","InvalidData","TreeFormatter","formatIssueSync","symbolSerializable","asSerializable","serializable","serializableSchema","serialize","deserialize","symbolWithResult","asWithResult","withExit","failureSchema","successSchema","exitSchemaCache","exitSchema","proto","getPrototypeOf","serializeFailure","deserializeFailure","serializeSuccess","deserializeSuccess","serializeExit","deserializeExit","asSerializableWithResult","procedure","TaggedRequest","payload","TaggedRequestClass","go","getEquivalenceAnnotation","getAnnotation","hook","isSome","getEquivalenceUnsupportedErrorMessage","memoizeThunk","annotatedAST","len","j","isRecord","aStringKeys","aSymbolKeys","getOwnPropertySymbols","aHas","hasOwnProperty","call","bHas","bSymbolKeys","bStringKeys","encodedParameter","getEncodedParameter","isSymbolKeyword","aKeys","searchTree","getSearchTree","candidates","isRecordOrArray","buckets","otherwise","tuples","SymbolStruct","SymbolFromStruct","PropertyKey$","PropertyKey","ArrayFormatterIssue"],"sources":["../../src/Schema.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAMA,OAAO,KAAKA,MAAM,MAAM,YAAY;AACpC,OAAO,KAAKC,WAAW,MAAM,iBAAiB;AAC9C,OAAO,KAAKC,OAAO,MAAM,aAAa;AACtC,OAAO,KAAKC,QAAQ,MAAM,cAAc;AAExC,OAAO,KAAKC,MAAM,MAAM,YAAY;AACpC,OAAO,KAAKC,MAAM,MAAM,YAAY;AACpC,OAAO,KAAKC,OAAO,MAAM,aAAa;AACtC,OAAO,KAAKC,YAAY,MAAM,kBAAkB;AAChD,OAAO,KAAKC,KAAK,MAAM,WAAW;AAClC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,SAAS,MAAM,eAAe;AAC1C,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,OAAO,MAAM,aAAa;AACtC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAC/C,OAAO,KAAKC,KAAK,MAAM,WAAW;AAClC,OAAO,KAAKC,UAAU,MAAM,gBAAgB;AAC5C,OAAO,KAAKC,QAAQ,MAAM,cAAc;AAExC,SAASC,IAAI,EAAEC,QAAQ,QAAQ,eAAe;AAC9C,SAASC,WAAW,QAAQ,kBAAkB;AAC9C,OAAO,KAAKC,QAAQ,MAAM,cAAc;AACxC,OAAO,KAAKC,QAAQ,MAAM,cAAc;AACxC,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAC/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2G,CAAC,EAAE1N,CAAC,EAAEb,GAAG,KAAKd,WAAW,CAACyC,GAAG,CAACojB,YAAY,CAACxW,CAAC,EAAEvO,GAAG,CAAC,EAAG4F,GAAG,IAAKqiC,YAAY,CAACloC,IAAI,CAAC;IAAE6F;EAAG,CAAE,CAAC;CACjG,CACF;AAED;AACA,MAAMuiC,YAAa,sBAAQv/B,KAAK,CAACoH,OAAO,EAAEE,OAAO,EAAEg4B,gBAAgB,CAAC,CAAC/nC,WAAW,CAAC;EAAE0D,UAAU,EAAE;AAAa,CAAE,CAAC;AAE/G;AACE;;;AAGAskC,YAAY,IAAIC,WAAW;AAG7B;;;;AAIA,OAAM,MAAOC,mBAAoB,sBAAQrwB,MAAM,CAAC;EAC9C/M,IAAI,EAAE8I,iBAAiB,CAAChL,OAAO,CAC7B,SAAS,EACT,YAAY,EACZ,SAAS,EACT,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,MAAM,EACN,WAAW,CACZ,CAAC,CAAC5I,WAAW,CAAC;IAAE8D,WAAW,EAAE;EAA6C,CAAE,CAAC;EAC9EnC,IAAI,EAAEiS,iBAAiB,CAAC9B,MAAM,CAACk2B,YAAY,CAAC,CAAC,CAAChoC,WAAW,CAAC;IACxD8D,WAAW,EAAE;GACd,CAAC;EACF1C,OAAO,EAAEwS,iBAAiB,CAAC/D,OAAO,CAAC,CAAC7P,WAAW,CAAC;IAAE8D,WAAW,EAAE;EAA4C,CAAE;CAC9G,CAAC,CAAC9D,WAAW,CAAC;EACb0D,UAAU,EAAE,qBAAqB;EACjCI,WAAW,EAAE;CACd,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/SchemaAST.js.map b/backend/node_modules/effect/dist/esm/SchemaAST.js.map new file mode 100644 index 0000000000000000000000000000000000000000..8dd1d86883d9c45d21a160de892fd5046e5e54d7 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/SchemaAST.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SchemaAST.js","names":["Arr","dual","identity","globalValue","Inspectable","errors_","util_","Number","Option","Order","Predicate","regexp","TypeConstructorAnnotationId","Symbol","for","BrandAnnotationId","SchemaIdAnnotationId","MessageAnnotationId","MissingMessageAnnotationId","IdentifierAnnotationId","TitleAnnotationId","AutoTitleAnnotationId","DescriptionAnnotationId","ExamplesAnnotationId","DefaultAnnotationId","JSONSchemaAnnotationId","ArbitraryAnnotationId","PrettyAnnotationId","EquivalenceAnnotationId","DocumentationAnnotationId","ConcurrencyAnnotationId","BatchingAnnotationId","ParseIssueTitleAnnotationId","ParseOptionsAnnotationId","DecodingFallbackAnnotationId","SurrogateAnnotationId","StableFilterAnnotationId","getAnnotation","annotated","key","Object","prototype","hasOwnProperty","call","annotations","some","none","getTypeConstructorAnnotation","getBrandAnnotation","getSchemaIdAnnotation","getMessageAnnotation","getMissingMessageAnnotation","getTitleAnnotation","getAutoTitleAnnotation","getIdentifierAnnotation","getDescriptionAnnotation","getExamplesAnnotation","getDefaultAnnotation","getJSONSchemaAnnotation","getDocumentationAnnotation","getConcurrencyAnnotation","getBatchingAnnotation","getParseIssueTitleAnnotation","getParseOptionsAnnotation","getDecodingFallbackAnnotation","getSurrogateAnnotation","getStableFilterAnnotation","hasStableFilter","exists","b","JSONIdentifierAnnotationId","getJSONIdentifierAnnotation","getJSONIdentifier","orElse","ParseJsonSchemaId","Declaration","typeParameters","decodeUnknown","encodeUnknown","_tag","constructor","toString","getOrElse","getExpected","toJSON","map","ast","toJSONAnnotations","createASTGuard","tag","isDeclaration","Literal","literal","formatUnknown","isBigInt","String","isLiteral","$null","null","UniqueSymbol","symbol","isUniqueSymbol","UndefinedKeyword","formatKeyword","undefinedKeyword","isUndefinedKeyword","VoidKeyword","voidKeyword","isVoidKeyword","NeverKeyword","neverKeyword","isNeverKeyword","UnknownKeyword","unknownKeyword","isUnknownKeyword","AnyKeyword","anyKeyword","isAnyKeyword","StringKeyword","stringKeyword","isStringKeyword","NumberKeyword","numberKeyword","isNumberKeyword","BooleanKeyword","booleanKeyword","isBooleanKeyword","BigIntKeyword","bigIntKeyword","isBigIntKeyword","SymbolKeyword","symbolKeyword","isSymbolKeyword","ObjectKeyword","objectKeyword","isObjectKeyword","Enums","enums","length","_","value","JSON","stringify","join","isEnums","isTemplateLiteralSpanType","types","every","templateLiteralSpanUnionTypeToString","type","templateLiteralSpanTypeToString","TemplateLiteralSpan","Error","getSchemaUnsupportedLiteralSpanErrorMessage","TemplateLiteral","head","spans","formatTemplateLiteral","span","isTemplateLiteral","Type","OptionalType","isOptional","getRestASTs","rest","annotatedAST","TupleType","elements","isReadonly","hasOptionalElement","hasIllegalRequiredElement","e","getASTRequiredElementFollowinAnOptionalElementErrorMessage","formatTuple","formattedElements","matchLeft","onEmpty","onNonEmpty","tail","formattedHead","wrappedHead","includes","formattedTail","isTupleType","PropertySignature","name","isParameter","from","IndexSignature","parameter","getASTIndexSignatureParameterErrorMessage","TypeLiteral","propertySignatures","indexSignatures","keys","i","getASTDuplicatePropertySignatureErrorMessage","parameters","string","encodedParameter","getEncodedParameter","getASTDuplicateIndexSignatureErrorMessage","formatTypeLiteral","ps","formatIndexSignatures","iss","pss","isTypeLiteral","sortCandidates","sort","mapInput","literalMap","number","boolean","bigint","flatten","candidates","flatMap","isUnion","unify","cs","out","uniques","literals","push","Union","make","isMembers","mapMembers","members","f","as","toJSONMemoMap","WeakMap","Suspend","memoizeThunk","pipe","liftThrowable","get","set","isSuspend","Refinement","filter","match","getOrElseExpected","onNone","onSome","expected","isRefinement","defaultParseOption","Transformation","to","transformation","isTransformation","FinalTransformation","decode","encode","createTransformationGuard","isFinalTransformation","ComposeTransformation","composeTransformation","isComposeTransformation","PropertySignatureTransformation","isRenamingPropertySignatureTransformation","t","TypeLiteralTransformation","propertySignatureTransformations","fromKeys","toKeys","pst","getASTDuplicatePropertySignatureTransformationErrorMessage","isTypeLiteralTransformation","overrides","d","getOwnPropertyDescriptors","base","surrogate","isSome","create","getPrototypeOf","keyof","_keyof","STRING_KEYWORD_PATTERN","NUMBER_KEYWORD_PATTERN","getTemplateLiteralSpanTypePattern","capture","escape","getTemplateLiteralPattern","handleTemplateLiteralSpanTypeParens","s","top","pattern","spanPattern","getTemplateLiteralRegExp","RegExp","getTemplateLiteralCapturingRegExp","getPropertySignatures","annotation","slice","getPropertyKeys","getPropertyKeyIndexedAccess","getIndexSignatures","getNumberIndexedAccess","hasOptional","concat","getASTUnsupportedSchemaErrorMessage","getTypeLiteralPropertySignature","ops","findFirst","isString","undefined","is","regex","test","isSymbol","reduce","intersection","record","go","isNumber","getASTUnsupportedLiteralErrorMessage","forEach","getASTUnsupportedKeySchemaErrorMessage","pick","names","ts","k","find","isNonEmptyReadonlyArray","omit","orUndefined","partial","options","exact","member","required","mutable","changeMap","getCompiler","compile","path","pickAnnotations","annotationIds","id","omitAnnotations","preserveTransformationAnnotations","typeAST","restASTs","p","preserve","changed","allocate","a","fa","getTransformationFrom","encodedAST_","isBound","borrowedAnnotations","identifier","suffix","encodedAST","encodedBoundAST","getOwnPropertySymbols","equals","self","that","equalsTemplateLiteralSpan","equalsEnums","equalsUnion","getEquivalence","intersectionWith","compose","ab","cd","rename","mapping","Reflect","ownKeys","getASTUnsupportedRenameSchemaErrorMessage","getBrands","brands","brand","pruneUndefined","onTransformation","hasUndefined","pruned"],"sources":["../../src/SchemaAST.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAIA,OAAO,KAAKA,GAAG,MAAM,YAAY;AAGjC,SAASC,IAAI,EAAEC,QAAQ,QAAQ,eAAe;AAC9C,SAASC,WAAW,QAAQ,kBAAkB;AAC9C,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAC/C,OAAO,KAAKC,OAAO,MAAM,6BAA6B;AACtD,OAAO,KAAKC,KAAK,MAAM,2BAA2B;AAClD,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC,OAAO,KAAKC,SAA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G,KAAK;QACxB,KAAK,MAAM3O,IAAI,IAAI/D,GAAG,CAAC4D,KAAK,EAAE;UAC5B,MAAM+O,MAAM,GAAGrB,IAAI,CAACvN,IAAI,CAAC;UACzB,IAAI4O,MAAM,EAAE;YACVD,YAAY,GAAG,IAAI;YACnB,IAAI,CAACjR,cAAc,CAACkR,MAAM,CAAC,EAAE;cAC3B/O,KAAK,CAAC8E,IAAI,CAACiK,MAAM,CAAC;YACpB;UACF,CAAC,MAAM;YACL/O,KAAK,CAAC8E,IAAI,CAAC3E,IAAI,CAAC;UAClB;QACF;QACA,IAAI2O,YAAY,EAAE;UAChB,OAAO/J,KAAK,CAACC,IAAI,CAAChF,KAAK,CAAC;QAC1B;QACA;MACF;IACA,KAAK,SAAS;MACZ,OAAO0N,IAAI,CAACtR,GAAG,CAACgJ,CAAC,EAAE,CAAC;IACtB,KAAK,gBAAgB;MACnB,OAAOyJ,gBAAgB,CAACzS,GAAG,CAAC;EAChC;AACF,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Scope.js b/backend/node_modules/effect/dist/esm/Scope.js new file mode 100644 index 0000000000000000000000000000000000000000..c919c6d1087a91a35f53c6f024e6151894d88bc0 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Scope.js @@ -0,0 +1,94 @@ +/** + * @since 2.0.0 + */ +import * as core from "./internal/core.js"; +import * as fiberRuntime from "./internal/fiberRuntime.js"; +/** + * A unique identifier for the `Scope` type. + * + * @since 2.0.0 + * @category symbols + */ +export const ScopeTypeId = core.ScopeTypeId; +/** + * A unique identifier for the `CloseableScope` type. + * + * @since 2.0.0 + * @category symbols + */ +export const CloseableScopeTypeId = core.CloseableScopeTypeId; +/** + * A tag representing the current `Scope` in the environment. + * + * @since 2.0.0 + * @category context + */ +export const Scope = fiberRuntime.scopeTag; +/** + * Adds a finalizer to this scope. The finalizer is guaranteed to be run when + * the scope is closed. Use this when the finalizer does not need to know the + * `Exit` value that the scope is closed with. + * + * @see {@link addFinalizerExit} + * + * @since 2.0.0 + * @category utils + */ +export const addFinalizer = core.scopeAddFinalizer; +/** + * Adds a finalizer to this scope. The finalizer receives the `Exit` value + * when the scope is closed, allowing it to perform different actions based + * on the exit status. + * + * @see {@link addFinalizer} + * + * @since 2.0.0 + * @category utils + */ +export const addFinalizerExit = core.scopeAddFinalizerExit; +/** + * Closes this scope with the specified exit value, running all finalizers that + * have been added to the scope. + * + * @since 2.0.0 + * @category destructors + */ +export const close = core.scopeClose; +/** + * Extends the scope of an `Effect` that requires a scope into this scope. + * It provides this scope to the effect but does not close the scope when the + * effect completes execution. This allows extending a scoped value into a + * larger scope. + * + * @since 2.0.0 + * @category utils + */ +export const extend = fiberRuntime.scopeExtend; +/** + * Forks a new child scope with the specified execution strategy. The child scope + * will automatically be closed when this scope is closed. + * + * @since 2.0.0 + * @category utils + */ +export const fork = core.scopeFork; +/** + * Provides this closeable scope to an `Effect` that requires a scope, + * guaranteeing that the scope is closed with the result of that effect as + * soon as the effect completes execution, whether by success, failure, or + * interruption. + * + * @since 2.0.0 + * @category destructors + */ +export const use = fiberRuntime.scopeUse; +/** + * Creates a new closeable scope where finalizers will run according to the + * specified `ExecutionStrategy`. If no execution strategy is provided, `sequential` + * will be used by default. + * + * @since 2.0.0 + * @category constructors + */ +export const make = fiberRuntime.scopeMake; +//# sourceMappingURL=Scope.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Scope.js.map b/backend/node_modules/effect/dist/esm/Scope.js.map new file mode 100644 index 0000000000000000000000000000000000000000..de11b98b46c55d543c2b2d328fe4fb117138b678 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Scope.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Scope.js","names":["core","fiberRuntime","ScopeTypeId","CloseableScopeTypeId","Scope","scopeTag","addFinalizer","scopeAddFinalizer","addFinalizerExit","scopeAddFinalizerExit","close","scopeClose","extend","scopeExtend","fork","scopeFork","use","scopeUse","make","scopeMake"],"sources":["../../src/Scope.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAQA,OAAO,KAAKA,IAAI,MAAM,oBAAoB;AAC1C,OAAO,KAAKC,YAAY,MAAM,4BAA4B;AAG1D;;;;;;AAMA,OAAO,MAAMC,WAAW,GAAkBF,IAAI,CAACE,WAAW;AAU1D;;;;;;AAMA,OAAO,MAAMC,oBAAoB,GAAkBH,IAAI,CAACG,oBAAoB;AAsD5E;;;;;;AAMA,OAAO,MAAMC,KAAK,GAA8BH,YAAY,CAACI,QAAQ;AAsBrE;;;;;;;;;;AAUA,OAAO,MAAMC,YAAY,GAGEN,IAAI,CAACO,iBAAiB;AAEjD;;;;;;;;;;AAUA,OAAO,MAAMC,gBAAgB,GAC3BR,IAAI,CAACS,qBAAqB;AAE5B;;;;;;;AAOA,OAAO,MAAMC,KAAK,GAAqFV,IAAI,CAACW,UAAU;AAEtH;;;;;;;;;AASA,OAAO,MAAMC,MAAM,GAqBfX,YAAY,CAACY,WAAW;AAE5B;;;;;;;AAOA,OAAO,MAAMC,IAAI,GAGoBd,IAAI,CAACe,SAAS;AAEnD;;;;;;;;;AASA,OAAO,MAAMC,GAAG,GAqBZf,YAAY,CAACgB,QAAQ;AAEzB;;;;;;;;AAQA,OAAO,MAAMC,IAAI,GAEoBjB,YAAY,CAACkB,SAAS","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ScopedCache.js b/backend/node_modules/effect/dist/esm/ScopedCache.js new file mode 100644 index 0000000000000000000000000000000000000000..3560881e7a212b7e900639e82bfe74f5ef5b50fd --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ScopedCache.js @@ -0,0 +1,24 @@ +import * as internal from "./internal/scopedCache.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const ScopedCacheTypeId = internal.ScopedCacheTypeId; +/** + * Constructs a new cache with the specified capacity, time to live, and + * lookup function. + * + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * Constructs a new cache with the specified capacity, time to live, and + * lookup function, where the time to live can depend on the `Exit` value + * returned by the lookup function. + * + * @since 2.0.0 + * @category constructors + */ +export const makeWith = internal.makeWith; +//# sourceMappingURL=ScopedCache.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ScopedCache.js.map b/backend/node_modules/effect/dist/esm/ScopedCache.js.map new file mode 100644 index 0000000000000000000000000000000000000000..55053bdba57b6910cd27aaf52debceb511eaba32 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ScopedCache.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ScopedCache.js","names":["internal","ScopedCacheTypeId","make","makeWith"],"sources":["../../src/ScopedCache.ts"],"sourcesContent":[null],"mappings":"AAOA,OAAO,KAAKA,QAAQ,MAAM,2BAA2B;AAMrD;;;;AAIA,OAAO,MAAMC,iBAAiB,GAAkBD,QAAQ,CAACC,iBAAiB;AA8F1E;;;;;;;AAOA,OAAO,MAAMC,IAAI,GAMsEF,QAAQ,CAACE,IAAI;AAEpG;;;;;;;;AAQA,OAAO,MAAMC,QAAQ,GAMkEH,QAAQ,CAACG,QAAQ","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Secret.js b/backend/node_modules/effect/dist/esm/Secret.js new file mode 100644 index 0000000000000000000000000000000000000000..8b71bfd8c1658ebe82d58b8c0653b10d16416e63 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Secret.js @@ -0,0 +1,44 @@ +import * as InternalSecret from "./internal/secret.js"; +/** + * @since 2.0.0 + * @category symbols + * @deprecated + */ +export const SecretTypeId = InternalSecret.SecretTypeId; +/** + * @since 2.0.0 + * @category refinements + * @deprecated + */ +export const isSecret = InternalSecret.isSecret; +/** + * @since 2.0.0 + * @category constructors + * @deprecated + */ +export const make = InternalSecret.make; +/** + * @since 2.0.0 + * @category constructors + * @deprecated + */ +export const fromIterable = InternalSecret.fromIterable; +/** + * @since 2.0.0 + * @category constructors + * @deprecated + */ +export const fromString = InternalSecret.fromString; +/** + * @since 2.0.0 + * @category getters + * @deprecated + */ +export const value = InternalSecret.value; +/** + * @since 2.0.0 + * @category unsafe + * @deprecated + */ +export const unsafeWipe = InternalSecret.unsafeWipe; +//# sourceMappingURL=Secret.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/SingleProducerAsyncInput.js.map b/backend/node_modules/effect/dist/esm/SingleProducerAsyncInput.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f780d712445b607cb5116f3ab76587bb8f36b53a --- /dev/null +++ b/backend/node_modules/effect/dist/esm/SingleProducerAsyncInput.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SingleProducerAsyncInput.js","names":["internal","make"],"sources":["../../src/SingleProducerAsyncInput.ts"],"sourcesContent":[null],"mappings":"AAOA,OAAO,KAAKA,QAAQ,MAAM,gDAAgD;AAuD1E;;;;AAIA,OAAO,MAAMC,IAAI,GAAoFD,QAAQ,CAACC,IAAI","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Sink.js.map b/backend/node_modules/effect/dist/esm/Sink.js.map new file mode 100644 index 0000000000000000000000000000000000000000..2d43d9719e2641220f6c36ff0ad47bd44610aa02 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Sink.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Sink.js","names":["internal","SinkTypeId","as","collectAll","collectAllN","collectAllFrom","collectAllToMap","collectAllToMapN","collectAllToSet","collectAllToSetN","collectAllUntil","collectAllUntilEffect","collectAllWhile","collectAllWhileEffect","collectAllWhileWith","collectLeftover","mapInput","mapInputEffect","mapInputChunks","mapInputChunksEffect","count","die","dieMessage","dieSync","dimap","dimapEffect","dimapChunks","dimapChunksEffect","drain","drop","dropUntil","dropUntilEffect","dropWhile","dropWhileEffect","ensuring","ensuringWith","context","contextWith","contextWithEffect","contextWithSink","every","fail","failSync","failCause","failCauseSync","filterInput","filterInputEffect","findEffect","fold","foldSink","foldChunks","foldChunksEffect","foldEffect","foldLeft","foldLeftChunks","foldLeftChunksEffect","foldLeftEffect","foldUntil","foldUntilEffect","foldWeighted","foldWeightedDecompose","foldWeightedDecomposeEffect","foldWeightedEffect","forEach","forEachChunk","forEachChunkWhile","forEachWhile","flatMap","fromChannel","toChannel","fromEffect","fromPubSub","fromPush","fromQueue","head","ignoreLeftover","last","leftover","map","mapEffect","mapError","mapLeftover","mkString","never","orElse","provideContext","race","raceBoth","raceWith","refineOrDie","refineOrDieWith","some","splitWhere","succeed","sum","summarized","suspend","sync","take","timed","unwrap","unwrapScoped","unwrapScopedWith","withDuration","zip","zipLeft","zipRight","zipWith"],"sources":["../../src/Sink.ts"],"sourcesContent":[null],"mappings":"AAcA,OAAO,KAAKA,QAAQ,MAAM,oBAAoB;AAW9C;;;;AAIA,OAAO,MAAMC,UAAU,GAAkBD,QAAQ,CAACC,UAAU;AAkF5D;;;;;;AAMA,OAAO,MAAMC,EAAE,GAeXF,QAAQ,CAACE,EAAE;AAEf;;;;;;AAMA,OAAO,MAAMC,UAAU,GAAwCH,QAAQ,CAACG,UAAU;AAElF;;;;;;AAMA,OAAO,MAAMC,WAAW,GAAqDJ,QAAQ,CAACI,WAAW;AAEjG;;;;;;AAMA,OAAO,MAAMC,cAAc,GAEcL,QAAQ,CAACK,cAAc;AAEhE;;;;;;;;AAQA,OAAO,MAAMC,eAAe,GAGYN,QAAQ,CAACM,eAAe;AAEhE;;;;;;;;AAQA,OAAO,MAAMC,gBAAgB,GAIeP,QAAQ,CAACO,gBAAgB;AAErE;;;;;;AAMA,OAAO,MAAMC,eAAe,GAA4CR,QAAQ,CAACQ,eAAe;AAEhG;;;;;;AAMA,OAAO,MAAMC,gBAAgB,GAAyDT,QAAQ,CAACS,gBAAgB;AAE/G;;;;;;;AAOA,OAAO,MAAMC,eAAe,GAA4DV,QAAQ,CAACU,eAAe;AAEhH;;;;;;;AAOA,OAAO,MAAMC,qBAAqB,GAESX,QAAQ,CAACW,qBAAqB;AAEzE;;;;;;;AAOA,OAAO,MAAMC,eAAe,GAiBxBZ,QAAQ,CAACY,eA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,OAAO,MAAMC,MAAM,GAEmBpG,QAAQ,CAACoG,MAAM;AAErD;;;;;;AAMA,OAAO,MAAMC,YAAY,GAEyBrG,QAAQ,CAACqG,YAAY;AAEvE;;;;;;;AAOA,OAAO,MAAMC,gBAAgB,GAEDtG,QAAQ,CAACsG,gBAAgB;AAErD;;;;;;AAMA,OAAO,MAAMC,YAAY,GAEwBvG,QAAQ,CAACuG,YAAY;AAEtE;;;;;;;;AAQA,OAAO,MAAMC,GAAG,GA0BZxG,QAAQ,CAACwG,GAAG;AAEhB;;;;;;AAMA,OAAO,MAAMC,OAAO,GAsBhBzG,QAAQ,CAACyG,OAAO;AAEpB;;;;;;AAMA,OAAO,MAAMC,QAAQ,GAsBjB1G,QAAQ,CAAC0G,QAAQ;AAErB;;;;;;;;AAQA,OAAO,MAAMC,OAAO,GA4BhB3G,QAAQ,CAAC2G,OAAO","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/SortedSet.js.map b/backend/node_modules/effect/dist/esm/SortedSet.js.map new file mode 100644 index 0000000000000000000000000000000000000000..1c64fd4844934d6713a863f807bb162e02aa4ba1 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/SortedSet.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SortedSet.js","names":["Equal","Dual","pipe","Hash","format","NodeInspectSymbol","toJSON","pipeArguments","hasProperty","RBT","TypeId","Symbol","for","SortedSetProto","_A","_","symbol","hash","keyTree","combine","cached","that","isSortedSet","equals","iterator","keys","toString","_id","values","Array","from","map","arguments","fromTree","a","Object","create","u","empty","O","fromIterable","dual","iterable","ord","k","make","entries","add","self","value","has","insert","difference","out","remove","every","predicate","filter","getOrder","flatMap","f","forEach","b","intersection","isSubset","partition","right","left","removeFirst","size","some","toggle","union","getEquivalence"],"sources":["../../src/SortedSet.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,KAAK,MAAM,YAAY;AAEnC,OAAO,KAAKC,IAAI,MAAM,eAAe;A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IAA0BvC,GAAG,CAACgB,IAAI,CAACuB,IAAI,CAAC9B,OAAO,CAAC;AAE5F;;;;AAIA,OAAO,MAAMuD,cAAc,GAAGA,CAAA,KAAgD,CAACvC,CAAC,EAAE4B,CAAC,KAAKE,QAAQ,CAAC9B,CAAC,EAAE4B,CAAC,CAAC,IAAIE,QAAQ,CAACF,CAAC,EAAE5B,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/String.js b/backend/node_modules/effect/dist/esm/String.js new file mode 100644 index 0000000000000000000000000000000000000000..8e4b25e15164ebae27bd9face81b3799ff10c0c8 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/String.js @@ -0,0 +1,635 @@ +/** + * This module provides utility functions and type class instances for working with the `string` type in TypeScript. + * It includes functions for basic string manipulation, as well as type class instances for + * `Equivalence` and `Order`. + * + * @since 2.0.0 + */ +import * as equivalence from "./Equivalence.js"; +import { dual } from "./Function.js"; +import * as readonlyArray from "./internal/array.js"; +import * as number from "./Number.js"; +import * as Option from "./Option.js"; +import * as order from "./Order.js"; +import * as predicate from "./Predicate.js"; +/** + * Tests if a value is a `string`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { String } from "effect" + * + * assert.deepStrictEqual(String.isString("a"), true) + * assert.deepStrictEqual(String.isString(1), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isString = predicate.isString; +/** + * @category instances + * @since 2.0.0 + */ +export const Equivalence = equivalence.string; +/** + * @category instances + * @since 2.0.0 + */ +export const Order = order.string; +/** + * The empty string `""`. + * + * @since 2.0.0 + */ +export const empty = ""; +/** + * Concatenates two strings at runtime. + * + * @since 2.0.0 + */ +export const concat = /*#__PURE__*/dual(2, (self, that) => self + that); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * assert.deepStrictEqual(pipe('a', String.toUpperCase), 'A') + * ``` + * + * @since 2.0.0 + */ +export const toUpperCase = self => self.toUpperCase(); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * assert.deepStrictEqual(pipe('A', String.toLowerCase), 'a') + * ``` + * + * @since 2.0.0 + */ +export const toLowerCase = self => self.toLowerCase(); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * assert.deepStrictEqual(pipe('abc', String.capitalize), 'Abc') + * ``` + * + * @since 2.0.0 + */ +export const capitalize = self => { + if (self.length === 0) return self; + return toUpperCase(self[0]) + self.slice(1); +}; +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * assert.deepStrictEqual(pipe('ABC', String.uncapitalize), 'aBC') + * ``` + * + * @since 2.0.0 + */ +export const uncapitalize = self => { + if (self.length === 0) return self; + return toLowerCase(self[0]) + self.slice(1); +}; +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * assert.deepStrictEqual(pipe('abc', String.replace('b', 'd')), 'adc') + * ``` + * + * @since 2.0.0 + */ +export const replace = (searchValue, replaceValue) => self => self.replace(searchValue, replaceValue); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { String } from "effect" + * + * assert.deepStrictEqual(String.trim(' a '), 'a') + * ``` + * + * @since 2.0.0 + */ +export const trim = self => self.trim(); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { String } from "effect" + * + * assert.deepStrictEqual(String.trimStart(' a '), 'a ') + * ``` + * + * @since 2.0.0 + */ +export const trimStart = self => self.trimStart(); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { String } from "effect" + * + * assert.deepStrictEqual(String.trimEnd(' a '), ' a') + * ``` + * + * @since 2.0.0 + */ +export const trimEnd = self => self.trimEnd(); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * assert.deepStrictEqual(pipe('abcd', String.slice(1, 3)), 'bc') + * ``` + * + * @since 2.0.0 + */ +export const slice = (start, end) => self => self.slice(start, end); +/** + * Test whether a `string` is empty. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { String } from "effect" + * + * assert.deepStrictEqual(String.isEmpty(''), true) + * assert.deepStrictEqual(String.isEmpty('a'), false) + * ``` + * + * @since 2.0.0 + */ +export const isEmpty = self => self.length === 0; +/** + * Test whether a `string` is non empty. + * + * @since 2.0.0 + */ +export const isNonEmpty = self => self.length > 0; +/** + * Calculate the number of characters in a `string`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { String } from "effect" + * + * assert.deepStrictEqual(String.length('abc'), 3) + * ``` + * + * @since 2.0.0 + */ +export const length = self => self.length; +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * assert.deepStrictEqual(pipe('abc', String.split('')), ['a', 'b', 'c']) + * assert.deepStrictEqual(pipe('', String.split('')), ['']) + * ``` + * + * @since 2.0.0 + */ +export const split = /*#__PURE__*/dual(2, (self, separator) => { + const out = self.split(separator); + return readonlyArray.isNonEmptyArray(out) ? out : [self]; +}); +/** + * Returns `true` if `searchString` appears as a substring of `self`, at one or more positions that are + * greater than or equal to `position`; otherwise, returns `false`. + * + * @since 2.0.0 + */ +export const includes = (searchString, position) => self => self.includes(searchString, position); +/** + * @since 2.0.0 + */ +export const startsWith = (searchString, position) => self => self.startsWith(searchString, position); +/** + * @since 2.0.0 + */ +export const endsWith = (searchString, position) => self => self.endsWith(searchString, position); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String, Option } from "effect" + * + * assert.deepStrictEqual(pipe("abc", String.charCodeAt(1)), Option.some(98)) + * assert.deepStrictEqual(pipe("abc", String.charCodeAt(4)), Option.none()) + * ``` + * + * @since 2.0.0 + */ +export const charCodeAt = /*#__PURE__*/dual(2, (self, index) => Option.filter(Option.some(self.charCodeAt(index)), charCode => !isNaN(charCode))); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String, Option } from "effect" + * + * assert.deepStrictEqual(pipe("abcd", String.substring(1)), "bcd") + * assert.deepStrictEqual(pipe("abcd", String.substring(1, 3)), "bc") + * ``` + * + * @since 2.0.0 + */ +export const substring = (start, end) => self => self.substring(start, end); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String, Option } from "effect" + * + * assert.deepStrictEqual(pipe("abc", String.at(1)), Option.some("b")) + * assert.deepStrictEqual(pipe("abc", String.at(4)), Option.none()) + * ``` + * + * @since 2.0.0 + */ +export const at = /*#__PURE__*/dual(2, (self, index) => Option.fromNullable(self.at(index))); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String, Option } from "effect" + * + * assert.deepStrictEqual(pipe("abc", String.charAt(1)), Option.some("b")) + * assert.deepStrictEqual(pipe("abc", String.charAt(4)), Option.none()) + * ``` + * + * @since 2.0.0 + */ +export const charAt = /*#__PURE__*/dual(2, (self, index) => Option.filter(Option.some(self.charAt(index)), isNonEmpty)); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String, Option } from "effect" + * + * assert.deepStrictEqual(pipe("abc", String.codePointAt(1)), Option.some(98)) + * ``` + * + * @since 2.0.0 + */ +export const codePointAt = /*#__PURE__*/dual(2, (self, index) => Option.fromNullable(self.codePointAt(index))); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String, Option } from "effect" + * + * assert.deepStrictEqual(pipe("abbbc", String.indexOf("b")), Option.some(1)) + * ``` + * + * @since 2.0.0 + */ +export const indexOf = searchString => self => Option.filter(Option.some(self.indexOf(searchString)), number.greaterThanOrEqualTo(0)); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String, Option } from "effect" + * + * assert.deepStrictEqual(pipe("abbbc", String.lastIndexOf("b")), Option.some(3)) + * assert.deepStrictEqual(pipe("abbbc", String.lastIndexOf("d")), Option.none()) + * ``` + * + * @since 2.0.0 + */ +export const lastIndexOf = searchString => self => Option.filter(Option.some(self.lastIndexOf(searchString)), number.greaterThanOrEqualTo(0)); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * assert.deepStrictEqual(pipe("a", String.localeCompare("b")), -1) + * assert.deepStrictEqual(pipe("b", String.localeCompare("a")), 1) + * assert.deepStrictEqual(pipe("a", String.localeCompare("a")), 0) + * ``` + * + * @since 2.0.0 + */ +export const localeCompare = (that, locales, options) => self => number.sign(self.localeCompare(that, locales, options)); +/** + * It is the `pipe`-able version of the native `match` method. + * + * @since 2.0.0 + */ +export const match = regexp => self => Option.fromNullable(self.match(regexp)); +/** + * It is the `pipe`-able version of the native `matchAll` method. + * + * @since 2.0.0 + */ +export const matchAll = regexp => self => self.matchAll(regexp); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * const str = "\u1E9B\u0323"; + * assert.deepStrictEqual(pipe(str, String.normalize()), "\u1E9B\u0323") + * assert.deepStrictEqual(pipe(str, String.normalize("NFC")), "\u1E9B\u0323") + * assert.deepStrictEqual(pipe(str, String.normalize("NFD")), "\u017F\u0323\u0307") + * assert.deepStrictEqual(pipe(str, String.normalize("NFKC")), "\u1E69") + * assert.deepStrictEqual(pipe(str, String.normalize("NFKD")), "\u0073\u0323\u0307") + * ``` + * + * @since 2.0.0 + */ +export const normalize = form => self => self.normalize(form); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * assert.deepStrictEqual(pipe("a", String.padEnd(5)), "a ") + * assert.deepStrictEqual(pipe("a", String.padEnd(5, "_")), "a____") + * ``` + * + * @since 2.0.0 + */ +export const padEnd = (maxLength, fillString) => self => self.padEnd(maxLength, fillString); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * assert.deepStrictEqual(pipe("a", String.padStart(5)), " a") + * assert.deepStrictEqual(pipe("a", String.padStart(5, "_")), "____a") + * ``` + * + * @since 2.0.0 + */ +export const padStart = (maxLength, fillString) => self => self.padStart(maxLength, fillString); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * assert.deepStrictEqual(pipe("a", String.repeat(5)), "aaaaa") + * ``` + * + * @since 2.0.0 + */ +export const repeat = count => self => self.repeat(count); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * assert.deepStrictEqual(pipe("ababb", String.replaceAll("b", "c")), "acacc") + * assert.deepStrictEqual(pipe("ababb", String.replaceAll(/ba/g, "cc")), "accbb") + * ``` + * + * @since 2.0.0 + */ +export const replaceAll = (searchValue, replaceValue) => self => self.replaceAll(searchValue, replaceValue); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String, Option } from "effect" + * + * assert.deepStrictEqual(pipe("ababb", String.search("b")), Option.some(1)) + * assert.deepStrictEqual(pipe("ababb", String.search(/abb/)), Option.some(2)) + * assert.deepStrictEqual(pipe("ababb", String.search("d")), Option.none()) + * ``` + * + * @since 2.0.0 + */ +export const search = /*#__PURE__*/dual(2, (self, regexp) => Option.filter(Option.some(self.search(regexp)), number.greaterThanOrEqualTo(0))); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * const str = "\u0130" + * assert.deepStrictEqual(pipe(str, String.toLocaleLowerCase("tr")), "i") + * ``` + * + * @since 2.0.0 + */ +export const toLocaleLowerCase = locale => self => self.toLocaleLowerCase(locale); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, String } from "effect" + * + * const str = "i\u0307" + * assert.deepStrictEqual(pipe(str, String.toLocaleUpperCase("lt-LT")), "I") + * ``` + * + * @since 2.0.0 + */ +export const toLocaleUpperCase = locale => self => self.toLocaleUpperCase(locale); +/** + * Keep the specified number of characters from the start of a string. + * + * If `n` is larger than the available number of characters, the string will + * be returned whole. + * + * If `n` is not a positive number, an empty string will be returned. + * + * If `n` is a float, it will be rounded down to the nearest integer. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { String } from "effect" + * + * assert.deepStrictEqual(String.takeLeft("Hello World", 5), "Hello") + * ``` + * + * @since 2.0.0 + */ +export const takeLeft = /*#__PURE__*/dual(2, (self, n) => self.slice(0, Math.max(n, 0))); +/** + * Keep the specified number of characters from the end of a string. + * + * If `n` is larger than the available number of characters, the string will + * be returned whole. + * + * If `n` is not a positive number, an empty string will be returned. + * + * If `n` is a float, it will be rounded down to the nearest integer. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { String } from "effect" + * + * assert.deepStrictEqual(String.takeRight("Hello World", 5), "World") + * ``` + * + * @since 2.0.0 + */ +export const takeRight = /*#__PURE__*/dual(2, (self, n) => self.slice(Math.max(0, self.length - Math.floor(n)), Infinity)); +const CR = 0x0d; +const LF = 0x0a; +/** + * Returns an `IterableIterator` which yields each line contained within the + * string, trimming off the trailing newline character. + * + * @since 2.0.0 + */ +export const linesIterator = self => linesSeparated(self, true); +/** + * Returns an `IterableIterator` which yields each line contained within the + * string as well as the trailing newline character. + * + * @since 2.0.0 + */ +export const linesWithSeparators = s => linesSeparated(s, false); +/** + * For every line in this string, strip a leading prefix consisting of blanks + * or control characters followed by the character specified by `marginChar` + * from the line. + * + * @since 2.0.0 + */ +export const stripMarginWith = /*#__PURE__*/dual(2, (self, marginChar) => { + let out = ""; + for (const line of linesWithSeparators(self)) { + let index = 0; + while (index < line.length && line.charAt(index) <= " ") { + index = index + 1; + } + const stripped = index < line.length && line.charAt(index) === marginChar ? line.substring(index + 1) : line; + out = out + stripped; + } + return out; +}); +/** + * For every line in this string, strip a leading prefix consisting of blanks + * or control characters followed by the `"|"` character from the line. + * + * @since 2.0.0 + */ +export const stripMargin = self => stripMarginWith(self, "|"); +/** + * @since 2.0.0 + */ +export const snakeToCamel = self => { + let str = self[0]; + for (let i = 1; i < self.length; i++) { + str += self[i] === "_" ? self[++i].toUpperCase() : self[i]; + } + return str; +}; +/** + * @since 2.0.0 + */ +export const snakeToPascal = self => { + let str = self[0].toUpperCase(); + for (let i = 1; i < self.length; i++) { + str += self[i] === "_" ? self[++i].toUpperCase() : self[i]; + } + return str; +}; +/** + * @since 2.0.0 + */ +export const snakeToKebab = self => self.replace(/_/g, "-"); +/** + * @since 2.0.0 + */ +export const camelToSnake = self => self.replace(/([A-Z])/g, "_$1").toLowerCase(); +/** + * @since 2.0.0 + */ +export const pascalToSnake = self => (self.slice(0, 1) + self.slice(1).replace(/([A-Z])/g, "_$1")).toLowerCase(); +/** + * @since 2.0.0 + */ +export const kebabToSnake = self => self.replace(/-/g, "_"); +class LinesIterator { + s; + stripped; + index; + length; + constructor(s, stripped = false) { + this.s = s; + this.stripped = stripped; + this.index = 0; + this.length = s.length; + } + next() { + if (this.done) { + return { + done: true, + value: undefined + }; + } + const start = this.index; + while (!this.done && !isLineBreak(this.s[this.index])) { + this.index = this.index + 1; + } + let end = this.index; + if (!this.done) { + const char = this.s[this.index]; + this.index = this.index + 1; + if (!this.done && isLineBreak2(char, this.s[this.index])) { + this.index = this.index + 1; + } + if (!this.stripped) { + end = this.index; + } + } + return { + done: false, + value: this.s.substring(start, end) + }; + } + [Symbol.iterator]() { + return new LinesIterator(this.s, this.stripped); + } + get done() { + return this.index >= this.length; + } +} +/** + * Test if the provided character is a line break character (i.e. either `"\r"` + * or `"\n"`). + */ +const isLineBreak = char => { + const code = char.charCodeAt(0); + return code === CR || code === LF; +}; +/** + * Test if the provided characters combine to form a carriage return/line-feed + * (i.e. `"\r\n"`). + */ +const isLineBreak2 = (char0, char1) => char0.charCodeAt(0) === CR && char1.charCodeAt(0) === LF; +const linesSeparated = (self, stripped) => new LinesIterator(self, stripped); +//# sourceMappingURL=String.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/String.js.map b/backend/node_modules/effect/dist/esm/String.js.map new file mode 100644 index 0000000000000000000000000000000000000000..041fe888af49a0d8173fe2aacf81e9b822875bb0 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/String.js.map @@ -0,0 +1 @@ +{"version":3,"file":"String.js","names":["equivalence","dual","readonlyArray","number","Option","order","predicate","isString","Equivalence","string","Order","empty","concat","self","that","toUpperCase","toLowerCase","capitalize","length","slice","uncapitalize","replace","searchValue","replaceValue","trim","trimStart","trimEnd","start","end","isEmpty","isNonEmpty","split","separator","out","isNonEmptyArray","includes","searchString","position","startsWith","endsWith","charCodeAt","index","filter","some","charCode","isNaN","substring","at","fromNullable","charAt","codePointAt","indexOf","greaterThanOrEqualTo","lastIndexOf","localeCompare","locales","options","sign","match","regexp","matchAll","normalize","form","padEnd","maxLength","fillString","padStart","repeat","count","replaceAll","search","toLocaleLowerCase","locale","toLocaleUpperCase","takeLeft","n","Math","max","takeRight","floor","Infinity","CR","LF","linesIterator","linesSeparated","linesWithSeparators","s","stripMarginWith","marginChar","line","stripped","stripMargin","snakeToCamel","str","i","snakeToPascal","snakeToKebab","camelToSnake","pascalToSnake","kebabToSnake","LinesIterator","constructor","next","done","value","undefined","isLineBreak","char","isLineBreak2","Symbol","iterator","code","char0","char1"],"sources":["../../src/String.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;AASA,OAAO,KAAKA,WAAW,MAAM,kBAAkB;AAC/C,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,aAAa,MAAM,qBAAqB;AACpD,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,KAAK,MAAM,YAAY;AAGnC,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAE3C;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,QAAQ,GAAgCD,SAAS,CAACC,QAAQ;AAEvE;;;;AAIA,OAAO,MAAMC,WAAW,GAAoCR,WAAW,CAACS,MAAM;AAE9E;;;;AAIA,OAAO,MAAMC,KAAK,GAAwBL,KAAK,CAACI,MAAM;AAEtD;;;;;AAKA,OAAO,MAAME,KAAK,GAAO,EAAW;AASpC;;;;;AAKA,OAAO,MAAMC,MAAM,gBAafX,IAAI,CAAC,CAAC,EAAE,CAACY,IAAY,EAAEC,IAAY,KAAaD,IAAI,GAAGC,IAAI,CAAC;AAEhE;;;;;;;;;;;AAWA,OAAO,MAAMC,WAAW,GAAsBF,IAAO,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EAClC;;AAGF;;;;AAIA,MAAMwF,WAAW,GAAIC,IAAY,IAAa;EAC5C,MAAMI,IAAI,GAAGJ,IAAI,CAACnE,UAAU,CAAC,CAAC,CAAC;EAC/B,OAAOuE,IAAI,KAAK9B,EAAE,IAAI8B,IAAI,KAAK7B,EAAE;AACnC,CAAC;AAED;;;;AAIA,MAAM0B,YAAY,GAAGA,CAACI,KAAa,EAAEC,KAAa,KAAcD,KAAK,CAACxE,UAAU,CAAC,CAAC,CAAC,KAAKyC,EAAE,IAAIgC,KAAK,CAACzE,UAAU,CAAC,CAAC,CAAC,KAAK0C,EAAE;AAExH,MAAME,cAAc,GAAGA,CAACvE,IAAY,EAAE6E,QAAiB,KAAoB,IAAIU,aAAa,CAACvF,IAAI,EAAE6E,QAAQ,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Struct.js b/backend/node_modules/effect/dist/esm/Struct.js new file mode 100644 index 0000000000000000000000000000000000000000..b73a6c63d3c2a9465ed01b99fadeebde4ba045a1 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Struct.js @@ -0,0 +1,191 @@ +/** + * This module provides utility functions for working with structs in TypeScript. + * + * @since 2.0.0 + */ +import * as Equivalence from "./Equivalence.js"; +import { dual } from "./Function.js"; +import * as order from "./Order.js"; +import * as Predicate from "./Predicate.js"; +/** + * Create a new object by picking properties of an existing object. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, Struct } from "effect" + * + * assert.deepStrictEqual(pipe({ a: "a", b: 1, c: true }, Struct.pick("a", "b")), { a: "a", b: 1 }) + * assert.deepStrictEqual(Struct.pick({ a: "a", b: 1, c: true }, "a", "b"), { a: "a", b: 1 }) + * ``` + * + * @since 2.0.0 + */ +export const pick = /*#__PURE__*/dual(args => Predicate.isObject(args[0]), (s, ...keys) => { + const out = {}; + for (const k of keys) { + if (k in s) { + out[k] = s[k]; + } + } + return out; +}); +/** + * Create a new object by omitting properties of an existing object. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, Struct } from "effect" + * + * assert.deepStrictEqual(pipe({ a: "a", b: 1, c: true }, Struct.omit("c")), { a: "a", b: 1 }) + * assert.deepStrictEqual(Struct.omit({ a: "a", b: 1, c: true }, "c"), { a: "a", b: 1 }) + * ``` + * + * @since 2.0.0 + */ +export const omit = /*#__PURE__*/dual(args => Predicate.isObject(args[0]), (s, ...keys) => { + const out = { + ...s + }; + for (const k of keys) { + delete out[k]; + } + return out; +}); +/** + * Given a struct of `Equivalence`s returns a new `Equivalence` that compares values of a struct + * by applying each `Equivalence` to the corresponding property of the struct. + * + * Alias of {@link Equivalence.struct}. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Struct, String, Number } from "effect" + * + * const PersonEquivalence = Struct.getEquivalence({ + * name: String.Equivalence, + * age: Number.Equivalence + * }) + * + * assert.deepStrictEqual( + * PersonEquivalence({ name: "John", age: 25 }, { name: "John", age: 25 }), + * true + * ) + * assert.deepStrictEqual( + * PersonEquivalence({ name: "John", age: 25 }, { name: "John", age: 40 }), + * false + * ) + * ``` + * + * @category combinators + * @since 2.0.0 + */ +export const getEquivalence = Equivalence.struct; +/** + * This function creates and returns a new `Order` for a struct of values based on the given `Order`s + * for each property in the struct. + * + * Alias of {@link order.struct}. + * + * @category combinators + * @since 2.0.0 + */ +export const getOrder = order.struct; +/** + * Transforms the values of a Struct provided a transformation function for each key. + * If no transformation function is provided for a key, it will return the original value for that key. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, Struct } from "effect" + * + * assert.deepStrictEqual( + * pipe( + * { a: 'a', b: 1, c: 3 }, + * Struct.evolve({ + * a: (a) => a.length, + * b: (b) => b * 2 + * }) + * ), + * { a: 1, b: 2, c: 3 } + * ) + * ``` + * + * @since 2.0.0 + */ +export const evolve = /*#__PURE__*/dual(2, (obj, t) => { + const out = { + ...obj + }; + for (const k in t) { + if (Object.prototype.hasOwnProperty.call(obj, k)) { + // @ts-expect-error + out[k] = t[k](obj[k]); + } + } + return out; +}); +/** + * Retrieves the value associated with the specified key from a struct. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, Struct } from "effect" + * + * const value = pipe({ a: 1, b: 2 }, Struct.get("a")) + * + * assert.deepStrictEqual(value, 1) + * ``` + * + * @since 2.0.0 + */ +export const get = key => s => s[key]; +/** + * Retrieves the object keys that are strings in a typed manner + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Struct } from "effect" + * + * const symbol: unique symbol = Symbol() + * + * const value = { + * a: 1, + * b: 2, + * [symbol]: 3 + * } + * + * const keys: Array<"a" | "b"> = Struct.keys(value) + * + * assert.deepStrictEqual(keys, ["a", "b"]) + * ``` + * + * @since 3.6.0 + */ +export const keys = o => Object.keys(o); +/** + * Retrieves the entries (key-value pairs) of an object, where keys are strings, + * in a type-safe manner. Symbol keys are excluded from the result. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Struct } from "effect" + * + * const c = Symbol("c") + * const value = { a: "foo", b: 1, [c]: true } + * + * const entries: Array<["a" | "b", string | number]> = Struct.entries(value) + * + * assert.deepStrictEqual(entries, [["a", "foo"], ["b", 1]]) + * ``` + * + * @since 3.17.0 + */ +export const entries = obj => Object.entries(obj); +//# sourceMappingURL=Struct.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Subscribable.js b/backend/node_modules/effect/dist/esm/Subscribable.js new file mode 100644 index 0000000000000000000000000000000000000000..ffaad329dfcddf35fa2bfa8f8af19e64815f130d --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Subscribable.js @@ -0,0 +1,56 @@ +/** + * @since 2.0.0 + */ +import * as Effect from "./Effect.js"; +import { dual } from "./Function.js"; +import { pipeArguments } from "./Pipeable.js"; +import { hasProperty } from "./Predicate.js"; +import * as Readable from "./Readable.js"; +import * as Stream from "./Stream.js"; +/** + * @since 2.0.0 + * @category type ids + */ +export const TypeId = /*#__PURE__*/Symbol.for("effect/Subscribable"); +/** + * @since 2.0.0 + * @category refinements + */ +export const isSubscribable = u => hasProperty(u, TypeId); +const Proto = { + [Readable.TypeId]: Readable.TypeId, + [TypeId]: TypeId, + pipe() { + return pipeArguments(this, arguments); + } +}; +/** + * @since 2.0.0 + * @category constructors + */ +export const make = options => Object.assign(Object.create(Proto), options); +/** + * @since 2.0.0 + * @category combinators + */ +export const map = /*#__PURE__*/dual(2, (self, f) => make({ + get: Effect.map(self.get, f), + changes: Stream.map(self.changes, f) +})); +/** + * @since 2.0.0 + * @category combinators + */ +export const mapEffect = /*#__PURE__*/dual(2, (self, f) => make({ + get: Effect.flatMap(self.get, f), + changes: Stream.mapEffect(self.changes, f) +})); +/** + * @since 2.0.0 + * @category constructors + */ +export const unwrap = effect => make({ + get: Effect.flatMap(effect, s => s.get), + changes: Stream.unwrap(Effect.map(effect, s => s.changes)) +}); +//# sourceMappingURL=Subscribable.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/SubscriptionRef.js.map b/backend/node_modules/effect/dist/esm/SubscriptionRef.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0d127963516c704b00d0156193f0f32914b87776 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/SubscriptionRef.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SubscriptionRef.js","names":["internal","Ref","Synchronized","SubscriptionRefTypeId","get","getAndSet","getAndUpdate","getAndUpdateEffect","getAndUpdateSome","getAndUpdateSomeEffect","make","modify","modifyEffect","modifySome","modifySomeEffect","set","setAndGet","update","updateEffect","updateAndGet","updateAndGetEffect","updateSome","updateSomeEffect","updateSomeAndGet","updateSomeAndGetEffect"],"sources":["../../src/SubscriptionRef.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,QAAQ,MAAM,+BAA+B;AAGzD,OAAO,KAAKC,GAAG,MAAM,UAAU;AAG/B,OAAO,KAAKC,YAAY,MAAM,sBAAsB;AAIpD;;;;AAIA,OAAO,MAAMC,qBAAqB,GAAkBH,QAAQ,CAACG,qBAAqB;AAmElF;;;;AAIA,OAAO,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O,MAAMC,gBAAgB,GAWzBtB,GAAG,CAACsB,gBAAgB;AAExB;;;;AAIA,OAAO,MAAMC,sBAAsB,GAc/BtB,YAAY,CAACsB,sBAAsB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TArray.js.map b/backend/node_modules/effect/dist/esm/TArray.js.map new file mode 100644 index 0000000000000000000000000000000000000000..1d025188dfc086177564c30f1659be9f17a94c0d --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TArray.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TArray.js","names":["internal","TArrayTypeId","collectFirst","collectFirstSTM","contains","count","countSTM","empty","every","everySTM","findFirst","findFirstIndex","findFirstIndexFrom","findFirstIndexWhere","findFirstIndexWhereFrom","findFirstIndexWhereSTM","findFirstIndexWhereFromSTM","findFirstSTM","findLast","findLastIndex","findLastIndexFrom","findLastSTM","forEach","fromIterable","get","headOption","lastOption","make","maxOption","minOption","reduce","reduceOption","reduceOptionSTM","reduceSTM","size","some","someSTM","toArray","transform","transformSTM","update","updateSTM"],"sources":["../../src/TArray.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,QAAQ,MAAM,0BAA0B;AAQpD;;;;AAIA,OAAO,MAAMC,YAAY,GAAkBD,QAAQ,CAACC,YAAY;AAqChE;;;;;;;AAOA,OAAO,MAAMC,YAAY,GAiBrBF,QAAQ,CAACE,YAAY;AAEzB;;;;;;;AAOA,OAAO,MAAMC,eAAe,GAiBxBH,QAAQ,CAACG,eAAe;AAE5B;;;;;;;AAOA,OAAO,MAAMC,QAAQ,GAiBjBJ,QAAQ,CAACI,QAAQ;AAErB;;;;;;;AAOA,OAAO,MAAMC,KAAK,GAiBdL,QAAQ,CAACK,KAAK;AAElB;;;;;;;AAOA,OAAO,MAAMC,QAAQ,GAiBjBN,QAAQ,CAACM,QAAQ;AAErB;;;;;;AAMA,OAAO,MAAMC,KAAK,GAAgCP,QAAQ,CAACO,KAAK;AAEhE;;;;;;;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B,UAAU;AAEhG;;;;;;AAMA,OAAO,MAAMC,UAAU,GAAsD1B,QAAQ,CAAC0B,UAAU;AAEhG;;;;;;AAMA,OAAO,MAAMC,IAAI,GAEwB3B,QAAQ,CAAC2B,IAAI;AAEtD;;;;;;AAMA,OAAO,MAAMC,SAAS,GAelB5B,QAAQ,CAAC4B,SAAS;AAEtB;;;;;;AAMA,OAAO,MAAMC,SAAS,GAelB7B,QAAQ,CAAC6B,SAAS;AAEtB;;;;;;AAMA,OAAO,MAAMC,MAAM,GAef9B,QAAQ,CAAC8B,MAAM;AAEnB;;;;;;AAMA,OAAO,MAAMC,YAAY,GAerB/B,QAAQ,CAAC+B,YAAY;AAEzB;;;;;;;AAOA,OAAO,MAAMC,eAAe,GAiBxBhC,QAAQ,CAACgC,eAAe;AAE5B;;;;;;;AAOA,OAAO,MAAMC,SAAS,GAqBlBjC,QAAQ,CAACiC,SAAS;AAEtB;;;;;;AAMA,OAAO,MAAMC,IAAI,GAAmClC,QAAQ,CAACkC,IAAI;AAEjE;;;;;;AAMA,OAAO,MAAMC,IAAI,GAebnC,QAAQ,CAACmC,IAAI;AAEjB;;;;;;;AAOA,OAAO,MAAMC,OAAO,GAiBhBpC,QAAQ,CAACoC,OAAO;AAEpB;;;;;;;AAOA,OAAO,MAAMC,OAAO,GAA8CrC,QAAQ,CAACqC,OAAO;AAElF;;;;;;AAMA,OAAO,MAAMC,SAAS,GAelBtC,QAAQ,CAACsC,SAAS;AAEtB;;;;;;AAMA,OAAO,MAAMC,YAAY,GAerBvC,QAAQ,CAACuC,YAAY;AAEzB;;;;;;AAMA,OAAO,MAAMC,MAAM,GAefxC,QAAQ,CAACwC,MAAM;AAEnB;;;;;;AAMA,OAAO,MAAMC,SAAS,GAelBzC,QAAQ,CAACyC,SAAS","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TDeferred.js.map b/backend/node_modules/effect/dist/esm/TDeferred.js.map new file mode 100644 index 0000000000000000000000000000000000000000..71fbfd3ab372e764442ede0ff00df752d54f4e5c --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TDeferred.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TDeferred.js","names":["internal","TDeferredTypeId","_await","await","done","fail","make","poll","succeed"],"sources":["../../src/TDeferred.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,QAAQ,MAAM,6BAA6B;AAMvD;;;;AAIA,OAAO,MAAMC,eAAe,GAAkBD,QAAQ,CAACC,eAAe;AAsCtE,MAAMC,MAAM,GAAmDF,QAAQ,CAACE,MAAM;AAE9E;AACE;;;;AAIAA,MAAM,IAAIC,KAAK;AAGjB;;;;AAIA,OAAO,MAAMC,IAAI,GAWbJ,QAAQ,CAACI,IAAI;AAEjB;;;;AAIA,OAAO,MAAMC,IAAI,GAWbL,QAAQ,CAACK,IAAI;AAEjB;;;;AAIA,OAAO,MAAMC,IAAI,GAAiDN,QAAQ,CAACM,IAAI;AAE/E;;;;AAIA,OAAO,MAAMC,IAAI,GAAiFP,QAAQ,CAACO,IAAI;AAE/G;;;;AAIA,OAAO,MAAMC,OAAO,GAWhBR,QAAQ,CAACQ,OAAO","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TPubSub.js.map b/backend/node_modules/effect/dist/esm/TPubSub.js.map new file mode 100644 index 0000000000000000000000000000000000000000..58b7d3854e8a2552149e00d96bf69284ffaa669d --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TPubSub.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TPubSub.js","names":["internal","TPubSubTypeId","awaitShutdown","bounded","capacity","dropping","isEmpty","isFull","shutdown","isShutdown","publish","publishAll","size","sliding","subscribe","subscribeScoped","unbounded"],"sources":["../../src/TPubSub.ts"],"sourcesContent":[null],"mappings":"AAKA,OAAO,KAAKA,QAAQ,MAAM,2BAA2B;AAQrD;;;;AAIA,OAAO,MAAMC,aAAa,GAAkBD,QAAQ,CAACC,aAAa;AAsClE;;;;;;;;AAQA,OAAO,MAAMC,aAAa,GAA2CF,QAAQ,CAACE,aAAa;AAE3F;;;;;;;;AAQA,OAAO,MAAMC,OAAO,GAA0DH,QAAQ,CAACG,OAAO;AAE9F;;;;;;AAMA,OAAO,MAAMC,QAAQ,GAAoCJ,QAAQ,CAACI,QAAQ;AAE1E;;;;;;;AAOA,OAAO,MAAMC,QAAQ,GAA0DL,QAAQ,CAACK,QAAQ;AAEhG;;;;;;AAMA,OAAO,MAAMC,OAAO,GAA8CN,QAAQ,CAACM,OAAO;AAElF;;;;;;;AAOA,OAAO,MAAMC,MAAM,GAA8CP,QAAQ,CAACO,MAAM;AAEhF;;;;;;;AAOA,OAAO,MAAMC,QAAQ,GAA2CR,QAAQ,CAACQ,QAAQ;AAEjF;;;;;;AAMA,OAAO,MAAMC,UAAU,GAA8CT,QAAQ,CAACS,UAAU;AAExF;;;;;;;AAOA,OAAO,MAAMC,OAAO,GAiBhBV,QAAQ,CAACU,OAAO;AAEpB;;;;;;;AAOA,OAAO,MAAMC,UAAU,GAiBnBX,QAAQ,CAACW,UAAU;AAEvB;;;;;;;;AAQA,OAAO,MAAMC,IAAI,GAA6CZ,QAAQ,CAACY,IAAI;AAE3E;;;;;;;;;AASA,OAAO,MAAMC,OAAO,GAA0Db,QAAQ,CAACa,OAAO;AAE9F;;;;;;;;;AASA,OAAO,MAAMC,SAAS,GAAyDd,QAAQ,CAACc,SAAS;AAEjG;;;;;;;;AAQA,OAAO,MAAMC,eAAe,GAC1Bf,QAAQ,CAACe,eAAe;AAE1B;;;;;;AAMA,OAAO,MAAMC,SAAS,GAAiChB,QAAQ,CAACgB,SAAS","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TQueue.js b/backend/node_modules/effect/dist/esm/TQueue.js new file mode 100644 index 0000000000000000000000000000000000000000..807e94337d913d3fd22caac231a4d752215c9e5c --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TQueue.js @@ -0,0 +1,229 @@ +/** + * @since 2.0.0 + */ +import * as internal from "./internal/stm/tQueue.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const TDequeueTypeId = internal.TDequeueTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +export const TEnqueueTypeId = internal.TEnqueueTypeId; +/** + * Returns `true` if the specified value is a `TQueue`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isTQueue = internal.isTQueue; +/** + * Returns `true` if the specified value is a `TDequeue`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isTDequeue = internal.isTDequeue; +/** + * Returns `true` if the specified value is a `TEnqueue`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isTEnqueue = internal.isTEnqueue; +/** + * Waits until the queue is shutdown. The `STM` returned by this method will + * not resume until the queue has been shutdown. If the queue is already + * shutdown, the `STM` will resume right away. + * + * @since 2.0.0 + * @category mutations + */ +export const awaitShutdown = internal.awaitShutdown; +/** + * Creates a bounded queue with the back pressure strategy. The queue will + * retain values until they have been taken, applying back pressure to + * offerors if the queue is at capacity. + * + * For best performance use capacities that are powers of two. + * + * @since 2.0.0 + * @category constructors + */ +export const bounded = internal.bounded; +/** + * Returns the number of elements the queue can hold. + * + * @since 2.0.0 + * @category getters + */ +export const capacity = internal.capacity; +/** + * Creates a bounded queue with the dropping strategy. The queue will drop new + * values if the queue is at capacity. + * + * For best performance use capacities that are powers of two. + * + * @since 2.0.0 + * @category constructors + */ +export const dropping = internal.dropping; +/** + * Returns `true` if the `TQueue` contains zero elements, `false` otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const isEmpty = internal.isEmpty; +/** + * Returns `true` if the `TQueue` contains at least one element, `false` + * otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const isFull = internal.isFull; +/** + * Returns `true` if `shutdown` has been called, otherwise returns `false`. + * + * @since 2.0.0 + * @category getters + */ +export const isShutdown = internal.isShutdown; +/** + * Places one value in the queue. + * + * @since 2.0.0 + * @category mutations + */ +export const offer = internal.offer; +/** + * For Bounded TQueue: uses the `BackPressure` Strategy, places the values in + * the queue and always returns true. If the queue has reached capacity, then + * the fiber performing the `offerAll` will be suspended until there is room + * in the queue. + * + * For Unbounded TQueue: Places all values in the queue and returns true. + * + * For Sliding TQueue: uses `Sliding` Strategy If there is room in the queue, + * it places the values otherwise it removes the old elements and enqueues the + * new ones. Always returns true. + * + * For Dropping TQueue: uses `Dropping` Strategy, It places the values in the + * queue but if there is no room it will not enqueue them and return false. + * + * @since 2.0.0 + * @category mutations + */ +export const offerAll = internal.offerAll; +/** + * Views the next element in the queue without removing it, retrying if the + * queue is empty. + * + * @since 2.0.0 + * @category getters + */ +export const peek = internal.peek; +/** + * Views the next element in the queue without removing it, returning `None` + * if the queue is empty. + * + * @since 2.0.0 + * @category getters + */ +export const peekOption = internal.peekOption; +/** + * Takes a single element from the queue, returning `None` if the queue is + * empty. + * + * @since 2.0.0 + * @category getters + */ +export const poll = internal.poll; +/** + * Drops elements from the queue while they do not satisfy the predicate, + * taking and returning the first element that does satisfy the predicate. + * Retries if no elements satisfy the predicate. + * + * @since 2.0.0 + * @category mutations + */ +export const seek = internal.seek; +/** + * Interrupts any fibers that are suspended on `offer` or `take`. Future calls + * to `offer*` and `take*` will be interrupted immediately. + * + * @since 2.0.0 + * @category mutations + */ +export const shutdown = internal.shutdown; +/** + * Retrieves the size of the queue, which is equal to the number of elements + * in the queue. This may be negative if fibers are suspended waiting for + * elements to be added to the queue. + * + * @since 2.0.0 + * @category getters + */ +export const size = internal.size; +/** + * Creates a bounded queue with the sliding strategy. The queue will add new + * values and drop old values if the queue is at capacity. + * + * For best performance use capacities that are powers of two. + * + * @since 2.0.0 + * @category constructors + */ +export const sliding = internal.sliding; +/** + * Takes the oldest value in the queue. If the queue is empty, this will return + * a computation that resumes when an item has been added to the queue. + * + * @since 2.0.0 + * @category mutations + */ +export const take = internal.take; +/** + * Takes all the values in the queue and returns the values. If the queue is + * empty returns an empty collection. + * + * @since 2.0.0 + * @category mutations + */ +export const takeAll = internal.takeAll; +/** + * Takes a number of elements from the queue between the specified minimum and + * maximum. If there are fewer than the minimum number of elements available, + * retries until at least the minimum number of elements have been collected. + * + * @since 2.0.0 + * @category mutations + */ +export const takeBetween = internal.takeBetween; +/** + * Takes the specified number of elements from the queue. If there are fewer + * than the specified number of elements available, it retries until they + * become available. + * + * @since 2.0.0 + * @category mutations + */ +export const takeN = internal.takeN; +/** + * Takes up to max number of values from the queue. + * + * @since 2.0.0 + * @category mutations + */ +export const takeUpTo = internal.takeUpTo; +/** + * Creates an unbounded queue. + * + * @since 2.0.0 + * @category constructors + */ +export const unbounded = internal.unbounded; +//# sourceMappingURL=TQueue.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TQueue.js.map b/backend/node_modules/effect/dist/esm/TQueue.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0b09144dc18347d8702d0a28a2a009fbcb05c13e --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TQueue.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TQueue.js","names":["internal","TDequeueTypeId","TEnqueueTypeId","isTQueue","isTDequeue","isTEnqueue","awaitShutdown","bounded","capacity","dropping","isEmpty","isFull","isShutdown","offer","offerAll","peek","peekOption","poll","seek","shutdown","size","sliding","take","takeAll","takeBetween","takeN","takeUpTo","unbounded"],"sources":["../../src/TQueue.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,QAAQ,MAAM,0BAA0B;AAMpD;;;;AAIA,OAAO,MAAMC,cAAc,GAAkBD,QAAQ,CAACC,cAAc;AAQpE;;;;AAIA,OAAO,MAAMC,cAAc,GAAkBF,QAAQ,CAACE,cAAc;AAuJpE;;;;;;AAMA,OAAO,MAAMC,QAAQ,GAAyCH,QAAQ,CAACG,QAAQ;AAE/E;;;;;;AAMA,OAAO,MAAMC,UAAU,GAA2CJ,QAAQ,CAACI,UAAU;AAErF;;;;;;AAMA,OAAO,MAAMC,UAAU,GAA2CL,QAAQ,CAACK,UAAU;AAErF;;;;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,CAACuB,OAAO;AAEpF;;;;;;;;AAQA,OAAO,MAAMC,WAAW,GAmBpBxB,QAAQ,CAACwB,WAAW;AAExB;;;;;;;;AAQA,OAAO,MAAMC,KAAK,GAmBdzB,QAAQ,CAACyB,KAAK;AAElB;;;;;;AAMA,OAAO,MAAMC,QAAQ,GAejB1B,QAAQ,CAAC0B,QAAQ;AAErB;;;;;;AAMA,OAAO,MAAMC,SAAS,GAAgC3B,QAAQ,CAAC2B,SAAS","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TRandom.js.map b/backend/node_modules/effect/dist/esm/TRandom.js.map new file mode 100644 index 0000000000000000000000000000000000000000..6e0fee12106b64ecca0cc67fb54fc9e8b59b9032 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TRandom.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TRandom.js","names":["internal","TRandomTypeId","Tag","live","next","nextBoolean","nextInt","nextIntBetween","nextRange","shuffle"],"sources":["../../src/TRandom.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,QAAQ,MAAM,2BAA2B;AAMrD;;;;AAIA,OAAO,MAAMC,aAAa,GAAkBD,QAAQ,CAACC,aAAa;AAkDlE;;;;;;AAMA,OAAO,MAAMC,GAAG,GAAkCF,QAAQ,CAACE,GAAG;AAE9D;;;;;;AAMA,OAAO,MAAMC,IAAI,GAAyBH,QAAQ,CAACG,IAAI;AAEvD;;;;;;AAMA,OAAO,MAAMC,IAAI,GAAoCJ,QAAQ,CAACI,IAAI;AAElE;;;;;;AAMA,OAAO,MAAMC,WAAW,GAAqCL,QAAQ,CAACK,WAAW;AAEjF;;;;;;AAMA,OAAO,MAAMC,OAAO,GAAoCN,QAAQ,CAACM,OAAO;AAExE;;;;;;;AAOA,OAAO,MAAMC,cAAc,GAAmEP,QAAQ,CAACO,cAAc;AAErH;;;;;;;AAOA,OAAO,MAAMC,SAAS,GAAkER,QAAQ,CAACQ,SAAS;AAE1G;;;;;;AAMA,OAAO,MAAMC,OAAO,GAAoET,QAAQ,CAACS,OAAO","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TReentrantLock.js b/backend/node_modules/effect/dist/esm/TReentrantLock.js new file mode 100644 index 0000000000000000000000000000000000000000..f65a025d8a1da15d8adad4433fa4994eac03c363 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TReentrantLock.js @@ -0,0 +1,142 @@ +import * as internal from "./internal/stm/tReentrantLock.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const TReentrantLockTypeId = internal.TReentrantLockTypeId; +/** + * Acquires a read lock. The transaction will suspend until no other fiber is + * holding a write lock. Succeeds with the number of read locks held by this + * fiber. + * + * @since 2.0.0 + * @category mutations + */ +export const acquireRead = internal.acquireRead; +/** + * Acquires a write lock. The transaction will suspend until no other fibers + * are holding read or write locks. Succeeds with the number of write locks + * held by this fiber. + * + * @since 2.0.0 + * @category mutations + */ +export const acquireWrite = internal.acquireWrite; +/** + * Retrieves the number of acquired read locks for this fiber. + * + * @since 2.0.0 + * @category mutations + */ +export const fiberReadLocks = internal.fiberReadLocks; +/** + * Retrieves the number of acquired write locks for this fiber. + * + * @since 2.0.0 + * @category mutations + */ +export const fiberWriteLocks = internal.fiberWriteLocks; +/** + * Just a convenience method for applications that only need reentrant locks, + * without needing a distinction between readers / writers. + * + * See `TReentrantLock.writeLock`. + * + * @since 2.0.0 + * @category mutations + */ +export const lock = internal.lock; +/** + * Determines if any fiber has a read or write lock. + * + * @since 2.0.0 + * @category mutations + */ +export const locked = internal.locked; +/** + * Makes a new reentrant read/write lock. + * + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * Obtains a read lock in a scoped context. + * + * @since 2.0.0 + * @category mutations + */ +export const readLock = internal.readLock; +/** + * Retrieves the total number of acquired read locks. + * + * @since 2.0.0 + * @category mutations + */ +export const readLocks = internal.readLocks; +/** + * Determines if any fiber has a read lock. + * + * @since 2.0.0 + * @category mutations + */ +export const readLocked = internal.readLocked; +/** + * Releases a read lock held by this fiber. Succeeds with the outstanding + * number of read locks held by this fiber. + * + * @since 2.0.0 + * @category mutations + */ +export const releaseRead = internal.releaseRead; +/** + * Releases a write lock held by this fiber. Succeeds with the outstanding + * number of write locks held by this fiber. + * + * @since 2.0.0 + * @category mutations + */ +export const releaseWrite = internal.releaseWrite; +/** + * Runs the specified workflow with a lock. + * + * @since 2.0.0 + * @category mutations + */ +export const withLock = internal.withLock; +/** + * Runs the specified workflow with a read lock. + * + * @since 2.0.0 + * @category mutations + */ +export const withReadLock = internal.withReadLock; +/** + * Runs the specified workflow with a write lock. + * + * @since 2.0.0 + * @category mutations + */ +export const withWriteLock = internal.withWriteLock; +/** + * Obtains a write lock in a scoped context. + * + * @since 2.0.0 + * @category mutations + */ +export const writeLock = internal.writeLock; +/** + * Determines if a write lock is held by some fiber. + * + * @since 2.0.0 + * @category mutations + */ +export const writeLocked = internal.writeLocked; +/** + * Computes the number of write locks held by fibers. + * + * @since 2.0.0 + * @category mutations + */ +export const writeLocks = internal.writeLocks; +//# sourceMappingURL=TReentrantLock.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TRef.js b/backend/node_modules/effect/dist/esm/TRef.js new file mode 100644 index 0000000000000000000000000000000000000000..b22d222cc21f6bcd1bb443c0af7c1d75336cdc4c --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TRef.js @@ -0,0 +1,75 @@ +/** + * @since 2.0.0 + */ +import * as internal from "./internal/stm/tRef.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const TRefTypeId = internal.TRefTypeId; +/** + * @since 2.0.0 + * @category mutations + */ +export const get = internal.get; +/** + * @since 2.0.0 + * @category mutations + */ +export const getAndSet = internal.getAndSet; +/** + * @since 2.0.0 + * @category mutations + */ +export const getAndUpdate = internal.getAndUpdate; +/** + * @since 2.0.0 + * @category mutations + */ +export const getAndUpdateSome = internal.getAndUpdateSome; +/** + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * @since 2.0.0 + * @category mutations + */ +export const modify = internal.modify; +/** + * @since 2.0.0 + * @category mutations + */ +export const modifySome = internal.modifySome; +/** + * @since 2.0.0 + * @category mutations + */ +export const set = internal.set; +/** + * @since 2.0.0 + * @category mutations + */ +export const setAndGet = internal.setAndGet; +/** + * @since 2.0.0 + * @category mutations + */ +export const update = internal.update; +/** + * @since 2.0.0 + * @category mutations + */ +export const updateAndGet = internal.updateAndGet; +/** + * @since 2.0.0 + * @category mutations + */ +export const updateSome = internal.updateSome; +/** + * @since 2.0.0 + * @category mutations + */ +export const updateSomeAndGet = internal.updateSomeAndGet; +//# sourceMappingURL=TRef.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TRef.js.map b/backend/node_modules/effect/dist/esm/TRef.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e538eb3c35a4fd608eab760586996c3a9865107d --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TRef.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TRef.js","names":["internal","TRefTypeId","get","getAndSet","getAndUpdate","getAndUpdateSome","make","modify","modifySome","set","setAndGet","update","updateAndGet","updateSome","updateSomeAndGet"],"sources":["../../src/TRef.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAKA,OAAO,KAAKA,QAAQ,MAAM,wBAAwB;AAQlD;;;;AAIA,OAAO,MAAMC,UAAU,GAAkBD,QAAQ,CAACC,UAAU;AAmD5D;;;;AAIA,OAAO,MAAMC,GAAG,GAAqCF,QAAQ,CAACE,GAAG;AAEjE;;;;AAIA,OAAO,MAAMC,SAAS,GAWlBH,QAAQ,CAACG,SAAS;AAEtB;;;;AAIA,OAAO,MAAMC,YAAY,GAWrBJ,QAAQ,CAACI,YAAY;AAEzB;;;;AAIA,OAAO,MAAMC,gBAAgB,GAWzBL,QAAQ,CAACK,gBAAgB;AAE7B;;;;AAIA,OAAO,MAAMC,IAAI,GAAsCN,QAAQ,CAACM,IAAI;AAEpE;;;;AAIA,OAAO,MAAMC,MAAM,GAWfP,QAAQ,CAACO,MAAM;AAEnB;;;;AAIA,OAAO,MAAMC,UAAU,GAWnBR,QAAQ,CAACQ,UAAU;AAEvB;;;;AAIA,OAAO,MAAMC,GAAG,GAWZT,QAAQ,CAACS,GAAG;AAEhB;;;;AAIA,OAAO,MAAMC,SAAS,GAWlBV,QAAQ,CAACU,SAAS;AAEtB;;;;AAIA,OAAO,MAAMC,MAAM,GAWfX,QAAQ,CAACW,MAAM;AAEnB;;;;AAIA,OAAO,MAAMC,YAAY,GAWrBZ,QAAQ,CAACY,YAAY;AAEzB;;;;AAIA,OAAO,MAAMC,UAAU,GAWnBb,QAAQ,CAACa,UAAU;AAEvB;;;;AAIA,OAAO,MAAMC,gBAAgB,GAWzBd,QAAQ,CAACc,gBAAgB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TSet.js b/backend/node_modules/effect/dist/esm/TSet.js new file mode 100644 index 0000000000000000000000000000000000000000..5d71bbc36501f15e511cf2f90fc4b7a281adb606 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TSet.js @@ -0,0 +1,201 @@ +import * as internal from "./internal/stm/tSet.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const TSetTypeId = internal.TSetTypeId; +/** + * Stores new element in the set. + * + * @since 2.0.0 + * @category mutations + */ +export const add = internal.add; +/** + * Atomically transforms the set into the difference of itself and the + * provided set. + * + * @since 2.0.0 + * @category mutations + */ +export const difference = internal.difference; +/** + * Makes an empty `TSet`. + * + * @since 2.0.0 + * @category constructors + */ +export const empty = internal.empty; +/** + * Atomically performs transactional-effect for each element in set. + * + * @since 2.0.0 + * @category elements + */ +export const forEach = internal.forEach; +/** + * Creates a new `TSet` from an iterable collection of values. + * + * @since 2.0.0 + * @category constructors + */ +export const fromIterable = internal.fromIterable; +/** + * Tests whether or not set contains an element. + * + * @since 2.0.0 + * @category elements + */ +export const has = internal.has; +/** + * Atomically transforms the set into the intersection of itself and the + * provided set. + * + * @since 2.0.0 + * @category mutations + */ +export const intersection = internal.intersection; +/** + * Tests if the set is empty or not + * + * @since 2.0.0 + * @category getters + */ +export const isEmpty = internal.isEmpty; +/** + * Makes a new `TSet` that is initialized with specified values. + * + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * Atomically folds using a pure function. + * + * @since 2.0.0 + * @category folding + */ +export const reduce = internal.reduce; +/** + * Atomically folds using a transactional function. + * + * @since 2.0.0 + * @category folding + */ +export const reduceSTM = internal.reduceSTM; +/** + * Removes a single element from the set. + * + * @since 2.0.0 + * @category mutations + */ +export const remove = internal.remove; +/** + * Removes elements from the set. + * + * @since 2.0.0 + * @category mutations + */ +export const removeAll = internal.removeAll; +/** + * Removes entries from a `TSet` that satisfy the specified predicate and returns the removed entries + * (or `void` if `discard = true`). + * + * @since 2.0.0 + * @category mutations + */ +export const removeIf = internal.removeIf; +/** + * Retains entries in a `TSet` that satisfy the specified predicate and returns the removed entries + * (or `void` if `discard = true`). + * + * @since 2.0.0 + * @category mutations + */ +export const retainIf = internal.retainIf; +/** + * Returns the set's cardinality. + * + * @since 2.0.0 + * @category getters + */ +export const size = internal.size; +/** + * Takes the first matching value, or retries until there is one. + * + * @since 2.0.0 + * @category mutations + */ +export const takeFirst = internal.takeFirst; +/** + * Takes the first matching value, or retries until there is one. + * + * @since 2.0.0 + * @category mutations + */ +export const takeFirstSTM = internal.takeFirstSTM; +/** + * Takes all matching values, or retries until there is at least one. + * + * @since 2.0.0 + * @category mutations + */ +export const takeSome = internal.takeSome; +/** + * Takes all matching values, or retries until there is at least one. + * + * @since 2.0.0 + * @category mutations + */ +export const takeSomeSTM = internal.takeSomeSTM; +/** + * Collects all elements into a `Chunk`. + * + * @since 2.0.0 + * @category destructors + */ +export const toChunk = internal.toChunk; +/** + * Collects all elements into a `HashSet`. + * + * @since 2.0.0 + * @category destructors + */ +export const toHashSet = internal.toHashSet; +/** + * Collects all elements into a `Array`. + * + * @since 2.0.0 + * @category destructors + */ +export const toArray = internal.toArray; +/** + * Collects all elements into a `ReadonlySet`. + * + * @since 2.0.0 + * @category destructors + */ +export const toReadonlySet = internal.toReadonlySet; +/** + * Atomically updates all elements using a pure function. + * + * @since 2.0.0 + * @category mutations + */ +export const transform = internal.transform; +/** + * Atomically updates all elements using a transactional function. + * + * @since 2.0.0 + * @category mutations + */ +export const transformSTM = internal.transformSTM; +/** + * Atomically transforms the set into the union of itself and the provided + * set. + * + * @since 2.0.0 + * @category mutations + */ +export const union = internal.union; +//# sourceMappingURL=TSet.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TSet.js.map b/backend/node_modules/effect/dist/esm/TSet.js.map new file mode 100644 index 0000000000000000000000000000000000000000..da56a3e1cf748c64688d9428604f091bfc661cb6 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TSet.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TSet.js","names":["internal","TSetTypeId","add","difference","empty","forEach","fromIterable","has","intersection","isEmpty","make","reduce","reduceSTM","remove","removeAll","removeIf","retainIf","size","takeFirst","takeFirstSTM","takeSome","takeSomeSTM","toChunk","toHashSet","toArray","toReadonlySet","transform","transformSTM","union"],"sources":["../../src/TSet.ts"],"sourcesContent":[null],"mappings":"AAKA,OAAO,KAAKA,QAAQ,MAAM,wBAAwB;AAOlD;;;;AAIA,OAAO,MAAMC,UAAU,GAAkBD,QAAQ,CAACC,UAAU;AAuC5D;;;;;;AAMA,OAAO,MAAMC,GAAG,GAeZF,QAAQ,CAACE,GAAG;AAEhB;;;;;;;AAOA,OAAO,MAAMC,UAAU,GAiBnBH,QAAQ,CAACG,UAAU;AAEvB;;;;;;AAMA,OAAO,MAAMC,KAAK,GAA8BJ,QAAQ,CAACI,KAAK;AAE9D;;;;;;AAMA,OAAO,MAAMC,OAAO,GAehBL,QAAQ,CAACK,OAAO;AAEpB;;;;;;AAMA,OAAO,MAAMC,YAAY,GAAmDN,QAAQ,CAACM,YAAY;AAEjG;;;;;;AAMA,OAAO,MAAMC,GAAG,GAeZP,QAAQ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G;;;;;;AAMA,OAAO,MAAMC,SAAS,GAelB1B,QAAQ,CAAC0B,SAAS;AAEtB;;;;;;AAMA,OAAO,MAAMC,YAAY,GAerB3B,QAAQ,CAAC2B,YAAY;AAEzB;;;;;;;AAOA,OAAO,MAAMC,KAAK,GAiBd5B,QAAQ,CAAC4B,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Take.js b/backend/node_modules/effect/dist/esm/Take.js new file mode 100644 index 0000000000000000000000000000000000000000..88feab0b2f81fd384a5c3b6df15562ed8a3cfc76 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Take.js @@ -0,0 +1,148 @@ +import * as internal from "./internal/take.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const TakeTypeId = internal.TakeTypeId; +/** + * Creates a `Take` with the specified chunk. + * + * @since 2.0.0 + * @category constructors + */ +export const chunk = internal.chunk; +/** + * Creates a failing `Take` with the specified defect. + * + * @since 2.0.0 + * @category constructors + */ +export const die = internal.die; +/** + * Creates a failing `Take` with the specified error message. + * + * @since 2.0.0 + * @category constructors + */ +export const dieMessage = internal.dieMessage; +/** + * Transforms a `Take` to an `Effect`. + * + * @since 2.0.0 + * @category destructors + */ +export const done = internal.done; +/** + * Represents the end-of-stream marker. + * + * @since 2.0.0 + * @category constructors + */ +export const end = internal.end; +/** + * Creates a failing `Take` with the specified error. + * + * @since 2.0.0 + * @category constructors + */ +export const fail = internal.fail; +/** + * Creates a failing `Take` with the specified cause. + * + * @since 2.0.0 + * @category constructors + */ +export const failCause = internal.failCause; +/** + * Creates an effect from `Effect` that does not fail, but succeeds with + * the `Take`. Error from stream when pulling is converted to + * `Take.failCause`. Creates a single value chunk. + * + * @since 2.0.0 + * @category constructors + */ +export const fromEffect = internal.fromEffect; +/** + * Creates a `Take` from an `Exit`. + * + * @since 2.0.0 + * @category constructors + */ +export const fromExit = internal.fromExit; +/** + * Creates effect from `Effect, Option, R>` that does not fail, but + * succeeds with the `Take`. Errors from stream when pulling are converted + * to `Take.failCause`, and the end-of-stream is converted to `Take.end`. + * + * @since 2.0.0 + * @category constructors + */ +export const fromPull = internal.fromPull; +/** + * Checks if this `take` is done (`Take.end`). + * + * @since 2.0.0 + * @category getters + */ +export const isDone = internal.isDone; +/** + * Checks if this `take` is a failure. + * + * @since 2.0.0 + * @category getters + */ +export const isFailure = internal.isFailure; +/** + * Checks if this `take` is a success. + * + * @since 2.0.0 + * @category getters + */ +export const isSuccess = internal.isSuccess; +/** + * Constructs a `Take`. + * + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * Transforms `Take` to `Take` by applying function `f`. + * + * @since 2.0.0 + * @category mapping + */ +export const map = internal.map; +/** + * Folds over the failure cause, success value and end-of-stream marker to + * yield a value. + * + * @since 2.0.0 + * @category destructors + */ +export const match = internal.match; +/** + * Effectful version of `Take.fold`. + * + * Folds over the failure cause, success value and end-of-stream marker to + * yield an effect. + * + * @since 2.0.0 + * @category destructors + */ +export const matchEffect = internal.matchEffect; +/** + * Creates a `Take` with a single value chunk. + * + * @since 2.0.0 + * @category constructors + */ +export const of = internal.of; +/** + * Returns an effect that effectfully "peeks" at the success of this take. + * + * @since 2.0.0 + * @category sequencing + */ +export const tap = internal.tap; +//# sourceMappingURL=Take.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Take.js.map b/backend/node_modules/effect/dist/esm/Take.js.map new file mode 100644 index 0000000000000000000000000000000000000000..967a52889f5ab9fc38d89ed01bfcebf65b712de6 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Take.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Take.js","names":["internal","TakeTypeId","chunk","die","dieMessage","done","end","fail","failCause","fromEffect","fromExit","fromPull","isDone","isFailure","isSuccess","make","map","match","matchEffect","of","tap"],"sources":["../../src/Take.ts"],"sourcesContent":[null],"mappings":"AAOA,OAAO,KAAKA,QAAQ,MAAM,oBAAoB;AAK9C;;;;AAIA,OAAO,MAAMC,UAAU,GAAkBD,QAA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EvD;;;;;;AAMA,OAAO,MAAMC,GAAG,GAeZpB,QAAQ,CAACoB,GAAG","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TestAnnotation.js b/backend/node_modules/effect/dist/esm/TestAnnotation.js new file mode 100644 index 0000000000000000000000000000000000000000..3ada5a08807627bbf9f6dbce443b2c8eb977d0d0 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TestAnnotation.js @@ -0,0 +1,94 @@ +/** + * @since 2.0.0 + */ +import * as Chunk from "./Chunk.js"; +import * as Either from "./Either.js"; +import * as Equal from "./Equal.js"; +import { pipe } from "./Function.js"; +import * as Hash from "./Hash.js"; +import * as HashSet from "./HashSet.js"; +import { getBugErrorMessage } from "./internal/errors.js"; +import { hasProperty } from "./Predicate.js"; +/** @internal */ +const TestAnnotationSymbolKey = "effect/TestAnnotation"; +/** + * @since 2.0.0 + */ +export const TestAnnotationTypeId = /*#__PURE__*/Symbol.for(TestAnnotationSymbolKey); +/** @internal */ +class TestAnnotationImpl { + identifier; + initial; + combine; + [TestAnnotationTypeId] = { + _A: _ => _ + }; + constructor(identifier, initial, combine) { + this.identifier = identifier; + this.initial = initial; + this.combine = combine; + } + [Hash.symbol]() { + return pipe(Hash.hash(TestAnnotationSymbolKey), Hash.combine(Hash.hash(this.identifier)), Hash.cached(this)); + } + [Equal.symbol](that) { + return isTestAnnotation(that) && this.identifier === that.identifier; + } +} +/** + * @since 2.0.0 + */ +export const isTestAnnotation = u => hasProperty(u, TestAnnotationTypeId); +/** + * @since 2.0.0 + */ +export const make = (identifier, initial, combine) => { + return new TestAnnotationImpl(identifier, initial, combine); +}; +/** + * @since 2.0.0 + */ +export const compose = (left, right) => { + if (Either.isLeft(left) && Either.isLeft(right)) { + return Either.left(left.left + right.left); + } + if (Either.isRight(left) && Either.isRight(right)) { + return Either.right(pipe(left.right, Chunk.appendAll(right.right))); + } + if (Either.isRight(left) && Either.isLeft(right)) { + return right; + } + if (Either.isLeft(left) && Either.isRight(right)) { + return right; + } + throw new Error(getBugErrorMessage("TestAnnotation.compose")); +}; +/** + * @since 2.0.0 + */ +export const fibers = /*#__PURE__*/make("fibers", /*#__PURE__*/Either.left(0), compose); +/** + * An annotation which counts ignored tests. + * + * @since 2.0.0 + */ +export const ignored = /*#__PURE__*/make("ignored", 0, (a, b) => a + b); +/** + * An annotation which counts repeated tests. + * + * @since 2.0.0 + */ +export const repeated = /*#__PURE__*/make("repeated", 0, (a, b) => a + b); +/** + * An annotation which counts retried tests. + * + * @since 2.0.0 + */ +export const retried = /*#__PURE__*/make("retried", 0, (a, b) => a + b); +/** + * An annotation which tags tests with strings. + * + * @since 2.0.0 + */ +export const tagged = /*#__PURE__*/make("tagged", /*#__PURE__*/HashSet.empty(), (a, b) => pipe(a, HashSet.union(b))); +//# sourceMappingURL=TestAnnotation.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TestAnnotationMap.js.map b/backend/node_modules/effect/dist/esm/TestAnnotationMap.js.map new file mode 100644 index 0000000000000000000000000000000000000000..45fc1aeffcd494ca81fc8ec8690c1cef47742e81 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TestAnnotationMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TestAnnotationMap.js","names":["dual","HashMap","hasProperty","TestAnnotationMapTypeId","Symbol","for","TestAnnotationMapImpl","map","constructor","isTestAnnotationMap","u","empty","make","overwrite","self","key","value","set","update","f","initial","has","unsafeGet","get","annotate","_","combine","that","result","entry"],"sources":["../../src/TestAnnotationMap.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,SAASA,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,SAASC,WAAW,QAAQ,gBAAgB;AAG5C;;;AAGA,OAAO,MAAMC,uBAAuB,gBAAkBC,MAAM,CAACC,GAAG,CAAC,0BAA0B,CAAC;AAkB5F;AACA,MAAMC,qBAAqB;EAEJC,GAAA;EADZ,CAACJ,uBAAuB,IAA6B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AC9B,OAAOd,OAAO,CAACqB,SAAS,CAACR,IAAI,CAACP,GAAG,EAAEQ,GAAG,CAAM;EAC9C;EACA,OAAOA,GAAG,CAACK,OAAO;AACpB,CAAC,CAAC;AAEF;;;;;AAKA,OAAO,MAAMI,QAAQ,gBAAGxB,IAAI,CAa1B,CAAC,EAAE,CAACc,IAAI,EAAEC,GAAG,EAAEC,KAAK,KAAKE,MAAM,CAACJ,IAAI,EAAEC,GAAG,EAAGU,CAAC,IAAKV,GAAG,CAACW,OAAO,CAACD,CAAC,EAAET,KAAK,CAAC,CAAC,CAAC;AAE3E;;;AAGA,OAAO,MAAMU,OAAO,gBAAG1B,IAAI,CASzB,CAAC,EAAE,CAACc,IAAI,EAAEa,IAAI,KAAI;EAClB,IAAIC,MAAM,GAAGd,IAAI,CAACP,GAAG;EACrB,KAAK,MAAMsB,KAAK,IAAIF,IAAI,CAACpB,GAAG,EAAE;IAC5B,IAAIN,OAAO,CAACoB,GAAG,CAACO,MAAM,EAAEC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;MACjC,MAAMb,KAAK,GAAGf,OAAO,CAACsB,GAAG,CAACK,MAAM,EAAEC,KAAK,CAAC,CAAC,CAAC,CAAE;MAC5CD,MAAM,GAAG3B,OAAO,CAACgB,GAAG,CAACW,MAAM,EAAEC,KAAK,CAAC,CAAC,CAAC,EAAEA,KAAK,CAAC,CAAC,CAAC,CAACH,OAAO,CAACV,KAAK,EAAEa,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3E,CAAC,MAAM;MACLD,MAAM,GAAG3B,OAAO,CAACgB,GAAG,CAACW,MAAM,EAAEC,KAAK,CAAC,CAAC,CAAC,EAAEA,KAAK,CAAC,CAAC,CAAC,CAAC;IAClD;EACF;EACA,OAAOjB,IAAI,CAACgB,MAAM,CAAC;AACrB,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TestClock.js b/backend/node_modules/effect/dist/esm/TestClock.js new file mode 100644 index 0000000000000000000000000000000000000000..20667dcb84242c9b78a24609deff528cc8576d9c --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TestClock.js @@ -0,0 +1,354 @@ +/** + * @since 2.0.0 + */ +import * as Chunk from "./Chunk.js"; +import * as Context from "./Context.js"; +import * as DateTime from "./DateTime.js"; +import * as Duration from "./Duration.js"; +import * as Equal from "./Equal.js"; +import * as FiberStatus from "./FiberStatus.js"; +import { constVoid, dual, identity, pipe } from "./Function.js"; +import * as HashMap from "./HashMap.js"; +import * as clock from "./internal/clock.js"; +import * as effect from "./internal/core-effect.js"; +import * as core from "./internal/core.js"; +import * as defaultServices from "./internal/defaultServices.js"; +import * as circular from "./internal/effect/circular.js"; +import * as fiberRuntime from "./internal/fiberRuntime.js"; +import * as layer from "./internal/layer.js"; +import * as ref from "./internal/ref.js"; +import * as synchronized from "./internal/synchronizedRef.js"; +import * as SuspendedWarningData from "./internal/testing/suspendedWarningData.js"; +import * as WarningData from "./internal/testing/warningData.js"; +import * as number from "./Number.js"; +import * as Option from "./Option.js"; +import * as Order from "./Order.js"; +import * as Annotations from "./TestAnnotations.js"; +import * as Live from "./TestLive.js"; +/** + * @since 2.0.0 + */ +export const makeData = (instant, sleeps) => ({ + instant, + sleeps +}); +/** + * @since 2.0.0 + */ +export const TestClock = /*#__PURE__*/Context.GenericTag("effect/TestClock"); +/** + * The warning message that will be displayed if a test is using time but is + * not advancing the `TestClock`. + * + * @internal + */ +const warning = "Warning: A test is using time, but is not advancing " + "the test clock, which may result in the test hanging. Use TestClock.adjust to " + "manually advance the time."; +/** + * The warning message that will be displayed if a test is advancing the clock + * but a fiber is still running. + * + * @internal + */ +const suspendedWarning = "Warning: A test is advancing the test clock, " + "but a fiber is not suspending, which may result in the test hanging. Use " + "TestAspect.diagnose to identity the fiber that is not suspending."; +/** @internal */ +export class TestClockImpl { + clockState; + live; + annotations; + warningState; + suspendedWarningState; + [clock.ClockTypeId] = clock.ClockTypeId; + constructor(clockState, live, annotations, warningState, suspendedWarningState) { + this.clockState = clockState; + this.live = live; + this.annotations = annotations; + this.warningState = warningState; + this.suspendedWarningState = suspendedWarningState; + this.currentTimeMillis = core.map(ref.get(this.clockState), data => data.instant); + this.currentTimeNanos = core.map(ref.get(this.clockState), data => BigInt(data.instant * 1000000)); + } + /** + * Unsafely returns the current time in milliseconds. + */ + unsafeCurrentTimeMillis() { + return ref.unsafeGet(this.clockState).instant; + } + /** + * Unsafely returns the current time in nanoseconds. + */ + unsafeCurrentTimeNanos() { + return BigInt(ref.unsafeGet(this.clockState).instant * 1000000); + } + /** + * Returns the current clock time in milliseconds. + */ + currentTimeMillis; + /** + * Returns the current clock time in nanoseconds. + */ + currentTimeNanos; + /** + * Saves the `TestClock`'s current state in an effect which, when run, will + * restore the `TestClock` state to the saved state. + */ + get save() { + return core.map(ref.get(this.clockState), data => ref.set(this.clockState, data)); + } + /** + * Sets the current clock time to the specified instant. Any effects that + * were scheduled to occur on or before the new time will be run in order. + */ + setTime(instant) { + return core.zipRight(this.warningDone(), this.run(() => instant)); + } + /** + * Semantically blocks the current fiber until the clock time is equal to or + * greater than the specified duration. Once the clock time is adjusted to + * on or after the duration, the fiber will automatically be resumed. + */ + sleep(durationInput) { + const duration = Duration.decode(durationInput); + return core.flatMap(core.deferredMake(), deferred => pipe(ref.modify(this.clockState, data => { + const end = data.instant + Duration.toMillis(duration); + if (end > data.instant) { + return [true, makeData(data.instant, pipe(data.sleeps, Chunk.prepend([end, deferred])))]; + } + return [false, data]; + }), core.flatMap(shouldAwait => shouldAwait ? pipe(this.warningStart(), core.zipRight(core.deferredAwait(deferred))) : pipe(core.deferredSucceed(deferred, void 0), core.asVoid)))); + } + /** + * Returns a list of the times at which all queued effects are scheduled to + * resume. + */ + get sleeps() { + return core.map(ref.get(this.clockState), data => Chunk.map(data.sleeps, _ => _[0])); + } + /** + * Increments the current clock time by the specified duration. Any effects + * that were scheduled to occur on or before the new time will be run in + * order. + */ + adjust(durationInput) { + const duration = Duration.decode(durationInput); + return core.zipRight(this.warningDone(), this.run(n => n + Duration.toMillis(duration))); + } + /** + * Increments the current clock time by the specified duration. Any effects + * that were scheduled to occur on or before the new time will be run in + * order. + */ + adjustWith(durationInput) { + const duration = Duration.decode(durationInput); + return effect => fiberRuntime.zipLeftOptions(effect, this.adjust(duration), { + concurrent: true + }); + } + /** + * Returns a set of all fibers in this test. + */ + supervisedFibers() { + return this.annotations.supervisedFibers; + } + /** + * Captures a "snapshot" of the identifier and status of all fibers in this + * test other than the current fiber. Fails with the `void` value if any of + * these fibers are not done or suspended. Note that because we cannot + * synchronize on the status of multiple fibers at the same time this + * snapshot may not be fully consistent. + */ + freeze() { + return core.flatMap(this.supervisedFibers(), fibers => pipe(fibers, effect.reduce(HashMap.empty(), (map, fiber) => pipe(fiber.status, core.flatMap(status => { + if (FiberStatus.isDone(status)) { + return core.succeed(HashMap.set(map, fiber.id(), status)); + } + if (FiberStatus.isSuspended(status)) { + return core.succeed(HashMap.set(map, fiber.id(), status)); + } + return core.fail(void 0); + }))))); + } + /** + * Forks a fiber that will display a warning message if a test is using time + * but is not advancing the `TestClock`. + */ + warningStart() { + return synchronized.updateSomeEffect(this.warningState, data => WarningData.isStart(data) ? Option.some(pipe(this.live.provide(pipe(effect.logWarning(warning), effect.delay(Duration.seconds(5)))), core.interruptible, fiberRuntime.fork, core.map(fiber => WarningData.pending(fiber)))) : Option.none()); + } + /** + * Cancels the warning message that is displayed if a test is using time but + * is not advancing the `TestClock`. + */ + warningDone() { + return synchronized.updateSomeEffect(this.warningState, warningData => { + if (WarningData.isStart(warningData)) { + return Option.some(core.succeed(WarningData.done)); + } + if (WarningData.isPending(warningData)) { + return Option.some(pipe(core.interruptFiber(warningData.fiber), core.as(WarningData.done))); + } + return Option.none(); + }); + } + yieldTimer = /*#__PURE__*/core.async(resume => { + const timer = setTimeout(() => { + resume(core.void); + }, 0); + return core.sync(() => clearTimeout(timer)); + }); + /** + * Returns whether all descendants of this fiber are done or suspended. + */ + suspended() { + return pipe(this.freeze(), core.zip(pipe(this.yieldTimer, core.zipRight(this.freeze()))), core.flatMap(([first, last]) => Equal.equals(first, last) ? core.succeed(first) : core.fail(void 0))); + } + /** + * Polls until all descendants of this fiber are done or suspended. + */ + awaitSuspended() { + return pipe(this.suspendedWarningStart(), core.zipRight(pipe(this.suspended(), core.zipWith(pipe(this.yieldTimer, core.zipRight(this.suspended())), Equal.equals), effect.filterOrFail(identity, constVoid), effect.eventually)), core.zipRight(this.suspendedWarningDone())); + } + /** + * Forks a fiber that will display a warning message if a test is advancing + * the `TestClock` but a fiber is not suspending. + */ + suspendedWarningStart() { + return synchronized.updateSomeEffect(this.suspendedWarningState, suspendedWarningData => { + if (SuspendedWarningData.isStart(suspendedWarningData)) { + return Option.some(pipe(this.live.provide(pipe(effect.logWarning(suspendedWarning), core.zipRight(ref.set(this.suspendedWarningState, SuspendedWarningData.done)), effect.delay(Duration.seconds(5)))), core.interruptible, fiberRuntime.fork, core.map(fiber => SuspendedWarningData.pending(fiber)))); + } + return Option.none(); + }); + } + /** + * Cancels the warning message that is displayed if a test is advancing the + * `TestClock` but a fiber is not suspending. + */ + suspendedWarningDone() { + return synchronized.updateSomeEffect(this.suspendedWarningState, suspendedWarningData => { + if (SuspendedWarningData.isPending(suspendedWarningData)) { + return Option.some(pipe(core.interruptFiber(suspendedWarningData.fiber), core.as(SuspendedWarningData.start))); + } + return Option.none(); + }); + } + /** + * Runs all effects scheduled to occur on or before the specified instant, + * which may depend on the current time, in order. + */ + run(f) { + return pipe(this.awaitSuspended(), core.zipRight(pipe(ref.modify(this.clockState, data => { + const end = f(data.instant); + const sorted = pipe(data.sleeps, Chunk.sort(pipe(number.Order, Order.mapInput(_ => _[0])))); + if (Chunk.isNonEmpty(sorted)) { + const [instant, deferred] = Chunk.headNonEmpty(sorted); + if (instant <= end) { + return [Option.some([end, deferred]), makeData(instant, Chunk.tailNonEmpty(sorted))]; + } + } + return [Option.none(), makeData(end, data.sleeps)]; + }), core.flatMap(option => { + switch (option._tag) { + case "None": + { + return core.void; + } + case "Some": + { + const [end, deferred] = option.value; + return pipe(core.deferredSucceed(deferred, void 0), core.zipRight(core.yieldNow()), core.zipRight(this.run(() => end))); + } + } + })))); + } +} +/** + * @since 2.0.0 + */ +export const live = data => layer.scoped(TestClock, core.gen(function* () { + const live = yield* Live.TestLive; + const annotations = yield* Annotations.TestAnnotations; + const clockState = yield* core.sync(() => ref.unsafeMake(data)); + const warningState = yield* circular.makeSynchronized(WarningData.start); + const suspendedWarningState = yield* circular.makeSynchronized(SuspendedWarningData.start); + const testClock = new TestClockImpl(clockState, live, annotations, warningState, suspendedWarningState); + yield* fiberRuntime.withClockScoped(testClock); + yield* fiberRuntime.addFinalizer(() => core.zipRight(testClock.warningDone(), testClock.suspendedWarningDone())); + return testClock; +})); +/** + * @since 2.0.0 + */ +export const defaultTestClock = /*#__PURE__*/live(/*#__PURE__*/makeData(/*#__PURE__*/new Date(0).getTime(), /*#__PURE__*/Chunk.empty())); +/** + * Accesses a `TestClock` instance in the context and increments the time + * by the specified duration, running any actions scheduled for on or before + * the new time in order. + * + * @since 2.0.0 + */ +export const adjust = durationInput => { + const duration = Duration.decode(durationInput); + return testClockWith(testClock => testClock.adjust(duration)); +}; +/** + * @since 2.0.0 + */ +export const adjustWith = /*#__PURE__*/dual(2, (effect, durationInput) => { + const duration = Duration.decode(durationInput); + return testClockWith(testClock => testClock.adjustWith(duration)(effect)); +}); +/** + * Accesses a `TestClock` instance in the context and saves the clock + * state in an effect which, when run, will restore the `TestClock` to the + * saved state. + * + * @since 2.0.0 + */ +export const save = () => testClockWith(testClock => testClock.save); +/** + * Accesses a `TestClock` instance in the context and sets the clock time + * to the specified `Instant` or `Date`, running any actions scheduled for on or before + * the new time in order. + * + * @since 2.0.0 + */ +export const setTime = input => testClockWith(testClock => testClock.setTime(typeof input === "number" ? input : DateTime.unsafeMake(input).epochMillis)); +/** + * Semantically blocks the current fiber until the clock time is equal to or + * greater than the specified duration. Once the clock time is adjusted to + * on or after the duration, the fiber will automatically be resumed. + * + * @since 2.0.0 + */ +export const sleep = durationInput => { + const duration = Duration.decode(durationInput); + return testClockWith(testClock => testClock.sleep(duration)); +}; +/** + * Accesses a `TestClock` instance in the context and returns a list of + * times that effects are scheduled to run. + * + * @since 2.0.0 + */ +export const sleeps = () => testClockWith(testClock => testClock.sleeps); +/** + * Retrieves the `TestClock` service for this test. + * + * @since 2.0.0 + */ +export const testClock = () => testClockWith(core.succeed); +/** + * Retrieves the `TestClock` service for this test and uses it to run the + * specified workflow. + * + * @since 2.0.0 + */ +export const testClockWith = f => core.fiberRefGetWith(defaultServices.currentServices, services => f(pipe(services, Context.get(clock.clockTag)))); +/** + * Accesses the current time of a `TestClock` instance in the context in + * milliseconds. + * + * @since 2.0.0 + */ +export const currentTimeMillis = /*#__PURE__*/testClockWith(testClock => testClock.currentTimeMillis); +//# sourceMappingURL=TestClock.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TestConfig.js b/backend/node_modules/effect/dist/esm/TestConfig.js new file mode 100644 index 0000000000000000000000000000000000000000..4be9e21a89065600e37d3809f4bee0765993fa00 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TestConfig.js @@ -0,0 +1,13 @@ +/** + * @since 2.0.0 + */ +import * as Context from "./Context.js"; +/** + * @since 2.0.0 + */ +export const TestConfig = /*#__PURE__*/Context.GenericTag("effect/TestConfig"); +/** + * @since 2.0.0 + */ +export const make = params => params; +//# sourceMappingURL=TestConfig.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TestConfig.js.map b/backend/node_modules/effect/dist/esm/TestConfig.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c69b69b2a4d124f89adc4fd55596ab87bd6dd968 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TestConfig.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TestConfig.js","names":["Context","TestConfig","GenericTag","make","params"],"sources":["../../src/TestConfig.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,OAAO,MAAM,cAAc;AA8BvC;;;AAGA,OAAO,MAAMC,UAAU,gBAAwCD,OAAO,CAACE,UAAU,CAAa,mBAAmB,CAAC;AAElH;;;AAGA,OAAO,MAAMC,IAAI,GAAIC,MAKpB,IAAiBA,MAAM","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TestContext.js b/backend/node_modules/effect/dist/esm/TestContext.js new file mode 100644 index 0000000000000000000000000000000000000000..449d89203826f942d9f893869c829245423c073c --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TestContext.js @@ -0,0 +1,21 @@ +import { pipe } from "./Function.js"; +import * as defaultServices from "./internal/defaultServices.js"; +import * as layer from "./internal/layer.js"; +import * as TestClock from "./TestClock.js"; +import * as TestServices from "./TestServices.js"; +/** @internal */ +export const live = /*#__PURE__*/pipe(/*#__PURE__*/TestServices.annotationsLayer(), /*#__PURE__*/layer.merge(/*#__PURE__*/TestServices.liveLayer()), /*#__PURE__*/layer.merge(/*#__PURE__*/TestServices.sizedLayer(100)), /*#__PURE__*/layer.merge(/*#__PURE__*/pipe(TestClock.defaultTestClock, /*#__PURE__*/layer.provideMerge(/*#__PURE__*/layer.merge(/*#__PURE__*/TestServices.liveLayer(), /*#__PURE__*/TestServices.annotationsLayer())))), /*#__PURE__*/layer.merge(/*#__PURE__*/TestServices.testConfigLayer({ + repeats: 100, + retries: 100, + samples: 200, + shrinks: 1000 +}))); +/** + * @since 2.0.0 + */ +export const LiveContext = /*#__PURE__*/layer.syncContext(() => defaultServices.liveServices); +/** + * @since 2.0.0 + */ +export const TestContext = /*#__PURE__*/layer.provideMerge(live, LiveContext); +//# sourceMappingURL=TestContext.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TestServices.js.map b/backend/node_modules/effect/dist/esm/TestServices.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f22589d7ada74cb9b3bb354d99f610f9fac0003c --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TestServices.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TestServices.js","names":["Context","Effect","dual","pipe","core","defaultServices","fiberRuntime","layer","ref","TestAnnotationMap","Annotations","TestConfig","Live","Sized","liveServices","make","TestAnnotations","unsafeMake","empty","add","TestLive","TestSized","repeats","retries","samples","shrinks","currentServices","fiberRefUnsafeMakeContext","annotations","annotationsWith","succeed","f","fiberRefGetWith","services","get","withAnnotations","effect","fiberRefLocallyWith","withAnnotationsScoped","fiberRefLocallyScopedWith","annotationsLayer","scoped","sync","map","tap","key","annotate","value","supervisedFibers","liveWith","live","withLive","withLiveScoped","liveLayer","context","provideLive","provide","provideWithLive","self","fiberRefLocally","sizedWith","sized","withSized","withSizedScoped","sizedLayer","size","fiberRefMake","fromFiberRef","withSize","testConfigWith","testConfig","withTestConfig","config","withTestConfigScoped","testConfigLayer","params","suspend","as"],"sources":["../../src/TestServices.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,OAAO,MAAM,cAAc;AAEvC,OAAO,KAAKC,MAAM,MAAM,aAAa;AAGrC,SAASC,IAAI,EAAEC,IAAI,QAAQ,eAAe;AAC1C,OAAO,KAAKC,IAAI,MAAM,oBAAoB;AAC1C,OAAO,KAAKC,eAAe,MAAM,+BAA+B;AAChE,OAAO,KAAKC,YAAY,MAAM,4BAA4B;AAC1D,OAAO,KAAKC,KAAK,MAAM,qBAAqB;AAC5C,OAAO,KAAKC,GAAG,MAAM,mBAAmB;AAKxC,OAAO,KAAKC,iBAAiB,MAAM,wBAAwB;AAC3D,OAAO,KAAKC,WAAW,MAAM,sBAAsB;AACnD,OAAO,KAAKC,UAAU,MAAM,iBAAiB;AAC7C,OAAO,KAAKC,IAAI,MAAM,eAAe;AACrC,OAAO,KAAKC,KAAK,MAAM,gBAAgB;AAWvC;;;;;AAKA,OAAO,MAAMC,YAAY,gBAAkCX,IAAI,cAC7DH,OAAO,CAACe,IAAI,CAACL,WAAW,CAACM,eAAe,eAAEN,WAAW,CA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C,OAAO,gBAA0B6C,cAAc,CAAEG,MAAM,IAAKpE,IAAI,CAAC0B,OAAO,CAAC0C,MAAM,CAAChD,OAAO,CAAC,CAAC;AAEtG;;;;;AAKA,OAAO,MAAMC,OAAO,gBAA0B4C,cAAc,CAAEG,MAAM,IAAKpE,IAAI,CAAC0B,OAAO,CAAC0C,MAAM,CAAC/C,OAAO,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TestSized.js b/backend/node_modules/effect/dist/esm/TestSized.js new file mode 100644 index 0000000000000000000000000000000000000000..7f543a63936c89a9bcfea28706da782e0d942e8b --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TestSized.js @@ -0,0 +1,36 @@ +/** + * @since 2.0.0 + */ +import * as Context from "./Context.js"; +import * as core from "./internal/core.js"; +/** + * @since 2.0.0 + */ +export const TestSizedTypeId = /*#__PURE__*/Symbol.for("effect/TestSized"); +/** + * @since 2.0.0 + */ +export const TestSized = /*#__PURE__*/Context.GenericTag("effect/TestSized"); +/** @internal */ +class SizedImpl { + fiberRef; + [TestSizedTypeId] = TestSizedTypeId; + constructor(fiberRef) { + this.fiberRef = fiberRef; + } + get size() { + return core.fiberRefGet(this.fiberRef); + } + withSize(size) { + return effect => core.fiberRefLocally(this.fiberRef, size)(effect); + } +} +/** + * @since 2.0.0 + */ +export const make = size => new SizedImpl(core.fiberRefUnsafeMake(size)); +/** + * @since 2.0.0 + */ +export const fromFiberRef = fiberRef => new SizedImpl(fiberRef); +//# sourceMappingURL=TestSized.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Tracer.js b/backend/node_modules/effect/dist/esm/Tracer.js new file mode 100644 index 0000000000000000000000000000000000000000..2d73638637eb2a66101881c42228103c168c6d5f --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Tracer.js @@ -0,0 +1,37 @@ +import * as defaultServices from "./internal/defaultServices.js"; +import * as internal from "./internal/tracer.js"; +/** + * @since 2.0.0 + */ +export const TracerTypeId = internal.TracerTypeId; +/** + * @since 2.0.0 + * @category tags + */ +export const ParentSpan = internal.spanTag; +/** + * @since 2.0.0 + * @category tags + */ +export const Tracer = internal.tracerTag; +/** + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * @since 2.0.0 + * @category constructors + */ +export const externalSpan = internal.externalSpan; +/** + * @since 2.0.0 + * @category constructors + */ +export const tracerWith = defaultServices.tracerWith; +/** + * @since 3.12.0 + * @category annotations + */ +export const DisablePropagation = internal.DisablePropagation; +//# sourceMappingURL=Tracer.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Trie.js b/backend/node_modules/effect/dist/esm/Trie.js new file mode 100644 index 0000000000000000000000000000000000000000..6a1f807a05a03b95c17253db7f076ac7df89805c --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Trie.js @@ -0,0 +1,716 @@ +import * as TR from "./internal/trie.js"; +const TypeId = TR.TrieTypeId; +/** + * Creates an empty `Trie`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie, Equal } from "effect" + * + * const trie = Trie.empty() + * + * assert.equal(Trie.size(trie), 0) + * assert.deepStrictEqual(Array.from(trie), []) + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const empty = TR.empty; +/** + * Creates a new `Trie` from an iterable collection of key/value pairs (e.g. `Array<[string, V]>`). + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie, Equal } from "effect" + * + * const iterable: Array = [["call", 0], ["me", 1], ["mind", 2], ["mid", 3]] + * const trie = Trie.fromIterable(iterable) + * + * // The entries in the `Trie` are extracted in alphabetical order, regardless of the insertion order + * assert.deepStrictEqual(Array.from(trie), [["call", 0], ["me", 1], ["mid", 3], ["mind", 2]]) + * assert.equal(Equal.equals(Trie.make(["call", 0], ["me", 1], ["mind", 2], ["mid", 3]), trie), true) + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const fromIterable = TR.fromIterable; +/** + * Constructs a new `Trie` from the specified entries (`[string, V]`). + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie, Equal } from "effect" + * + * const trie = Trie.make(["ca", 0], ["me", 1]) + * + * assert.deepStrictEqual(Array.from(trie), [["ca", 0], ["me", 1]]) + * assert.equal(Equal.equals(Trie.fromIterable([["ca", 0], ["me", 1]]), trie), true) + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const make = TR.make; +/** + * Insert a new entry in the `Trie`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie } from "effect" + * + * const trie1 = Trie.empty().pipe( + * Trie.insert("call", 0) + * ) + * const trie2 = trie1.pipe(Trie.insert("me", 1)) + * const trie3 = trie2.pipe(Trie.insert("mind", 2)) + * const trie4 = trie3.pipe(Trie.insert("mid", 3)) + * + * assert.deepStrictEqual(Array.from(trie1), [["call", 0]]) + * assert.deepStrictEqual(Array.from(trie2), [["call", 0], ["me", 1]]) + * assert.deepStrictEqual(Array.from(trie3), [["call", 0], ["me", 1], ["mind", 2]]) + * assert.deepStrictEqual(Array.from(trie4), [["call", 0], ["me", 1], ["mid", 3], ["mind", 2]]) + * ``` + * + * @since 2.0.0 + * @category mutations + */ +export const insert = TR.insert; +/** + * Returns an `IterableIterator` of the keys within the `Trie`. + * + * The keys are returned in alphabetical order, regardless of insertion order. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie } from "effect" + * + * const trie = Trie.empty().pipe( + * Trie.insert("cab", 0), + * Trie.insert("abc", 1), + * Trie.insert("bca", 2) + * ) + * + * const result = Array.from(Trie.keys(trie)) + * assert.deepStrictEqual(result, ["abc", "bca", "cab"]) + * ``` + * + * @since 2.0.0 + * @category getters + */ +export const keys = TR.keys; +/** + * Returns an `IterableIterator` of the values within the `Trie`. + * + * Values are ordered based on their key in alphabetical order, regardless of insertion order. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie } from "effect" + * + * const trie = Trie.empty().pipe( + * Trie.insert("call", 0), + * Trie.insert("me", 1), + * Trie.insert("and", 2) + * ) + * + * const result = Array.from(Trie.values(trie)) + * assert.deepStrictEqual(result, [2, 0, 1]) + * ``` + * + * @since 2.0.0 + * @category getters + */ +export const values = TR.values; +/** + * Returns an `IterableIterator` of the entries within the `Trie`. + * + * The entries are returned by keys in alphabetical order, regardless of insertion order. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie } from "effect" + * + * const trie = Trie.empty().pipe( + * Trie.insert("call", 0), + * Trie.insert("me", 1) + * ) + * + * const result = Array.from(Trie.entries(trie)) + * assert.deepStrictEqual(result, [["call", 0], ["me", 1]]) + * ``` + * + * @since 2.0.0 + * @category getters + */ +export const entries = TR.entries; +/** + * Returns an `Array<[K, V]>` of the entries within the `Trie`. + * + * Equivalent to `Array.from(Trie.entries(trie))`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie } from "effect" + * + * const trie = Trie.empty().pipe( + * Trie.insert("call", 0), + * Trie.insert("me", 1) + * ) + * const result = Trie.toEntries(trie) + * + * assert.deepStrictEqual(result, [["call", 0], ["me", 1]]) + * ``` + * + * @since 2.0.0 + * @category getters + */ +export const toEntries = self => Array.from(entries(self)); +/** + * Returns an `IterableIterator` of the keys within the `Trie` + * that have `prefix` as prefix (`prefix` included if it exists). + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie } from "effect" + * + * const trie = Trie.empty().pipe( + * Trie.insert("she", 0), + * Trie.insert("shells", 1), + * Trie.insert("sea", 2), + * Trie.insert("shore", 3) + * ) + * + * const result = Array.from(Trie.keysWithPrefix(trie, "she")) + * assert.deepStrictEqual(result, ["she", "shells"]) + * ``` + * + * @since 2.0.0 + * @category getters + */ +export const keysWithPrefix = TR.keysWithPrefix; +/** + * Returns an `IterableIterator` of the values within the `Trie` + * that have `prefix` as prefix (`prefix` included if it exists). + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie } from "effect" + * + * const trie = Trie.empty().pipe( + * Trie.insert("she", 0), + * Trie.insert("shells", 1), + * Trie.insert("sea", 2), + * Trie.insert("shore", 3) + * ) + * + * const result = Array.from(Trie.valuesWithPrefix(trie, "she")) + * + * // 0: "she", 1: "shells" + * assert.deepStrictEqual(result, [0, 1]) + * ``` + * + * @since 2.0.0 + * @category getters + */ +export const valuesWithPrefix = TR.valuesWithPrefix; +/** + * Returns an `IterableIterator` of the entries within the `Trie` + * that have `prefix` as prefix (`prefix` included if it exists). + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie } from "effect" + * + * const trie = Trie.empty().pipe( + * Trie.insert("she", 0), + * Trie.insert("shells", 1), + * Trie.insert("sea", 2), + * Trie.insert("shore", 3) + * ) + * + * const result = Array.from(Trie.entriesWithPrefix(trie, "she")) + * assert.deepStrictEqual(result, [["she", 0], ["shells", 1]]) + * ``` + * + * @since 2.0.0 + * @category getters + */ +export const entriesWithPrefix = TR.entriesWithPrefix; +/** + * Returns `Array<[K, V]>` of the entries within the `Trie` + * that have `prefix` as prefix (`prefix` included if it exists). + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie } from "effect" + * + * const trie = Trie.empty().pipe( + * Trie.insert("shells", 0), + * Trie.insert("sells", 1), + * Trie.insert("sea", 2), + * Trie.insert("she", 3) + * ) + * + * const result = Trie.toEntriesWithPrefix(trie, "she") + * assert.deepStrictEqual(result, [["she", 3], ["shells", 0]]) + * ``` + * + * @since 2.0.0 + * @category getters + */ +export const toEntriesWithPrefix = TR.toEntriesWithPrefix; +/** + * Returns the longest key/value in the `Trie` + * that is a prefix of that `key` if it exists, `None` otherwise. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie, Option } from "effect" + * + * const trie = Trie.empty().pipe( + * Trie.insert("shells", 0), + * Trie.insert("sells", 1), + * Trie.insert("she", 2) + * ) + * + * assert.deepStrictEqual(Trie.longestPrefixOf(trie, "sell"), Option.none()) + * assert.deepStrictEqual(Trie.longestPrefixOf(trie, "sells"), Option.some(["sells", 1])) + * assert.deepStrictEqual(Trie.longestPrefixOf(trie, "shell"), Option.some(["she", 2])) + * assert.deepStrictEqual(Trie.longestPrefixOf(trie, "shellsort"), Option.some(["shells", 0])) + * ``` + * + * @since 2.0.0 + * @category getters + */ +export const longestPrefixOf = TR.longestPrefixOf; +/** + * Returns the size of the `Trie` (number of entries in the `Trie`). + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie } from "effect" + * + * const trie = Trie.empty().pipe( + * Trie.insert("a", 0), + * Trie.insert("b", 1) + * ) + * + * assert.equal(Trie.size(trie), 2) + * ``` + * + * @since 2.0.0 + * @category getters + */ +export const size = TR.size; +/** + * Safely lookup the value for the specified key in the `Trie`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie, Option } from "effect" + * + * const trie = Trie.empty().pipe( + * Trie.insert("call", 0), + * Trie.insert("me", 1), + * Trie.insert("mind", 2), + * Trie.insert("mid", 3) + * ) + * + * assert.deepStrictEqual(Trie.get(trie, "call"), Option.some(0)) + * assert.deepStrictEqual(Trie.get(trie, "me"), Option.some(1)) + * assert.deepStrictEqual(Trie.get(trie, "mind"), Option.some(2)) + * assert.deepStrictEqual(Trie.get(trie, "mid"), Option.some(3)) + * assert.deepStrictEqual(Trie.get(trie, "cale"), Option.none()) + * assert.deepStrictEqual(Trie.get(trie, "ma"), Option.none()) + * assert.deepStrictEqual(Trie.get(trie, "midn"), Option.none()) + * assert.deepStrictEqual(Trie.get(trie, "mea"), Option.none()) + * ``` + * + * @since 2.0.0 + * @category elements + */ +export const get = TR.get; +/** + * Check if the given key exists in the `Trie`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie } from "effect" + * + * const trie = Trie.empty().pipe( + * Trie.insert("call", 0), + * Trie.insert("me", 1), + * Trie.insert("mind", 2), + * Trie.insert("mid", 3) + * ) + * + * assert.equal(Trie.has(trie, "call"), true) + * assert.equal(Trie.has(trie, "me"), true) + * assert.equal(Trie.has(trie, "mind"), true) + * assert.equal(Trie.has(trie, "mid"), true) + * assert.equal(Trie.has(trie, "cale"), false) + * assert.equal(Trie.has(trie, "ma"), false) + * assert.equal(Trie.has(trie, "midn"), false) + * assert.equal(Trie.has(trie, "mea"), false) + * ``` + * + * @since 2.0.0 + * @category elements + */ +export const has = TR.has; +/** + * Checks if the `Trie` contains any entries. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie } from "effect" + * + * const trie = Trie.empty() + * const trie1 = trie.pipe(Trie.insert("ma", 0)) + * + * assert.equal(Trie.isEmpty(trie), true) + * assert.equal(Trie.isEmpty(trie1), false) + * ``` + * + * @since 2.0.0 + * @category elements + */ +export const isEmpty = TR.isEmpty; +/** + * Unsafely lookup the value for the specified key in the `Trie`. + * + * `unsafeGet` will throw if the key is not found. Use `get` instead to safely + * get a value from the `Trie`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie } from "effect" + * + * const trie = Trie.empty().pipe( + * Trie.insert("call", 0), + * Trie.insert("me", 1) + * ) + * + * assert.throws(() => Trie.unsafeGet(trie, "mae")) + * ``` + * + * @since 2.0.0 + * @category unsafe + */ +export const unsafeGet = TR.unsafeGet; +/** + * Remove the entry for the specified key in the `Trie`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie, Option } from "effect" + * + * const trie = Trie.empty().pipe( + * Trie.insert("call", 0), + * Trie.insert("me", 1), + * Trie.insert("mind", 2), + * Trie.insert("mid", 3) + * ) + * + * const trie1 = trie.pipe(Trie.remove("call")) + * const trie2 = trie1.pipe(Trie.remove("mea")) + * + * assert.deepStrictEqual(Trie.get(trie, "call"), Option.some(0)) + * assert.deepStrictEqual(Trie.get(trie1, "call"), Option.none()) + * assert.deepStrictEqual(Trie.get(trie2, "call"), Option.none()) + * ``` + * + * @since 2.0.0 + * @category mutations + */ +export const remove = TR.remove; +/** + * Reduce a state over the entries of the `Trie`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie } from "effect" + * + * const trie = Trie.empty().pipe( + * Trie.insert("shells", 0), + * Trie.insert("sells", 1), + * Trie.insert("she", 2) + * ) + * + * assert.equal( + * trie.pipe( + * Trie.reduce(0, (acc, n) => acc + n) + * ), + * 3 + * ) + * assert.equal( + * trie.pipe( + * Trie.reduce(10, (acc, n) => acc + n) + * ), + * 13 + * ) + * assert.equal( + * trie.pipe( + * Trie.reduce("", (acc, _, key) => acc + key) + * ), + * "sellssheshells" + * ) + * ``` + * + * @since 2.0.0 + * @category folding + */ +export const reduce = TR.reduce; +/** + * Maps over the entries of the `Trie` using the specified function. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie, Equal } from "effect" + * + * const trie = Trie.empty().pipe( + * Trie.insert("shells", 0), + * Trie.insert("sells", 1), + * Trie.insert("she", 2) + * ) + * + * const trieMapV = Trie.empty().pipe( + * Trie.insert("shells", 1), + * Trie.insert("sells", 2), + * Trie.insert("she", 3) + * ) + * + * const trieMapK = Trie.empty().pipe( + * Trie.insert("shells", 6), + * Trie.insert("sells", 5), + * Trie.insert("she", 3) + * ) + * + * assert.equal(Equal.equals(Trie.map(trie, (v) => v + 1), trieMapV), true) + * assert.equal(Equal.equals(Trie.map(trie, (_, k) => k.length), trieMapK), true) + * ``` + * + * @since 2.0.0 + * @category folding + */ +export const map = TR.map; +/** + * Filters entries out of a `Trie` using the specified predicate. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie, Equal } from "effect" + * + * const trie = Trie.empty().pipe( + * Trie.insert("shells", 0), + * Trie.insert("sells", 1), + * Trie.insert("she", 2) + * ) + * + * const trieMapV = Trie.empty().pipe( + * Trie.insert("she", 2) + * ) + * + * const trieMapK = Trie.empty().pipe( + * Trie.insert("shells", 0), + * Trie.insert("sells", 1) + * ) + * + * assert.equal(Equal.equals(Trie.filter(trie, (v) => v > 1), trieMapV), true) + * assert.equal(Equal.equals(Trie.filter(trie, (_, k) => k.length > 3), trieMapK), true) + * ``` + * + * @since 2.0.0 + * @category filtering + */ +export const filter = TR.filter; +/** + * Maps over the entries of the `Trie` using the specified partial function + * and filters out `None` values. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie, Equal, Option } from "effect" + * + * const trie = Trie.empty().pipe( + * Trie.insert("shells", 0), + * Trie.insert("sells", 1), + * Trie.insert("she", 2) + * ) + * + * const trieMapV = Trie.empty().pipe( + * Trie.insert("she", 2) + * ) + * + * const trieMapK = Trie.empty().pipe( + * Trie.insert("shells", 0), + * Trie.insert("sells", 1) + * ) + * + * assert.equal(Equal.equals(Trie.filterMap(trie, (v) => v > 1 ? Option.some(v) : Option.none()), trieMapV), true) + * assert.equal( + * Equal.equals(Trie.filterMap(trie, (v, k) => k.length > 3 ? Option.some(v) : Option.none()), trieMapK), + * true + * ) + * ``` + * + * @since 2.0.0 + * @category filtering + */ +export const filterMap = TR.filterMap; +/** + * Filters out `None` values from a `Trie` of `Options`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie, Equal, Option } from "effect" + * + * const trie = Trie.empty>().pipe( + * Trie.insert("shells", Option.some(0)), + * Trie.insert("sells", Option.none()), + * Trie.insert("she", Option.some(2)) + * ) + * + * const trieMapV = Trie.empty().pipe( + * Trie.insert("shells", 0), + * Trie.insert("she", 2) + * ) + * + * assert.equal(Equal.equals(Trie.compact(trie), trieMapV), true) + * ``` + * + * @since 2.0.0 + * @category filtering + */ +export const compact = TR.compact; +/** + * Applies the specified function to the entries of the `Trie`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie } from "effect" + * + * let value = 0 + * + * Trie.empty().pipe( + * Trie.insert("shells", 0), + * Trie.insert("sells", 1), + * Trie.insert("she", 2), + * Trie.forEach((n, key) => { + * value += n + key.length + * }) + * ) + * + * assert.equal(value, 17) + * ``` + * + * @since 2.0.0 + * @category traversing + */ +export const forEach = TR.forEach; +/** + * Updates the value of the specified key within the `Trie` if it exists. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie, Equal, Option } from "effect" + * + * const trie = Trie.empty().pipe( + * Trie.insert("shells", 0), + * Trie.insert("sells", 1), + * Trie.insert("she", 2) + * ) + * + * assert.deepStrictEqual(trie.pipe(Trie.modify("she", (v) => v + 10), Trie.get("she")), Option.some(12)) + * + * assert.equal(Equal.equals(trie.pipe(Trie.modify("me", (v) => v)), trie), true) + * ``` + * + * @since 2.0.0 + * @category mutations + */ +export const modify = TR.modify; +/** + * Removes all entries in the `Trie` which have the specified keys. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie, Equal } from "effect" + * + * const trie = Trie.empty().pipe( + * Trie.insert("shells", 0), + * Trie.insert("sells", 1), + * Trie.insert("she", 2) + * ) + * + * assert.equal( + * Equal.equals(trie.pipe(Trie.removeMany(["she", "sells"])), Trie.empty().pipe(Trie.insert("shells", 0))), + * true + * ) + * ``` + * + * @since 2.0.0 + * @category mutations + */ +export const removeMany = TR.removeMany; +/** + * Insert multiple entries in the `Trie` at once. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Trie, Equal } from "effect" + * + * const trie = Trie.empty().pipe( + * Trie.insert("shells", 0), + * Trie.insert("sells", 1), + * Trie.insert("she", 2) + * ) + * + * const trieInsert = Trie.empty().pipe( + * Trie.insert("shells", 0), + * Trie.insertMany( + * [["sells", 1], ["she", 2]] + * ) + * ) + * + * assert.equal( + * Equal.equals(trie, trieInsert), + * true + * ) + * ``` + * + * @since 2.0.0 + * @category mutations + */ +export const insertMany = TR.insertMany; +//# sourceMappingURL=Trie.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Trie.js.map b/backend/node_modules/effect/dist/esm/Trie.js.map new file mode 100644 index 0000000000000000000000000000000000000000..61db32ee0d887b2c7eff3bbaf1f0266cda5a3584 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Trie.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Trie.js","names":["TR","TypeId","TrieTypeId","empty","fromIterable","make","insert","keys","values","entries","toEntries","self","Array","from","keysWithPrefix","valuesWithPrefix","entriesWithPrefix","toEntriesWithPrefix","longestPrefixOf","size","get","has","isEmpty","unsafeGet","remove","reduce","map","filter","filterMap","compact","forEach","modify","removeMany","insertMany"],"sources":["../../src/Trie.ts"],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,OAAO,MAAMC,MAAM,GA+Cf/B,EAAE,CAAC+B,MAAM;AAEb;;;;;;;;;;;;;;;;;;;;;;;AAuBA,OAAO,MAAMC,UAAU,GAiDnBhC,EAAE,CAACgC,UAAU;AAEjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,OAAO,MAAMC,UAAU,GA+DnBjC,EAAE,CAACiC,UAAU","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/UpstreamPullStrategy.js b/backend/node_modules/effect/dist/esm/UpstreamPullStrategy.js new file mode 100644 index 0000000000000000000000000000000000000000..7486bcfed767249d6b10a695dc328c84565fa552 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/UpstreamPullStrategy.js @@ -0,0 +1,51 @@ +/** + * @since 2.0.0 + */ +import * as internal from "./internal/channel/upstreamPullStrategy.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const UpstreamPullStrategyTypeId = internal.UpstreamPullStrategyTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +export const PullAfterNext = internal.PullAfterNext; +/** + * @since 2.0.0 + * @category constructors + */ +export const PullAfterAllEnqueued = internal.PullAfterAllEnqueued; +/** + * Returns `true` if the specified value is an `UpstreamPullStrategy`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isUpstreamPullStrategy = internal.isUpstreamPullStrategy; +/** + * Returns `true` if the specified `UpstreamPullStrategy` is a `PullAfterNext`, + * `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isPullAfterNext = internal.isPullAfterNext; +/** + * Returns `true` if the specified `UpstreamPullStrategy` is a + * `PullAfterAllEnqueued`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isPullAfterAllEnqueued = internal.isPullAfterAllEnqueued; +/** + * Folds an `UpstreamPullStrategy` into a value of type `Z`. + * + * @since 2.0.0 + * @category folding + */ +export const match = internal.match; +//# sourceMappingURL=UpstreamPullStrategy.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Utils.js b/backend/node_modules/effect/dist/esm/Utils.js new file mode 100644 index 0000000000000000000000000000000000000000..abfc400d0e8c46dd79220dc1c5847dfd51ca2290 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Utils.js @@ -0,0 +1,357 @@ +/** + * @since 2.0.0 + */ +import { identity } from "./Function.js"; +import { globalValue } from "./GlobalValue.js"; +import { getBugErrorMessage } from "./internal/errors.js"; +import { isNullable, isObject } from "./Predicate.js"; +/* + * Copyright 2014 Thom Chiovoloni, released under the MIT license. + * + * A random number generator based on the basic implementation of the PCG algorithm, + * as described here: http://www.pcg-random.org/ + * + * Adapted for TypeScript from Thom's original code at https://github.com/thomcc/pcg-random + * + * forked from https://github.com/frptools + * + * @since 2.0.0 + */ +/** + * @category symbols + * @since 2.0.0 + */ +export const GenKindTypeId = /*#__PURE__*/Symbol.for("effect/Gen/GenKind"); +/** + * @category predicates + * @since 3.0.6 + */ +export const isGenKind = u => isObject(u) && GenKindTypeId in u; +/** + * @category constructors + * @since 2.0.0 + */ +export class GenKindImpl { + value; + constructor( + /** + * @since 2.0.0 + */ + value) { + this.value = value; + } + /** + * @since 2.0.0 + */ + get _F() { + return identity; + } + /** + * @since 2.0.0 + */ + get _R() { + return _ => _; + } + /** + * @since 2.0.0 + */ + get _O() { + return _ => _; + } + /** + * @since 2.0.0 + */ + get _E() { + return _ => _; + } + /** + * @since 2.0.0 + */ + [GenKindTypeId] = GenKindTypeId; + /** + * @since 2.0.0 + */ + [Symbol.iterator]() { + return new SingleShotGen(this); + } +} +/** + * @category constructors + * @since 2.0.0 + */ +export class SingleShotGen { + self; + called = false; + constructor(self) { + this.self = self; + } + /** + * @since 2.0.0 + */ + next(a) { + return this.called ? { + value: a, + done: true + } : (this.called = true, { + value: this.self, + done: false + }); + } + /** + * @since 2.0.0 + */ + return(a) { + return { + value: a, + done: true + }; + } + /** + * @since 2.0.0 + */ + throw(e) { + throw e; + } + /** + * @since 2.0.0 + */ + [Symbol.iterator]() { + return new SingleShotGen(this.self); + } +} +/** + * @category constructors + * @since 2.0.0 + */ +export const makeGenKind = kind => new GenKindImpl(kind); +/** + * @category adapters + * @since 2.0.0 + */ +export const adapter = () => function () { + let x = arguments[0]; + for (let i = 1; i < arguments.length; i++) { + x = arguments[i](x); + } + return new GenKindImpl(x); +}; +const defaultIncHi = 0x14057b7e; +const defaultIncLo = 0xf767814f; +const MUL_HI = 0x5851f42d >>> 0; +const MUL_LO = 0x4c957f2d >>> 0; +const BIT_53 = 9007199254740992.0; +const BIT_27 = 134217728.0; +/** + * PCG is a family of simple fast space-efficient statistically good algorithms + * for random number generation. Unlike many general-purpose RNGs, they are also + * hard to predict. + * + * @category model + * @since 2.0.0 + */ +export class PCGRandom { + _state; + constructor(seedHi, seedLo, incHi, incLo) { + if (isNullable(seedLo) && isNullable(seedHi)) { + seedLo = Math.random() * 0xffffffff >>> 0; + seedHi = 0; + } else if (isNullable(seedLo)) { + seedLo = seedHi; + seedHi = 0; + } + if (isNullable(incLo) && isNullable(incHi)) { + incLo = this._state ? this._state[3] : defaultIncLo; + incHi = this._state ? this._state[2] : defaultIncHi; + } else if (isNullable(incLo)) { + incLo = incHi; + incHi = 0; + } + this._state = new Int32Array([0, 0, incHi >>> 0, ((incLo || 0) | 1) >>> 0]); + this._next(); + add64(this._state, this._state[0], this._state[1], seedHi >>> 0, seedLo >>> 0); + this._next(); + return this; + } + /** + * Returns a copy of the internal state of this random number generator as a + * JavaScript Array. + * + * @category getters + * @since 2.0.0 + */ + getState() { + return [this._state[0], this._state[1], this._state[2], this._state[3]]; + } + /** + * Restore state previously retrieved using `getState()`. + * + * @since 2.0.0 + */ + setState(state) { + this._state[0] = state[0]; + this._state[1] = state[1]; + this._state[2] = state[2]; + this._state[3] = state[3] | 1; + } + /** + * Get a uniformly distributed 32 bit integer between [0, max). + * + * @category getter + * @since 2.0.0 + */ + integer(max) { + return Math.round(this.number() * Number.MAX_SAFE_INTEGER) % max; + } + /** + * Get a uniformly distributed IEEE-754 double between 0.0 and 1.0, with + * 53 bits of precision (every bit of the mantissa is randomized). + * + * @category getters + * @since 2.0.0 + */ + number() { + const hi = (this._next() & 0x03ffffff) * 1.0; + const lo = (this._next() & 0x07ffffff) * 1.0; + return (hi * BIT_27 + lo) / BIT_53; + } + /** @internal */ + _next() { + // save current state (what we'll use for this number) + const oldHi = this._state[0] >>> 0; + const oldLo = this._state[1] >>> 0; + // churn LCG. + mul64(this._state, oldHi, oldLo, MUL_HI, MUL_LO); + add64(this._state, this._state[0], this._state[1], this._state[2], this._state[3]); + // get least sig. 32 bits of ((oldstate >> 18) ^ oldstate) >> 27 + let xsHi = oldHi >>> 18; + let xsLo = (oldLo >>> 18 | oldHi << 14) >>> 0; + xsHi = (xsHi ^ oldHi) >>> 0; + xsLo = (xsLo ^ oldLo) >>> 0; + const xorshifted = (xsLo >>> 27 | xsHi << 5) >>> 0; + // rotate xorshifted right a random amount, based on the most sig. 5 bits + // bits of the old state. + const rot = oldHi >>> 27; + const rot2 = (-rot >>> 0 & 31) >>> 0; + return (xorshifted >>> rot | xorshifted << rot2) >>> 0; + } +} +function mul64(out, aHi, aLo, bHi, bLo) { + let c1 = (aLo >>> 16) * (bLo & 0xffff) >>> 0; + let c0 = (aLo & 0xffff) * (bLo >>> 16) >>> 0; + let lo = (aLo & 0xffff) * (bLo & 0xffff) >>> 0; + let hi = (aLo >>> 16) * (bLo >>> 16) + ((c0 >>> 16) + (c1 >>> 16)) >>> 0; + c0 = c0 << 16 >>> 0; + lo = lo + c0 >>> 0; + if (lo >>> 0 < c0 >>> 0) { + hi = hi + 1 >>> 0; + } + c1 = c1 << 16 >>> 0; + lo = lo + c1 >>> 0; + if (lo >>> 0 < c1 >>> 0) { + hi = hi + 1 >>> 0; + } + hi = hi + Math.imul(aLo, bHi) >>> 0; + hi = hi + Math.imul(aHi, bLo) >>> 0; + out[0] = hi; + out[1] = lo; +} +// add two 64 bit numbers (given in parts), and store the result in `out`. +function add64(out, aHi, aLo, bHi, bLo) { + let hi = aHi + bHi >>> 0; + const lo = aLo + bLo >>> 0; + if (lo >>> 0 < aLo >>> 0) { + hi = hi + 1 | 0; + } + out[0] = hi; + out[1] = lo; +} +/** + * @since 3.0.6 + */ +export const YieldWrapTypeId = /*#__PURE__*/Symbol.for("effect/Utils/YieldWrap"); +/** + * @since 3.0.6 + */ +export class YieldWrap { + /** + * @since 3.0.6 + */ + #value; + constructor(value) { + this.#value = value; + } + /** + * @since 3.0.6 + */ + [YieldWrapTypeId]() { + return this.#value; + } +} +/** + * @since 3.0.6 + */ +export function yieldWrapGet(self) { + if (typeof self === "object" && self !== null && YieldWrapTypeId in self) { + return self[YieldWrapTypeId](); + } + throw new Error(getBugErrorMessage("yieldWrapGet")); +} +/** + * Note: this is an experimental feature made available to allow custom matchers in tests, not to be directly used yet in user code + * + * @since 3.1.1 + * @status experimental + * @category modifiers + */ +export const structuralRegionState = /*#__PURE__*/globalValue("effect/Utils/isStructuralRegion", () => ({ + enabled: false, + tester: undefined +})); +/** + * Note: this is an experimental feature made available to allow custom matchers in tests, not to be directly used yet in user code + * + * @since 3.1.1 + * @status experimental + * @category modifiers + */ +export const structuralRegion = (body, tester) => { + const current = structuralRegionState.enabled; + const currentTester = structuralRegionState.tester; + structuralRegionState.enabled = true; + if (tester) { + structuralRegionState.tester = tester; + } + try { + return body(); + } finally { + structuralRegionState.enabled = current; + structuralRegionState.tester = currentTester; + } +}; +const standard = { + effect_internal_function: body => { + return body(); + } +}; +const forced = { + effect_internal_function: body => { + try { + return body(); + } finally { + // + } + } +}; +const isNotOptimizedAway = /*#__PURE__*/standard.effect_internal_function(() => new Error().stack)?.includes("effect_internal_function") === true; +/** + * @since 3.2.2 + * @status experimental + * @category tracing + */ +export const internalCall = isNotOptimizedAway ? standard.effect_internal_function : forced.effect_internal_function; +const genConstructor = function* () {}.constructor; +/** + * @since 3.11.0 + */ +export const isGeneratorFunction = u => isObject(u) && u.constructor === genConstructor; +//# sourceMappingURL=Utils.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Utils.js.map b/backend/node_modules/effect/dist/esm/Utils.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a69dbed1731750309da124082b4cfd77d21e009e --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Utils.js","names":["identity","globalValue","getBugErrorMessage","isNullable","isObject","GenKindTypeId","Symbol","for","isGenKind","u","GenKindImpl","value","constructor","_F","_R","_","_O","_E","iterator","SingleShotGen","self","called","next","a","done","return","throw","e","makeGenKind","kind","adapter","x","arguments","i","length","defaultIncHi","defaultIncLo","MUL_HI","MUL_LO","BIT_53","BIT_27","PCGRandom","_state","seedHi","seedLo","incHi","incLo","Math","random","Int32Array","_next","add64","getState","setState","state","integer","max","round","number","Number","MAX_SAFE_INTEGER","hi","lo","oldHi","oldLo","mul64","xsHi","xsLo","xorshifted","rot","rot2","out","aHi","aLo","bHi","bLo","c1","c0","imul","YieldWrapTypeId","YieldWrap","yieldWrapGet","Error","structuralRegionState","enabled","tester","undefined","structuralRegion","body","current","currentTester","standard","effect_internal_function","forced","isNotOptimizedAway","stack","includes","internalCall","genConstructor","isGeneratorFunction"],"sources":["../../src/Utils.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,SAASA,QAAQ,QAAQ,eAAe;AACxC,SAASC,WAAW,QAAQ,kBAAkB;AAE9C,SAASC,kBAAkB,QAAQ,sBAAsB;AACzD,SAASC,UAAU,EAAEC,QAAQ,QAAQ,gBAAgB;AAGrD;;;;;;;;;;;;AAaA;;;;AAIA,OAAO,MAAMC,aAAa,gBAAkBC,MAAM,CAACC,GAAG,CAAC,oBAAoB,CAAC;AAkB5E;;;;AAIA,OAAO,MAAMC,SAAS,GAAIC,CAAU,IAA4CL,QAAQ,CAACK,CAAC,CAAC,IAAIJ,aAAa,IAAII,CAAC;AAEjH;;;;AAIA,OAAM,MAAOC,WAAW;EAKXC,KAAA;EAJXC;EACE;;;EAGSD,KAA0B;IAA1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T,CAAC,CACH;AAED;;;;;;;AAOA,OAAO,MAAMC,gBAAgB,GAAGA,CAAIC,IAAa,EAAEH,MAA4C,KAAO;EACpG,MAAMI,OAAO,GAAGN,qBAAqB,CAACC,OAAO;EAC7C,MAAMM,aAAa,GAAGP,qBAAqB,CAACE,MAAM;EAClDF,qBAAqB,CAACC,OAAO,GAAG,IAAI;EACpC,IAAIC,MAAM,EAAE;IACVF,qBAAqB,CAACE,MAAM,GAAGA,MAAM;EACvC;EACA,IAAI;IACF,OAAOG,IAAI,EAAE;EACf,CAAC,SAAS;IACRL,qBAAqB,CAACC,OAAO,GAAGK,OAAO;IACvCN,qBAAqB,CAACE,MAAM,GAAGK,aAAa;EAC9C;AACF,CAAC;AAED,MAAMC,QAAQ,GAAG;EACfC,wBAAwB,EAAMJ,IAAa,IAAI;IAC7C,OAAOA,IAAI,EAAE;EACf;CACD;AAED,MAAMK,MAAM,GAAG;EACbD,wBAAwB,EAAMJ,IAAa,IAAI;IAC7C,IAAI;MACF,OAAOA,IAAI,EAAE;IACf,CAAC,SAAS;MACR;IAAA;EAEJ;CACD;AAED,MAAMM,kBAAkB,GACtB,aAAAH,QAAQ,CAACC,wBAAwB,CAAC,MAAM,IAAIV,KAAK,EAAE,CAACa,KAAK,CAAC,EAAEC,QAAQ,CAAC,0BAA0B,CAAC,KAAK,IAAI;AAE3G;;;;;AAKA,OAAO,MAAMC,YAAY,GAAGH,kBAAkB,GAAGH,QAAQ,CAACC,wBAAwB,GAAGC,MAAM,CAACD,wBAAwB;AAEpH,MAAMM,cAAc,GAAI,aAAS,CAAI,CAAC,CAAEtF,WAAW;AAEnD;;;AAGA,OAAO,MAAMuF,mBAAmB,GAAI1F,CAAU,IAC5CL,QAAQ,CAACK,CAAC,CAAC,IAAIA,CAAC,CAACG,WAAW,KAAKsF,cAAc","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/index.js.map b/backend/node_modules/effect/dist/esm/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..797ab310f78342881a527bac81b7d6d684e6bf3a --- /dev/null +++ b/backend/node_modules/effect/dist/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","names":["absurd","flow","hole","identity","pipe","unsafeCoerce","Arbitrary","Array","BigDecimal","BigInt","Boolean","Brand","Cache","Cause","Channel","ChildExecutorDecision","Chunk","Clock","Config","ConfigError","ConfigProvider","ConfigProviderPathPatch","Console","Context","Cron","Data","DateTime","DefaultServices","Deferred","Differ","Duration","Effect","Effectable","Either","Encoding","Equal","Equivalence","ExecutionPlan","ExecutionStrategy","Exit","FastCheck","Fiber","FiberHandle","FiberId","FiberMap","FiberRef","FiberRefs","FiberRefsPatch","FiberSet","FiberStatus","Function","GlobalValue","Graph","GroupBy","HKT","Hash","HashMap","HashRing","HashSet","Inspectable","Iterable","JSONSchema","KeyedPool","Layer","LayerMap","List","LogLevel","LogSpan","Logger","Mailbox","ManagedRuntime","Match","MergeDecision","MergeState","MergeStrategy","Metric","MetricBoundaries","MetricHook","MetricKey","MetricKeyType","MetricLabel","MetricPair","MetricPolling","MetricRegistry","MetricState","Micro","ModuleVersion","MutableHashMap","MutableHashSet","MutableList","MutableQueue","MutableRef","NonEmptyIterable","Number","Option","Order","Ordering","ParseResult","PartitionedSemaphore","Pipeable","Pool","Predicate","Pretty","PrimaryKey","PubSub","Queue","Random","RateLimiter","RcMap","RcRef","Readable","Record","RedBlackTree","Redacted","Ref","RegExp","Reloadable","Request","RequestBlock","RequestResolver","Resource","Runtime","RuntimeFlags","RuntimeFlagsPatch","STM","Schedule","ScheduleDecision","ScheduleInterval","ScheduleIntervals","Scheduler","Schema","SchemaAST","Scope","ScopedCache","ScopedRef","Secret","SingleProducerAsyncInput","Sink","SortedMap","SortedSet","Stream","StreamEmit","StreamHaltStrategy","Streamable","String","Struct","Subscribable","SubscriptionRef","Supervisor","Symbol","SynchronizedRef","TArray","TDeferred","TMap","TPriorityQueue","TPubSub","TQueue","TRandom","TReentrantLock","TRef","TSemaphore","TSet","TSubscriptionRef","Take","TestAnnotation","TestAnnotationMap","TestAnnotations","TestClock","TestConfig","TestContext","TestLive","TestServices","TestSized","Tracer","Trie","Tuple","Types","Unify","UpstreamPullRequest","UpstreamPullStrategy","Utils"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAIA;AACE;;;AAGAA,MAAM;AACN;;;AAGAC,IAAI;AACJ;;;AAGAC,IAAI;AACJ;;;AAGAC,QAAQ;AACR;;;AAGAC,IAAI;AACJ;;;AAGAC,YAAY,QACP,eAAe;AAEtB;;;AAGA,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAE3C;;;;;AAKA,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC;;;;;;;;;;;;;;;;;;AAkBA,OAAO,KAAKC,UAAU,MAAM,iBAAiB;AAE7C;;;;;;;;;;AAUA,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC;;;;;;;AAOA,OAAO,KAAKC,OAAO,MAAM,cAAc;AAEvC;;;;;;;;;;;;;;;;;;AAkBA,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC;;;AAGA,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC;;;;;;;;;;;;;;;;;;;;;;;AAuBA,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC;;;AAGA,OAAO,KAAKC,OAAO,MAAM,cAAc;AAEvC;;;AAGA,OAAO,KAAKC,qBAAqB,MAAM,4BAA4B;AAEnE;;;AAGA,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC;;;AAGA,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC;;;AAGA,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC;;;AAGA,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAE/C;;;AAGA,OAAO,KAAKC,cAAc,MAAM,qBAAqB;AAErD;;;AAGA,OAAO,KAAKC,uBAAuB,MAAM,8BAA8B;AAEvE;;;AAGA,OAAO,KAAKC,OAAO,MAAM,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WAAW;AAEjC;;;AAGA,OAAO,KAAKC,gBAAgB,MAAM,uBAAuB;AAEzD;;;AAGA,OAAO,KAAKC,IAAI,MAAM,WAAW;AAEjC;;;AAGA,OAAO,KAAKC,cAAc,MAAM,qBAAqB;AAErD;;;AAGA,OAAO,KAAKC,iBAAiB,MAAM,wBAAwB;AAE3D;;;AAGA,OAAO,KAAKC,eAAe,MAAM,sBAAsB;AAEvD;;;AAGA,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAE3C;;;AAGA,OAAO,KAAKC,UAAU,MAAM,iBAAiB;AAE7C;;;AAGA,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAE/C;;;AAGA,OAAO,KAAKC,QAAQ,MAAM,eAAe;AAEzC;;;AAGA,OAAO,KAAKC,YAAY,MAAM,mBAAmB;AAEjD;;;AAGA,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAE3C;;;AAGA,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC;;;;;;;;;;;;;;;;;AAiBA,OAAO,KAAKC,IAAI,MAAM,WAAW;AAEjC;;;;;AAKA,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC;;;;;AAKA,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC;;;AAGA,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC;;;AAGA,OAAO,KAAKC,mBAAmB,MAAM,0BAA0B;AAE/D;;;AAGA,OAAO,KAAKC,oBAAoB,MAAM,2BAA2B;AAEjE;;;AAGA,OAAO,KAAKC,KAAK,MAAM,YAAY","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/package.json b/backend/node_modules/effect/dist/esm/package.json new file mode 100644 index 0000000000000000000000000000000000000000..5e8d4f8b206ed6b50641a6b833fd656cd98e12ca --- /dev/null +++ b/backend/node_modules/effect/dist/esm/package.json @@ -0,0 +1,4 @@ +{ + "type": "module", + "sideEffects": [] +}