docs: 仓库链接指向本镜像仓库
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run

This commit is contained in:
TanTan committed 2026-11-13 09:27:07 +08:00
1 parent fa9c73363d
commit 2a69b23b47
18210 files changed
+5101211 -16

No files matched your search

@@ -0,0 +1 @@
{"version":3,"file":"sourcemap-segment.d.ts","sourceRoot":"","sources":["../src/sourcemap-segment.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG,MAAM,CAAC;AAC9B,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AACzB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AAEzB,MAAM,MAAM,gBAAgB,GACxB,CAAC,eAAe,CAAC,GACjB,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,GACzD,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;AAE1E,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC"}
@@ -0,0 +1,812 @@
import { expect, expectTypeOf, test } from "vitest";
import * as z from "zod/v4";
const empty = z.templateLiteral([]);
const hello = z.templateLiteral(["hello"]);
const world = z.templateLiteral(["", z.literal("world")]);
const one = z.templateLiteral([1]);
const two = z.templateLiteral(["", z.literal(2)]);
const onePointOne = z.templateLiteral([z.literal(1.1)]);
const truee = z.templateLiteral([true]);
const anotherTrue = z.templateLiteral(["", z.literal(true)]);
const falsee = z.templateLiteral([false]);
const anotherFalse = z.templateLiteral(["", z.literal(false)]);
const nulll = z.templateLiteral([null]);
const anotherNull = z.templateLiteral(["", z.null()]);
const undefinedd = z.templateLiteral([undefined]);
const anotherUndefined = z.templateLiteral(["", z.undefined()]);
const anyString = z.templateLiteral(["", z.string()]);
const lazyString = z.templateLiteral(["", z.lazy(() => z.string())]);
const anyNumber = z.templateLiteral(["", z.number()]);
const anyInt = z.templateLiteral(["", z.number().int()]);
// const anyFiniteNumber = z.templateLiteral(["", z.number().finite()]);
// const anyNegativeNumber = z.templateLiteral(["", z.number().negative()]);
// const anyPositiveNumber = z.templateLiteral(["", z.number().positive()]);
// const zeroButInADumbWay = z.templateLiteral(["", z.number().nonnegative().nonpositive()]);
// const finiteButInADumbWay = z.templateLiteral(["", z.number().min(5).max(10)]);
const bool = z.templateLiteral(["", z.boolean()]);
const bigone = z.templateLiteral(["", z.literal(BigInt(1))]);
const anyBigint = z.templateLiteral(["", z.bigint()]);
const nullableYo = z.templateLiteral(["", z.nullable(z.literal("yo"))]);
const nullableString = z.templateLiteral(["", z.nullable(z.string())]);
const optionalYeah = z.templateLiteral(["", z.literal("yeah").optional()]);
const optionalString = z.templateLiteral(["", z.string().optional()]);
const optionalNumber = z.templateLiteral(["", z.number().optional()]);
const nullishBruh = z.templateLiteral(["", z.literal("bruh").nullish()]);
const nullishString = z.templateLiteral(["", z.string().nullish()]);
const cuid = z.templateLiteral(["", z.string().cuid()]);
const cuidZZZ = z.templateLiteral(["", z.string().cuid(), "ZZZ"]);
const cuid2 = z.templateLiteral(["", z.string().cuid2()]);
const datetime = z.templateLiteral(["", z.string().datetime()]);
const email = z.templateLiteral(["", z.string().email()]);
// const ip = z.templateLiteral(["", z.string().ip()]);
const ipv4 = z.templateLiteral(["", z.string().ipv4()]);
const ipv6 = z.templateLiteral(["", z.string().ipv6()]);
const mac = z.templateLiteral(["", z.mac()]);
const ulid = z.templateLiteral(["", z.string().ulid()]);
const uuid = z.templateLiteral(["", z.string().uuid()]);
const stringAToZ = z.templateLiteral(["", z.string().regex(/^[a-z]+$/)]);
const stringStartsWith = z.templateLiteral(["", z.string().startsWith("hello")]);
const stringEndsWith = z.templateLiteral(["", z.string().endsWith("world")]);
const stringMax5 = z.templateLiteral(["", z.string().max(5)]);
const stringMin5 = z.templateLiteral(["", z.string().min(5)]);
const stringLen5 = z.templateLiteral(["", z.string().length(5)]);
const stringMin5Max10 = z.templateLiteral(["", z.string().min(5).max(10)]);
const stringStartsWithMax5 = z.templateLiteral(["", z.string().startsWith("hello").max(5)]);
const brandedString = z.templateLiteral(["", z.string().min(1).brand("myBrand")]);
// const anything = z.templateLiteral(["", z.any()]);
const url = z.templateLiteral(["https://", z.string().regex(/\w+/), ".", z.enum(["com", "net"])]);
const measurement = z.templateLiteral([
"",
z.number().finite(),
z.enum(["px", "em", "rem", "vh", "vw", "vmin", "vmax"]).optional(),
]);
const decimalEnum = z.templateLiteral(["", z.enum({ A: 1.2 })]);
// String(1e21) is "1e+21" — the `+` needs escaping too, or the pattern rejects its own enum value
const exponentEnum = z.templateLiteral(["", z.enum({ A: 1e21 })]);
const connectionString = z.templateLiteral([
"mongodb://",
z
.templateLiteral([
"",
z.string().regex(/\w+/).describe("username"),
":",
z.string().regex(/\w+/).describe("password"),
"@",
])
.optional(),
z.string().regex(/\w+/).describe("host"),
":",
z.number().finite().int().positive().describe("port"),
z
.templateLiteral([
"/",
z.string().regex(/\w+/).optional().describe("defaultauthdb"),
z
.templateLiteral([
"?",
z
.string()
.regex(/^\w+=\w+(&\w+=\w+)*$/)
.optional()
.describe("options"),
])
.optional(),
])
.optional(),
]);
test("template literal type inference", () => {
expectTypeOf<z.infer<typeof empty>>().toEqualTypeOf<``>();
expectTypeOf<z.infer<typeof hello>>().toEqualTypeOf<`hello`>();
expectTypeOf<z.infer<typeof world>>().toEqualTypeOf<`world`>();
expectTypeOf<z.infer<typeof one>>().toEqualTypeOf<`1`>();
expectTypeOf<z.infer<typeof two>>().toEqualTypeOf<`2`>();
expectTypeOf<z.infer<typeof truee>>().toEqualTypeOf<`true`>();
expectTypeOf<z.infer<typeof anotherTrue>>().toEqualTypeOf<`true`>();
expectTypeOf<z.infer<typeof falsee>>().toEqualTypeOf<`false`>();
expectTypeOf<z.infer<typeof anotherFalse>>().toEqualTypeOf<`false`>();
expectTypeOf<z.infer<typeof nulll>>().toEqualTypeOf<`null`>();
expectTypeOf<z.infer<typeof anotherNull>>().toEqualTypeOf<`null`>();
expectTypeOf<z.infer<typeof undefinedd>>().toEqualTypeOf<``>();
expectTypeOf<z.infer<typeof anotherUndefined>>().toEqualTypeOf<``>();
expectTypeOf<z.infer<typeof anyString>>().toEqualTypeOf<string>();
expectTypeOf<z.infer<typeof lazyString>>().toEqualTypeOf<string>();
expectTypeOf<z.infer<typeof anyNumber>>().toEqualTypeOf<`${number}`>();
expectTypeOf<z.infer<typeof anyInt>>().toEqualTypeOf<`${number}`>();
// expectTypeOf<z.infer<typeof anyFiniteNumber>>().toEqualTypeOf<`${number}`>();
// expectTypeOf<z.infer<typeof anyNegativeNumber>>().toEqualTypeOf<`${number}`>();
// expectTypeOf<z.infer<typeof anyPositiveNumber>>().toEqualTypeOf<`${number}`>();
// expectTypeOf<z.infer<typeof zeroButInADumbWay>>().toEqualTypeOf<`${number}`>();
// expectTypeOf<z.infer<typeof finiteButInADumbWay>>().toEqualTypeOf<`${number}`>();
expectTypeOf<z.infer<typeof bool>>().toEqualTypeOf<`true` | `false`>();
expectTypeOf<z.infer<typeof bigone>>().toEqualTypeOf<`${bigint}`>();
expectTypeOf<z.infer<typeof anyBigint>>().toEqualTypeOf<`${bigint}`>();
expectTypeOf<z.infer<typeof nullableYo>>().toEqualTypeOf<`yo` | `null`>();
expectTypeOf<z.infer<typeof nullableString>>().toEqualTypeOf<string>();
expectTypeOf<z.infer<typeof optionalYeah>>().toEqualTypeOf<`yeah` | ``>();
expectTypeOf<z.infer<typeof optionalString>>().toEqualTypeOf<string>();
expectTypeOf<z.infer<typeof optionalNumber>>().toEqualTypeOf<`${number}` | ``>();
expectTypeOf<z.infer<typeof nullishBruh>>().toEqualTypeOf<`bruh` | `null` | ``>();
expectTypeOf<z.infer<typeof nullishString>>().toEqualTypeOf<string>();
expectTypeOf<z.infer<typeof cuid>>().toEqualTypeOf<string>();
expectTypeOf<z.infer<typeof cuidZZZ>>().toEqualTypeOf<`${string}ZZZ`>();
expectTypeOf<z.infer<typeof cuid2>>().toEqualTypeOf<string>();
expectTypeOf<z.infer<typeof datetime>>().toEqualTypeOf<string>();
expectTypeOf<z.infer<typeof email>>().toEqualTypeOf<string>();
// expectTypeOf<z.infer<typeof ip>>().toEqualTypeOf<string>();
expectTypeOf<z.infer<typeof ipv4>>().toEqualTypeOf<string>();
expectTypeOf<z.infer<typeof ipv6>>().toEqualTypeOf<string>();
expectTypeOf<z.infer<typeof mac>>().toEqualTypeOf<string>();
expectTypeOf<z.infer<typeof ulid>>().toEqualTypeOf<string>();
expectTypeOf<z.infer<typeof uuid>>().toEqualTypeOf<string>();
expectTypeOf<z.infer<typeof stringAToZ>>().toEqualTypeOf<string>();
expectTypeOf<z.infer<typeof stringStartsWith>>().toEqualTypeOf<string>();
expectTypeOf<z.infer<typeof stringEndsWith>>().toEqualTypeOf<string>();
expectTypeOf<z.infer<typeof stringMax5>>().toEqualTypeOf<string>();
expectTypeOf<z.infer<typeof stringMin5>>().toEqualTypeOf<string>();
expectTypeOf<z.infer<typeof stringLen5>>().toEqualTypeOf<string>();
expectTypeOf<z.infer<typeof stringMin5Max10>>().toEqualTypeOf<string>();
expectTypeOf<z.infer<typeof stringStartsWithMax5>>().toEqualTypeOf<string>();
expectTypeOf<z.infer<typeof brandedString>>().toEqualTypeOf<`${string & z.core.$brand<"myBrand">}`>();
// expectTypeOf<z.infer<typeof anything>>().toEqualTypeOf<`${any}`>();
expectTypeOf<z.infer<typeof url>>().toEqualTypeOf<`https://${string}.com` | `https://${string}.net`>();
expectTypeOf<z.infer<typeof measurement>>().toEqualTypeOf<
| `${number}`
| `${number}px`
| `${number}em`
| `${number}rem`
| `${number}vh`
| `${number}vw`
| `${number}vmin`
| `${number}vmax`
>();
expectTypeOf<z.infer<typeof connectionString>>().toEqualTypeOf<
| `mongodb://${string}:${number}`
| `mongodb://${string}:${number}/${string}`
| `mongodb://${string}:${number}/${string}?${string}`
| `mongodb://${string}:${string}@${string}:${number}`
| `mongodb://${string}:${string}@${string}:${number}/${string}`
| `mongodb://${string}:${string}@${string}:${number}/${string}?${string}`
>();
});
test("template literal unsupported args", () => {
expect(() =>
// @ts-expect-error
z.templateLiteral([z.object({})])
).toThrow();
expect(() =>
// @ts-expect-error
z.templateLiteral([z.array(z.object({}))])
).toThrow();
expect(() =>
// @ts-expect-error
z.templateLiteral([z.union([z.object({}), z.string()])])
).toThrow();
// @ts-expect-error
expect(() => z.templateLiteral([z.date()])).toThrow();
expect(() =>
// @ts-expect-error
z.templateLiteral([z.custom<object>((_) => true)])
).toThrow();
expect(() =>
z.templateLiteral([
// @ts-expect-error
z.discriminatedUnion("discriminator", [z.object({}), z.object({})]),
])
).toThrow();
expect(() =>
// @ts-expect-error
z.templateLiteral([z.function()])
).toThrow();
expect(() =>
// @ts-expect-error
z.templateLiteral([z.instanceof(class MyClass {})])
).toThrow();
expect(() =>
// @ts-expect-error
z.templateLiteral([z.intersection(z.object({}), z.object({}))])
).toThrow();
expect(() =>
// @ts-expect-error
z.templateLiteral([z.map(z.string(), z.string())])
).toThrow();
expect(() =>
// @ts-expect-error
z.templateLiteral([z.nullable(z.object({}))])
).toThrow();
expect(() =>
// @ts-expect-error
z.templateLiteral([z.optional(z.object({}))])
).toThrow();
expect(() =>
// @ts-expect-error
z.templateLiteral([z.promise()])
).toThrow();
expect(() =>
// @ts-expect-error
z.templateLiteral([z.record(z.unknown())])
).toThrow();
expect(() =>
// @ts-expect-error
z.templateLiteral([z.set(z.string())])
).toThrow();
expect(() =>
// @ts-expect-error
z.templateLiteral([z.symbol()])
).toThrow();
expect(() =>
// @ts-expect-error
z.templateLiteral([z.tuple([z.string()])])
).toThrow();
expect(() =>
// @ts-expect-error
z.templateLiteral([z.unknown()])
).toThrow();
expect(() =>
// @ts-expect-error
z.templateLiteral([z.void()])
).toThrow();
expect(() =>
// @ts-expect-error
z.templateLiteral([z.never()])
).toThrow();
// @ts-expect-error
expect(() => z.templateLiteral([z.nan()])).toThrow();
expect(() =>
// @ts-expect-error
z.templateLiteral([z.pipe(z.string(), z.string())])
).toThrow();
expect(() =>
// @ts-expect-error
z.templateLiteral([z.preprocess(() => true, z.boolean())])
).toThrow();
expect(() =>
// @ts-expect-error
z.templateLiteral([z.object({}).brand("brand")])
).toThrow();
// these constraints aren't enforced but they shouldn't throw
z.templateLiteral([z.number().multipleOf(2)]);
z.templateLiteral([z.string().emoji()]);
z.templateLiteral([z.string().url()]);
z.templateLiteral([z.string().url()]);
z.templateLiteral([z.string().trim()]);
z.templateLiteral([z.string().includes("train")]);
z.templateLiteral([z.string().toLowerCase()]);
z.templateLiteral([z.string().toUpperCase()]);
});
test("template literal parsing - success - basic cases", () => {
expect(() => z.templateLiteral([]).parse(7)).toThrow();
empty.parse("");
hello.parse("hello");
world.parse("world");
one.parse("1");
two.parse("2");
onePointOne.parse("1.1");
truee.parse("true");
anotherTrue.parse("true");
falsee.parse("false");
anotherFalse.parse("false");
nulll.parse("null");
anotherNull.parse("null");
undefinedd.parse("undefined");
anotherUndefined.parse("undefined");
anyString.parse("blahblahblah");
anyString.parse("");
lazyString.parse("blahblahblah");
lazyString.parse("");
anyNumber.parse("123");
anyNumber.parse("1.23");
anyNumber.parse("0");
anyNumber.parse("-1.23");
anyNumber.parse("-123");
// anyNumber.parse("Infinity");
// anyNumber.parse("-Infinity");
anyInt.parse("123");
// anyInt.parse("-123");
// anyFiniteNumber.parse("123");
// anyFiniteNumber.parse("1.23");
// anyFiniteNumber.parse("0");
// anyFiniteNumber.parse("-1.23");
// anyFiniteNumber.parse("-123");
// anyNegativeNumber.parse("-123");
// anyNegativeNumber.parse("-1.23");
// anyNegativeNumber.parse("-Infinity");
// anyPositiveNumber.parse("123");
// anyPositiveNumber.parse("1.23");
// anyPositiveNumber.parse("Infinity");
// zeroButInADumbWay.parse("0");
// zeroButInADumbWay.parse("00000");
// finiteButInADumbWay.parse("5");
// finiteButInADumbWay.parse("10");
// finiteButInADumbWay.parse("6.66");
bool.parse("true");
bool.parse("false");
bigone.parse("1");
anyBigint.parse("123456");
anyBigint.parse("0");
// anyBigint.parse("-123456");
nullableYo.parse("yo");
nullableYo.parse("null");
nullableString.parse("abc");
nullableString.parse("null");
optionalYeah.parse("yeah");
optionalYeah.parse("");
optionalString.parse("abc");
optionalString.parse("");
optionalNumber.parse("123");
optionalNumber.parse("1.23");
optionalNumber.parse("0");
optionalNumber.parse("-1.23");
optionalNumber.parse("-123");
// optionalNumber.parse("Infinity");
// optionalNumber.parse("-Infinity");
nullishBruh.parse("bruh");
nullishBruh.parse("null");
nullishBruh.parse("");
cuid.parse("cjld2cyuq0000t3rmniod1foy");
cuidZZZ.parse("cjld2cyuq0000t3rmniod1foyZZZ");
cuid2.parse("tz4a98xxat96iws9zmbrgj3a");
datetime.parse(new Date().toISOString());
email.parse("info@example.com");
// ip.parse("213.174.246.205");
// ip.parse("c359:f57c:21e5:39eb:1187:e501:f936:b452");
ipv4.parse("213.174.246.205");
ipv6.parse("c359:f57c:21e5:39eb:1187:e501:f936:b452");
mac.parse("00:1A:2B:3C:4D:5E");
ulid.parse("01GW3D2QZJBYB6P1Z1AE997VPW");
uuid.parse("808989fd-3a6e-4af2-b607-737323a176f6");
stringAToZ.parse("asudgaskhdgashd");
stringStartsWith.parse("hello world");
stringEndsWith.parse("hello world");
stringMax5.parse("hello");
stringMin5.parse("hello");
stringLen5.parse("hello");
stringMin5Max10.parse("hello worl");
stringStartsWithMax5.parse("hello");
brandedString.parse("branded string");
});
test("template literal parsing - failure - basic cases", () => {
expect(() => empty.parse("a")).toThrow();
expect(() => hello.parse("hello!")).toThrow();
expect(() => hello.parse("!hello")).toThrow();
expect(() => world.parse("world!")).toThrow();
expect(() => world.parse("!world")).toThrow();
expect(() => one.parse("2")).toThrow();
expect(() => one.parse("12")).toThrow();
expect(() => one.parse("21")).toThrow();
expect(() => onePointOne.parse("1s1")).toThrow();
expect(() => two.parse("1")).toThrow();
expect(() => two.parse("21")).toThrow();
expect(() => two.parse("12")).toThrow();
expect(() => truee.parse("false")).toThrow();
expect(() => truee.parse("1true")).toThrow();
expect(() => truee.parse("true1")).toThrow();
expect(() => anotherTrue.parse("false")).toThrow();
expect(() => anotherTrue.parse("1true")).toThrow();
expect(() => anotherTrue.parse("true1")).toThrow();
expect(() => falsee.parse("true")).toThrow();
expect(() => falsee.parse("1false")).toThrow();
expect(() => falsee.parse("false1")).toThrow();
expect(() => anotherFalse.parse("true")).toThrow();
expect(() => anotherFalse.parse("1false")).toThrow();
expect(() => anotherFalse.parse("false1")).toThrow();
expect(() => nulll.parse("123")).toThrow();
expect(() => nulll.parse("null1")).toThrow();
expect(() => nulll.parse("1null")).toThrow();
expect(() => anotherNull.parse("123")).toThrow();
expect(() => anotherNull.parse("null1")).toThrow();
expect(() => anotherNull.parse("1null")).toThrow();
expect(() => undefinedd.parse("123")).toThrow();
expect(() => undefinedd.parse("undefined1")).toThrow();
expect(() => undefinedd.parse("1undefined")).toThrow();
expect(() => anotherUndefined.parse("123")).toThrow();
expect(() => anotherUndefined.parse("undefined1")).toThrow();
expect(() => anotherUndefined.parse("1undefined")).toThrow();
expect(() => anyNumber.parse("2a")).toThrow();
expect(() => anyNumber.parse("a2")).toThrow();
expect(() => anyNumber.parse("-2a")).toThrow();
expect(() => anyNumber.parse("a-2")).toThrow();
expect(() => anyNumber.parse("2.5a")).toThrow();
expect(() => anyNumber.parse("a2.5")).toThrow();
expect(() => anyNumber.parse("Infinitya")).toThrow();
expect(() => anyNumber.parse("aInfinity")).toThrow();
expect(() => anyNumber.parse("-Infinitya")).toThrow();
expect(() => anyNumber.parse("a-Infinity")).toThrow();
expect(() => anyNumber.parse("2e5")).toThrow();
expect(() => anyNumber.parse("2e-5")).toThrow();
expect(() => anyNumber.parse("2e+5")).toThrow();
expect(() => anyNumber.parse("-2e5")).toThrow();
expect(() => anyNumber.parse("-2e-5")).toThrow();
expect(() => anyNumber.parse("-2e+5")).toThrow();
expect(() => anyNumber.parse("2.1e5")).toThrow();
expect(() => anyNumber.parse("2.1e-5")).toThrow();
expect(() => anyNumber.parse("2.1e+5")).toThrow();
expect(() => anyNumber.parse("-2.1e5")).toThrow();
expect(() => anyNumber.parse("-2.1e-5")).toThrow();
expect(() => anyNumber.parse("-2.1e+5")).toThrow();
expect(() => anyNumber.parse("-Infinity")).toThrow();
expect(() => anyNumber.parse("Infinity")).toThrow();
expect(() => anyInt.parse("1.23")).toThrow();
expect(() => anyInt.parse("-1.23")).toThrow();
expect(() => anyInt.parse("d1")).toThrow();
expect(() => anyInt.parse("1d")).toThrow();
// expect(() => anyFiniteNumber.parse("Infinity")).toThrow();
// expect(() => anyFiniteNumber.parse("-Infinity")).toThrow();
// expect(() => anyFiniteNumber.parse("123a")).toThrow();
// expect(() => anyFiniteNumber.parse("a123")).toThrow();
// expect(() => anyNegativeNumber.parse("0")).toThrow();
// expect(() => anyNegativeNumber.parse("1")).toThrow();
// expect(() => anyNegativeNumber.parse("Infinity")).toThrow();
// expect(() => anyPositiveNumber.parse("0")).toThrow();
// expect(() => anyPositiveNumber.parse("-1")).toThrow();
// expect(() => anyPositiveNumber.parse("-Infinity")).toThrow();
// expect(() => zeroButInADumbWay.parse("1")).toThrow();
// expect(() => zeroButInADumbWay.parse("-1")).toThrow();
// expect(() => finiteButInADumbWay.parse("Infinity")).toThrow();
// expect(() => finiteButInADumbWay.parse("-Infinity")).toThrow();
// expect(() => finiteButInADumbWay.parse("-5")).toThrow();
// expect(() => finiteButInADumbWay.parse("10a")).toThrow();
// expect(() => finiteButInADumbWay.parse("a10")).toThrow();
expect(() => bool.parse("123")).toThrow();
expect(() => bigone.parse("2")).toThrow();
expect(() => bigone.parse("c1")).toThrow();
expect(() => anyBigint.parse("1.23")).toThrow();
expect(() => anyBigint.parse("-1.23")).toThrow();
expect(() => anyBigint.parse("c123")).toThrow();
expect(() => nullableYo.parse("yo1")).toThrow();
expect(() => nullableYo.parse("1yo")).toThrow();
expect(() => nullableYo.parse("null1")).toThrow();
expect(() => nullableYo.parse("1null")).toThrow();
expect(() => optionalYeah.parse("yeah1")).toThrow();
expect(() => optionalYeah.parse("1yeah")).toThrow();
expect(() => optionalYeah.parse("undefined")).toThrow();
expect(() => optionalNumber.parse("123a")).toThrow();
expect(() => optionalNumber.parse("a123")).toThrow();
// expect(() => optionalNumber.parse("Infinitya")).toThrow();
// expect(() => optionalNumber.parse("aInfinity")).toThrow();
expect(() => nullishBruh.parse("bruh1")).toThrow();
expect(() => nullishBruh.parse("1bruh")).toThrow();
expect(() => nullishBruh.parse("null1")).toThrow();
expect(() => nullishBruh.parse("1null")).toThrow();
expect(() => nullishBruh.parse("undefined")).toThrow();
expect(() => cuid.parse("bjld2cyuq0000t3rmniod1foy")).toThrow();
expect(() => cuid.parse("cjld2")).toThrow();
expect(() => cuid.parse("cjld2 cyu")).toThrow();
expect(() => cuid.parse("cjld2cyuq0000t3rmniod1foy ")).toThrow();
expect(() => cuid.parse("1cjld2cyuq0000t3rmniod1foy")).toThrow();
expect(() => cuidZZZ.parse("cjld2cyuq0000t3rmniod1foy")).toThrow();
expect(() => cuidZZZ.parse("cjld2cyuq0000t3rmniod1foyZZY")).toThrow();
expect(() => cuidZZZ.parse("cjld2cyuq0000t3rmniod1foyZZZ1")).toThrow();
expect(() => cuidZZZ.parse("1cjld2cyuq0000t3rmniod1foyZZZ")).toThrow();
expect(() => cuid2.parse("A9z4a98xxat96iws9zmbrgj3a")).toThrow();
expect(() => cuid2.parse("tz4a98xxat96iws9zmbrgj3!")).toThrow();
expect(() => datetime.parse("2022-01-01 00:00:00")).toThrow();
expect(() => email.parse("info@example.com@")).toThrow();
// expect(() => ip.parse("213.174.246:205")).toThrow();
// expect(() => ip.parse("c359.f57c:21e5:39eb:1187:e501:f936:b452")).toThrow();
expect(() => ipv4.parse("1213.174.246.205")).toThrow();
expect(() => ipv4.parse("c359:f57c:21e5:39eb:1187:e501:f936:b452")).toThrow();
expect(() => ipv6.parse("c359:f57c:21e5:39eb:1187:e501:f936:b4521")).toThrow();
expect(() => ipv6.parse("213.174.246.205")).toThrow();
expect(() => mac.parse("00:1A:2B:3C:4D:5E:6A:7B")).toThrow();
expect(() => mac.parse("00:1A:2B:3C")).toThrow();
expect(() => ulid.parse("01GW3D2QZJBYB6P1Z1AE997VPW!")).toThrow();
expect(() => uuid.parse("808989fd-3a6e-4af2-b607-737323a176f6Z")).toThrow();
expect(() => uuid.parse("Z808989fd-3a6e-4af2-b607-737323a176f6")).toThrow();
expect(() => stringAToZ.parse("asdasdasd1")).toThrow();
expect(() => stringAToZ.parse("1asdasdasd")).toThrow();
expect(() => stringStartsWith.parse("ahello")).toThrow();
expect(() => stringEndsWith.parse("worlda")).toThrow();
expect(() => stringMax5.parse("123456")).toThrow();
expect(() => stringMin5.parse("1234")).toThrow();
expect(() => stringLen5.parse("123456")).toThrow();
expect(() => stringLen5.parse("1234")).toThrow();
expect(() => stringMin5Max10.parse("1234")).toThrow();
expect(() => stringMin5Max10.parse("12345678901")).toThrow();
// the "startswith" overrides the max length
// expect(() => stringStartsWithMax5.parse("hello1")).toThrow();
expect(() => stringStartsWithMax5.parse("1hell")).toThrow();
expect(() => brandedString.parse("")).toThrow();
});
test("regexes", () => {
expect(empty._zod.pattern.source).toMatchInlineSnapshot(`"^$"`);
expect(hello._zod.pattern.source).toMatchInlineSnapshot(`"^hello$"`);
expect(world._zod.pattern.source).toMatchInlineSnapshot(`"^(world)$"`);
expect(one._zod.pattern.source).toMatchInlineSnapshot(`"^1$"`);
expect(two._zod.pattern.source).toMatchInlineSnapshot(`"^(2)$"`);
expect(truee._zod.pattern.source).toMatchInlineSnapshot(`"^true$"`);
expect(anotherTrue._zod.pattern.source).toMatchInlineSnapshot(`"^(true)$"`);
expect(falsee._zod.pattern.source).toMatchInlineSnapshot(`"^false$"`);
expect(anotherFalse._zod.pattern.source).toMatchInlineSnapshot(`"^(false)$"`);
expect(nulll._zod.pattern.source).toMatchInlineSnapshot(`"^null$"`);
expect(anotherNull._zod.pattern.source).toMatchInlineSnapshot(`"^null$"`);
expect(undefinedd._zod.pattern.source).toMatchInlineSnapshot(`"^undefined$"`);
expect(anotherUndefined._zod.pattern.source).toMatchInlineSnapshot(`"^undefined$"`);
expect(anyString._zod.pattern.source).toMatchInlineSnapshot(`"^[\\s\\S]{0,}$"`);
expect(lazyString._zod.pattern.source).toMatchInlineSnapshot(`"^[\\s\\S]{0,}$"`);
expect(anyNumber._zod.pattern.source).toMatchInlineSnapshot(`"^-?\\d+(?:\\.\\d+)?$"`);
expect(anyInt._zod.pattern.source).toMatchInlineSnapshot(`"^-?\\d+$"`);
// expect(anyFiniteNumber._zod.pattern.source).toMatchInlineSnapshot(`"^-?\\d+(?:\\.\\d+)?$"`);
// expect(anyNegativeNumber._zod.pattern.source).toMatchInlineSnapshot(`"^-?\\d+(?:\\.\\d+)?$"`);
// expect(anyPositiveNumber._zod.pattern.source).toMatchInlineSnapshot(`"^-?\\d+(?:\\.\\d+)?$"`);
// expect(zeroButInADumbWay._zod.pattern.source).toMatchInlineSnapshot(`"^-?\\d+(?:\\.\\d+)?$"`);
// expect(finiteButInADumbWay._zod.pattern.source).toMatchInlineSnapshot(`"^-?\\d+(?:\\.\\d+)?$"`);
expect(bool._zod.pattern.source).toMatchInlineSnapshot(`"^(?:true|false)$"`);
expect(bigone._zod.pattern.source).toMatchInlineSnapshot(`"^(1)$"`);
expect(anyBigint._zod.pattern.source).toMatchInlineSnapshot(`"^-?\\d+n?$"`);
expect(nullableYo._zod.pattern.source).toMatchInlineSnapshot(`"^((yo)|null)$"`);
expect(nullableString._zod.pattern.source).toMatchInlineSnapshot(`"^([\\s\\S]{0,}|null)$"`);
expect(optionalYeah._zod.pattern.source).toMatchInlineSnapshot(`"^((yeah))?$"`);
expect(optionalString._zod.pattern.source).toMatchInlineSnapshot(`"^([\\s\\S]{0,})?$"`);
expect(optionalNumber._zod.pattern.source).toMatchInlineSnapshot(`"^(-?\\d+(?:\\.\\d+)?)?$"`);
expect(nullishBruh._zod.pattern.source).toMatchInlineSnapshot(`"^(((bruh)|null))?$"`);
expect(nullishString._zod.pattern.source).toMatchInlineSnapshot(`"^(([\\s\\S]{0,}|null))?$"`);
expect(cuid._zod.pattern.source).toMatchInlineSnapshot(`"^[cC][0-9a-z]{6,}$"`);
expect(cuidZZZ._zod.pattern.source).toMatchInlineSnapshot(`"^[cC][0-9a-z]{6,}ZZZ$"`);
expect(cuid2._zod.pattern.source).toMatchInlineSnapshot(`"^[0-9a-z]+$"`);
expect(datetime._zod.pattern.source).toMatchInlineSnapshot(
`"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"`
);
expect(email._zod.pattern.source).toMatchInlineSnapshot(
`"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"`
);
// expect(ip._zod.pattern.source).toMatchInlineSnapshot(
// `"^(^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$)|(^(([a-fA-F0-9]{1,4}:){7}|::([a-fA-F0-9]{1,4}:){0,6}|([a-fA-F0-9]{1,4}:){1}:([a-fA-F0-9]{1,4}:){0,5}|([a-fA-F0-9]{1,4}:){2}:([a-fA-F0-9]{1,4}:){0,4}|([a-fA-F0-9]{1,4}:){3}:([a-fA-F0-9]{1,4}:){0,3}|([a-fA-F0-9]{1,4}:){4}:([a-fA-F0-9]{1,4}:){0,2}|([a-fA-F0-9]{1,4}:){5}:([a-fA-F0-9]{1,4}:){0,1})([a-fA-F0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$)$"`
// );
expect(ipv4._zod.pattern.source).toMatchInlineSnapshot(
`"^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"`
);
expect(ipv6._zod.pattern.source).toMatchInlineSnapshot(
`"^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$"`
);
expect(mac._zod.pattern.source).toMatchInlineSnapshot(
`"^(?:[0-9A-F]{2}:){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}:){5}[0-9a-f]{2}$"`
);
expect(ulid._zod.pattern.source).toMatchInlineSnapshot(`"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$"`);
expect(uuid._zod.pattern.source).toMatchInlineSnapshot(
`"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"`
);
expect(stringAToZ._zod.pattern.source).toMatchInlineSnapshot(`"^[a-z]+$"`);
expect(stringStartsWith._zod.pattern.source).toMatchInlineSnapshot(`"^hello.*$"`);
expect(stringEndsWith._zod.pattern.source).toMatchInlineSnapshot(`"^.*world$"`);
expect(stringMax5._zod.pattern.source).toMatchInlineSnapshot(`"^[\\s\\S]{0,5}$"`);
expect(stringMin5._zod.pattern.source).toMatchInlineSnapshot(`"^[\\s\\S]{5,}$"`);
expect(stringLen5._zod.pattern.source).toMatchInlineSnapshot(`"^[\\s\\S]{5,5}$"`);
expect(stringMin5Max10._zod.pattern.source).toMatchInlineSnapshot(`"^[\\s\\S]{5,10}$"`);
expect(brandedString._zod.pattern.source).toMatchInlineSnapshot(`"^[\\s\\S]{1,}$"`);
expect(url._zod.pattern.source).toMatchInlineSnapshot(`"^https:\\/\\/\\w+\\.(com|net)$"`);
expect(measurement._zod.pattern.source).toMatchInlineSnapshot(`"^-?\\d+(?:\\.\\d+)?((px|em|rem|vh|vw|vmin|vmax))?$"`);
expect(decimalEnum._zod.pattern.source).toMatchInlineSnapshot(`"^(1\\.2)$"`);
expect(exponentEnum._zod.pattern.source).toMatchInlineSnapshot(`"^(1e\\+21)$"`);
expect(connectionString._zod.pattern.source).toMatchInlineSnapshot(
`"^mongodb:\\/\\/(\\w+:\\w+@)?\\w+:-?\\d+(\\/(\\w+)?(\\?(\\w+=\\w+(&\\w+=\\w+)*)?)?)?$"`
);
});
test("template literal parsing - success - complex cases", () => {
url.parse("https://example.com");
url.parse("https://speedtest.net");
exponentEnum.parse("1e+21");
// measurement.parse(1);
// measurement.parse(1.1);
// measurement.parse(0);
// measurement.parse(-1.1);
// measurement.parse(-1);
measurement.parse("1");
measurement.parse("1.1");
measurement.parse("0");
measurement.parse("-1");
measurement.parse("-1.1");
measurement.parse("1px");
measurement.parse("1.1px");
measurement.parse("0px");
measurement.parse("-1px");
measurement.parse("-1.1px");
measurement.parse("1em");
measurement.parse("1.1em");
measurement.parse("0em");
measurement.parse("-1em");
measurement.parse("-1.1em");
measurement.parse("1rem");
measurement.parse("1.1rem");
measurement.parse("0rem");
measurement.parse("-1rem");
measurement.parse("-1.1rem");
measurement.parse("1vh");
measurement.parse("1.1vh");
measurement.parse("0vh");
measurement.parse("-1vh");
measurement.parse("-1.1vh");
measurement.parse("1vw");
measurement.parse("1.1vw");
measurement.parse("0vw");
measurement.parse("-1vw");
measurement.parse("-1.1vw");
measurement.parse("1vmin");
measurement.parse("1.1vmin");
measurement.parse("0vmin");
measurement.parse("-1vmin");
measurement.parse("-1.1vmin");
measurement.parse("1vmax");
measurement.parse("1.1vmax");
measurement.parse("0vmax");
measurement.parse("-1vmax");
measurement.parse("-1.1vmax");
connectionString.parse("mongodb://host:1234");
connectionString.parse("mongodb://host:1234/");
connectionString.parse("mongodb://host:1234/defaultauthdb");
connectionString.parse("mongodb://host:1234/defaultauthdb?authSource=admin");
connectionString.parse("mongodb://host:1234/defaultauthdb?authSource=admin&connectTimeoutMS=300000");
connectionString.parse("mongodb://host:1234/?authSource=admin");
connectionString.parse("mongodb://host:1234/?authSource=admin&connectTimeoutMS=300000");
connectionString.parse("mongodb://username:password@host:1234");
connectionString.parse("mongodb://username:password@host:1234/");
connectionString.parse("mongodb://username:password@host:1234/defaultauthdb");
connectionString.parse("mongodb://username:password@host:1234/defaultauthdb?authSource=admin");
connectionString.parse(
"mongodb://username:password@host:1234/defaultauthdb?authSource=admin&connectTimeoutMS=300000"
);
connectionString.parse("mongodb://username:password@host:1234/?authSource=admin");
connectionString.parse("mongodb://username:password@host:1234/?authSource=admin&connectTimeoutMS=300000");
});
test("template literal parsing - failure - complex cases", () => {
expect(() => url.parse("http://example.com")).toThrow();
expect(() => url.parse("https://.com")).toThrow();
expect(() => url.parse("https://examplecom")).toThrow();
expect(() => url.parse("https://example.org")).toThrow();
expect(() => url.parse("https://example.net.il")).toThrow();
expect(() => measurement.parse("1.1.1")).toThrow();
expect(() => measurement.parse("Infinity")).toThrow();
expect(() => measurement.parse("-Infinity")).toThrow();
expect(() => measurement.parse("NaN")).toThrow();
expect(() => measurement.parse("1%")).toThrow();
expect(() => decimalEnum.parse("1x2")).toThrow();
expect(() => exponentEnum.parse("1e21")).toThrow();
expect(() => connectionString.parse("mongod://host:1234")).toThrow();
expect(() => connectionString.parse("mongodb://:1234")).toThrow();
expect(() => connectionString.parse("mongodb://host1234")).toThrow();
expect(() => connectionString.parse("mongodb://host:d234")).toThrow();
expect(() => connectionString.parse("mongodb://host:12.34")).toThrow();
// Note: template literal regex currently allows negative numbers despite .positive() constraint
// This is a known limitation where template literals use regex patterns directly
// expect(() => connectionString.parse("mongodb://host:-1234")).toThrow();
// expect(() => connectionString.parse("mongodb://host:-12.34")).toThrow();
expect(() => connectionString.parse("mongodb://host:")).toThrow();
expect(() => connectionString.parse("mongodb://:password@host:1234")).toThrow();
expect(() => connectionString.parse("mongodb://usernamepassword@host:1234")).toThrow();
expect(() => connectionString.parse("mongodb://username:@host:1234")).toThrow();
expect(() => connectionString.parse("mongodb://@host:1234")).toThrow();
expect(() => connectionString.parse("mongodb://host:1234/defaultauthdb?authSourceadmin")).toThrow();
expect(() => connectionString.parse("mongodb://host:1234/?authSourceadmin")).toThrow();
expect(() => connectionString.parse("mongodb://host:1234/defaultauthdb?&authSource=admin")).toThrow();
expect(() => connectionString.parse("mongodb://host:1234/?&authSource=admin")).toThrow();
});
test("template literal parsing - failure - issue format", () => {
expect(anotherNull.safeParse("1null")).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"code": "invalid_format",
"format": "template_literal",
"pattern": "^null$",
"path": [],
"message": "Invalid input"
}
]],
"success": false,
}
`);
expect(cuidZZZ.safeParse("1cjld2cyuq0000t3rmniod1foyZZZ")).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"code": "invalid_format",
"format": "template_literal",
"pattern": "^[cC][0-9a-z]{6,}ZZZ$",
"path": [],
"message": "Invalid input"
}
]],
"success": false,
}
`);
expect(stringMin5Max10.safeParse("1234")).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"code": "invalid_format",
"format": "template_literal",
"pattern": "^[\\\\s\\\\S]{5,10}$",
"path": [],
"message": "Invalid input"
}
]],
"success": false,
}
`);
expect(connectionString.safeParse("mongodb://host:1234/defaultauthdb?authSourceadmin")).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"code": "invalid_format",
"format": "template_literal",
"pattern": "^mongodb:\\\\/\\\\/(\\\\w+:\\\\w+@)?\\\\w+:-?\\\\d+(\\\\/(\\\\w+)?(\\\\?(\\\\w+=\\\\w+(&\\\\w+=\\\\w+)*)?)?)?$",
"path": [],
"message": "Invalid input"
}
]],
"success": false,
}
`);
expect(stringStartsWithMax5.safeParse("1hell")).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"code": "invalid_format",
"format": "template_literal",
"pattern": "^hello.*$",
"path": [],
"message": "Invalid input"
}
]],
"success": false,
}
`);
});
test("part patterns fold checks through wrappers and unions", () => {
// a constrained string keeps its bounds under a wrapper and inside a union
const wrapped = z.templateLiteral(["a-", z.string().min(2).max(3).optional()]);
expect(wrapped.safeParse("a-").success).toBe(true);
expect(wrapped.safeParse("a-xy").success).toBe(true);
expect(wrapped.safeParse("a-x").success).toBe(false);
expect(wrapped.safeParse("a-wxyz").success).toBe(false);
const union = z.templateLiteral(["", z.union([z.string().regex(/^[a-c]+$/), z.number().int()])]);
expect(union.safeParse("abc").success).toBe(true);
expect(union.safeParse("12").success).toBe(true);
expect(union.safeParse("xyz").success).toBe(false);
expect(union.safeParse("1.5").success).toBe(false);
// an empty length range matches nothing rather than building an invalid quantifier
const empty = z.templateLiteral(["", z.string().min(8).length(5)]);
expect(empty.safeParse("abcde").success).toBe(false);
// lazy resolves its inner schema on the internals, not the def
const lazy = z.templateLiteral(["", z.lazy(() => z.string().min(2)).optional()]);
expect(lazy.safeParse("x").success).toBe(false);
expect(lazy.safeParse("xy").success).toBe(true);
});
test("an embedded email does not constrain the other parts", () => {
const schema = z.templateLiteral([z.email(), "|", z.string()]);
expect(schema.safeParse("a@b.cc|a..b").success).toBe(true);
expect(schema.safeParse("a@b.cc|xy").success).toBe(true);
expect(schema.safeParse("a..b@b.cc|xy").success).toBe(false);
expect(schema.safeParse(".a@b.cc|xy").success).toBe(false);
});
@@ -0,0 +1,109 @@
{
"name": "htmlparser2",
"version": "10.0.0",
"description": "Fast & forgiving HTML/XML parser",
"keywords": [
"html",
"parser",
"streams",
"xml",
"dom",
"rss",
"feed",
"atom"
],
"repository": {
"type": "git",
"url": "git://github.com/fb55/htmlparser2.git"
},
"funding": [
"https://github.com/fb55/htmlparser2?sponsor=1",
{
"type": "github",
"url": "https://github.com/sponsors/fb55"
}
],
"license": "MIT",
"author": "Felix Boehm <me@feedic.com>",
"sideEffects": false,
"type": "module",
"exports": {
".": {
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/commonjs/index.d.ts",
"default": "./dist/commonjs/index.js"
}
},
"./WritableStream": {
"import": {
"types": "./dist/esm/WritableStream.d.ts",
"default": "./dist/esm/WritableStream.js"
},
"require": {
"types": "./dist/commonjs/WritableStream.d.ts",
"default": "./dist/commonjs/WritableStream.js"
}
}
},
"main": "./dist/commonjs/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/commonjs/index.d.ts",
"files": [
"WritableStream.js",
"dist",
"src"
],
"scripts": {
"build": "tshy",
"format": "npm run format:es && npm run format:prettier",
"format:es": "npm run lint:es -- --fix",
"format:prettier": "npm run format:prettier:raw -- --write",
"format:prettier:raw": "prettier '**/*.{ts,md,json,yml}'",
"lint": "npm run lint:es && npm run lint:ts && npm run lint:prettier",
"lint:es": "eslint src",
"lint:prettier": "npm run format:prettier:raw -- --check",
"lint:ts": "tsc --noEmit",
"prepare": "npm run build",
"test": "npm run test:vi && npm run lint",
"test:vi": "vitest run"
},
"prettier": {
"tabWidth": 4
},
"dependencies": {
"domelementtype": "^2.3.0",
"domhandler": "^5.0.3",
"domutils": "^3.2.1",
"entities": "^6.0.0"
},
"devDependencies": {
"@types/node": "^22.10.2",
"@typescript-eslint/eslint-plugin": "^8.18.1",
"@typescript-eslint/parser": "^8.18.1",
"@vitest/coverage-v8": "^2.1.8",
"eslint": "^8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-n": "^17.15.1",
"eslint-plugin-unicorn": "^56.0.1",
"prettier": "^3.4.2",
"tshy": "^3.0.2",
"typescript": "^5.7.2",
"vitest": "^2.0.2"
},
"tshy": {
"exclude": [
"**/*.spec.ts",
"**/__fixtures__/*",
"**/__tests__/*",
"**/__snapshots__/*"
],
"exports": {
".": "./src/index.ts",
"./WritableStream": "./src/WritableStream.ts"
}
}
}
@@ -0,0 +1,374 @@
/**
* @fileoverview Disallows or enforces spaces inside of parentheses.
* @author Jonathan Rajavuori
* @deprecated in ESLint v8.53.0
*/
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "space-in-parens",
url: "https://eslint.style/rules/space-in-parens",
},
},
],
},
type: "layout",
docs: {
description: "Enforce consistent spacing inside parentheses",
recommended: false,
url: "https://eslint.org/docs/latest/rules/space-in-parens",
},
fixable: "whitespace",
schema: [
{
enum: ["always", "never"],
},
{
type: "object",
properties: {
exceptions: {
type: "array",
items: {
enum: ["{}", "[]", "()", "empty"],
},
uniqueItems: true,
},
},
additionalProperties: false,
},
],
messages: {
missingOpeningSpace: "There must be a space after this paren.",
missingClosingSpace: "There must be a space before this paren.",
rejectedOpeningSpace: "There should be no space after this paren.",
rejectedClosingSpace: "There should be no space before this paren.",
},
},
create(context) {
const ALWAYS = context.options[0] === "always",
exceptionsArrayOptions =
(context.options[1] && context.options[1].exceptions) || [],
options = {};
let exceptions;
if (exceptionsArrayOptions.length) {
options.braceException = exceptionsArrayOptions.includes("{}");
options.bracketException = exceptionsArrayOptions.includes("[]");
options.parenException = exceptionsArrayOptions.includes("()");
options.empty = exceptionsArrayOptions.includes("empty");
}
/**
* Produces an object with the opener and closer exception values
* @returns {Object} `openers` and `closers` exception values
* @private
*/
function getExceptions() {
const openers = [],
closers = [];
if (options.braceException) {
openers.push("{");
closers.push("}");
}
if (options.bracketException) {
openers.push("[");
closers.push("]");
}
if (options.parenException) {
openers.push("(");
closers.push(")");
}
if (options.empty) {
openers.push(")");
closers.push("(");
}
return {
openers,
closers,
};
}
//--------------------------------------------------------------------------
// Helpers
//--------------------------------------------------------------------------
const sourceCode = context.sourceCode;
/**
* Determines if a token is one of the exceptions for the opener paren
* @param {Object} token The token to check
* @returns {boolean} True if the token is one of the exceptions for the opener paren
*/
function isOpenerException(token) {
return exceptions.openers.includes(token.value);
}
/**
* Determines if a token is one of the exceptions for the closer paren
* @param {Object} token The token to check
* @returns {boolean} True if the token is one of the exceptions for the closer paren
*/
function isCloserException(token) {
return exceptions.closers.includes(token.value);
}
/**
* Determines if an opening paren is immediately followed by a required space
* @param {Object} openingParenToken The paren token
* @param {Object} tokenAfterOpeningParen The token after it
* @returns {boolean} True if the opening paren is missing a required space
*/
function openerMissingSpace(openingParenToken, tokenAfterOpeningParen) {
if (
sourceCode.isSpaceBetween(
openingParenToken,
tokenAfterOpeningParen,
)
) {
return false;
}
if (
!options.empty &&
astUtils.isClosingParenToken(tokenAfterOpeningParen)
) {
return false;
}
if (ALWAYS) {
return !isOpenerException(tokenAfterOpeningParen);
}
return isOpenerException(tokenAfterOpeningParen);
}
/**
* Determines if an opening paren is immediately followed by a disallowed space
* @param {Object} openingParenToken The paren token
* @param {Object} tokenAfterOpeningParen The token after it
* @returns {boolean} True if the opening paren has a disallowed space
*/
function openerRejectsSpace(openingParenToken, tokenAfterOpeningParen) {
if (
!astUtils.isTokenOnSameLine(
openingParenToken,
tokenAfterOpeningParen,
)
) {
return false;
}
if (tokenAfterOpeningParen.type === "Line") {
return false;
}
if (
!sourceCode.isSpaceBetween(
openingParenToken,
tokenAfterOpeningParen,
)
) {
return false;
}
if (ALWAYS) {
return isOpenerException(tokenAfterOpeningParen);
}
return !isOpenerException(tokenAfterOpeningParen);
}
/**
* Determines if a closing paren is immediately preceded by a required space
* @param {Object} tokenBeforeClosingParen The token before the paren
* @param {Object} closingParenToken The paren token
* @returns {boolean} True if the closing paren is missing a required space
*/
function closerMissingSpace(
tokenBeforeClosingParen,
closingParenToken,
) {
if (
sourceCode.isSpaceBetween(
tokenBeforeClosingParen,
closingParenToken,
)
) {
return false;
}
if (
!options.empty &&
astUtils.isOpeningParenToken(tokenBeforeClosingParen)
) {
return false;
}
if (ALWAYS) {
return !isCloserException(tokenBeforeClosingParen);
}
return isCloserException(tokenBeforeClosingParen);
}
/**
* Determines if a closer paren is immediately preceded by a disallowed space
* @param {Object} tokenBeforeClosingParen The token before the paren
* @param {Object} closingParenToken The paren token
* @returns {boolean} True if the closing paren has a disallowed space
*/
function closerRejectsSpace(
tokenBeforeClosingParen,
closingParenToken,
) {
if (
!astUtils.isTokenOnSameLine(
tokenBeforeClosingParen,
closingParenToken,
)
) {
return false;
}
if (
!sourceCode.isSpaceBetween(
tokenBeforeClosingParen,
closingParenToken,
)
) {
return false;
}
if (ALWAYS) {
return isCloserException(tokenBeforeClosingParen);
}
return !isCloserException(tokenBeforeClosingParen);
}
//--------------------------------------------------------------------------
// Public
//--------------------------------------------------------------------------
return {
Program: function checkParenSpaces(node) {
exceptions = getExceptions();
const tokens = sourceCode.tokensAndComments;
tokens.forEach((token, i) => {
const prevToken = tokens[i - 1];
const nextToken = tokens[i + 1];
// if token is not an opening or closing paren token, do nothing
if (
!astUtils.isOpeningParenToken(token) &&
!astUtils.isClosingParenToken(token)
) {
return;
}
// if token is an opening paren and is not followed by a required space
if (
token.value === "(" &&
openerMissingSpace(token, nextToken)
) {
context.report({
node,
loc: token.loc,
messageId: "missingOpeningSpace",
fix(fixer) {
return fixer.insertTextAfter(token, " ");
},
});
}
// if token is an opening paren and is followed by a disallowed space
if (
token.value === "(" &&
openerRejectsSpace(token, nextToken)
) {
context.report({
node,
loc: {
start: token.loc.end,
end: nextToken.loc.start,
},
messageId: "rejectedOpeningSpace",
fix(fixer) {
return fixer.removeRange([
token.range[1],
nextToken.range[0],
]);
},
});
}
// if token is a closing paren and is not preceded by a required space
if (
token.value === ")" &&
closerMissingSpace(prevToken, token)
) {
context.report({
node,
loc: token.loc,
messageId: "missingClosingSpace",
fix(fixer) {
return fixer.insertTextBefore(token, " ");
},
});
}
// if token is a closing paren and is preceded by a disallowed space
if (
token.value === ")" &&
closerRejectsSpace(prevToken, token)
) {
context.report({
node,
loc: {
start: prevToken.loc.end,
end: token.loc.start,
},
messageId: "rejectedClosingSpace",
fix(fixer) {
return fixer.removeRange([
prevToken.range[1],
token.range[0],
]);
},
});
}
});
},
};
},
};
@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const FolderOutput = createLucideIcon("FolderOutput", [
[
"path",
{
d: "M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5",
key: "1yk7aj"
}
],
["path", { d: "M2 13h10", key: "pgb2dq" }],
["path", { d: "m5 10-3 3 3 3", key: "1r8ie0" }]
]);
export { FolderOutput as default };
//# sourceMappingURL=folder-output.js.map
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 zxcvbn-ts
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1 @@
module.exports={C:{"4":0.05471,"52":0.00684,"66":0.00684,"88":0.00684,"115":0.02052,"118":0.00684,"120":2.29107,"121":4.46587,"122":0.00684,"123":0.04103,"124":0.0342,"125":0.01368,"128":0.00684,"129":0.00684,"130":0.00684,"131":0.00684,"132":0.00684,"133":0.00684,"134":0.00684,"135":0.00684,"136":0.00684,"138":0.00684,"139":0.00684,"140":0.04103,"141":0.00684,"142":0.00684,"146":0.0342,"147":0.00684,"149":0.00684,"150":0.02052,"152":0.01368,"153":0.01368,"154":0.1231,"155":0.38982,"156":0.45137,"157":0.00684,_:"2 3 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 53 54 55 56 57 58 59 60 61 62 63 64 65 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 119 126 127 137 143 144 145 148 151 158 159 160 3.5 3.6"},D:{"60":0.00684,"62":0.00684,"63":0.00684,"64":0.00684,"65":0.00684,"66":0.00684,"67":0.00684,"68":0.00684,"69":0.01368,"70":0.00684,"73":0.00684,"75":0.00684,"79":0.00684,"84":0.01368,"87":0.00684,"92":0.00684,"97":0.01368,"101":0.00684,"103":0.69074,"104":0.69758,"105":0.6839,"106":0.6839,"107":0.69758,"108":0.71126,"109":1.03953,"110":0.69758,"111":0.71126,"112":0.69758,"114":0.00684,"116":1.38148,"117":0.70442,"118":3.13226,"119":4.43167,"120":6.14826,"121":0.02736,"122":0.06155,"123":0.04103,"124":0.70442,"125":0.02052,"126":0.02052,"127":0.01368,"128":0.01368,"129":0.00684,"130":0.01368,"131":1.42935,"132":0.01368,"133":1.70975,"134":0.34879,"135":0.34195,"136":0.34195,"137":0.38298,"138":0.43086,"139":0.36247,"140":0.39666,"141":0.39666,"142":1.23102,"143":0.02052,"144":0.05471,"145":0.56764,"146":1.09424,"147":0.02736,"148":0.18465,"149":0.58132,"150":0.34879,"151":1.7713,"152":5.5943,"153":5.10873,"154":1.30625,"155":0.04787,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 61 71 72 74 76 77 78 80 81 83 85 86 88 89 90 91 93 94 95 96 98 99 100 102 113 115 156 157"},F:{"51":0.00684,"52":0.00684,"53":0.00684,"54":0.00684,"55":0.00684,"56":0.01368,"57":0.00684,"91":0.00684,"95":0.00684,"105":0.01368,"106":0.02736,"107":0.00684,"111":0.00684,"114":0.00684,"115":0.01368,"116":0.01368,"118":0.00684,"119":0.00684,"120":0.00684,"121":0.00684,"122":0.01368,"133":0.00684,"134":0.08891,"135":0.49925,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 92 93 94 96 97 98 99 100 101 102 103 104 108 109 110 112 113 117 123 124 125 126 127 131 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.00684,"109":0.02052,"114":0.00684,"119":2.18848,"120":2.25003,"122":0.04103,"123":0.01368,"124":0.00684,"131":0.01368,"132":0.00684,"134":0.00684,"136":0.00684,"139":0.00684,"140":0.01368,"142":0.00684,"144":0.00684,"145":0.02736,"146":0.00684,"147":0.02736,"148":0.02736,"149":0.02736,"150":0.08207,"151":0.17098,"152":1.33361,"153":1.49774,"154":0.44454,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 121 125 126 127 128 129 130 133 135 137 138 141 143"},E:{"27":0.04103,_:"4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 13.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.3 16.4 16.5 17.0 17.2 17.4 17.5 18.0 18.1 18.2 18.4 26.1 27.1 27.2 TP","14.1":0.00684,"15.6":0.00684,"16.6":0.01368,"17.1":0.00684,"17.3":0.00684,"17.6":0.02736,"18.3":0.00684,"18.5-18.7":0.00684,"26.0":0.00684,"26.2":0.01368,"26.3":0.0342,"26.4":0.02052,"26.5":0.05471,"26.6":0.20517},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00045,"5.0-5.1":0.00045,"6.0-6.1":0,"7.0-7.1":0.00091,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00454,"11.0-11.2":0.00045,"11.3-11.4":0.00091,"12.0-12.1":0,"12.2-12.5":0.01179,"13.0-13.1":0,"13.2":0.00227,"13.3":0,"13.4-13.7":0.00045,"14.0-14.4":0.00181,"14.5-14.8":0.00272,"15.0-15.1":0.00272,"15.2-15.3":0.00181,"15.4":0.00227,"15.5":0.00272,"15.6-15.8":0.05897,"16.0":0.00454,"16.1":0.00816,"16.2":0.00454,"16.3":0.00998,"16.4":0.00227,"16.5":0.00363,"16.6-16.7":0.0821,"17.0":0.00318,"17.1":0.00454,"17.2":0.00454,"17.3":0.0068,"17.4":0.00953,"17.5":0.0186,"17.6-17.7":0.04808,"18.0":0.00998,"18.1":0.01996,"18.2":0.02722,"18.3":0.04717,"18.4":0.02948,"18.5-18.7":0.60919,"26.0":0.02948,"26.1":0.02994,"26.2":0.07802,"26.3":0.08437,"26.4":0.06169,"26.5":0.41323,"26.6":2.54971,"27.0":0.1955,"27.1":0,"27.2":0.00499},P:{"21":0.01883,"22":0.01883,"23":0.00942,"24":0.00942,"25":0.00942,"26":0.09416,"27":0.02825,"28":0.02825,"29":0.08475,"30":1.3748,_:"4 20 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.113},I:{"0":0.02527,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.Line truncated
@@ -0,0 +1 @@
{"version":3,"file":"move-up-left.js","sources":["../../../src/icons/move-up-left.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MoveUpLeft\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNSAxMVY1SDExIiAvPgogIDxwYXRoIGQ9Ik01IDVMMTkgMTkiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/move-up-left\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst MoveUpLeft = createLucideIcon('MoveUpLeft', [\n ['path', { d: 'M5 11V5H11', key: '3q78g9' }],\n ['path', { d: 'M5 5L19 19', key: '5zm2fv' }],\n]);\n\nexport default MoveUpLeft;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,131 @@
'use strict'
const corsSafeListedMethods = /** @type {const} */ (['GET', 'HEAD', 'POST'])
const corsSafeListedMethodsSet = new Set(corsSafeListedMethods)
const nullBodyStatus = /** @type {const} */ ([101, 204, 205, 304])
const redirectStatus = /** @type {const} */ ([301, 302, 303, 307, 308])
const redirectStatusSet = new Set(redirectStatus)
/**
* @see https://fetch.spec.whatwg.org/#block-bad-port
*/
const badPorts = /** @type {const} */ ([
'1', '7', '9', '11', '13', '15', '17', '19', '20', '21', '22', '23', '25', '37', '42', '43', '53', '69', '77', '79',
'87', '95', '101', '102', '103', '104', '109', '110', '111', '113', '115', '117', '119', '123', '135', '137',
'139', '143', '161', '179', '389', '427', '465', '512', '513', '514', '515', '526', '530', '531', '532',
'540', '548', '554', '556', '563', '587', '601', '636', '989', '990', '993', '995', '1719', '1720', '1723',
'2049', '3659', '4045', '4190', '5060', '5061', '6000', '6566', '6665', '6666', '6667', '6668', '6669', '6679',
'6697', '10080'
])
const badPortsSet = new Set(badPorts)
/**
* @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-header
*/
const referrerPolicyTokens = /** @type {const} */ ([
'no-referrer',
'no-referrer-when-downgrade',
'same-origin',
'origin',
'strict-origin',
'origin-when-cross-origin',
'strict-origin-when-cross-origin',
'unsafe-url'
])
/**
* @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policies
*/
const referrerPolicy = /** @type {const} */ ([
'',
...referrerPolicyTokens
])
const referrerPolicyTokensSet = new Set(referrerPolicyTokens)
const requestRedirect = /** @type {const} */ (['follow', 'manual', 'error'])
const safeMethods = /** @type {const} */ (['GET', 'HEAD', 'OPTIONS', 'TRACE', 'QUERY'])
const safeMethodsSet = new Set(safeMethods)
const requestMode = /** @type {const} */ (['navigate', 'same-origin', 'no-cors', 'cors'])
const requestCredentials = /** @type {const} */ (['omit', 'same-origin', 'include'])
const requestCache = /** @type {const} */ ([
'default',
'no-store',
'reload',
'no-cache',
'force-cache',
'only-if-cached'
])
/**
* @see https://fetch.spec.whatwg.org/#request-body-header-name
*/
const requestBodyHeader = /** @type {const} */ ([
'content-encoding',
'content-language',
'content-location',
'content-type',
// See https://github.com/nodejs/undici/issues/2021
// 'Content-Length' is a forbidden header name, which is typically
// removed in the Headers implementation. However, undici doesn't
// filter out headers, so we add it here.
'content-length'
])
/**
* @see https://fetch.spec.whatwg.org/#enumdef-requestduplex
*/
const requestDuplex = /** @type {const} */ ([
'half'
])
/**
* @see http://fetch.spec.whatwg.org/#forbidden-method
*/
const forbiddenMethods = /** @type {const} */ (['CONNECT', 'TRACE', 'TRACK'])
const forbiddenMethodsSet = new Set(forbiddenMethods)
const subresource = /** @type {const} */ ([
'audio',
'audioworklet',
'font',
'image',
'manifest',
'paintworklet',
'script',
'style',
'track',
'video',
'xslt',
''
])
const subresourceSet = new Set(subresource)
module.exports = {
subresource,
forbiddenMethods,
requestBodyHeader,
referrerPolicy,
requestRedirect,
requestMode,
requestCredentials,
requestCache,
redirectStatus,
corsSafeListedMethods,
nullBodyStatus,
safeMethods,
badPorts,
requestDuplex,
subresourceSet,
badPortsSet,
redirectStatusSet,
corsSafeListedMethodsSet,
safeMethodsSet,
forbiddenMethodsSet,
referrerPolicyTokens: referrerPolicyTokensSet
}
@@ -0,0 +1,2 @@
import type { TSESTree } from '@typescript-eslint/utils';
export declare function isNullLiteral(i: TSESTree.Node): i is TSESTree.NullLiteral;
@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Clock9 = createLucideIcon("Clock9", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["polyline", { points: "12 6 12 12 7.5 12", key: "1k60p0" }]
]);
export { Clock9 as default };
//# sourceMappingURL=clock-9.js.map
@@ -0,0 +1,10 @@
import { ParamAssocArray } from "./node.js";
//#region src/router/reg-exp-router/trie.d.ts
export type ReplacementMap = number[];
export declare class Trie {
paths: Record<string, [number, ParamAssocArray]>;
insert(path: string, isStatic: boolean): void;
buildRegExp(): [RegExp, ReplacementMap, ReplacementMap];
}
//#endregion
@@ -0,0 +1,3 @@
import { type ZodErrorMap } from "../ZodError.js";
declare const errorMap: ZodErrorMap;
export default errorMap;
@@ -0,0 +1,11 @@
export * from './AST';
export * from './Config';
export * from './ESLint';
export * from './Linter';
export * from './Parser';
export * from './ParserOptions';
export * from './Processor';
export * from './Rule';
export * from './RuleTester';
export * from './Scope';
export * from './SourceCode';
@@ -0,0 +1 @@
{"version":3,"file":"layers.js","sources":["../../../src/icons/layers.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Layers\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIuODMgMi4xOGEyIDIgMCAwIDAtMS42NiAwTDIuNiA2LjA4YTEgMSAwIDAgMCAwIDEuODNsOC41OCAzLjkxYTIgMiAwIDAgMCAxLjY2IDBsOC41OC0zLjlhMSAxIDAgMCAwIDAtMS44M3oiIC8+CiAgPHBhdGggZD0iTTIgMTJhMSAxIDAgMCAwIC41OC45MWw4LjYgMy45MWEyIDIgMCAwIDAgMS42NSAwbDguNTgtMy45QTEgMSAwIDAgMCAyMiAxMiIgLz4KICA8cGF0aCBkPSJNMiAxN2ExIDEgMCAwIDAgLjU4LjkxbDguNiAzLjkxYTIgMiAwIDAgMCAxLjY1IDBsOC41OC0zLjlBMSAxIDAgMCAwIDIyIDE3IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/layers\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Layers = createLucideIcon('Layers', [\n [\n 'path',\n {\n d: 'M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z',\n key: 'zw3jo',\n },\n ],\n [\n 'path',\n {\n d: 'M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12',\n key: '1wduqc',\n },\n ],\n [\n 'path',\n {\n d: 'M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17',\n key: 'kqbvx6',\n },\n ],\n]);\n\nexport default Layers;\n"],"names":[],"mappings":"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"}
@@ -0,0 +1 @@
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../src/update.ts"],"names":[],"mappings":";AAAA,SAAS;;;AAET,uDAA+C;AAG/C,6CAA2C;AAE3C,iDAAiD;AACpC,QAAA,MAAM,GAAG,IAAA,6BAAW,EAC/B,oBAAC,CAAC,QAAQ,EACV,oBAAC,CAAC,SAAS,EACX,oBAAC,CAAC,UAAU,EACZ,oBAAC,CAAC,WAAW,EACb,CAAC,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,EAAE;IACpB,oBAAC,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;IAC1B,WAAW,CAAC,GAAG,CAAC,CAAA;AAClB,CAAC,CACF,CAAA;AAED,MAAM,WAAW,GAAG,CAAC,GAA0B,EAAE,EAAE;IACjD,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAA;IAEzB,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;QACpB,GAAG,CAAC,UAAU,GAAG,IAAI,GAAG,EAAE,CAAA;IAC5B,CAAC;IAED,GAAG,CAAC,MAAM;QACR,MAAM,CAAC,CAAC;YACN,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CACb,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC;gBAClB,CAAC;gBACC,qBAAqB;gBACrB,CACE,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;oBAC9C,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAClB;gBACD,oBAAoB;iBACrB;YACL,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CACb,CAAC;YACC,qBAAqB;YACrB,CACE,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;gBAC9C,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAClB;YACD,oBAAoB;aACrB,CAAA;AACT,CAAC,CAAA","sourcesContent":["// tar -u\n\nimport { makeCommand } from './make-command.js'\nimport { type TarOptionsWithAliases } from './options.js'\n\nimport { replace as r } from './replace.js'\n\n// just call tar.r with the filter and mtimeCache\nexport const update = makeCommand(\n r.syncFile,\n r.asyncFile,\n r.syncNoFile,\n r.asyncNoFile,\n (opt, entries = []) => {\n r.validate?.(opt, entries)\n mtimeFilter(opt)\n },\n)\n\nconst mtimeFilter = (opt: TarOptionsWithAliases) => {\n const filter = opt.filter\n\n if (!opt.mtimeCache) {\n opt.mtimeCache = new Map()\n }\n\n opt.filter =\n filter ?\n (path, stat) =>\n filter(path, stat) &&\n !(\n /* c8 ignore start */\n (\n (opt.mtimeCache?.get(path) ?? stat.mtime ?? 0) >\n (stat.mtime ?? 0)\n )\n /* c8 ignore stop */\n )\n : (path, stat) =>\n !(\n /* c8 ignore start */\n (\n (opt.mtimeCache?.get(path) ?? stat.mtime ?? 0) >\n (stat.mtime ?? 0)\n )\n /* c8 ignore stop */\n )\n}\n"]}
@@ -0,0 +1,47 @@
MIT License
Copyright (c) Pooya Parsa <pooya@pi0.io>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
---
Prompt support is based on https://github.com/bombshell-dev/clack
MIT License
Copyright (c) Nate Moore
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---
Color support is based on https://github.com/jorgebucaran/colorette
Copyright © Jorge Bucaran <https://jorgebucaran.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1 @@
{"version":3,"file":"chevrons-left-right.js","sources":["../../../src/icons/chevrons-left-right.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ChevronsLeftRight\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtOSA3LTUgNSA1IDUiIC8+CiAgPHBhdGggZD0ibTE1IDcgNSA1LTUgNSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/chevrons-left-right\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ChevronsLeftRight = createLucideIcon('ChevronsLeftRight', [\n ['path', { d: 'm9 7-5 5 5 5', key: 'j5w590' }],\n ['path', { d: 'm15 7 5 5-5 5', key: '1bl6da' }],\n]);\n\nexport default ChevronsLeftRight;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoB,iBAAiB,mBAAqB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC7C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAChD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: [ljharb]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/side-channel-list
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -0,0 +1,43 @@
'use strict'
const test = require('tape')
const fastURI = require('..')
const AJV = require('ajv')
const ajv = new AJV({
uriResolver: fastURI // comment this line to see it works with uri-js
})
test('ajv', t => {
t.plan(1)
const schema = {
$ref: '#/definitions/Record%3Cstring%2CPerson%3E',
definitions: {
Person: {
type: 'object',
properties: {
firstName: {
type: 'string'
}
}
},
'Record<string,Person>': {
type: 'object',
additionalProperties: {
$ref: '#/definitions/Person'
}
}
}
}
const data = {
joe: {
firstName: 'Joe'
}
}
const validate = ajv.compile(schema)
t.ok(validate(data))
})
@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const University = createLucideIcon("University", [
["circle", { cx: "12", cy: "10", r: "1", key: "1gnqs8" }],
["path", { d: "M22 20V8h-4l-6-4-6 4H2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2", key: "1qj5sn" }],
["path", { d: "M6 17v.01", key: "roodi6" }],
["path", { d: "M6 13v.01", key: "67c122" }],
["path", { d: "M18 17v.01", key: "12ktxm" }],
["path", { d: "M18 13v.01", key: "tn1rt1" }],
["path", { d: "M14 22v-5a2 2 0 0 0-2-2a2 2 0 0 0-2 2v5", key: "11g7fi" }]
]);
export { University as default };
//# sourceMappingURL=university.js.map
@@ -0,0 +1,347 @@
declare const _default: {
inherit: string;
current: string;
transparent: string;
black: string;
white: string;
slate: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
gray: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
zinc: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
neutral: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
stone: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
mauve: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
olive: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
mist: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
taupe: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
red: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
orange: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
amber: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
yellow: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
lime: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
green: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
emerald: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
teal: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
cyan: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
sky: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
blue: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
indigo: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
violet: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
purple: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
fuchsia: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
pink: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
rose: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
};
export { _default as _ };
@@ -0,0 +1 @@
module.exports={C:{"56":0.10695,"60":0.00509,"63":0.01528,"66":0.00509,"69":0.00509,"72":0.01528,"76":0.00509,"78":0.04074,"79":0.01019,"103":0.00509,"108":0.01019,"113":0.01528,"114":0.03056,"115":0.71302,"120":0.01019,"121":0.02037,"125":0.00509,"127":0.09677,"135":0.23937,"136":0.01019,"138":0.00509,"140":0.17826,"141":0.00509,"142":0.00509,"143":0.08658,"144":0.00509,"145":0.04074,"146":0.00509,"147":0.01019,"148":0.02037,"149":0.01528,"150":0.08149,"151":0.3667,"152":0.04074,"153":0.20372,"154":0.66209,"155":1.82329,"156":1.45151,"157":0.11205,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 57 58 59 61 62 64 65 67 68 70 71 73 74 75 77 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 104 105 106 107 109 110 111 112 116 117 118 119 122 123 124 126 128 129 130 131 132 133 134 137 139 158 159 160 3.5 3.6"},D:{"49":0.01019,"51":0.01019,"58":0.01019,"67":0.00509,"68":0.03056,"71":0.01528,"79":0.00509,"80":0.01528,"87":0.02037,"92":0.00509,"96":0.02547,"101":0.04074,"102":0.00509,"103":0.02547,"104":0.00509,"105":0.00509,"106":0.01528,"107":0.00509,"108":0.00509,"109":0.76904,"110":0.01019,"112":0.00509,"114":0.06621,"116":0.12223,"117":0.00509,"118":0.09167,"119":0.03565,"120":0.06621,"121":0.02037,"122":0.02037,"124":0.02547,"125":0.00509,"126":0.02547,"127":0.00509,"128":0.04584,"129":0.03056,"131":0.11205,"132":0.00509,"133":0.02547,"134":0.05093,"135":0.01019,"136":0.04074,"137":0.04584,"138":0.25465,"139":0.12223,"140":0.01528,"141":0.04074,"142":0.10186,"143":0.03565,"144":0.06621,"145":0.02547,"146":0.12733,"147":0.09677,"148":0.28012,"149":0.13242,"150":0.66209,"151":2.15943,"152":13.13485,"153":8.35252,"154":1.71125,"155":0.03056,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 50 52 53 54 55 56 57 59 60 61 62 63 64 65 66 69 70 72 73 74 75 76 77 78 81 83 84 85 86 88 89 90 91 93 94 95 97 98 99 100 111 113 115 123 130 156 157"},F:{"46":0.02037,"95":0.00509,"106":0.00509,"118":0.03565,"131":0.00509,"133":0.01019,"134":0.05093,"135":0.69774,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 96 97 98 99 100 101 102 103 104 105 107 108 109 110 111 112 113 114 115 116 117 119 120 121 122 123 124 125 126 127 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"15":0.00509,"16":0.01528,"17":0.00509,"89":0.00509,"90":0.00509,"92":0.03056,"100":0.00509,"109":0.00509,"114":0.00509,"119":0.00509,"120":0.01019,"122":0.01019,"126":0.00509,"128":0.00509,"131":0.00509,"133":0.04584,"134":0.00509,"135":0.03056,"138":0.03565,"139":0.02037,"140":0.00509,"141":0.00509,"142":0.01019,"143":0.03056,"144":0.01528,"145":0.01019,"146":0.04584,"147":0.04584,"148":0.05602,"149":0.05602,"150":0.17316,"151":0.91165,"152":3.99801,"153":4.52768,"154":0.89128,_:"12 13 14 18 79 80 81 83 84 85 86 87 88 91 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 121 123 124 125 127 129 130 132 136 137"},E:{"11":0.00509,"27":0.10695,_:"4 5 6 7 8 9 10 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.1 15.4 15.5 16.0 16.2 16.3 16.4 17.0 18.4 27.1 27.2 TP","13.1":0.00509,"14.1":0.00509,"15.2-15.3":0.00509,"15.6":0.05093,"16.1":0.00509,"16.5":0.01019,"16.6":0.02037,"17.1":0.03056,"17.2":0.00509,"17.3":0.00509,"17.4":0.0764,"17.5":0.06621,"17.6":0.0713,"18.0":0.01528,"18.1":0.03565,"18.2":0.00509,"18.3":0.02547,"18.5-18.7":0.01019,"26.0":0.02037,"26.1":0.00509,"26.2":0.0713,"26.3":0.06112,"26.4":0.01019,"26.5":0.12223,"26.6":0.219},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00092,"5.0-5.1":0.00092,"6.0-6.1":0,"7.0-7.1":0.00183,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00916,"11.0-11.2":0.00092,"11.3-11.4":0.00183,"12.0-12.1":0,"12.2-12.5":0.02381,"13.0-13.1":0,"13.2":0.00458,"13.3":0,"13.4-13.7":0.00092,"14.0-14.4":0.00366,"14.5-14.8":0.00549,"15.0-15.1":0.00549,"15.2-15.3":0.00366,"15.4":0.00458,"15.5":0.00549,"15.6-15.8":0.11903,"16.0":0.00916,"16.1":0.01648,"16.2":0.00916,"16.3":0.02014,"16.4":0.00458,"16.5":0.00733,"16.6-16.7":0.16573,"17.0":0.00641,"17.1":0.00916,"17.2":0.00916,"17.3":0.01373,"17.4":0.01923,"17.5":0.03754,"17.6-17.7":0.09706,"18.0":0.02014,"18.1":0.04029,"18.2":0.05494,"18.3":0.09523,"18.4":0.05952,"18.5-18.7":1.22971,"26.0":0.05952,"26.1":0.06043,"26.2":0.15749,"26.3":0.17031,"26.4":0.12453,"26.5":0.83415,"26.6":5.14685,"27.0":0.39464,"27.1":0,"27.2":0.01007},P:{"21":0.0178,"22":0.0178,"23":0.0178,"24":0.0178,"25":0.03561,"26":0.06231,"27":0.08902,"28":0.19584,"29":0.21364,"30":0.68544,_:"4 20 5.0-5.4 6.2-6.4 8.2 9.2 10.1 12.0 13.0 14.0 15.0 16.0 17.0 19.0","7.2-7.4":0.0178,"11.1-11.2":0.0089,"18.0":0.0089},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,Line truncated
@@ -0,0 +1,120 @@
[
[
{
"host": "10.10.10.10.example.com"
},
"//10.10.10.10.example.com"
],
[
{
"host": "2001:db8::7"
},
"//[2001:db8::7]"
],
[
{
"host": "::ffff:129.144.52.38"
},
"//[::ffff:129.144.52.38]"
],
[
{
"host": "2606:2800:220:1:248:1893:25c8:1946"
},
"//[2606:2800:220:1:248:1893:25c8:1946]"
],
[
{
"host": "10.10.10.10.example.com"
},
"//10.10.10.10.example.com"
],
[
{
"host": "10.10.10.10"
},
"//10.10.10.10"
],
[
{
"path": "?query"
},
"%3Fquery"
],
[
{
"path": "foo:bar"
},
"foo%3Abar"
],
[
{
"path": "//path"
},
"/%2Fpath"
],
[
{
"scheme": "uri",
"host": "example.com",
"port": "9000"
},
"uri://example.com:9000"
],
[
{
"scheme": "uri",
"userinfo": "foo:bar",
"host": "example.com",
"port": 1,
"path": "path",
"query": "query",
"fragment": "fragment"
},
"uri://foo:bar@example.com:1/path?query#fragment"
],
[
{
"scheme": "",
"userinfo": "",
"host": "",
"port": 0,
"path": "",
"query": "",
"fragment": ""
},
"//@:0?#"
],
[
{},
""
],
[
{
"host": "fe80::a%en1"
},
"//[fe80::a%25en1]"
],
[
{
"host": "fe80::a%25en1"
},
"//[fe80::a%25en1]"
],
[
{
"scheme": "wss",
"host": "example.com",
"path": "/foo",
"query": "bar"
},
"wss://example.com/foo?bar"
],
[
{
"scheme": "scheme",
"path": "with:colon"
},
"scheme:with:colon"
]
]
@@ -0,0 +1,9 @@
//#region src/utils/jwt/utf8.ts
/**
* @module
* Functions for encoding/decoding UTF8.
*/
const utf8Encoder = new TextEncoder();
const utf8Decoder = new TextDecoder();
//#endregion
export { utf8Decoder, utf8Encoder };
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Cast = createLucideIcon("Cast", [
["path", { d: "M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6", key: "3zrzxg" }],
["path", { d: "M2 12a9 9 0 0 1 8 8", key: "g6cvee" }],
["path", { d: "M2 16a5 5 0 0 1 4 4", key: "1y1dii" }],
["line", { x1: "2", x2: "2.01", y1: "20", y2: "20", key: "xu2jvo" }]
]);
export { Cast as default };
//# sourceMappingURL=cast.js.map
@@ -0,0 +1,583 @@
/**
* @fileoverview A module that filters reported problems based on `eslint-disable` and `eslint-enable` comments
* @author Teddy Katz
*/
"use strict";
//------------------------------------------------------------------------------
// Typedefs
//------------------------------------------------------------------------------
/** @typedef {import("../types").Linter.LintMessage} LintMessage */
/** @typedef {import("@eslint/core").Language} Language */
/** @typedef {import("@eslint/core").Position} Position */
/** @typedef {import("@eslint/core").RulesConfig} RulesConfig */
//------------------------------------------------------------------------------
// Module Definition
//------------------------------------------------------------------------------
const escapeRegExp = require("escape-string-regexp");
const { Config } = require("../config/config.js");
/**
* Compares the locations of two objects in a source file
* @param {Position} itemA The first object
* @param {Position} itemB The second object
* @returns {number} A value less than 1 if itemA appears before itemB in the source file, greater than 1 if
* itemA appears after itemB in the source file, or 0 if itemA and itemB have the same location.
*/
function compareLocations(itemA, itemB) {
return itemA.line - itemB.line || itemA.column - itemB.column;
}
/**
* Groups a set of directives into sub-arrays by their parent comment.
* @param {Iterable<Directive>} directives Unused directives to be removed.
* @returns {Directive[][]} Directives grouped by their parent comment.
*/
function groupByParentDirective(directives) {
const groups = new Map();
for (const directive of directives) {
const {
unprocessedDirective: { parentDirective },
} = directive;
if (groups.has(parentDirective)) {
groups.get(parentDirective).push(directive);
} else {
groups.set(parentDirective, [directive]);
}
}
return [...groups.values()];
}
/**
* Creates removal details for a set of directives within the same comment.
* @param {Directive[]} directives Unused directives to be removed.
* @param {{node: Token, value: string}} parentDirective Data about the backing directive.
* @param {SourceCode} sourceCode The source code object for the file being linted.
* @returns {{ description, fix, unprocessedDirective }[]} Details for later creation of output Problems.
*/
function createIndividualDirectivesRemoval(
directives,
parentDirective,
sourceCode,
) {
/*
* Get the list of the rules text without any surrounding whitespace. In order to preserve the original
* formatting, we don't want to change that whitespace.
*
* // eslint-disable-line rule-one , rule-two , rule-three -- comment
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
*/
const listText = parentDirective.value.trim();
// Calculate where it starts in the source code text
const listStart = sourceCode.text.indexOf(
listText,
sourceCode.getRange(parentDirective.node)[0],
);
/*
* We can assume that `listText` contains multiple elements.
* Otherwise, this function wouldn't be called - if there is
* only one rule in the list, then the whole comment must be removed.
*/
return directives.map(directive => {
const { ruleId } = directive;
const regex = new RegExp(
String.raw`(?:^|\s*,\s*)(?<quote>['"]?)${escapeRegExp(ruleId)}\k<quote>(?:\s*,\s*|$)`,
"u",
);
const match = regex.exec(listText);
const matchedText = match[0];
const matchStart = listStart + match.index;
const matchEnd = matchStart + matchedText.length;
const firstIndexOfComma = matchedText.indexOf(",");
const lastIndexOfComma = matchedText.lastIndexOf(",");
let removalStart, removalEnd;
if (firstIndexOfComma !== lastIndexOfComma) {
/*
* Since there are two commas, this must one of the elements in the middle of the list.
* Matched range starts where the previous rule name ends, and ends where the next rule name starts.
*
* // eslint-disable-line rule-one , rule-two , rule-three -- comment
* ^^^^^^^^^^^^^^
*
* We want to remove only the content between the two commas, and also one of the commas.
*
* // eslint-disable-line rule-one , rule-two , rule-three -- comment
* ^^^^^^^^^^^
*/
removalStart = matchStart + firstIndexOfComma;
removalEnd = matchStart + lastIndexOfComma;
} else {
/*
* This is either the first element or the last element.
*
* If this is the first element, matched range starts where the first rule name starts
* and ends where the second rule name starts. This is exactly the range we want
* to remove so that the second rule name will start where the first one was starting
* and thus preserve the original formatting.
*
* // eslint-disable-line rule-one , rule-two , rule-three -- comment
* ^^^^^^^^^^^
*
* Similarly, if this is the last element, we've already matched the range we want to
* remove. The previous rule name will end where the last one was ending, relative
* to the content on the right side.
*
* // eslint-disable-line rule-one , rule-two , rule-three -- comment
* ^^^^^^^^^^^^^
*/
removalStart = matchStart;
removalEnd = matchEnd;
}
return {
description: `'${ruleId}'`,
fix: {
range: [removalStart, removalEnd],
text: "",
},
unprocessedDirective: directive.unprocessedDirective,
};
});
}
/**
* Creates a description of deleting an entire unused disable directive.
* @param {Directive[]} directives Unused directives to be removed.
* @param {Token} node The backing Comment token.
* @param {SourceCode} sourceCode The source code object for the file being linted.
* @returns {{ description, fix, unprocessedDirective }} Details for later creation of an output problem.
*/
function createDirectiveRemoval(directives, node, sourceCode) {
const range = sourceCode.getRange(node);
const ruleIds = directives
.filter(directive => directive.ruleId)
.map(directive => `'${directive.ruleId}'`);
return {
description:
ruleIds.length <= 2
? ruleIds.join(" or ")
: `${ruleIds.slice(0, ruleIds.length - 1).join(", ")}, or ${ruleIds.at(-1)}`,
fix: {
range,
text: " ",
},
unprocessedDirective: directives[0].unprocessedDirective,
};
}
/**
* Parses details from directives to create output Problems.
* @param {Iterable<Directive>} allDirectives Unused directives to be removed.
* @param {SourceCode} sourceCode The source code object for the file being linted.
* @returns {{ description, fix, unprocessedDirective }[]} Details for later creation of output Problems.
*/
function processUnusedDirectives(allDirectives, sourceCode) {
const directiveGroups = groupByParentDirective(allDirectives);
return directiveGroups.flatMap(directives => {
const { parentDirective } = directives[0].unprocessedDirective;
const remainingRuleIds = new Set(parentDirective.ruleIds);
for (const directive of directives) {
remainingRuleIds.delete(directive.ruleId);
}
return remainingRuleIds.size
? createIndividualDirectivesRemoval(
directives,
parentDirective,
sourceCode,
)
: [
createDirectiveRemoval(
directives,
parentDirective.node,
sourceCode,
),
];
});
}
/**
* Collect eslint-enable comments that are removing suppressions by eslint-disable comments.
* @param {Directive[]} directives The directives to check.
* @returns {Set<Directive>} The used eslint-enable comments
*/
function collectUsedEnableDirectives(directives) {
/**
* A Map of `eslint-enable` keyed by ruleIds that may be marked as used.
* If `eslint-enable` does not have a ruleId, the key will be `null`.
* @type {Map<string|null, Directive>}
*/
const enabledRules = new Map();
/**
* A Set of `eslint-enable` marked as used.
* It is also the return value of `collectUsedEnableDirectives` function.
* @type {Set<Directive>}
*/
const usedEnableDirectives = new Set();
/*
* Checks the directives backwards to see if the encountered `eslint-enable` is used by the previous `eslint-disable`,
* and if so, stores the `eslint-enable` in `usedEnableDirectives`.
*/
for (let index = directives.length - 1; index >= 0; index--) {
const directive = directives[index];
if (directive.type === "disable") {
if (enabledRules.size === 0) {
continue;
}
if (directive.ruleId === null) {
// If encounter `eslint-disable` without ruleId,
// mark all `eslint-enable` currently held in enabledRules as used.
// e.g.
// /* eslint-disable */ <- current directive
// /* eslint-enable rule-id1 */ <- used
// /* eslint-enable rule-id2 */ <- used
// /* eslint-enable */ <- used
for (const enableDirective of enabledRules.values()) {
usedEnableDirectives.add(enableDirective);
}
enabledRules.clear();
} else {
const enableDirective = enabledRules.get(directive.ruleId);
if (enableDirective) {
// If encounter `eslint-disable` with ruleId, and there is an `eslint-enable` with the same ruleId in enabledRules,
// mark `eslint-enable` with ruleId as used.
// e.g.
// /* eslint-disable rule-id */ <- current directive
// /* eslint-enable rule-id */ <- used
usedEnableDirectives.add(enableDirective);
} else {
const enabledDirectiveWithoutRuleId =
enabledRules.get(null);
if (enabledDirectiveWithoutRuleId) {
// If encounter `eslint-disable` with ruleId, and there is no `eslint-enable` with the same ruleId in enabledRules,
// mark `eslint-enable` without ruleId as used.
// e.g.
// /* eslint-disable rule-id */ <- current directive
// /* eslint-enable */ <- used
usedEnableDirectives.add(enabledDirectiveWithoutRuleId);
}
}
}
} else if (directive.type === "enable") {
if (directive.ruleId === null) {
// If encounter `eslint-enable` without ruleId, the `eslint-enable` that follows it are unused.
// So clear enabledRules.
// e.g.
// /* eslint-enable */ <- current directive
// /* eslint-enable rule-id *// <- unused
// /* eslint-enable */ <- unused
enabledRules.clear();
enabledRules.set(null, directive);
} else {
enabledRules.set(directive.ruleId, directive);
}
}
}
return usedEnableDirectives;
}
/**
* This is the same as the exported function, except that it
* doesn't handle disable-line and disable-next-line directives, and it always reports unused
* disable directives.
* @param {Object} options options for applying directives. This is the same as the options
* for the exported function, except that `reportUnusedDisableDirectives` is not supported
* (this function always reports unused disable directives).
* @returns {{problems: LintMessage[], unusedDirectives: LintMessage[]}} An object with a list
* of problems (including suppressed ones) and unused eslint-disable directives
*/
function applyDirectives(options) {
const problems = [];
const usedDisableDirectives = new Set();
const { sourceCode } = options;
for (const problem of options.problems) {
let disableDirectivesForProblem = [];
let nextDirectiveIndex = 0;
while (
nextDirectiveIndex < options.directives.length &&
compareLocations(options.directives[nextDirectiveIndex], problem) <=
0
) {
const directive = options.directives[nextDirectiveIndex++];
if (
directive.ruleId === null ||
directive.ruleId === problem.ruleId
) {
switch (directive.type) {
case "disable":
disableDirectivesForProblem.push(directive);
break;
case "enable":
disableDirectivesForProblem = [];
break;
// no default
}
}
}
if (disableDirectivesForProblem.length > 0) {
const suppressions = disableDirectivesForProblem.map(directive => ({
kind: "directive",
justification: directive.unprocessedDirective.justification,
}));
if (problem.suppressions) {
problem.suppressions =
problem.suppressions.concat(suppressions);
} else {
problem.suppressions = suppressions;
usedDisableDirectives.add(disableDirectivesForProblem.at(-1));
}
}
problems.push(problem);
}
const unusedDisableDirectivesToReport = options.directives.filter(
directive =>
directive.type === "disable" &&
!usedDisableDirectives.has(directive) &&
!options.rulesToIgnore.has(directive.ruleId),
);
const unusedEnableDirectivesToReport = new Set(
options.directives.filter(
directive =>
directive.unprocessedDirective.type === "enable" &&
!options.rulesToIgnore.has(directive.ruleId),
),
);
/*
* If directives has the eslint-enable directive,
* check whether the eslint-enable comment is used.
*/
if (unusedEnableDirectivesToReport.size > 0) {
for (const directive of collectUsedEnableDirectives(
options.directives,
)) {
unusedEnableDirectivesToReport.delete(directive);
}
}
const processed = processUnusedDirectives(
unusedDisableDirectivesToReport,
sourceCode,
).concat(
processUnusedDirectives(unusedEnableDirectivesToReport, sourceCode),
);
const columnOffset = options.language.columnStart === 1 ? 0 : 1;
const lineOffset = options.language.lineStart === 1 ? 0 : 1;
const unusedDirectives = processed.map(
({ description, fix, unprocessedDirective }) => {
const { parentDirective, type, line, column } =
unprocessedDirective;
let message;
if (type === "enable") {
message = description
? `Unused eslint-enable directive (no matching eslint-disable directives were found for ${description}).`
: "Unused eslint-enable directive (no matching eslint-disable directives were found).";
} else {
message = description
? `Unused eslint-disable directive (no problems were reported from ${description}).`
: "Unused eslint-disable directive (no problems were reported).";
}
const loc = sourceCode.getLoc(parentDirective.node);
return {
ruleId: null,
message,
line:
type === "disable-next-line"
? loc.start.line + lineOffset
: line,
column:
type === "disable-next-line"
? loc.start.column + columnOffset
: column,
severity:
options.reportUnusedDisableDirectives === "warn" ? 1 : 2,
...(options.disableFixes ? {} : { fix }),
};
},
);
return { problems, unusedDirectives };
}
/**
* Given a list of directive comments (i.e. metadata about eslint-disable and eslint-enable comments) and a list
* of reported problems, adds the suppression information to the problems.
* @param {Object} options Information about directives and problems
* @param {Language} options.language The language being linted.
* @param {SourceCode} options.sourceCode The source code object for the file being linted.
* @param {{
* type: ("disable"|"enable"|"disable-line"|"disable-next-line"),
* ruleId: (string|null),
* line: number,
* column: number,
* justification: string
* }} options.directives Directive comments found in the file, with one-based columns.
* Two directive comments can only have the same location if they also have the same type (e.g. a single eslint-disable
* comment for two different rules is represented as two directives).
* @param {{ruleId: (string|null), line: number, column: number}[]} options.problems
* A list of problems reported by rules, sorted by increasing location in the file, with one-based columns.
* @param {"off" | "warn" | "error"} options.reportUnusedDisableDirectives If `"warn"` or `"error"`, adds additional problems for unused directives
* @param {RulesConfig} options.configuredRules The rules configuration.
* @param {Function} options.ruleFilter A predicate function to filter which rules should be executed.
* @param {boolean} options.disableFixes If true, it doesn't make `fix` properties.
* @returns {{ruleId: (string|null), line: number, column: number, suppressions?: {kind: string, justification: string}}[]}
* An object with a list of reported problems, the suppressed of which contain the suppression information.
*/
module.exports = ({
language,
sourceCode,
directives,
disableFixes,
problems,
configuredRules,
ruleFilter,
reportUnusedDisableDirectives = "off",
}) => {
const blockDirectives = directives
.filter(
directive =>
directive.type === "disable" || directive.type === "enable",
)
.map(directive =>
Object.assign({}, directive, { unprocessedDirective: directive }),
)
.sort(compareLocations);
const lineDirectives = directives
.flatMap(directive => {
switch (directive.type) {
case "disable":
case "enable":
return [];
case "disable-line":
return [
{
type: "disable",
line: directive.line,
column: 1,
ruleId: directive.ruleId,
unprocessedDirective: directive,
},
{
type: "enable",
line: directive.line + 1,
column: 0,
ruleId: directive.ruleId,
unprocessedDirective: directive,
},
];
case "disable-next-line":
return [
{
type: "disable",
line: directive.line + 1,
column: 1,
ruleId: directive.ruleId,
unprocessedDirective: directive,
},
{
type: "enable",
line: directive.line + 2,
column: 0,
ruleId: directive.ruleId,
unprocessedDirective: directive,
},
];
default:
throw new TypeError(
`Unrecognized directive type '${directive.type}'`,
);
}
})
.sort(compareLocations);
// This determines a list of rules that are not being run by the given ruleFilter, if present.
const rulesToIgnore =
configuredRules && ruleFilter
? new Set(
Object.keys(configuredRules).filter(ruleId => {
const severity = Config.getRuleNumericSeverity(
configuredRules[ruleId],
);
// Ignore for disabled rules.
if (severity === 0) {
return false;
}
return !ruleFilter({ severity, ruleId });
}),
)
: new Set();
// If no ruleId is supplied that means this directive is applied to all rules, so we can't determine if it's unused if any rules are filtered out.
if (rulesToIgnore.size > 0) {
rulesToIgnore.add(null);
}
const blockDirectivesResult = applyDirectives({
language,
sourceCode,
problems,
directives: blockDirectives,
disableFixes,
reportUnusedDisableDirectives,
rulesToIgnore,
});
const lineDirectivesResult = applyDirectives({
language,
sourceCode,
problems: blockDirectivesResult.problems,
directives: lineDirectives,
disableFixes,
reportUnusedDisableDirectives,
rulesToIgnore,
});
return reportUnusedDisableDirectives !== "off"
? lineDirectivesResult.problems
.concat(blockDirectivesResult.unusedDirectives)
.concat(lineDirectivesResult.unusedDirectives)
.sort(compareLocations)
: lineDirectivesResult.problems;
};
@@ -0,0 +1 @@
{"version":3,"file":"folder-edit.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1 @@
{"version":3,"file":"HTMLProjectionNode.mjs","sources":["../../../../src/projection/node/HTMLProjectionNode.ts"],"sourcesContent":["import { createProjectionNode } from \"./create-projection-node\"\nimport { DocumentProjectionNode } from \"./DocumentProjectionNode\"\nimport { IProjectionNode } from \"./types\"\n\nexport const rootProjectionNode: { current: IProjectionNode | undefined } = {\n current: undefined,\n}\n\nexport const HTMLProjectionNode = createProjectionNode<HTMLElement>({\n measureScroll: (instance) => ({\n x: instance.scrollLeft,\n y: instance.scrollTop,\n }),\n defaultParent: () => {\n if (!rootProjectionNode.current) {\n const documentNode = new DocumentProjectionNode({})\n documentNode.mount(window)\n documentNode.setOptions({ layoutScroll: true })\n rootProjectionNode.current = documentNode\n }\n return rootProjectionNode.current\n },\n resetTransform: (instance, value) => {\n instance.style.transform = value !== undefined ? value : \"none\"\n },\n checkIsScrollRoot: (instance) =>\n Boolean(window.getComputedStyle(instance).position === \"fixed\"),\n})\n"],"names":[],"mappings":";;;AAIO,MAAM,kBAAkB,GAA6C;AACxE,IAAA,OAAO,EAAE,SAAS;;AAGf,MAAM,kBAAkB,GAAG,oBAAoB,CAAc;AAChE,IAAA,aAAa,EAAE,CAAC,QAAQ,MAAM;QAC1B,CAAC,EAAE,QAAQ,CAAC,UAAU;QACtB,CAAC,EAAE,QAAQ,CAAC,SAAS;KACxB,CAAC;IACF,aAAa,EAAE,MAAK;AAChB,QAAA,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE;AAC7B,YAAA,MAAM,YAAY,GAAG,IAAI,sBAAsB,CAAC,EAAE,CAAC;AACnD,YAAA,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC;YAC1B,YAAY,CAAC,UAAU,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;AAC/C,YAAA,kBAAkB,CAAC,OAAO,GAAG,YAAY;QAC7C;QACA,OAAO,kBAAkB,CAAC,OAAO;IACrC,CAAC;AACD,IAAA,cAAc,EAAE,CAAC,QAAQ,EAAE,KAAK,KAAI;AAChC,QAAA,QAAQ,CAAC,KAAK,CAAC,SAAS,GAAG,KAAK,KAAK,SAAS,GAAG,KAAK,GAAG,MAAM;IACnE,CAAC;AACD,IAAA,iBAAiB,EAAE,CAAC,QAAQ,KACxB,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC;AACtE,CAAA;;;;"}
@@ -0,0 +1,14 @@
import { GroupAnimationWithThen } from 'motion-dom';
import { createAnimationsFromSequence } from '../../sequence/create.mjs';
import { animateElements } from './animate-elements.mjs';
function animateSequence(definition, options) {
const animations = [];
createAnimationsFromSequence(definition, options).forEach(({ keyframes, transition }, element) => {
animations.push(...animateElements(element, keyframes, transition));
});
return new GroupAnimationWithThen(animations);
}
export { animateSequence };
//# sourceMappingURL=animate-sequence.mjs.map
@@ -0,0 +1,36 @@
export declare class InvariantError extends Error {
constructor(message: string);
}
/**
* Provide a condition and if that condition is falsey, this throws an error
* with the given message.
*
* inspired by invariant from 'tiny-invariant' except will still include the
* message in production.
*
* @example
* invariant(typeof value === 'string', `value must be a string`)
*
* @param condition The condition to check
* @param message The message to throw (or a callback to generate the message)
* @param responseInit Additional response init options if a response is thrown
*
* @throws {InvariantError} if condition is falsey
*/
export declare function invariant(condition: any, message: string | (() => string)): asserts condition;
/**
* Provide a condition and if that condition is falsey, this throws a 400
* Response with the given message.
*
* inspired by invariant from 'tiny-invariant'
*
* @example
* invariantResponse(typeof value === 'string', `value must be a string`)
*
* @param condition The condition to check
* @param message The message to throw (or a callback to generate the message)
* @param responseInit Additional response init options if a response is thrown
*
* @throws {Response} if condition is falsey
*/
export declare function invariantResponse(condition: any, message: string | (() => string), responseInit?: ResponseInit): asserts condition;
@@ -0,0 +1,68 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_helper_html_index = require("../html/index.js");
//#region src/helper/ssg/plugins.ts
/**
* The default plugin that defines the recommended behavior.
*
* @experimental
* `defaultPlugin` is an experimental feature.
* The API might be changed.
*/
const defaultPlugin = () => {
return { afterResponseHook: (res) => {
if (res.status !== 200) return false;
return res;
} };
};
const REDIRECT_STATUS_CODES = /* @__PURE__ */ new Set([
301,
302,
303,
307,
308
]);
const generateRedirectHtml = (location) => {
return require_helper_html_index.html`<!DOCTYPE html>
<title>Redirecting to: ${location}</title>
<meta http-equiv="refresh" content="0;url=${location}" />
<meta name="robots" content="noindex" />
<link rel="canonical" href="${location}" />
<body>
<a href="${location}">Redirecting to <code>${location}</code></a>
</body>
`.toString().replace(/\n/g, "");
};
/**
* The redirect plugin that generates HTML redirect pages for HTTP redirect responses for status codes 301, 302, 303, 307 and 308.
*
* When used with `defaultPlugin`, place `redirectPlugin` before it, because `defaultPlugin` skips non-200 responses.
*
* ```ts
* // ✅ Will work as expected
* toSSG(app, fs, { plugins: [redirectPlugin(), defaultPlugin()] })
*
* // ❌ Will not work as expected
* toSSG(app, fs, { plugins: [defaultPlugin(), redirectPlugin()] })
* ```
*
* @experimental
* `redirectPlugin` is an experimental feature.
* The API might be changed.
*/
const redirectPlugin = () => {
return { afterResponseHook: (res) => {
if (REDIRECT_STATUS_CODES.has(res.status)) {
const location = res.headers.get("Location");
if (!location) return false;
const htmlBody = generateRedirectHtml(location);
return new Response(htmlBody, {
status: 200,
headers: { "Content-Type": "text/html; charset=utf-8" }
});
}
return res;
} };
};
//#endregion
exports.defaultPlugin = defaultPlugin;
exports.redirectPlugin = redirectPlugin;
@@ -0,0 +1 @@
{"version":3,"file":"log-in.js","sources":["../../../src/icons/log-in.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name LogIn\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUgM2g0YTIgMiAwIDAgMSAyIDJ2MTRhMiAyIDAgMCAxLTIgMmgtNCIgLz4KICA8cG9seWxpbmUgcG9pbnRzPSIxMCAxNyAxNSAxMiAxMCA3IiAvPgogIDxsaW5lIHgxPSIxNSIgeDI9IjMiIHkxPSIxMiIgeTI9IjEyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/log-in\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst LogIn = createLucideIcon('LogIn', [\n ['path', { d: 'M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4', key: 'u53s6r' }],\n ['polyline', { points: '10 17 15 12 10 7', key: '1ail0h' }],\n ['line', { x1: '15', x2: '3', y1: '12', y2: '12', key: 'v6grx8' }],\n]);\n\nexport default LogIn;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CAAA,CACtC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC1D,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACnE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,37 @@
var Mn=Object.defineProperty;var Oe=(e,t)=>{for(var r in t)Mn(e,r,{get:t[r],enumerable:!0})};var Rn={};Oe(Rn,{languages:()=>Ln,parsers:()=>Sr,printers:()=>Pi});var Jt=(e,t)=>(r,s,...n)=>r|1&&s==null?void 0:(t.call(s)??s[e]).apply(s,n);var zn=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},Yn=Jt("replaceAll",function(){if(typeof this=="string")return zn}),ct=Yn;function Gn(e){return this[e<0?this.length+e:e]}var Kn=Jt("at",function(){if(Array.isArray(this)||typeof this=="string")return Gn}),V=Kn;var Wn=()=>{},Dt=Wn;var Ot="string",It="array",$t="cursor",kt="indent",Et="align",Xt="trim",vt="group",wt="fill",Tt="if-break",Zt="indent-if-break",te="line-suffix",ee="line-suffix-boundary",Q="line",re="label",xt="break-parent",ne=new Set([$t,kt,Et,Xt,vt,wt,Tt,Zt,te,ee,Q,re,xt]);function Lr(e,t,r){if(!e.has(t)){let s=r(t);e.set(t,s)}return e.get(t)}function jn(e){if(typeof e=="string")return Ot;if(Array.isArray(e))return It;if(!e)return;let{type:t}=e;if(ne.has(t))return t}var se=jn;var Qn=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Jn(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
Expected it to be 'string' or 'object'.`;if(se(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let s=Qn([...ne].map(n=>`'${n}'`));return`Unexpected doc.type '${e.type}'.
Expected it to be ${s}.`}var Ie=class extends Error{name="InvalidDocError";constructor(t){super(Jn(t)),this.doc=t}},Dr=Ie;function $n(e,t){if(typeof e=="string")return t(e);let r=new Map;return s(e);function s(i){return Lr(r,i,n)}function n(i){switch(se(i)){case It:return t(i.map(s));case wt:return t({...i,parts:i.parts.map(s)});case Tt:return t({...i,breakContents:s(i.breakContents),flatContents:s(i.flatContents)});case vt:{let{expandedStates:a,contents:o}=i;return a?(a=a.map(s),o=a[0]):o=s(o),t({...i,contents:o,expandedStates:a})}case Et:case kt:case Zt:case re:case te:return t({...i,contents:s(i.contents)});case Ot:case $t:case Xt:case ee:case Q:case xt:return t(i);default:throw new Dr(i)}}}function ie(e,t=Or){return $n(e,r=>typeof r=="string"?ut(t,r.split(`
`)):r)}var M=Dt,ae=Dt,Ir=Dt,Br=Dt;function F(e){return M(e),{type:kt,contents:e}}function Xn(e,t){return Br(e),M(t),{type:Et,contents:t,n:e}}function Be(e){return Xn(-1,e)}var Re={type:xt};function qe(e){return Ir(e),{type:wt,parts:e}}function I(e,t={}){return M(e),ae(t.expandedStates,!0),{type:vt,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Ve(e,t="",r={}){return M(e),t!==""&&M(t),{type:Tt,breakContents:e,flatContents:t,groupId:r.groupId}}function ut(e,t){M(e),ae(t);let r=[];for(let s=0;s<t.length;s++)s!==0&&r.push(e),r.push(t[s]);return r}var N={type:Q},H={type:Q,soft:!0},Zn={type:Q,hard:!0},ht=[Zn,Re],ts={type:Q,hard:!0,literal:!0},Or=[ts,Re];var Rr=Object.freeze({character:"'",codePoint:39}),qr=Object.freeze({character:'"',codePoint:34}),es=Object.freeze({preferred:Rr,alternate:qr}),rs=Object.freeze({preferred:qr,alternate:Rr});function oe(e,t){let{preferred:r,alternate:s}=t===!0||t==="'"?es:rs,{length:n}=e,i=0,a=0;for(let o=0;o<n;o++){let c=e.charCodeAt(o);c===r.codePoint?i++:c===s.codePoint&&a++}return(i>a?s:r).character}function Fe(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var He=class{#t;constructor(t){this.#t=new Set(t)}getLeadingWhitespaceCount(t){let r=this.#t,s=0;for(let n=0;n<t.length&&r.has(t.charAt(n));n++)s++;return s}getTrailingWhitespaceCount(t){let r=this.#t,s=0;for(let n=t.length-1;n>=0&&r.has(t.charAt(n));n--)s++;return s}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return this.#t.has(t.charAt(0))}hasTrailingWhitespace(t){return this.#t.has(V(0,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let s=`[${Fe([...this.#t].join(""))}]+`,n=new RegExp(r?`(${s})`:s);return t.split(n)}hasWhitespaceCharacter(t){let r=this.#t;return Array.prototype.some.call(t,s=>r.has(s))}hasNonWhitespaceCharacter(t){let r=this.#t;return Array.prototype.some.call(t,s=>!r.has(s))}isWhitespaceOnly(t){let r=this.#t;return Array.prototype.every.call(t,s=>r.has(s))}#e(t){let r=Number.POSITIVE_INFINITY;for(let s of t.split(`
`)){if(s.length===0)continue;let n=this.getLeadingWhitespaceCount(s);if(n===0)return 0;s.length!==n&&n<r&&(r=n)}return r===Number.POSITIVE_INFINITY?0:r}dedentString(t){let r=this.#e(t);return r===0?t:t.split(`
`).map(s=>s.slice(r)).join(`
`)}},Vr=He;var ns=[" ",`
`,"\f","\r"," "],ss=new Vr(ns),R=ss;function is(e){return Array.isArray(e)&&e.length>0}var Bt=is;var Ue=class extends Error{name="UnexpectedNodeError";constructor(t,r,s="type"){super(`Unexpected ${r} node ${s}: ${JSON.stringify(t[s])}.`),this.node=t}},Fr=Ue;function as(e){let{node:t}=e;if(t.type!=="TextNode")return;let{parent:r}=e;if(!(r.type==="ElementNode"&&r.tag==="style"&&r.children.length===1&&r.children[0]===t))return;let s=r.attributes.find(n=>n.type==="AttrNode"&&n.name==="lang");if(!(s&&!(s.value.type==="TextNode"&&(s.value.chars===""||s.value.chars==="css"))))return async n=>{let i=t.chars;return i.trim()?await n(i,{parser:"css"}):""}}var Hr=as;var Rt=null;function qt(e){if(Rt!==null&&typeof Rt.property){let t=Rt;return Rt=qt.prototype=null,t}return Rt=qt.prototype=e??Object.create(null),new qt}var os=10;for(let e=0;e<=os;e++)qt();function Me(e){return qt(e)}function ls(e,t="type"){Me(e);function r(s){let n=s[t],i=e[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:s});return i}return r}var Ur=ls;var cs=Object.freeze([]);function zr(){return cs}var Xa=zr(),Za=zr();var ze=Object.assign;var Mr=console;function Yr(e,t="unexpected unreachable branch"){throw Mr.log("unreachable",e),Mr.log(`${t} :: ${JSON.stringify(e)} (${e})`),new Error("code reached unreachable")}var us=(function(){var e=function(X,b,S,y){for(S=S||{},y=X.length;y--;S[X[y]]=b);return S},t=[2,52],r=[1,20],s=[5,14,15,19,29,34,39,44,47,48,53,57,61],n=[1,44],i=[1,40],a=[1,43],o=[1,33],c=[1,34],h=[1,35],f=[1,36],p=[1,37],g=[1,42],E=[1,46],T=[14,15,19,29,34,39,44,47,48,53,57,61],D=[14,15,19,29,34,44,47,48,53,57,61],B=[15,18],O=[14,15,19,29,34,47,48,53,57,61],z=[33,67,73,75,84,85,86,87,88,89],P=[23,33,56,67,68,73,75,77,79,84,85,86,87,88,89],U=[1,62],C=[1,63],$=[23,33,56,68,73,79],W=[23,33,56,67,68,73,75,77,79,84,85,86,87,88,89,92,93],kr=[2,51],Er=[1,64],vr=[67,73,75,77,84,85,86,87,88,89],wr=[56,67,73,75,84,85,86,87,88,89],Tr=[1,75],we=[1,76],Te=[1,83],gt=[33,67,73,75,79,84,85,86,87,88,89],xr=[23,67,73,75,84,85,86,87,88,89],Nr=[67,68,73,75,84,85,86,87,88,89],bt=[33,79],xe=[1,134],Ar=[73,81],Ne={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,hash:49,expr:50,mustache_repetition0:51,mustache_option0:52,OPEN_UNESCAPED:53,mustache_repetition1:54,mustache_option1:55,CLOSE_UNESCAPED:56,OPEN_PARTIAL:57,partial_repetition0:58,partial_option0:59,openPartialBlock:60,OPEN_PARTIAL_BLOCK:61,openPartialBlock_repetition0:62,openPartialBlock_option0:63,exprHead:64,arrayLiteral:65,sexpr:66,OPEN_SEXPR:67,CLOSE_SEXPR:68,sexpr_repetition0:69,sexpr_option0:70,hash_repetition_plus0:71,hashSegment:72,ID:73,EQUALS:74,OPEN_ARRAY:75,arrayLiteral_repetition0:76,CLOSE_ARRAY:77,blockParams:78,OPEN_BLOCK_PARAMS:79,blockParams_repetition_plus0:80,CLOSE_BLOCK_PARAMS:81,path:82,dataName:83,STRING:84,NUMBER:85,BOOLEAN:86,UNDEFINED:87,NULL:88,DATA:89,pathSegments:90,sep:91,SEP:92,PRIVATE_SEP:93,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",53:"OPEN_UNESCAPED",56:"CLOSE_UNESCAPED",57:"OPEN_PARTIAL",61:"OPEN_PARTIAL_BLOCK",67:"OPEN_SEXPR",68:"CLOSE_SEXPR",73:"ID",74:"EQUALS",75:"OPEN_ARRAY",77:"CLOSE_ARRAY",79:"OPEN_BLOCK_PARAMS",81:"CLOSE_BLOCK_PARAMS",84:"STRING",85:"NUMBER",86:"BOOLEAN",87:"UNDEFINED",88:"NULL",89:"DATA",92:"SEP",93:"PRIVATE_SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,3],[8,5],[8,5],[11,5],[12,3],[60,5],[50,1],[50,1],[64,1],[64,1],[66,3],[66,5],[49,1],[72,3],[65,3],[78,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[83,2],[91,1],[91,1],[82,3],[82,1],[90,3],[90,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[51,0],[51,2],[52,0],[52,1],[54,0],[54,2],[55,0],[55,1],[58,0],[58,2],[59,0],[59,1],[62,0],[62,2],[63,0],[63,1],[69,0],[69,2],[70,0],[70,1],[71,1],[71,Line truncated
`+x.showPosition()+`
Expecting `+Qt.join(", ")+", got '"+(this.terminals_[L]||L)+"'":De="Parse error on line "+(Z+1)+": Unexpected "+(L==Cr?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(De,{text:x.match,token:this.terminals_[L]||L,line:x.yylineno,loc:Ce,expected:Qt})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+lt+", token: "+L);switch(q[0]){case 1:y.push(L),w.push(x.yytext),l.push(x.yylloc),y.push(q[1]),L=null,_e?(L=_e,_e=null):(Lt=x.yyleng,u=x.yytext,Z=x.yylineno,Ce=x.yylloc,Pr>0&&Pr--);break;case 2:if(j=this.productions_[q[1]][1],St.$=w[w.length-j],St._$={first_line:l[l.length-(j||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(j||1)].first_column,last_column:l[l.length-1].last_column},Hn&&(St._$.range=[l[l.length-(j||1)].range[0],l[l.length-1].range[1]]),Le=this.performAction.apply(St,[u,Lt,Z,ot.yy,q[1],w,l].concat(Fn)),typeof Le<"u")return Le;j&&(y=y.slice(0,-1*j*2),w=w.slice(0,-1*j),l=l.slice(0,-1*j)),y.push(this.productions_[q[1]][0]),w.push(St.$),l.push(St._$),_r=yt[y[y.length-2]][y[y.length-1]],y.push(_r);break;case 3:return!0}}return!0}},qn=(function(){var X={EOF:1,parseError:function(S,y){if(this.yy.parser)this.yy.parser.parseError(S,y);else throw new Error(S)},setInput:function(b,S){return this.yy=S||this.yy||{},this._input=b,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var b=this._input[0];this.yytext+=b,this.yyleng++,this.offset++,this.match+=b,this.matched+=b;var S=b.match(/(?:\r\n?|\n).*/g);return S?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),b},unput:function(b){var S=b.length,y=b.split(/(?:\r\n?|\n)/g);this._input=b+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-S),this.offset-=S;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),y.length-1&&(this.yylineno-=y.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:y?(y.length===m.length?this.yylloc.first_column:0)+m[m.length-y.length].length-y[0].length:this.yylloc.first_column-S},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-S]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(b){this.unput(this.match.slice(b))},pastInput:function(){var b=this.matched.substr(0,this.matched.length-this.match.length);return(b.length>20?"...":"")+b.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var b=this.match;return b.length<20&&(b+=this._input.substr(0,20-b.length)),(b.substr(0,20)+(b.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var b=this.pastInput(),S=new Array(b.length+1).join("-");return b+this.upcomingInput()+`
`+S+"^"},test_match:function(b,S){var y,m,w;if(this.options.backtrack_lexer&&(w={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(w.yylloc.range=this.yylloc.range.slice(0))),m=b[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],y=this.performAction.call(this,this.yy,this,S,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var l in w)this[l]=w[l];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var b,S,y,m;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),l=0;l<w.length;l++)if(y=this._input.match(this.rules[w[l]]),y&&(!S||y[0].length>S[0].length)){if(S=y,m=l,this.options.backtrack_lexer){if(b=this.test_match(y,w[l]),b!==!1)return b;if(this._backtrack){S=!1;continue}else return!1}else if(!this.options.flex)break}return S?(b=this.test_match(S,w[m]),b!==!1?b:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var S=this.next();return S||this.lex()},begin:function(S){this.conditionStack.push(S)},popState:function(){var S=this.conditionStack.length-1;return S>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(S){return S=this.conditionStack.length-1-Math.abs(S||0),S>=0?this.conditionStack[S]:"INITIAL"},pushState:function(S){this.begin(S)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(S,y,m,w){function l(u,Z){return y.yytext=y.yytext.substring(u,y.yyleng-Z+u)}var yt=w;switch(m){case 0:if(y.yytext.slice(-2)==="\\\\"?(l(0,1),this.begin("mu")):y.yytext.slice(-1)==="\\"?(l(0,1),this.begin("emu")):this.begin("mu"),y.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(l(5,9),18);case 5:return 15;case 6:return this.popState(),14;break;case 7:return 67;case 8:return 68;case 9:if(S.syntax.square==="string")this.unput(y.yytext),this.begin("escl");else return 75;break;case 10:return 77;case 11:return 19;case 12:return this.popState(),this.begin("raw"),23;break;case 13:return 57;case 14:return 61;case 15:return 29;case 16:return 47;case 17:return this.popState(),44;break;case 18:return this.popState(),44;break;case 19:return 34;case 20:return 39;case 21:return 53;case 22:return 48;case 23:this.unput(y.yytext),this.popState(),this.begin("com");break;case 24:return this.popState(),14;break;case 25:return 48;case 26:return 74;case 27:return 73;case 28:return 73;case 29:return 93;case 30:return 92;case 31:break;case 32:return this.popState(),56;break;case 33:return this.popState(),33;break;case 34:return y.yytext=l(1,2).replace(/\\"/g,'"'),84;break;case 35:return y.yytext=l(1,2).replace(/\\'/g,"'"),84;break;case 36:return 89;case 37:return 86;case 38:return 86;case 39:return 87;case 40:return 88;case 41:return 85;case 42:return 79;case 43:return 81;case 44:return 73;case 45:return y.yytext=y.yytext.replace(/\\([\\\]])/g,"$1"),this.popState(),73;break;case 46:return"INVALID";case 47:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)\]|])))/,/^(?:\.#)/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)\]])))/,/^(?:false(?=([~}\s)\]])))/,/^(?:undefined(?=([~}\s)\]])))/,/^(?:null(?=([~}\s)\]])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)\]])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)\]|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},escl:{rules:[45],inclusive:!1},INITIAL:{rules:[0,1,47],inclusive:!0}}};return X})();Ne.lexer=qn;function Ae(){this.yy={}}return Ae.prototype=Ne,Ne.Parser=Ae,new Ae})(),Vt=us;var Ye=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Ge(e,t){var r=t&&t.loc,s,n,i,a;r&&(s=r.start.line,n=r.end.line,i=r.start.column,a=r.end.column,e+=" - "+s+":"+i);for(var o=Error.prototype.constructor.call(this,e),c=0;c<Ye.length;c++)this[Ye[c]]=o[Ye[c]];Error.captureStackTrace&&Error.captureStackTrace(this,Ge);try{r&&(this.lineNumber=s,this.endLineNumber=n,Object.defineProperty?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:a,enumerable:!0})):(this.column=i,this.endColumn=a))}catch{}}Ge.prototype=new Error;var tt=Ge;function le(){this.parents=[]}le.prototype={constructor:le,mutating:!1,acceptKey:function(e,t){var r=this.accept(e[t]);if(this.mutating){if(r&&!le.prototype[r.type])throw new tt('Unexpected node type "'+r.type+'" found when accepting '+t+" on "+e.type);e[t]=r}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new tt(e.type+" requires "+t)},acceptArray:function(e){for(var t=0,r=e.length;t<r;t++)this.acceptKey(e,t),e[t]||(e.splice(t,1),Line truncated
`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangle:"\u22EB",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",nprec:"\u2280",npreceq:"\u2AAF\u0338",npre:"\u2AAF\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",Ocirc:"\xD4",ocirc:"\xF4",ocir:"\u229A",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",orarr:"\u21BB",Or:"\u2A54",or:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",otimesas:"\u2A36",Otimes:"\u2A37",otimes:"\u2297",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4Line truncated
`)}var Xe=(function(){function e(t,r,s){s===void 0&&(s="precompile"),this.delegate=t,this.entityParser=r,this.mode=s,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var n=this.peek();if(n==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&n===`
`){var i=this.tagNameBuffer.toLowerCase();(i==="pre"||i==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var n=this.peek(),i=this.tagNameBuffer;n==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):n==="&"&&i!=="script"&&i!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(n))},tagOpen:function(){var n=this.consume();n==="!"?this.transitionTo("markupDeclarationOpen"):n==="/"?this.transitionTo("endTagOpen"):(n==="@"||n===":"||Jr(n))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(n))},markupDeclarationOpen:function(){var n=this.consume();if(n==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var i=n.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();i==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var n=this.consume();_(n)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var n=this.consume();_(n)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(n.toLowerCase()))},doctypeName:function(){var n=this.consume();_(n)?this.transitionTo("afterDoctypeName"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(n.toLowerCase())},afterDoctypeName:function(){var n=this.consume();if(!_(n))if(n===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var i=n.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),a=i.toUpperCase()==="PUBLIC",o=i.toUpperCase()==="SYSTEM";(a||o)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),a?this.transitionTo("afterDoctypePublicKeyword"):o&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var n=this.peek();_(n)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):n==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):n==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):n===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var n=this.consume();n==='"'?this.transitionTo("afterDoctypePublicIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(n)},doctypePublicIdentifierSingleQuoted:function(){var n=this.consume();n==="'"?this.transitionTo("afterDoctypePublicIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(n)},afterDoctypePublicIdentifier:function(){var n=this.consume();_(n)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):n==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):n==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var n=this.consume();_(n)||(n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):n==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):n==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var n=this.consume();n==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(n)},doctypeSystemIdentifierSingleQuoted:function(){var n=this.consume();n==="'"?this.transitionTo("afterDoctypeSystemIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(n)},afterDoctypeSystemIdentifier:function(){var n=this.consume();_(n)||n===">"&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var n=this.consume();n==="-"?this.transitionTo("commentStartDash"):n===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(n),this.transitionTo("comment"))},commentStartDash:function(){var n=this.consumLine truncated
`?(this.line++,this.column=0):this.column++,t},e.prototype.consumeCharRef=function(){var t=this.input.indexOf(";",this.index);if(t!==-1){var r=this.input.slice(this.index,t),s=this.entityParser.parse(r);if(s){for(var n=r.length;n;)this.consume(),n--;return this.consume(),s}}},e.prototype.markTagStart=function(){this.delegate.tagOpen()},e.prototype.appendToTagName=function(t){this.tagNameBuffer+=t,this.delegate.appendToTagName(t)},e.prototype.isIgnoredEndTag=function(){var t=this.tagNameBuffer;return t==="title"&&this.input.substring(this.index,this.index+8)!=="</title>"||t==="style"&&this.input.substring(this.index,this.index+8)!=="</style>"||t==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},e})(),ho=(function(){function e(t,r){r===void 0&&(r={}),this.options=r,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new Xe(this,t,r.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(t){return this.tokens=[],this.tokenizer.tokenize(t),this.tokens},e.prototype.tokenizePart=function(t){return this.tokens=[],this.tokenizer.tokenizePart(t),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var t=this.token;if(t===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return t;for(var r=0;r<arguments.length;r++)if(t.type===arguments[r])return t;throw new Error("token type was unexpectedly "+t.type)},e.prototype.push=function(t){this.token=t,this.tokens.push(t)},e.prototype.currentAttribute=function(){return this._currentAttribute},e.prototype.addLocInfo=function(){this.options.loc&&(this.current().loc={start:{line:this.startLine,column:this.startColumn},end:{line:this.tokenizer.line,column:this.tokenizer.column}}),this.startLine=this.tokenizer.line,this.startColumn=this.tokenizer.column},e.prototype.beginDoctype=function(){this.push({type:"Doctype",name:""})},e.prototype.appendToDoctypeName=function(t){this.current("Doctype").name+=t},e.prototype.appendToDoctypePublicIdentifier=function(t){var r=this.current("Doctype");r.publicIdentifier===void 0?r.publicIdentifier=t:r.publicIdentifier+=t},e.prototype.appendToDoctypeSystemIdentifier=function(t){var r=this.current("Doctype");r.systemIdentifier===void 0?r.systemIdentifier=t:r.systemIdentifier+=t},e.prototype.endDoctype=function(){this.addLocInfo()},e.prototype.beginData=function(){this.push({type:"Chars",chars:""})},e.prototype.appendToData=function(t){this.current("Chars").chars+=t},e.prototype.finishData=function(){this.addLocInfo()},e.prototype.beginComment=function(){this.push({type:"Comment",chars:""})},e.prototype.appendToCommentData=function(t){this.current("Comment").chars+=t},e.prototype.finishComment=function(){this.addLocInfo()},e.prototype.tagOpen=function(){},e.prototype.beginStartTag=function(){this.push({type:"StartTag",tagName:"",attributes:[],selfClosing:!1})},e.prototype.beginEndTag=function(){this.push({type:"EndTag",tagName:""})},e.prototype.finishTag=function(){this.addLocInfo()},e.prototype.markTagAsSelfClosing=function(){this.current("StartTag").selfClosing=!0},e.prototype.appendToTagName=function(t){this.current("StartTag","EndTag").tagName+=t},e.prototype.beginAttribute=function(){this._currentAttribute=["","",!1]},e.prototype.appendToAttributeName=function(t){this.currentAttribute()[0]+=t},e.prototype.beginAttributeValue=function(t){this.currentAttribute()[2]=t},e.prototype.appendToAttributeValue=function(t){this.currentAttribute()[1]+=t},e.prototype.finishAttributeValue=function(){this.current("StartTag").attributes.push(this._currentAttribute)},e.prototype.reportSyntaxError=function(t){this.current().syntaxError=t},e})();var pe={Append:1,TrustingAppend:2,Comment:3,Modifier:4,StrictModifier:5,Block:6,StrictBlock:7,Component:8,OpenElement:10,OpenElementWithSplat:11,FlushElement:12,CloseElement:13,StaticAttr:14,DynamicAttr:15,ComponentAttr:16,AttrSplat:17,Yield:18,DynamicArg:20,StaticArg:21,TrustingDynamicAttr:22,TrustingComponentAttr:23,StaticComponentAttr:24,Debugger:26,Undefined:27,Call:28,Concat:29,GetSymbol:30,GetLexicalSymbol:32,GetStrictKeyword:31,GetFreeAsComponentOrHelperHead:35,GetFreeAsHelperHead:37,GetFreeAsModifierHead:38,GetFreeAsComponentHead:39,InElement:40,If:41,Each:42,Let:44,WithDynamicVars:45,InvokeComponent:46,HasBlock:48,HasBlockParams:49,Curry:50,Not:51,IfInline:52,GetDynamicVar:53,Log:54};function Xr(e){return function(t){return Array.isArray(t)&&t[0]===e}}var fo=Xr(pe.FlushElement);var mo=Xr(pe.GetSymbol);var _s=!1,Ls=/["\x26\xa0]/u,wo=new RegExp(Ls.source,"gu"),Ds=/[&<>\xa0]/u,To=new RegExp(Ds.source,"gu");var de=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function on(){return[...de]}function Os(e){return de.has(e.toLowerCase())&&e[0]?.toLowerCase()===e[0]}function YLine truncated
`,s);if(t<=n||n===-1)return{line:r+1,column:t-s};r+=1,s=n+1}}charPosFor(t){let{line:r,column:s}=t,n=this.source.length,i=0,a=0;for(;a<n;){let o=this.source.indexOf(`
`,a);if(o===-1&&(o=this.source.length),i===r-1){if(a+s>o)return o;if(_s){let c=this.hbsPosFor(a+s);c.line,c.column}return a+s}if(o===-1)return 0;i+=1,a=o+1}return n}};function k(e,t){let{module:r,loc:s}=t,{line:n,column:i}=s.start,a=t.asString(),o=a?`
|
| ${a.split(`
`).join(`
| `)}
|
`:"",c=new Error(`${e}: ${o}(error occurred in '${r}' @ line ${n} : column ${i})`);return c.name="SyntaxError",c.location=t,c.code=a,c}var be={Template:["body"],Block:["body"],MustacheStatement:["path","params","hash"],BlockStatement:["path","params","hash","program","inverse"],ElementModifierStatement:["path","params","hash"],CommentStatement:[],MustacheCommentStatement:[],ElementNode:["attributes","modifiers","children","comments"],AttrNode:["value"],TextNode:[],ConcatStatement:["parts"],SubExpression:["path","params","hash"],PathExpression:[],StringLiteral:[],BooleanLiteral:[],NumberLiteral:[],NullLiteral:[],UndefinedLiteral:[],Hash:["pairs"],HashPair:["value"]},mr=(function(){function e(t,r,s,n){let i=Error.call(this,t);this.key=n,this.message=t,this.node=r,this.parent=s,i.stack&&(this.stack=i.stack)}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e})();function Zr(e,t,r){return new mr("Cannot remove a node unless it is part of an array",e,t,r)}function qs(e,t,r){return new mr("Cannot replace a node with multiple nodes unless it is part of an array",e,t,r)}function tn(e,t){return new mr("Replacing and removing in key handlers is not yet supported.",e,null,t)}var Ct=class{constructor(t,r=null,s=null){this.node=t,this.parent=r,this.parentKey=s}get parentNode(){return this.parent?this.parent.node:null}parents(){return{[Symbol.iterator]:()=>new lr(this)}}},lr=class{constructor(t){this.path=t}next(){return this.path.parent?(this.path=this.path.parent,{done:!1,value:this.path}):{done:!0,value:null}}};function cn(e){return typeof e=="function"?e:e.enter}function un(e){return typeof e=="function"?void 0:e.exit}function ye(e,t){let r,s,n,{node:i,parent:a,parentKey:o}=t,c=(function(h,f){if(h.Program&&(f==="Template"&&!h.Template||f==="Block"&&!h.Block))return h.Program;let p=h[f];return p!==void 0?p:h.All})(e,i.type);if(c!==void 0&&(r=cn(c),s=un(c)),r!==void 0&&(n=r(i,t)),n!=null){if(JSON.stringify(i)!==JSON.stringify(n))return Array.isArray(n)?(hn(e,n,a,o),n):ye(e,new Ct(n,a,o))||n;n=void 0}if(n===void 0){let h=be[i.type];for(let f=0;f<h.length;f++)Vs(e,c,t,h[f]);s!==void 0&&(n=s(i,t))}return n}function en(e,t,r){e[t]=r}function Vs(e,t,r,s){let n,i,{node:a}=r,o=(function(c,h){return c[h]})(a,s);if(o){if(t!==void 0){let c=(function(h,f){let p=typeof h!="function"?h.keys:void 0;if(p===void 0)return;let g=p[f];return g!==void 0?g:p.All})(t,s);c!==void 0&&(n=cn(c),i=un(c))}if(n!==void 0&&n(a,s)!==void 0)throw tn(a,s);if(Array.isArray(o))hn(e,o,r,s);else{let c=ye(e,new Ct(o,r,s));c!==void 0&&(function(h,f,p,g){if(g===null)throw Zr(p,h,f);if(Array.isArray(g)){if(g.length!==1)throw g.length===0?Zr(p,h,f):qs(p,h,f);en(h,f,g[0])}else en(h,f,g)})(a,s,o,c)}if(i!==void 0&&i(a,s)!==void 0)throw tn(a,s)}}function hn(e,t,r,s){for(let n=0;n<t.length;n++){let i=t[n],a=ye(e,new Ct(i,r,s));a!==void 0&&(n+=Fs(t,n,a)-1)}}function Fs(e,t,r){return r===null?(e.splice(t,1),0):Array.isArray(r)?(e.splice(t,1,...r),r.length):(e.splice(t,1,r),1)}function Hs(e,t){ye(t,new Ct(e))}function At(e,t){(function(r){switch(r.type){case"Block":case"Template":return r.body;case"ElementNode":return r.children}})(e).push(t)}function pn(e){return e.type==="StringLiteral"||e.type==="BooleanLiteral"||e.type==="NumberLiteral"||e.type==="NullLiteral"||e.type==="UndefinedLiteral"}var Ze;function tr(){return Ze||(Ze=new ft("","(synthetic)")),Ze}function rn(e,t){return d.var({name:e,loc:v(t||null)})}function rt(e,t){let r=v(t||null);if(typeof e!="string"){if("type"in e)return e;{e.head.indexOf(".");let{head:i,tail:a}=e;return d.path({head:d.head({original:i,loc:r.sliceStartChars({chars:i.length})}),tail:a,loc:v(t||null)})}}let{head:s,tail:n}=(function(i,a){let[o,...c]=i.split("."),h=d.head({original:o,loc:v(a||null)});return d.path({head:h,tail:c,loc:v(a||null)})})(e,r);return d.path({head:s,tail:n,loc:r})}function me(e,t,r){return d.literal({type:e,value:t,loc:v(r||null)})}function Ht(e=[],t){return d.hash({pairs:e,loc:v(t||null)})}function fn(e){return e.map((t=>typeof t=="string"?d.var({name:t,loc:A.synthetic(t)}):t))}function nn(e=[],t=[],r=!1,s){return d.blockItself({body:e,params:fn(t),chained:r,loc:v(s||null)})}function sn(e=[],t=[],r){return d.template({body:e,blockParams:t,loc:v(r||null)})}function v(...e){if(e.length===1){let t=e[0];return t&&typeof t=="object"?A.forHbsLoc(tr(),t):A.forHbsLoc(tr(),Bs)}{let[t,r,s,n,i]=e,a=i?new ft("",i):tr();return A.forHbsLoc(a,{start:{line:t,column:r},end:{line:s||t,column:n||r}})}}var Us={mustache:function(e,t=[],r=Ht([]),s=!1,n,i){return d.mustache({path:rt(e),params:t,hash:r,trusting:s,strip:i,loc:v(n||null)})},block:function(e,t,r,s,n=null,i,a,o,c){let h,f=null;return h=s.type==="Template"?d.blockItself({params:fn(s.blockParams),body:s.body,loc:s.loc}):s,n?.type==="Template"?(n.blockParams.length,f=d.blockItself({params:[],body:n.body,loc:n.loc})):f=n,d.block({path:rt(e),params:t||[],hash:r||Ht([]),defaultBlock:h,elseBlock:f,loc:v(i||null),openStrip:a,inverseStrip:o,closeStrip:c})},cLine truncated
`)}},ur=class extends cr{parse(t,r){t.loc;let s=d.template({body:[],blockParams:r,loc:this.source.spanFor(t.loc)}),n=this.parseProgram(s,t);return this.pendingError?.eof(n.loc.getEnd()),n}Program(t,r){t.loc;let s=d.blockItself({body:[],params:r,chained:t.chained,loc:this.source.spanFor(t.loc)});return this.parseProgram(s,t)}parseProgram(t,r){if(r.body.length===0)return t;let s;try{this.elementStack.push(t);for(let n of r.body)this.acceptNode(n)}finally{s=this.elementStack.pop()}if(t!==s){if(s?.type==="ElementNode")throw k(`Unclosed element \`${s.tag}\``,s.loc);t.type}return t}BlockStatement(t){if(this.tokenizer.state==="comment")return t.loc,void this.appendToCommentData(this.sourceForNode(t));if(this.tokenizer.state!=="data"&&this.tokenizer.state!=="beforeData")throw k("A block may only be used inside an HTML element or another block.",this.source.spanFor(t.loc));let{path:r,params:s,hash:n}=rr(this,t),i=this.source.spanFor(t.loc),a,o=[];if(t.program.blockParams?.length){let p=n.loc.collapse("end");p=t.program.loc?p.withEnd(this.source.spanFor(t.program.loc).getStart()):t.program.body[0]?p.withEnd(this.source.spanFor(t.program.body[0].loc).getStart()):p.withEnd(i.getEnd()),a=an(this.source,t,p);let g=p.asString(),E=g.indexOf("|")+1,T=g.indexOf("|",E);for(let D of t.program.blockParams){let B,O;B=E>=T?-1:g.indexOf(D,E),B===-1||B+D.length>T?(E=T,O=this.source.spanFor(sr)):(E=B,O=p.sliceStartChars({skipStart:E,chars:D.length}),E+=D.length),o.push(d.var({name:D,loc:O}))}}else a=an(this.source,t,i);let c=this.Program(a.program,o),h=a.inverse?this.Program(a.inverse,[]):null,f=d.block({path:r,params:s,hash:n,defaultBlock:c,elseBlock:h,loc:this.source.spanFor(t.loc),openStrip:t.openStrip,inverseStrip:t.inverseStrip,closeStrip:t.closeStrip});At(this.currentElement(),f)}MustacheStatement(t){this.pendingError?.mustache(this.source.spanFor(t.loc));let{tokenizer:r}=this;if(r.state==="comment")return void this.appendToCommentData(this.sourceForNode(t));let s,{escaped:n,loc:i,strip:a}=t;if("original"in t.path&&t.path.original==="...attributes")throw k("Illegal use of ...attributes",this.source.spanFor(t.loc));if(pn(t.path))s=d.mustache({path:this.acceptNode(t.path),params:[],hash:d.hash({pairs:[],loc:this.source.spanFor(t.path.loc).collapse("end")}),trusting:!n,loc:this.source.spanFor(i),strip:a});else{let{path:o,params:c,hash:h}=rr(this,t);s=d.mustache({path:o,params:c,hash:h,trusting:!n,loc:this.source.spanFor(i),strip:a})}switch(r.state){case"tagOpen":case"tagName":throw k("Cannot use mustaches in an elements tagname",s.loc);case"beforeAttributeName":nr(this.currentStartTag,s);break;case"attributeName":case"afterAttributeName":this.beginAttributeValue(!1),this.finishAttributeValue(),nr(this.currentStartTag,s),r.transitionTo("beforeAttributeName");break;case"afterAttributeValueQuoted":nr(this.currentStartTag,s),r.transitionTo("beforeAttributeName");break;case"beforeAttributeValue":this.beginAttributeValue(!1),this.appendDynamicAttributeValuePart(s),r.transitionTo("attributeValueUnquoted");break;case"attributeValueDoubleQuoted":case"attributeValueSingleQuoted":case"attributeValueUnquoted":this.appendDynamicAttributeValuePart(s);break;default:At(this.currentElement(),s)}return s}appendDynamicAttributeValuePart(t){this.finalizeTextPart();let r=this.currentAttr;r.isDynamic=!0,r.parts.push(t)}finalizeTextPart(){let t=this.currentAttr.currentPart;t!==null&&(this.currentAttr.parts.push(t),this.startTextPart())}startTextPart(){this.currentAttr.currentPart=null}ContentStatement(t){(function(r,s){let n=s.loc.start.line,i=s.loc.start.column,a=(function(o,c){if(c==="")return{lines:o.split(`
`).length-1,columns:0};let[h]=o.split(c),f=h.split(/\n/u),p=f.length-1;return{lines:p,columns:f[p].length}})(s.original,s.value);n+=a.lines,a.lines?i=a.columns:i+=a.columns,r.line=n,r.column=i})(this.tokenizer,t),this.tokenizer.tokenizePart(t.value),this.tokenizer.flushData()}CommentStatement(t){let{tokenizer:r}=this;if(r.state==="comment")return this.appendToCommentData(this.sourceForNode(t)),null;let{value:s,loc:n}=t,i=d.mustacheComment({value:s,loc:this.source.spanFor(n)});switch(r.state){case"beforeAttributeName":case"afterAttributeName":this.currentStartTag.comments.push(i);break;case"beforeData":case"data":At(this.currentElement(),i);break;default:throw k(`Using a Handlebars comment when in the \`${r.state}\` state is not supported`,this.source.spanFor(t.loc))}return i}PartialStatement(t){throw k("Handlebars partials are not supported",this.source.spanFor(t.loc))}PartialBlockStatement(t){throw k("Handlebars partial blocks are not supported",this.source.spanFor(t.loc))}Decorator(t){throw k("Handlebars decorators are not supported",this.source.spanFor(t.loc))}DecoratorBlock(t){throw k("Handlebars decorator blocks are not supported",this.source.spanFor(t.loc))}SubExpression(t){let{path:r,params:s,hash:n}=rr(this,t);return d.sexpr({path:r,params:s,hash:n,loc:this.source.spanFor(t.loc)})}PathExpression(t){let{original:r}=t,s;if(r.indexOf("/")!==-1){if(r.slice(0,2)==="./")throw k('Using "./" is not supported in Glimmer and unnecessary',this.source.spanFor(t.loc));if(r.slice(0,3)==="../")throw k('Changing context using "../" is not supported in Glimmer',this.source.spanFor(t.loc));if(r.indexOf(".")!==-1)throw k("Mixing '.' and '/' in paths is not supported in Glimmer; use only '.' to separate property paths",this.source.spanFor(t.loc));s=[t.parts.join("/")]}else{if(r===".")throw k("'.' is not a supported path in Glimmer; check for a path with a trailing '.'",this.source.spanFor(t.loc));s=t.parts}let n,i=!1;if(/^this(?:\..+)?$/u.test(r)&&(i=!0),i)n=d.this({loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+4}})});else if(t.data){let a=s.shift();if(a===void 0)throw k("Attempted to parse a path expression, but it was not valid. Paths beginning with @ must start with a-z.",this.source.spanFor(t.loc));n=d.atName({name:`@${a}`,loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+a.length+1}})})}else{let a=s.shift();if(a===void 0)throw k("Attempted to parse a path expression, but it was not valid. Paths must start with a-z or A-Z.",this.source.spanFor(t.loc));n=d.var({name:a,loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+a.length}})})}return d.path({head:n,tail:s,loc:this.source.spanFor(t.loc)})}Hash(t){let r=t.pairs.map((s=>d.pair({key:s.key,value:this.acceptNode(s.value),loc:this.source.spanFor(s.loc)})));return d.hash({pairs:r,loc:this.source.spanFor(t.loc)})}StringLiteral(t){return d.literal({type:"StringLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}BooleanLiteral(t){return d.literal({type:"BooleanLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}NumberLiteral(t){return d.literal({type:"NumberLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}UndefinedLiteral(t){return d.literal({type:"UndefinedLiteral",value:void 0,loc:this.source.spanFor(t.loc)})}NullLiteral(t){return d.literal({type:"NullLiteral",value:null,loc:this.source.spanFor(t.loc)})}constructor(...t){super(...t),this.pendingError=null}};function rr(e,t){let r;switch(t.path.type){case"PathExpression":r=e.PathExpression(t.path);break;case"SubExpression":r=e.SubExpression(t.path);break;case"StringLiteral":case"UndefinedLiteral":case"NullLiteral":case"NumberLiteral":case"BooleanLiteral":{let i;throw i=t.path.type==="BooleanLiteral"?t.path.original.toString():t.path.type==="StringLiteral"?`"${t.path.original}"`:t.path.type==="NullLiteral"?"null":t.path.type==="NumberLiteral"?t.path.value.toString():"undefined",k(`${t.path.type} "${t.path.type==="StringLiteral"?t.path.original:i}" cannot be called as a sub-expression, replace (${i}) with ${i}`,e.source.spanFor(t.path.loc))}}let s=t.params.map((i=>e.acceptNode(i))),n=Yt(s)?fr(s).loc:r.loc;return{path:r,params:s,hash:t.hash?e.Hash(t.hash):d.hash({pairs:[],loc:e.source.spanFor(n).collapse("end")})}}function nr(e,t){let{path:r,params:s,hash:n,loc:i}=t;if(pn(r)){let o=`{{${(function(c){return c.type==="UndefinedLiteral"?"undefined":JSON.stringify(c.value)})(r)}}}`;throw k(`In <${e.name} ... ${o} ..., ${o} is not a valid modifier`,t.loc)}let a=d.elementModifier({path:r,params:s,hash:n,loc:i});e.modifiers.push(a)}function an(e,t,r){if(!t.program.loc){let n=V(0,t.program.body,0),i=V(0,t.program.body,-1);if(n&&i)t.program.loc={...n.loc,end:i.loc.end};else{let a=e.spanFor(t.loc);t.program.loc=r.withEnd(a.getEnd())}}let s=e.spanFor(t.program.loc).getEnd();return t.inverse&&!t.inverse.loc&&(t.inverse.loc=s.collapsed()),t}function Nt(e){return/[\t\n\f ]/u.test(e)}Line truncated
`?s?s.loc.getEnd():this.currentAttr.valueSpan.getStart():i.move(-1),this.currentAttr.currentPart=d.text({chars:t,loc:i.collapsed()})}}finishAttributeValue(){this.finalizeTextPart();let t=this.currentTag,r=this.offset();if(t.type==="EndTag")throw k("Invalid end tag: closing tag must not have attributes",this.source.spanFor({start:t.start.toJSON(),end:r.toJSON()}));let{name:s,parts:n,start:i,isQuoted:a,isDynamic:o,valueSpan:c}=this.currentAttr;if(s.startsWith("|")&&n.length===0&&!a&&!o)throw k("Invalid block parameters syntax: block parameters must be preceded by the `as` keyword",i.until(i.move(s.length)));let h=this.assembleAttributeValue(n,a,o,i.until(r));h.loc=c.withEnd(r);let f=d.attr({name:s,value:h,loc:i.until(r)});this.currentStartTag.attributes.push(f)}parsePossibleBlockParams(){let t=/[!"#%&'()*+./;<=>@[\\\]^`{|}~]/u;this.tokenizer.state;let r=this.currentStartTag,s=this.currentAttr,n={state:"PossibleAs"},i={PossibleAs:o=>{if(n.state,Nt(o))n={state:"BeforeStartPipe"},this.tokenizer.transitionTo("afterAttributeName"),this.tokenizer.consume();else{if(o==="|")throw k('Invalid block parameters syntax: expecting at least one space character between "as" and "|"',s.start.until(this.offset().move(1)));n={state:"Done"}}},BeforeStartPipe:o=>{n.state,Nt(o)?this.tokenizer.consume():o==="|"?(n={state:"BeforeBlockParamName"},this.tokenizer.transitionTo("beforeAttributeName"),this.tokenizer.consume()):n={state:"Done"}},BeforeBlockParamName:o=>{if(n.state,Nt(o))this.tokenizer.consume();else if(o==="")n={state:"Done"},this.pendingError={mustache(c){throw k("Invalid block parameters syntax: mustaches cannot be used inside parameters list",c)},eof(c){throw k('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}};else if(o==="|"){if(r.params.length===0)throw k("Invalid block parameters syntax: empty parameters list, expecting at least one identifier",s.start.until(this.offset().move(1)));n={state:"AfterEndPipe"},this.tokenizer.consume()}else{if(o===">"||o==="/")throw k('Invalid block parameters syntax: incomplete parameters list, expecting "|" but the tag was closed prematurely',s.start.until(this.offset().move(1)));n={state:"BlockParamName",name:o,start:this.offset()},this.tokenizer.consume()}},BlockParamName:o=>{if(n.state,o==="")n={state:"Done"},this.pendingError={mustache(c){throw k("Invalid block parameters syntax: mustaches cannot be used inside parameters list",c)},eof(c){throw k('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}};else if(o==="|"||Nt(o)){let c=n.start.until(this.offset());if(n.name==="this"||t.test(n.name))throw k(`Invalid block parameters syntax: invalid identifier name \`${n.name}\``,c);r.params.push(d.var({name:n.name,loc:c})),n=o==="|"?{state:"AfterEndPipe"}:{state:"BeforeBlockParamName"},this.tokenizer.consume()}else{if(o===">"||o==="/")throw k('Invalid block parameters syntax: expecting "|" but the tag was closed prematurely',s.start.until(this.offset().move(1)));n.name+=o,this.tokenizer.consume()}},AfterEndPipe:o=>{n.state,Nt(o)?this.tokenizer.consume():o===""?(n={state:"Done"},this.pendingError={mustache(c){throw k("Invalid block parameters syntax: modifiers cannot follow parameters list",c)},eof(c){throw k('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}}):o===">"||o==="/"?n={state:"Done"}:(n={state:"Error",message:'Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',start:this.offset()},this.tokenizer.consume())},Error:o=>{if(n.state,o===""||o==="/"||o===">"||Nt(o))throw k(n.message,n.start.until(this.offset()));this.tokenizer.consume()},Done:()=>{}},a;do a=this.tokenizer.peek(),i[n.state](a);while(n.state!=="Done"&&a!=="");n.state}reportSyntaxError(t){throw k(t,this.offset().collapsed())}assembleConcatenatedValue(t){let r=Is(t),s=fr(t);return d.concat({parts:t,loc:this.source.spanFor(r.loc).extend(this.source.spanFor(s.loc))})}validateEndTag(t,r,s){if(de.has(t.name)&&!s)throw k(`<${t.name}> elements do not need end tags. You should remove it`,t.loc);if(r.type!=="ElementNode")throw k(`Closing tag </${t.name}> without an open tag`,t.loc);if(r.tag!==t.name)throw k(`Closing tag </${t.name}> did not match last open tag <${r.tag}> (on line ${r.loc.startPosition.line})`,t.loc)}assembleAttributeValue(t,r,s,n){if(s){if(r)return this.assembleConcatenatedValue(t);{let[i,a]=t;if(a===void 0||a.type==="TextNode"&&a.chars==="/")return i;throw k("An unquoted attribute value must be a string or a mustache, preceded by whitespace or a '=' character, and followed by whitespace, a '>' character, or '/>'",n)}}return Yt(t)?t[0]:d.text({chars:"",loc:n})}constructor(...t){super(...t),this.tagOpenLine=0,this.tagOpenColumn=0}},Ms={},pr=class extends $e{constructor(){super({})}parse(){}};function mn(e,t={}){let r,s,n,i=t.mode||"precompile";typeLine truncated
`).length-1}function ai(e){e=typeof e=="string"?e:"";let t=(e.match(/^([^\S\n\r]*[\n\r])+/g)||[])[0]||"";return _t(t)}function oi(e){e=typeof e=="string"?e:"";let t=(e.match(/([\n\r][^\S\n\r]*)+$/g)||[])[0]||"";return _t(t)}function Kt(e=0){return Array.from({length:Math.min(e,xn)},()=>ht)}function li(e,t){let{node:{value:r}}=e,s=oe(r,ci(e)?!t.singleQuote:t.singleQuote);return[s,ct(0,r,s,`\\${s}`),s]}function ci(e){let{ancestors:t}=e,r=t.findIndex(s=>s.type!=="SubExpression");return r!==-1&&t[r+1].type==="ConcatStatement"&&t[r+2].type==="AttrNode"}function ui(e,t){let r=br(e,t),s=ve(e,t);return s?F([r,N,I(s)]):r}function Tn(e,t){let r=br(e,t),s=ve(e,t);return s?[F([r,N,s]),H]:r}function br(e,t){return t("path")}function ve(e,t){let{node:r}=e,s=[];return r.params.length>0&&s.push(...e.map(t,"params")),r.hash?.pairs.length>0&&s.push(t("hash")),s.length===0?"":ut(N,s)}function yr(e){return["as |",e.blockParams.join(" "),"|"]}var hi=new Set("!\"#%&'()*+,./;<=>@[\\]^`{|}~"),pi=new Set(["true","false","null","undefined"]),fi=(e,t)=>t===0&&e.startsWith("@")?!1:t!==0&&pi.has(e)||/\s/.test(e)||/^\d/.test(e)||Array.prototype.some.call(e,r=>hi.has(r));function mi(e){return e.tail.length===0&&e.original.includes("/")?e.original:[e.head.original,...e.tail].map((r,s)=>fi(r,s)?`[${r}]`:r).join(".")}var di={features:{experimental_frontMatterSupport:{massageAstNode:!0,embed:!0,print:!0}},print:js,massageAstNode:dr,hasPrettierIgnore:yn,getVisitorKeys:dn,embed:Hr},_n=di;var Ln=[{name:"Handlebars",type:"markup",aceMode:"handlebars",extensions:[".handlebars",".hbs"],tmScope:"text.html.handlebars",aliases:["hbs","htmlbars"],parsers:["glimmer"],vscodeLanguageIds:["handlebars"],linguistLanguageId:155}];var Sr={};Oe(Sr,{glimmer:()=>Ai});function gi(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)}var Dn=gi;function bi(e){return ct(0,e,/[^\n]/g," ")}var On=bi;var In=Symbol.for("PRETTIER_IS_FRONT_MATTER");var Wt=3;function yi(e){let t=e.slice(0,Wt);if(t!=="---"&&t!=="+++")return;let r=e.indexOf(`
`,Wt);if(r===-1)return;let s=e.slice(Wt,r).trim(),n=e.indexOf(`
${t}`,r),i=s;if(i||(i=t==="+++"?"toml":"yaml"),n===-1&&t==="---"&&i==="yaml"&&(n=e.indexOf(`
...`,r)),n===-1)return;let a=n+1+Wt,o=e.charAt(a+1);if(!/\s?/.test(o))return;let c=e.slice(0,a),h;return{language:i,explicitLanguage:s||null,value:e.slice(r+1,n),startDelimiter:t,endDelimiter:c.slice(-Wt),raw:c,start:{line:1,column:0,index:0},end:{index:c.length,get line(){return h??(h=c.split(`
`)),h.length},get column(){return h??(h=c.split(`
`)),V(0,h,-1).length}},[In]:!0}}function Si(e){let t=yi(e);return t?{frontMatter:t,get content(){let{raw:r}=t;return On(r)+e.slice(r.length)}}:{content:e}}var Bn=Si;function ki(e){let t=e.children??e.body;if(t)for(let r=0;r<t.length-1;r++)t[r].type==="TextNode"&&t[r+1].type==="MustacheStatement"&&(t[r].chars=t[r].chars.replace(/\\$/,"\\\\"))}var Ei=e=>{let{start:t,end:r}=e.loc;t.offset=e.loc.getStart().offset,r.offset=e.loc.getEnd().offset},vi=()=>({name:"glimmerPrettierParsePlugin",visitor:{All(e){Ei(e),ki(e)}}}),wi={mode:"codemod",plugins:{ast:[vi]}};function Ti(e){let{frontMatter:t,content:r}=Bn(e),s;try{s=mn(r,wi)}catch(n){let i=Ni(n);if(i){let a=xi(n);throw Dn(a,{loc:i,cause:n})}throw n}if(t){let n={...t,type:"FrontMatter",loc:{start:{...t.start,offset:t.start.index},end:{...t.end,offset:t.end.index}}};s.body.unshift(n)}return s}function xi(e){let{message:t}=e,r=t.split(`
`);return r.length>=4&&/^Parse error on line \d+:$/.test(r[0])&&/^-*\^$/.test(V(0,r,-2))?V(0,r,-1):r.length>=4&&/:\s?$/.test(r[0])&&/^\(error occurred in '.*?' @ line \d+ : column \d+\)$/.test(V(0,r,-1))&&r[1]===""&&V(0,r,-2)===""&&r.slice(2,-2).every(s=>s.startsWith("|"))?r[0].trim().slice(0,-1):t}function Ni(e){let{location:t,hash:r}=e;if(t){let{start:s,end:n}=t;return{start:{line:s.line,column:s.column+1},end:typeof n.line=="number"?{line:n.line,column:n.column+1}:void 0}}if(r){let{loc:{last_line:s,last_column:n}}=r;return{start:{line:s,column:n+1}}}}var Ai={parse:Ti,astFormat:"glimmer",locStart:dt,locEnd:Gt};var Pi={glimmer:_n};export{Rn as default,Ln as languages,Sr as parsers,Pi as printers};
@@ -0,0 +1,47 @@
import * as path from 'node:path';
import path__default from 'node:path';
/**
* Constant for path separator.
*
* Always equals to `"/"`.
*/
declare const sep = "/";
declare const normalize: typeof path__default.normalize;
declare const join: typeof path__default.join;
declare const resolve: typeof path__default.resolve;
/**
* Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.
*
* @param path - The path to normalise.
* @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.
* @returns the normalised path string.
*/
declare function normalizeString(path: string, allowAboveRoot: boolean): string;
declare const isAbsolute: typeof path__default.isAbsolute;
declare const toNamespacedPath: typeof path__default.toNamespacedPath;
declare const extname: typeof path__default.extname;
declare const relative: typeof path__default.relative;
declare const dirname: typeof path__default.dirname;
declare const format: typeof path__default.format;
declare const basename: typeof path__default.basename;
declare const parse: typeof path__default.parse;
/**
* The `path.matchesGlob()` method determines if `path` matches the `pattern`.
* @param path The path to glob-match against.
* @param pattern The glob to check the path against.
*/
declare const matchesGlob: (path: string, pattern: string | string[]) => boolean;
type NodePath = typeof path;
/**
* The platform-specific file delimiter.
*
* Equals to `";"` in windows and `":"` in all other platforms.
*/
declare const delimiter: ";" | ":";
declare const posix: NodePath["posix"];
declare const win32: NodePath["win32"];
declare const _default: NodePath;
export { basename, _default as default, delimiter, dirname, extname, format, isAbsolute, join, matchesGlob, normalize, normalizeString, parse, posix, relative, resolve, sep, toNamespacedPath, win32 };
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"_A","2":"_Z"},B:{"1":"_J"},C:{"1":"_EM","2":"_2C"},D:{"1":"_vN _HC","2":"_OG"},E:{"1":"_YB","2":"_4"},F:{"1":"_yF","2":"_VE"},G:{"1":"_t","2":"_d"},H:{"1":"1D"},I:{"1":"_8B","2":"_n"},J:{"1":"A","2":"D"},K:{"1":"_ZB","2":"_cB"},L:{"1":"I"},M:{"1":"YC"},N:{"1":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:5,C:"matchMedia",D:true};
@@ -0,0 +1,358 @@
# EventSource
<!--introduced_in=v6.5.0-->
<!--type=module-->
<!-- source_link=lib/web/eventsource/eventsource.js -->
> Stability: 1 - Experimental
`EventSource` is a [WHATWG-conformant][] implementation of the
[server-sent events][] interface. It opens a persistent HTTP connection to a
server that responds with the `text/event-stream` content type and dispatches
the events it receives without closing the connection.
```mjs
import { EventSource } from 'undici'
const eventSource = new EventSource('http://localhost:3000')
eventSource.onmessage = (event) => {
console.log(event.data)
}
```
Constructing an `EventSource` for the first time emits a one-time
`ExperimentalWarning` with the code `'UNDICI-ES'`. The interface is also
installed onto `globalThis` as `globalThis.EventSource`.
## Class: `EventSource`
<!-- YAML
added: v6.5.0
-->
> Stability: 1 - Experimental
* Extends: {EventTarget}
The `EventSource` interface receives server-sent events over an HTTP
connection. Instances are created with the [`new EventSource()`](#new-eventsourceurl-eventsourceinitdict)
constructor and emit [`'open'`](#event-open), [`'message'`](#event-message), and
[`'error'`](#event-error) events.
### `new EventSource(url[, eventSourceInitDict])`
<!-- YAML
added: v6.5.0
-->
> Stability: 1 - Experimental
* `url` {string|URL} The URL of the event stream. Relative URLs are resolved
against the environment's base URL.
* `eventSourceInitDict` {Object} (optional)
* `withCredentials` {boolean} When `true`, the request is made with the
credentials mode set to `include` and CORS attribute state set to
`use-credentials`; otherwise the credentials mode is `same-origin`.
**Default:** `false`.
* `dispatcher` {Dispatcher} The dispatcher used for the underlying request.
**Default:** the global dispatcher.
> Stability: 0 - Deprecated. Use `node.dispatcher` instead.
* `node` {Object} undici-specific extensions to the standard
`EventSourceInit` dictionary.
* `dispatcher` {Dispatcher} The dispatcher used for the underlying request.
**Default:** the global dispatcher.
* `reconnectionTime` {number} The reconnection time, in milliseconds, to
wait before re-establishing a dropped connection. The server may override
this value with a `retry` field. **Default:** `3000`.
EventSource-specific limits can be configured on the dispatcher using the
`eventSource` option. See [`Client`][] for details.
Creates a new `EventSource` and immediately begins connecting to `url`. The
request is sent with the `Accept: text/event-stream` header, a cache mode of
`no-store`, and an initiator type of `other`.
If `url` cannot be parsed, a `SyntaxError` `DOMException` is thrown.
```mjs
import { EventSource } from 'undici'
const eventSource = new EventSource('http://localhost:3000', {
withCredentials: true
})
```
A custom [`Dispatcher`][] can be supplied to control the underlying request, for
example to add request headers:
```mjs
import { EventSource, Agent } from 'undici'
class CustomHeaderAgent extends Agent {
dispatch (opts) {
opts.headers['x-custom-header'] = 'hello world'
return super.dispatch(...arguments)
}
}
const eventSource = new EventSource('http://localhost:3000', {
node: {
dispatcher: new CustomHeaderAgent()
}
})
```
### `eventSource.close()`
<!-- YAML
added: v6.5.0
-->
> Stability: 1 - Experimental
* Returns: {undefined}
Closes the connection, if any, aborts the underlying request, and sets
[`eventSource.readyState`](#eventsourcereadystate) to `CLOSED`. Once closed, the
`EventSource` does not attempt to reconnect. Calling `close()` on an already
closed `EventSource` has no effect.
### `eventSource.readyState`
<!-- YAML
added: v6.5.0
-->
> Stability: 1 - Experimental
* Type: {number}
A read-only number representing the state of the connection. It is one of the
following constants:
* [`EventSource.CONNECTING`](#eventsourceconnecting) (`0`) — the connection has
not yet been established, or it was closed and is being re-established.
* [`EventSource.OPEN`](#eventsourceopen) (`1`) — the connection is open and
events are being dispatched as they are received.
* [`EventSource.CLOSED`](#eventsourceclosed) (`2`) — the connection is not open
and is not being re-established.
### `eventSource.url`
<!-- YAML
added: v6.5.0
-->
> Stability: 1 - Experimental
* Type: {string}
A read-only string providing the URL of the event stream, after resolution
against the environment's base URL.
### `eventSource.withCredentials`
<!-- YAML
added: v6.5.0
-->
> Stability: 1 - Experimental
* Type: {boolean}
A read-only boolean indicating whether the `EventSource` was instantiated with
CORS credentials (`true`), or not (`false`, the default). It reflects the
`withCredentials` option passed to the constructor.
### `eventSource.onopen`
<!-- YAML
added: v6.5.0
-->
> Stability: 1 - Experimental
* Type: {Function|null} **Default:** `null`.
An event handler that is invoked when an [`'open'`](#event-open) event is
dispatched. Assigning a function registers it as the handler; assigning `null`
removes the current handler.
### `eventSource.onmessage`
<!-- YAML
added: v6.5.0
-->
> Stability: 1 - Experimental
* Type: {Function|null} **Default:** `null`.
An event handler that is invoked when a [`'message'`](#event-message) event is
dispatched. Assigning a function registers it as the handler; assigning `null`
removes the current handler.
### `eventSource.onerror`
<!-- YAML
added: v6.5.0
-->
> Stability: 1 - Experimental
* Type: {Function|null} **Default:** `null`.
An event handler that is invoked when an [`'error'`](#event-error) event is
dispatched. Assigning a function registers it as the handler; assigning `null`
removes the current handler.
### `EventSource.CONNECTING`
<!-- YAML
added: v6.5.0
-->
> Stability: 1 - Experimental
* Type: {number}
The numeric constant `0`, representing the `CONNECTING`
[`readyState`](#eventsourcereadystate). It is defined as a read-only,
non-writable property on both the `EventSource` constructor and instances.
### `EventSource.OPEN`
<!-- YAML
added: v6.5.0
-->
> Stability: 1 - Experimental
* Type: {number}
The numeric constant `1`, representing the `OPEN`
[`readyState`](#eventsourcereadystate). It is defined as a read-only,
non-writable property on both the `EventSource` constructor and instances.
### `EventSource.CLOSED`
<!-- YAML
added: v6.5.0
-->
> Stability: 1 - Experimental
* Type: {number}
The numeric constant `2`, representing the `CLOSED`
[`readyState`](#eventsourcereadystate). It is defined as a read-only,
non-writable property on both the `EventSource` constructor and instances.
### Event: `'open'`
<!-- YAML
added: v6.5.0
-->
> Stability: 1 - Experimental
Emitted when the connection is established and the
[`readyState`](#eventsourcereadystate) becomes `OPEN`. The listener receives an
{Event}.
```mjs
import { EventSource } from 'undici'
const eventSource = new EventSource('http://localhost:3000')
eventSource.addEventListener('open', () => {
console.log('connection opened')
})
```
### Event: `'message'`
<!-- YAML
added: v6.15.0
-->
> Stability: 1 - Experimental
Emitted when a message that has no explicit `event` field is received. The
listener receives a {MessageEvent} whose `data`, `lastEventId`, and `origin`
properties are populated from the server-sent event. Named events (those with an
`event` field) are dispatched under their own type and must be subscribed to with
[`addEventListener()`][].
```mjs
import { createServer } from 'node:http'
import { EventSource } from 'undici'
const server = createServer((request, response) => {
response.writeHead(200, {
'content-type': 'text/event-stream',
'cache-control': 'no-cache',
connection: 'keep-alive'
})
response.write('event: ping\n')
response.write('data: connected\n\n')
const interval = setInterval(() => {
response.write(`data: ${Date.now()}\n\n`)
}, 1000)
request.on('close', () => clearInterval(interval))
})
server.listen(3000, () => {
const eventSource = new EventSource('http://localhost:3000')
// Named event, delivered under its own type.
eventSource.addEventListener('ping', (event) => {
console.log('ping:', event.data)
})
// Unnamed event, delivered as 'message'.
eventSource.onmessage = (event) => {
console.log('message:', event.data)
}
})
```
### Event: `'error'`
<!-- YAML
added: v6.5.0
changes:
- version: v7.11.0
pr-url: https://github.com/nodejs/undici/pull/4247
description: The connection is no longer re-established after a network
error; the `EventSource` is closed instead.
-->
> Stability: 1 - Experimental
Emitted when the connection fails or is interrupted. The listener receives an
{Event}. When the failure is recoverable, the `EventSource` transitions back to
`CONNECTING` and retries after the reconnection time; when it is not, the
`EventSource` transitions to `CLOSED` and does not reconnect.
```mjs
import { EventSource } from 'undici'
const eventSource = new EventSource('http://localhost:3000')
eventSource.onerror = () => {
if (eventSource.readyState === EventSource.CLOSED) {
console.log('connection closed')
} else {
console.log('reconnecting')
}
}
```
[WHATWG-conformant]: https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events
[`Client`]: Client.md#new-clienturl-options
[`Dispatcher`]: Dispatcher.md#class-dispatcher
[`addEventListener()`]: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
[server-sent events]: https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events
@@ -0,0 +1,298 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.AssignmentExpression = AssignmentExpression;
exports.BinaryExpression = BinaryExpression;
exports.ClassExpression = ClassExpression;
exports.ArrowFunctionExpression = exports.ConditionalExpression = ConditionalExpression;
exports.DoExpression = DoExpression;
exports.FunctionExpression = FunctionExpression;
exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
exports.Identifier = Identifier;
exports.LogicalExpression = LogicalExpression;
exports.NullableTypeAnnotation = NullableTypeAnnotation;
exports.ObjectExpression = ObjectExpression;
exports.OptionalIndexedAccessType = OptionalIndexedAccessType;
exports.OptionalCallExpression = exports.OptionalMemberExpression = OptionalMemberExpression;
exports.SequenceExpression = SequenceExpression;
exports.TSSatisfiesExpression = exports.TSAsExpression = TSAsExpression;
exports.TSConditionalType = TSConditionalType;
exports.TSConstructorType = exports.TSFunctionType = TSFunctionType;
exports.TSInferType = TSInferType;
exports.TSInstantiationExpression = TSInstantiationExpression;
exports.TSIntersectionType = TSIntersectionType;
exports.SpreadElement = exports.UnaryExpression = exports.TSTypeAssertion = UnaryLike;
exports.TSTypeOperator = TSTypeOperator;
exports.TSUnionType = TSUnionType;
exports.IntersectionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation;
exports.UpdateExpression = UpdateExpression;
exports.AwaitExpression = exports.YieldExpression = YieldExpression;
var _t = require("@babel/types");
var _index = require("./index.js");
const {
isMemberExpression,
isOptionalMemberExpression,
isYieldExpression,
isStatement
} = _t;
const PRECEDENCE = new Map([["||", 0], ["??", 1], ["&&", 2], ["|", 3], ["^", 4], ["&", 5], ["==", 6], ["===", 6], ["!=", 6], ["!==", 6], ["<", 7], [">", 7], ["<=", 7], [">=", 7], ["in", 7], ["instanceof", 7], [">>", 8], ["<<", 8], [">>>", 8], ["+", 9], ["-", 9], ["*", 10], ["/", 10], ["%", 10], ["**", 11]]);
function isTSTypeExpression(nodeId) {
return nodeId === 156 || nodeId === 201 || nodeId === 209;
}
const isClassExtendsClause = (node, parent, parentId) => {
return (parentId === 21 || parentId === 22) && parent.superClass === node;
};
const hasPostfixPart = (node, parent, parentId) => {
switch (parentId) {
case 108:
case 132:
return parent.object === node;
case 17:
case 130:
case 112:
return parent.callee === node;
case 222:
return parent.tag === node;
case 191:
return true;
}
return false;
};
function NullableTypeAnnotation(node, parent, parentId) {
return parentId === 4;
}
function FunctionTypeAnnotation(node, parent, parentId, tokenContext) {
return (parentId === 239 || parentId === 90 || parentId === 4 || (tokenContext & _index.TokenContext.arrowFlowReturnType) > 0
);
}
function UpdateExpression(node, parent, parentId) {
return hasPostfixPart(node, parent, parentId) || isClassExtendsClause(node, parent, parentId);
}
function needsParenBeforeExpressionBrace(tokenContext) {
return (tokenContext & (_index.TokenContext.expressionStatement | _index.TokenContext.arrowBody)) > 0;
}
function ObjectExpression(node, parent, parentId, tokenContext) {
return needsParenBeforeExpressionBrace(tokenContext);
}
function DoExpression(node, parent, parentId, tokenContext) {
return (tokenContext & _index.TokenContext.expressionStatement) > 0 && !node.async;
}
function BinaryLike(node, parent, parentId, nodeType) {
if (isClassExtendsClause(node, parent, parentId)) {
return true;
}
if (hasPostfixPart(node, parent, parentId) || parentId === 238 || parentId === 145 || parentId === 8) {
return true;
}
let parentPos;
switch (parentId) {
case 10:
case 107:
parentPos = PRECEDENCE.get(parent.operator);
break;
case 156:
case 201:
parentPos = 7;
}
if (parentPos !== undefined) {
const nodePos = nodeType === 2 ? 7 : PRECEDENCE.get(node.operator);
if (parentPos > nodePos) return true;
if (parentPos === nodePos && parentId === 10 && (nodePos === 11 ? parent.left === node : parent.right === node)) {
return true;
}
if (nodeType === 1 && parentId === 107 && (nodePos === 1 && parentPos !== 1 || parentPos === 1 && nodePos !== 1)) {
return true;
}
}
return false;
}
function UnionTypeAnnotation(node, parent, parentId) {
switch (parentId) {
case 4:
case 115:
case 90:
case 239:
return true;
}
return false;
}
function OptionalIndexedAccessType(node, parent, parentId) {
return parentId === 84 && parent.objectType === node;
}
function TSAsExpression(node, parent, parentId) {
if ((parentId === 6 || parentId === 7) && parent.left === node) {
return true;
}
if (parentId === 10 && (parent.operator === "|" || parent.operator === "&") && node === parent.left) {
return true;
}
return BinaryLike(node, parent, parentId, 2);
}
function TSConditionalType(node, parent, parentId) {
switch (parentId) {
case 155:
case 195:
case 211:
case 212:
return true;
case 175:
return parent.objectType === node;
case 181:
case 219:
return parent.types[0] === node;
case 161:
return parent.checkType === node || parent.extendsType === node;
}
return false;
}
function TSUnionType(node, parent, parentId) {
switch (parentId) {
case 181:
case 211:
case 155:
case 195:
return true;
case 175:
return parent.objectType === node;
}
return false;
}
function TSIntersectionType(node, parent, parentId) {
return parentId === 211 || TSTypeOperator(node, parent, parentId);
}
function TSInferType(node, parent, parentId) {
if (TSTypeOperator(node, parent, parentId)) {
return true;
}
if ((parentId === 181 || parentId === 219) && node.typeParameter.constraint && parent.types[0] === node) {
return true;
}
return false;
}
function TSTypeOperator(node, parent, parentId) {
switch (parentId) {
case 155:
case 195:
return true;
case 175:
if (parent.objectType === node) {
return true;
}
}
return false;
}
function TSInstantiationExpression(node, parent, parentId) {
switch (parentId) {
case 17:
case 130:
case 112:
case 177:
return (parent.typeParameters
) != null;
}
return false;
}
function TSFunctionType(node, parent, parentId) {
if (TSUnionType(node, parent, parentId)) return true;
return parentId === 219 || parentId === 161 && (parent.checkType === node || parent.extendsType === node);
}
function BinaryExpression(node, parent, parentId, tokenContext) {
if (BinaryLike(node, parent, parentId, 0)) return true;
return (tokenContext & _index.TokenContext.forInOrInitHeadAccumulate) > 0 && node.operator === "in";
}
function LogicalExpression(node, parent, parentId) {
return BinaryLike(node, parent, parentId, 1);
}
function SequenceExpression(node, parent, parentId) {
if (parentId === 144 || parentId === 133 || parentId === 108 && parent.property === node || parentId === 132 && parent.property === node || parentId === 224) {
return false;
}
if (parentId === 21) {
return true;
}
if (parentId === 68) {
return parent.right === node;
}
if (parentId === 60) {
return true;
}
return !isStatement(parent);
}
function YieldExpression(node, parent, parentId) {
return parentId === 10 || parentId === 107 || parentId === 238 || parentId === 145 || hasPostfixPart(node, parent, parentId) || parentId === 8 && isYieldExpression(node) || parentId === 28 && node === parent.test || isClassExtendsClause(node, parent, parentId) || isTSTypeExpression(parentId);
}
function ClassExpression(node, parent, parentId, tokenContext) {
return (tokenContext & (_index.TokenContext.expressionStatement | _index.TokenContext.exportDefault)) > 0;
}
function UnaryLike(node, parent, parentId) {
return hasPostfixPart(node, parent, parentId) || parentId === 10 && parent.operator === "**" && parent.left === node || isClassExtendsClause(node, parent, parentId);
}
function FunctionExpression(node, parent, parentId, tokenContext) {
return (tokenContext & (_index.TokenContext.expressionStatement | _index.TokenContext.exportDefault)) > 0;
}
function ConditionalExpression(node, parent, parentId) {
switch (parentId) {
case 238:
case 145:
case 10:
case 107:
case 8:
return true;
case 28:
if (parent.test === node) {
return true;
}
}
if (isTSTypeExpression(parentId)) {
return true;
}
return UnaryLike(node, parent, parentId);
}
function OptionalMemberExpression(node, parent, parentId) {
switch (parentId) {
case 17:
return parent.callee === node;
case 108:
return parent.object === node;
}
return false;
}
function AssignmentExpression(node, parent, parentId, tokenContext) {
if (needsParenBeforeExpressionBrace(tokenContext) && node.left.type === "ObjectPattern") {
return true;
}
return ConditionalExpression(node, parent, parentId);
}
function Identifier(node, parent, parentId, tokenContext, getRawIdentifier) {
var _node$extra;
if (getRawIdentifier && getRawIdentifier(node) !== node.name) {
return false;
}
if (parentId === 6 && (_node$extra = node.extra) != null && _node$extra.parenthesized && parent.left === node) {
const rightType = parent.right.type;
if ((rightType === "FunctionExpression" || rightType === "ClassExpression") && parent.right.id == null) {
return true;
}
}
if (tokenContext & _index.TokenContext.forOfHead || (parentId === 108 || parentId === 132) && tokenContext & (_index.TokenContext.expressionStatement | _index.TokenContext.forInitHead | _index.TokenContext.forInHead)) {
if (node.name === "let") {
const isFollowedByBracket = isMemberExpression(parent, {
object: node,
computed: true
}) || isOptionalMemberExpression(parent, {
object: node,
computed: true,
optional: false
});
if (isFollowedByBracket && tokenContext & (_index.TokenContext.expressionStatement | _index.TokenContext.forInitHead | _index.TokenContext.forInHead)) {
return true;
}
return (tokenContext & _index.TokenContext.forOfHead) > 0;
}
}
return parentId === 68 && parent.left === node && node.name === "async" && !parent.await;
}
//# sourceMappingURL=parentheses.js.map
@@ -0,0 +1,14 @@
import type { TypeOrValueSpecifier } from '../util';
export type MessageIds = 'object' | 'undef';
export type Options = [
{
allow?: TypeOrValueSpecifier[];
allowRethrowing?: boolean;
allowThrowingAny?: boolean;
allowThrowingUnknown?: boolean;
}
];
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<MessageIds, Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
name: string;
};
export default _default;
@@ -0,0 +1,7 @@
// Generated using scripts/write-decode-map.ts
export default new Uint16Array(
// prettier-ignore
"\u1d41<\xd5\u0131\u028a\u049d\u057b\u05d0\u0675\u06de\u07a2\u07d6\u080f\u0a4a\u0a91\u0da1\u0e6d\u0f09\u0f26\u10ca\u1228\u12e1\u1415\u149d\u14c3\u14df\u1525\0\0\0\0\0\0\u156b\u16cd\u198d\u1c12\u1ddd\u1f7e\u2060\u21b0\u228d\u23c0\u23fb\u2442\u2824\u2912\u2d08\u2e48\u2fce\u3016\u32ba\u3639\u37ac\u38fe\u3a28\u3a71\u3ae0\u3b2e\u0800EMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig\u803b\xc6\u40c6P\u803b&\u4026cute\u803b\xc1\u40c1reve;\u4102\u0100iyx}rc\u803b\xc2\u40c2;\u4410r;\uc000\ud835\udd04rave\u803b\xc0\u40c0pha;\u4391acr;\u4100d;\u6a53\u0100gp\x9d\xa1on;\u4104f;\uc000\ud835\udd38plyFunction;\u6061ing\u803b\xc5\u40c5\u0100cs\xbe\xc3r;\uc000\ud835\udc9cign;\u6254ilde\u803b\xc3\u40c3ml\u803b\xc4\u40c4\u0400aceforsu\xe5\xfb\xfe\u0117\u011c\u0122\u0127\u012a\u0100cr\xea\xf2kslash;\u6216\u0176\xf6\xf8;\u6ae7ed;\u6306y;\u4411\u0180crt\u0105\u010b\u0114ause;\u6235noullis;\u612ca;\u4392r;\uc000\ud835\udd05pf;\uc000\ud835\udd39eve;\u42d8c\xf2\u0113mpeq;\u624e\u0700HOacdefhilorsu\u014d\u0151\u0156\u0180\u019e\u01a2\u01b5\u01b7\u01ba\u01dc\u0215\u0273\u0278\u027ecy;\u4427PY\u803b\xa9\u40a9\u0180cpy\u015d\u0162\u017aute;\u4106\u0100;i\u0167\u0168\u62d2talDifferentialD;\u6145leys;\u612d\u0200aeio\u0189\u018e\u0194\u0198ron;\u410cdil\u803b\xc7\u40c7rc;\u4108nint;\u6230ot;\u410a\u0100dn\u01a7\u01adilla;\u40b8terDot;\u40b7\xf2\u017fi;\u43a7rcle\u0200DMPT\u01c7\u01cb\u01d1\u01d6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01e2\u01f8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020foubleQuote;\u601duote;\u6019\u0200lnpu\u021e\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6a74\u0180git\u022f\u0236\u023aruent;\u6261nt;\u622fourIntegral;\u622e\u0100fr\u024c\u024e;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6a2fcr;\uc000\ud835\udc9ep\u0100;C\u0284\u0285\u62d3ap;\u624d\u0580DJSZacefios\u02a0\u02ac\u02b0\u02b4\u02b8\u02cb\u02d7\u02e1\u02e6\u0333\u048d\u0100;o\u0179\u02a5trahd;\u6911cy;\u4402cy;\u4405cy;\u440f\u0180grs\u02bf\u02c4\u02c7ger;\u6021r;\u61a1hv;\u6ae4\u0100ay\u02d0\u02d5ron;\u410e;\u4414l\u0100;t\u02dd\u02de\u6207a;\u4394r;\uc000\ud835\udd07\u0100af\u02eb\u0327\u0100cm\u02f0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031ccute;\u40b4o\u0174\u030b\u030d;\u42d9bleAcute;\u42ddrave;\u4060ilde;\u42dcond;\u62c4ferentialD;\u6146\u0470\u033d\0\0\0\u0342\u0354\0\u0405f;\uc000\ud835\udd3b\u0180;DE\u0348\u0349\u034d\u40a8ot;\u60dcqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03cf\u03e2\u03f8ontourIntegra\xec\u0239o\u0274\u0379\0\0\u037b\xbb\u0349nArrow;\u61d3\u0100eo\u0387\u03a4ft\u0180ART\u0390\u0396\u03a1rrow;\u61d0ightArrow;\u61d4e\xe5\u02cang\u0100LR\u03ab\u03c4eft\u0100AR\u03b3\u03b9rrow;\u67f8ightArrow;\u67faightArrow;\u67f9ight\u0100AT\u03d8\u03derrow;\u61d2ee;\u62a8p\u0241\u03e9\0\0\u03efrrow;\u61d1ownArrow;\u61d5erticalBar;\u6225n\u0300ABLRTa\u0412\u042a\u0430\u045e\u047f\u037crrow\u0180;BU\u041d\u041e\u0422\u6193ar;\u6913pArrow;\u61f5reve;\u4311eft\u02d2\u043a\0\u0446\0\u0450ightVector;\u6950eeVector;\u695eector\u0100;B\u0459\u045a\u61bdar;\u6956ight\u01d4\u0467\0\u0471eeVector;\u695fector\u0100;B\u047a\u047b\u61c1ar;\u6957ee\u0100;A\u0486\u0487\u62a4rrow;\u61a7\u0100ct\u0492\u0497r;\uc000\ud835\udc9frok;\u4110\u0800NTacdfglmopqstux\u04bd\u04c0\u04c4\u04cb\u04de\u04e2\u04e7\u04ee\u04f5\u0521\u052f\u0536\u0552\u055d\u0560\u0565G;\u414aH\u803b\xd0\u40d0cute\u803b\xc9\u40c9\u0180aiy\u04d2\u04d7\u04dcron;\u411arc\u803b\xca\u40ca;\u442dot;\u4116r;\uc000\ud835\udd08rave\u803b\xc8\u40c8ement;\u6208\u0100ap\u04fa\u04fecr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65fberySmallSquare;\u65ab\u0100gp\u0526\u052aon;\u4118f;\uc000\ud835\udd3csilon;\u4395u\u0100ai\u053c\u0549l\u0100;T\u0542\u0543\u6a75ilde;\u6242librium;\u61cc\u0100ci\u0557\u055ar;\u6130m;\u6a73a;\u4397ml\u803b\xcb\u40cb\u0100ip\u056a\u056fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058d\u05b2\u05ccy;\u4424r;\uc000\ud835\udd09lled\u0253\u0597\0\0\u05a3mallSquare;\u65fcerySmallSquare;\u65aa\u0370\u05ba\0\u05bf\0\0\u05c4f;\uc000\ud835\udd3dAll;\u6200riertrf;\u6131c\xf2\u05cb\u0600JTabcdfgorst\u05e8\u05ec\u05ef\u05fa\u0600\u0612\u0616\u061b\u061d\u0623\u066c\u0672cy;\u4403\u803b>\u403emma\u0100;d\u05f7\u05f8\u4393;\u43dcreve;\u411e\u0180eiy\u0607\u060c\u0610dil;\u4122rc;\u411c;\u4413ot;\u4120r;\uc000\ud835\udd0a;\u62d9pf;\uc000\ud835\udd3eeater\u0300EFGLST\u0635\u0644\u064e\u0656\u065b\u0666qual\u0100;L\u063e\u063f\u6265ess;\u62dbullEqual;\u6267reater;\u6aa2ess;\u6277lantEqual;\u6a7eilde;\u6273cr;\uc000\ud835\udca2;\u626b\u0400Aacfiosu\u0685\u068b\u0696\u069b\u069e\u06aa\u06be\u06caRDcy;\u442a\u0100ct\u0690\u0694ek;\u42c7;\u405eirc;\u4124r;\u610clbertSpace;\u610b\u01f0\u06af\0\u06b2f;\u610dizontalLine;\u6500\u0100ct\u06c3\u06c5\xf2\u06a9rok;\u4126mp\u0144\u06d0\u06d8ownHum\xf0\u012fqual;\u624f\u0700EJOacdfgmnostu\u06fa\u06fe\u0703\u0707\u070e\u071a\u071e\u0721\u0728\u0744\u0778\u078b\u078f\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803b\xcd\u40cd\u0100iy\u0713\u0718rc\u803b\xce\u40ce;\u4418ot;\u4130r;\u6111rave\u803b\xcc\uLine truncated
.split("")
.map((c) => c.charCodeAt(0)));
//# sourceMappingURL=decode-data-html.js.map
@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.styleSingleton = void 0;
var hook_1 = require("./hook");
/**
* create a Component to add styles on demand
* - styles are added when first instance is mounted
* - styles are removed when the last instance is unmounted
* - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior
*/
var styleSingleton = function () {
var useStyle = (0, hook_1.styleHookSingleton)();
var Sheet = function (_a) {
var styles = _a.styles, dynamic = _a.dynamic;
useStyle(styles, dynamic);
return null;
};
return Sheet;
};
exports.styleSingleton = styleSingleton;
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"B","2":"_Z","289":"A"},B:{"1":"_J"},C:{"1":"_H _ZR","2":"_5D","194":"_rB _UO","1025":"_nC _JH"},D:{"1":"_1H","2":"_8E"},E:{"2050":"_R"},F:{"1":"_BM","2":"_GP"},G:{"1":"_TE","2":"_AI","516":"jD _jD _GG pD"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"1":"B","289":"A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"ME","194":"LE"}},B:2,C:"CSS touch-action property",D:true};
@@ -0,0 +1,18 @@
This software is released under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Grid2x2Plus = createLucideIcon("Grid2x2Plus", [
[
"path",
{
d: "M12 3v17a1 1 0 0 1-1 1H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a1 1 0 0 1-1 1H3",
key: "11za1p"
}
],
["path", { d: "M16 19h6", key: "xwg31i" }],
["path", { d: "M19 22v-6", key: "qhmiwi" }]
]);
export { Grid2x2Plus as default };
//# sourceMappingURL=grid-2x2-plus.js.map
@@ -0,0 +1,494 @@
'use strict'
let Comment = require('./comment')
let Declaration = require('./declaration')
let Node = require('./node')
let { isClean, my } = require('./symbols')
let AtRule, parse, Root, Rule
function cleanSource(nodes) {
let stack = nodes.slice()
while (stack.length > 0) {
let node = stack.pop()
delete node.source
if (node.nodes) {
node.nodes = node.nodes.slice()
for (let i of node.nodes) stack.push(i)
}
}
return nodes.slice()
}
function markTreeDirty(node) {
let stack = [node]
while (stack.length > 0) {
let next = stack.pop()
next[isClean] = false
if (next.proxyOf.nodes) {
for (let i of next.proxyOf.nodes) stack.push(i)
}
}
}
class Container extends Node {
get first() {
if (!this.proxyOf.nodes) return undefined
return this.proxyOf.nodes[0]
}
get last() {
if (!this.proxyOf.nodes) return undefined
return this.proxyOf.nodes[this.proxyOf.nodes.length - 1]
}
append(...children) {
for (let child of children) {
let nodes = this.normalize(child, this.last)
for (let node of nodes) this.proxyOf.nodes.push(node)
}
this.markDirty()
return this
}
cleanRaws(keepBetween) {
let stack = [this]
while (stack.length > 0) {
let node = stack.pop()
if (node !== this && node.cleanRaws !== Container.prototype.cleanRaws) {
// Subclass with own logic; let it handle its subtree
node.cleanRaws(keepBetween)
continue
}
Node.prototype.cleanRaws.call(node, keepBetween)
if (node.nodes) {
for (let child of node.nodes) stack.push(child)
}
}
}
each(callback) {
if (!this.proxyOf.nodes) return undefined
let iterator = this.getIterator()
let index, result
while (this.indexes[iterator] < this.proxyOf.nodes.length) {
index = this.indexes[iterator]
result = callback(this.proxyOf.nodes[index], index)
if (result === false) break
this.indexes[iterator] += 1
}
delete this.indexes[iterator]
return result
}
every(condition) {
return this.nodes.every(condition)
}
getIterator() {
if (!this.lastEach) this.lastEach = 0
if (!this.indexes) this.indexes = {}
this.lastEach += 1
let iterator = this.lastEach
this.indexes[iterator] = 0
return iterator
}
getProxyProcessor() {
return {
get(node, prop) {
if (prop === 'proxyOf') {
return node
} else if (!node[prop]) {
return node[prop]
} else if (
prop === 'each' ||
(typeof prop === 'string' && prop.startsWith('walk'))
) {
return (...args) => {
return node[prop](
...args.map(i => {
if (typeof i === 'function') {
return (child, index) => i(child.toProxy(), index)
} else {
return i
}
})
)
}
} else if (prop === 'every' || prop === 'some') {
return cb => {
return node[prop]((child, ...other) =>
cb(child.toProxy(), ...other)
)
}
} else if (prop === 'root') {
return () => node.root().toProxy()
} else if (prop === 'nodes') {
return node.nodes.map(i => i.toProxy())
} else if (prop === 'first' || prop === 'last') {
return node[prop].toProxy()
} else {
return node[prop]
}
},
set(node, prop, value) {
if (node[prop] === value) return true
node[prop] = value
if (prop === 'name' || prop === 'params' || prop === 'selector') {
node.markDirty()
}
return true
}
}
}
index(child) {
if (typeof child === 'number') return child
if (child.proxyOf) child = child.proxyOf
return this.proxyOf.nodes.indexOf(child)
}
insertAfter(exist, add) {
let existIndex = this.index(exist)
let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse()
existIndex = this.index(exist)
for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node)
let index
for (let id in this.indexes) {
index = this.indexes[id]
if (existIndex < index) {
this.indexes[id] = index + nodes.length
}
}
this.markDirty()
return this
}
insertBefore(exist, add) {
let existIndex = this.index(exist)
let type = existIndex === 0 ? 'prepend' : false
let nodes = this.normalize(
add,
this.proxyOf.nodes[existIndex],
type
).reverse()
existIndex = this.index(exist)
for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node)
let index
for (let id in this.indexes) {
index = this.indexes[id]
if (existIndex <= index) {
this.indexes[id] = index + nodes.length
}
}
this.markDirty()
return this
}
normalize(nodes, sample) {
if (typeof nodes === 'string') {
nodes = cleanSource(parse(nodes).nodes)
} else if (typeof nodes === 'undefined') {
nodes = []
} else if (Array.isArray(nodes)) {
nodes = nodes.slice(0)
for (let i of nodes) {
if (i.parent) i.parent.removeChild(i, 'ignore')
}
} else if (nodes.type === 'root' && this.type !== 'document') {
nodes = nodes.nodes.slice(0)
for (let i of nodes) {
if (i.parent) i.parent.removeChild(i, 'ignore')
}
} else if (nodes.type) {
nodes = [nodes]
} else if (nodes.prop) {
if (typeof nodes.value === 'undefined') {
throw new Error('Value field is missed in node creation')
} else if (typeof nodes.value !== 'string') {
nodes.value = String(nodes.value)
}
nodes = [new Declaration(nodes)]
} else if (nodes.selector || nodes.selectors) {
nodes = [new Rule(nodes)]
} else if (nodes.name) {
nodes = [new AtRule(nodes)]
} else if (nodes.text) {
nodes = [new Comment(nodes)]
} else {
throw new Error('Unknown node type in node creation')
}
let processed = nodes.map(i => {
/* c8 ignore next */
if (!i[my]) Container.rebuild(i)
i = i.proxyOf
if (i.parent) i.parent.removeChild(i)
if (i[isClean]) markTreeDirty(i)
if (!i.raws) i.raws = {}
if (typeof i.raws.before === 'undefined') {
if (sample && typeof sample.raws.before !== 'undefined') {
i.raws.before = sample.raws.before.replace(/\S/g, '')
}
}
i.parent = this.proxyOf
return i
})
return processed
}
prepend(...children) {
children = children.reverse()
for (let child of children) {
let nodes = this.normalize(child, this.first, 'prepend').reverse()
for (let node of nodes) this.proxyOf.nodes.unshift(node)
for (let id in this.indexes) {
this.indexes[id] = this.indexes[id] + nodes.length
}
}
this.markDirty()
return this
}
push(child) {
child.parent = this
this.proxyOf.nodes.push(child)
return this
}
removeAll() {
for (let node of this.proxyOf.nodes) node.parent = undefined
this.proxyOf.nodes = []
this.markDirty()
return this
}
removeChild(child) {
child = this.index(child)
this.proxyOf.nodes[child].parent = undefined
this.proxyOf.nodes.splice(child, 1)
let index
for (let id in this.indexes) {
index = this.indexes[id]
if (index >= child) {
this.indexes[id] = index - 1
}
}
this.markDirty()
return this
}
replaceValues(pattern, opts, callback) {
if (!callback) {
callback = opts
opts = {}
}
this.walkDecls(decl => {
if (opts.props && !opts.props.includes(decl.prop)) return
if (opts.fast && !decl.value.includes(opts.fast)) return
decl.value = decl.value.replace(pattern, callback)
})
this.markDirty()
return this
}
some(condition) {
return this.nodes.some(condition)
}
walk(callback) {
if (!this.proxyOf.nodes) return undefined
// An explicit stack instead of recursive `each()` calls to survive
// deeply nested trees. Each frame keeps a live `indexes` slot, so
// insertion and removal during the walk behave like `each()`: the
// slot stays at the current child until its subtree is finished.
let stack = [{ iterator: this.getIterator(), node: this.proxyOf }]
while (stack.length > 0) {
let { iterator, node } = stack[stack.length - 1]
let index = node.indexes[iterator]
if (index >= node.proxyOf.nodes.length) {
delete node.indexes[iterator]
stack.pop()
let parent = stack[stack.length - 1]
// Finish the parent’s step for the child subtree we just left
if (parent) parent.node.indexes[parent.iterator] += 1
continue
}
let child = node.proxyOf.nodes[index]
let result
try {
result = callback(child, index)
} catch (e) {
throw child.addToError(e)
}
if (result === false) {
for (let opened of stack) {
delete opened.node.indexes[opened.iterator]
}
return false
}
if (child.walk && child.proxyOf.nodes) {
stack.push({ iterator: child.getIterator(), node: child })
} else {
node.indexes[iterator] += 1
}
}
return undefined
}
walkAtRules(name, callback) {
if (!callback) {
callback = name
return this.walk((child, i) => {
if (child.type === 'atrule') {
return callback(child, i)
}
})
}
if (name instanceof RegExp) {
return this.walk((child, i) => {
if (child.type === 'atrule' && name.test(child.name)) {
return callback(child, i)
}
})
}
return this.walk((child, i) => {
if (child.type === 'atrule' && child.name === name) {
return callback(child, i)
}
})
}
walkComments(callback) {
return this.walk((child, i) => {
if (child.type === 'comment') {
return callback(child, i)
}
})
}
walkDecls(prop, callback) {
if (!callback) {
callback = prop
return this.walk((child, i) => {
if (child.type === 'decl') {
return callback(child, i)
}
})
}
if (prop instanceof RegExp) {
return this.walk((child, i) => {
if (child.type === 'decl' && prop.test(child.prop)) {
return callback(child, i)
}
})
}
return this.walk((child, i) => {
if (child.type === 'decl' && child.prop === prop) {
return callback(child, i)
}
})
}
walkRules(selector, callback) {
if (!callback) {
callback = selector
return this.walk((child, i) => {
if (child.type === 'rule') {
return callback(child, i)
}
})
}
if (selector instanceof RegExp) {
return this.walk((child, i) => {
if (child.type === 'rule' && selector.test(child.selector)) {
return callback(child, i)
}
})
}
return this.walk((child, i) => {
if (child.type === 'rule' && child.selector === selector) {
return callback(child, i)
}
})
}
}
Container.registerParse = dependant => {
parse = dependant
}
Container.registerRule = dependant => {
Rule = dependant
}
Container.registerAtRule = dependant => {
AtRule = dependant
}
Container.registerRoot = dependant => {
Root = dependant
}
module.exports = Container
Container.default = Container
/* c8 ignore start */
Container.rebuild = node => {
let stack = [node]
while (stack.length > 0) {
let next = stack.pop()
if (next.type === 'atrule') {
Object.setPrototypeOf(next, AtRule.prototype)
} else if (next.type === 'rule') {
Object.setPrototypeOf(next, Rule.prototype)
} else if (next.type === 'decl') {
Object.setPrototypeOf(next, Declaration.prototype)
} else if (next.type === 'comment') {
Object.setPrototypeOf(next, Comment.prototype)
} else if (next.type === 'root') {
Object.setPrototypeOf(next, Root.prototype)
}
next[my] = true
if (next.nodes) {
for (let child of next.nodes) stack.push(child)
}
}
}
/* c8 ignore stop */
@@ -0,0 +1 @@
"use strict";var ImportType;exports.initSync=exports.init=exports.ImportType=void 0,exports.parse=parse,exports.ImportType=ImportType,function(A){A[A.Static=1]="Static",A[A.Dynamic=2]="Dynamic",A[A.ImportMeta=3]="ImportMeta",A[A.StaticSourcePhase=4]="StaticSourcePhase",A[A.DynamicSourcePhase=5]="DynamicSourcePhase",A[A.StaticDeferPhase=6]="StaticDeferPhase",A[A.DynamicDeferPhase=7]="DynamicDeferPhase"}(ImportType||(exports.ImportType=ImportType={}));const A=1===new Uint8Array(new Uint16Array([1]).buffer)[0];function parse(E,g="@"){if(!C)return init.then((()=>parse(E)));const I=E.length+1,o=(C.__heap_base.value||C.__heap_base)+4*I-C.memory.buffer.byteLength;o>0&&C.memory.grow(Math.ceil(o/65536));const D=C.sa(I-1);if((A?B:Q)(E,new Uint16Array(C.memory.buffer,D,I)),!C.parse())throw Object.assign(new Error(`Parse error ${g}:${E.slice(0,C.e()).split("\n").length}:${C.e()-E.lastIndexOf("\n",C.e()-1)}`),{idx:C.e()});const w=[],K=[];for(;C.ri();){const A=C.is(),Q=C.ie(),B=C.it(),g=C.ai(),I=C.id(),o=C.ss(),D=C.se();let K;C.ip()&&(K=k(E.slice(-1===I?A-1:A,-1===I?Q+1:Q)));const i=[];for(C.rsa();C.ra();){const A=C.aks(),Q=C.ake(),B=C.avs(),g=C.ave();i.push([J(E.slice(A,Q)),J(E.slice(B,g))])}w.push({n:K,t:B,s:A,e:Q,ss:o,se:D,d:I,a:g,at:i.length>0?i:null})}for(;C.re();){const A=C.es(),Q=C.ee(),B=C.els(),g=C.ele(),I=J(E.slice(A,Q)),o=B<0?void 0:J(E.slice(B,g));K.push({s:A,e:Q,ls:B,le:g,n:I,ln:o})}function k(A){try{return(0,eval)(A)}catch(A){}}function J(A){if(!A)return A;const Q=A[0];return('"'===Q||"'"===Q)&&k(A)||A}return[w,K,!!C.f(),!!C.ms()]}function Q(A,Q){const B=A.length;let C=0;for(;C<B;){const B=A.charCodeAt(C);Q[C++]=(255&B)<<8|B>>>8}}function B(A,Q){const B=A.length;let C=0;for(;C<B;)Q[C]=A.charCodeAt(C++)}let C;const E=()=>{return A="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 truncated
@@ -0,0 +1,53 @@
/**
* @fileoverview Rule to flag octal escape sequences in string literals.
* @author Ian Christian Myers
*/
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "Disallow octal escape sequences in string literals",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-octal-escape",
},
schema: [],
messages: {
octalEscapeSequence:
"Don't use octal: '\\{{sequence}}'. Use '\\u....' instead.",
},
},
create(context) {
return {
Literal(node) {
if (typeof node.value !== "string") {
return;
}
// \0 represents a valid NULL character if it isn't followed by a digit.
const match = node.raw.match(
/^(?:[^\\]|\\.)*?\\([0-3][0-7]{1,2}|[4-7][0-7]|0(?=[89])|[1-7])/su,
);
if (match) {
context.report({
node,
messageId: "octalEscapeSequence",
data: { sequence: match[1] },
});
}
},
};
},
};
@@ -0,0 +1,62 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.arrayIsEqual = arrayIsEqual;
exports.insertInArray = insertInArray;
exports.removeFromArray = removeFromArray;
exports.replaceInArray = replaceInArray;
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
* @format
*/
function assertArrayBounds(array, index) {
if (index < 0 || index >= array.length) {
throw new Error(`Invalid Mutation: Tried to mutate an elements array with an out of bounds index. Index: ${index}, Array Size: ${array.length}`);
}
}
function arrayIsEqual(a1, a2) {
if (a1 === a2) {
return true;
}
if (a1.length !== a2.length) {
return false;
}
for (let i = 0; i < a1.length; i++) {
if (a1[i] !== a2[i]) {
return false;
}
}
return true;
}
function insertInArray(array, index, elements) {
if (index === array.length) {
// Support the insert at end of array case.
return array.concat(elements);
}
assertArrayBounds(array, index);
return array.slice(0, index).concat(elements).concat(array.slice(index));
}
function removeFromArray(array, index) {
assertArrayBounds(array, index);
return [...array.slice(0, index), ...array.slice(index + 1)];
}
function replaceInArray(array, index, elements) {
assertArrayBounds(array, index);
return array.slice(0, index).concat(elements).concat(array.slice(index + 1));
}
@@ -0,0 +1 @@
{"version":3,"file":"src-Cqbh3MYc.mjs","names":["BRANDS: unique symbol","current: unknown","code: OAuthErrorCode | string","errorUri?: string","response: OAuthErrorResponse","code: SdkErrorCode","data?: unknown","REQUIRED_CLIENT_CAPABILITIES_BY_METHOD: Readonly<Record<string, ClientCapabilities>>","isPlainObject","missing: Record<string, unknown>","missingMembers: Record<string, unknown>","build","JSONValueSchema: z.ZodType<JSONValue, JSONValue>","JSONValueSchema","JSONObjectSchema: z.ZodType<JSONObject, JSONObject>","ProgressTokenSchema","CursorSchema","TaskMetadataSchema","RelatedTaskMetadataSchema","RequestMetaSchema","BaseRequestParamsSchema","TaskAugmentedRequestParamsSchema","RequestSchema","NotificationsParamsSchema","NotificationSchema","ResultSchema","RequestIdSchema","EmptyResultSchema","CancelledNotificationParamsSchema","CancelledNotificationSchema","IconSchema","IconsSchema","BaseMetadataSchema","ImplementationSchema","JSONObjectSchema","ClientTasksCapabilitySchema","ServerTasksCapabilitySchema","ClientCapabilitiesSchema","InitializeRequestParamsSchema","InitializeRequestSchema","ServerCapabilitiesSchema","InitializeResultSchema","InitializedNotificationSchema","PingRequestSchema","ProgressSchema","ProgressNotificationParamsSchema","ProgressNotificationSchema","PaginatedRequestParamsSchema","PaginatedRequestSchema","PaginatedResultSchema","ResourceContentsSchema","TextResourceContentsSchema","BlobResourceContentsSchema","RoleSchema","AnnotationsSchema","ResourceSchema","ResourceTemplateSchema","ListResourcesRequestSchema","ListResourcesResultSchema","ListResourceTemplatesRequestSchema","ListResourceTemplatesResultSchema","ResourceRequestParamsSchema","ReadResourceRequestParamsSchema","ReadResourceRequestSchema","ReadResourceResultSchema","ResourceListChangedNotificationSchema","SubscribeRequestParamsSchema","SubscribeRequestSchema","UnsubscribeRequestParamsSchema","UnsubscribeRequestSchema","ResourceUpdatedNotificationParamsSchema","ResourceUpdatedNotificationSchema","PromptArgumentSchema","PromptSchema","ListPromptsRequestSchema","ListPromptsResultSchema","GetPromptRequestParamsSchema","GetPromptRequestSchema","TextContentSchema","ImageContentSchema","AudioContentSchema","ToolUseContentSchema","EmbeddedResourceSchema","ResourceLinkSchema","ContentBlockSchema","PromptMessageSchema","GetPromptResultSchema","PromptListChangedNotificationSchema","ToolAnnotationsSchema","ToolExecutionSchema","ToolSchema","ListToolsRequestSchema","ListToolsResultSchema","CallToolResultSchema","CallToolRequestParamsSchema","CallToolRequestSchema","ToolListChangedNotificationSchema","LoggingLevelSchema","SetLevelRequestParamsSchema","SetLevelRequestSchema","LoggingMessageNotificationParamsSchema","LoggingMessageNotificationSchema","ModelHintSchema","ModelPreferencesSchema","ToolChoiceSchema","ToolResultContentSchema","SamplingContentSchema","SamplingMessageContentBlockSchema","SamplingMessageSchema","CreateMessageRequestParamsSchema","CreateMessageRequestSchema","CreateMessageResultSchema","CreateMessageResultWithToolsSchema","BooleanSchemaSchema","StringSchemaSchema","NumberSchemaSchema","UntitledSingleSelectEnumSchemaSchema","TitledSingleSelectEnumSchemaSchema","LegacyTitledEnumSchemaSchema","SingleSelectEnumSchemaSchema","UntitledMultiSelectEnumSchemaSchema","TitledMultiSelectEnumSchemaSchema","MultiSelectEnumSchemaSchema","EnumSchemaSchema","PrimitiveSchemaDefinitionSchema","ElicitRequestFormParamsSchema","ElicitRequestURLParamsSchema","ElicitRequestParamsSchema","ElicitRequestSchema","ElicitationCompleteNotificationParamsSchema","ElicitationCompleteNotificationSchema","ElicitResultSchema","ResourceTemplateReferenceSchema","PromptReferenceSchema","CompleteRequestParamsSchema","CompleteRequestSchema","CompleteResultSchema","RootSchema","ListRootsRequestSchema","ListRootsResultSchema","RootsListChangedNotificationSchema","TaskCreationParamsSchema","TaskStatusSchema","TaskSchema","CreateTaskResultSchema","TaskStatusNotificationParamsSchema","TaskStatusNotificationSchema","GetTaskRequestSchema","GetTaskResultSchema","GetTaskPayloadRequestSchema","GetTaskPayloadResultSchema","ListTasksRequestSchema","ListTasksResultSchema","CancelTaskRequestSchema","memo: Rev2025WireSchemas | undefined","REF_REWRITE_DATA_POSITION_KEYS: ReadonlySet<string>","REF_REWRITE_NAME_MAP_KEYS: ReadonlySet<string>","out: Record<string, unknown>","requestMethodKeys: { readonly [M in Rev2025RequestMethod]: null }","notificationMethodKeys: { readonly [M in Rev2025NotificationMethod]: null }","resultMethodKeys: { readonly [M in Rev2025TypedRequestMethod]: null }","maps: RegistryMaps | undefined","maps","requestMethodKeys","notificationMethodKeys","rev2025RequestMethods: readonly string[]","rev2025NotificationMethods: readonly string[]","isPlainObject","triState","NOT_IN_ERA: ValidateOutcome<never>","rev2025Codec: WireCodec","NOT_IN_ERA","JSONValueSchema: z.ZodType<JSONValue, JSONValue>","JSONValueSchema","JSONObjectSchema: z.ZodType<JSONObject, JSONLine truncated
@@ -0,0 +1 @@
{"version":3,"file":"file-badge.js","sources":["../../../src/icons/file-badge.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FileBadge\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMjJoNmEyIDIgMCAwIDAgMi0yVjdsLTUtNUg2YTIgMiAwIDAgMC0yIDJ2MyIgLz4KICA8cGF0aCBkPSJNMTQgMnY0YTIgMiAwIDAgMCAyIDJoNCIgLz4KICA8cGF0aCBkPSJNNSAxN2EzIDMgMCAxIDAgMC02IDMgMyAwIDAgMCAwIDZaIiAvPgogIDxwYXRoIGQ9Ik03IDE2LjUgOCAyMmwtMy0xLTMgMSAxLTUuNSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/file-badge\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FileBadge = createLucideIcon('FileBadge', [\n ['path', { d: 'M12 22h6a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3', key: '12ixgl' }],\n ['path', { d: 'M14 2v4a2 2 0 0 0 2 2h4', key: 'tnqrlb' }],\n ['path', { d: 'M5 17a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z', key: 'u0c8gj' }],\n ['path', { d: 'M7 16.5 8 22l-3-1-3 1 1-5.5', key: '5gm2nr' }],\n]);\n\nexport default FileBadge;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAChF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACnE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA+B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC9D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"sse.js","sourceRoot":"","sources":["../../../src/client/sse.ts"],"names":[],"mappings":"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 truncated
@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CloudSnow = createLucideIcon("CloudSnow", [
["path", { d: "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242", key: "1pljnt" }],
["path", { d: "M8 15h.01", key: "a7atzg" }],
["path", { d: "M8 19h.01", key: "puxtts" }],
["path", { d: "M12 17h.01", key: "p32p05" }],
["path", { d: "M12 21h.01", key: "h35vbk" }],
["path", { d: "M16 15h.01", key: "rnfrdf" }],
["path", { d: "M16 19h.01", key: "1vcnzz" }]
]);
export { CloudSnow as default };
//# sourceMappingURL=cloud-snow.js.map
@@ -0,0 +1 @@
{"version":3,"file":"steps.mjs","sources":["../../../src/easing/steps.ts"],"sourcesContent":["import { clamp } from \"../clamp\"\nimport type { EasingFunction } from \"./types\"\n\n/*\n Create stepped version of 0-1 progress\n\n @param [int]: Number of steps\n @param [number]: Current value\n @return [number]: Stepped value\n*/\nexport type Direction = \"start\" | \"end\"\n\nexport function steps(\n numSteps: number,\n direction: Direction = \"end\"\n): EasingFunction {\n return (progress: number) => {\n progress =\n direction === \"end\"\n ? Math.min(progress, 0.999)\n : Math.max(progress, 0.001)\n const expanded = progress * numSteps\n const rounded =\n direction === \"end\" ? Math.floor(expanded) : Math.ceil(expanded)\n\n return clamp(0, 1, rounded / numSteps)\n }\n}\n"],"names":[],"mappings":";;SAYgB,KAAK,CACjB,QAAgB,EAChB,YAAuB,KAAK,EAAA;IAE5B,OAAO,CAAC,QAAgB,KAAI;QACxB,QAAQ;AACJ,YAAA,SAAS,KAAK;kBACR,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK;kBACxB,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC;AACnC,QAAA,MAAM,QAAQ,GAAG,QAAQ,GAAG,QAAQ;QACpC,MAAM,OAAO,GACT,SAAS,KAAK,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;QAEpE,OAAO,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;AAC1C,IAAA,CAAC;AACL;;;;"}
@@ -0,0 +1,76 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.getContextualType = getContextualType;
const ts = __importStar(require("typescript"));
/**
* Returns the contextual type of a given node.
* Contextual type is the type of the target the node is going into.
* i.e. the type of a called function's parameter, or the defined type of a variable declaration
*/
function getContextualType(checker, node) {
const parent = node.parent;
if (ts.isCallExpression(parent) || ts.isNewExpression(parent)) {
if (node === parent.expression) {
// is the callee, so has no contextual type
return;
}
}
else if (ts.isVariableDeclaration(parent) ||
ts.isPropertyDeclaration(parent) ||
ts.isParameter(parent)) {
return parent.type ? checker.getTypeFromTypeNode(parent.type) : undefined;
}
else if (ts.isJsxExpression(parent)) {
return checker.getContextualType(parent);
}
else if (ts.isIdentifier(node) &&
(ts.isPropertyAssignment(parent) ||
ts.isShorthandPropertyAssignment(parent))) {
return checker.getContextualType(node);
}
else if (ts.isBinaryExpression(parent) &&
parent.operatorToken.kind === ts.SyntaxKind.EqualsToken &&
parent.right === node) {
// is RHS of assignment
return checker.getTypeAtLocation(parent.left);
}
else if (![ts.SyntaxKind.JsxExpression, ts.SyntaxKind.TemplateSpan].includes(parent.kind)) {
// parent is not something we know we can get the contextual type of
return;
}
// TODO - support return statement checking
return checker.getContextualType(node);
}
@@ -0,0 +1 @@
{"version":3,"file":"calendar-plus.js","sources":["../../../src/icons/calendar-plus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CalendarPlus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOCAydjQiIC8+CiAgPHBhdGggZD0iTTE2IDJ2NCIgLz4KICA8cGF0aCBkPSJNMjEgMTNWNmEyIDIgMCAwIDAtMi0ySDVhMiAyIDAgMCAwLTIgMnYxNGEyIDIgMCAwIDAgMiAyaDgiIC8+CiAgPHBhdGggZD0iTTMgMTBoMTgiIC8+CiAgPHBhdGggZD0iTTE2IDE5aDYiIC8+CiAgPHBhdGggZD0iTTE5IDE2djYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/calendar-plus\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst CalendarPlus = createLucideIcon('CalendarPlus', [\n ['path', { d: 'M8 2v4', key: '1cmpym' }],\n ['path', { d: 'M16 2v4', key: '4m81vk' }],\n ['path', { d: 'M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8', key: '3spt84' }],\n ['path', { d: 'M3 10h18', key: '8toen8' }],\n ['path', { d: 'M16 19h6', key: 'xwg31i' }],\n ['path', { d: 'M19 16v6', key: 'tddt3s' }],\n]);\n\nexport default CalendarPlus;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const AlignHorizontalSpaceBetween = createLucideIcon("AlignHorizontalSpaceBetween", [
["rect", { width: "6", height: "14", x: "3", y: "5", rx: "2", key: "j77dae" }],
["rect", { width: "6", height: "10", x: "15", y: "7", rx: "2", key: "bq30hj" }],
["path", { d: "M3 2v20", key: "1d2pfg" }],
["path", { d: "M21 2v20", key: "p059bm" }]
]);
export { AlignHorizontalSpaceBetween as default };
//# sourceMappingURL=align-horizontal-space-between.js.map
@@ -0,0 +1,6 @@
# undici-types
This package is a dual-publish of the [undici](https://www.npmjs.com/package/undici) library types. The `undici` package **still contains types**. This package is for users who _only_ need undici types (such as for `@types/node`). It is published alongside every release of `undici`, so you can always use the same version.
- [GitHub nodejs/undici](https://github.com/nodejs/undici)
- [Undici Documentation](https://undici.nodejs.org/#/)
@@ -0,0 +1,22 @@
"use strict";
module.exports = function (it) {
const { pluginId, plugins } = it;
let result = `ESLint couldn't determine the plugin "${pluginId}" uniquely.
`;
for (const { filePath, importerName } of plugins) {
result += `
- ${filePath} (loaded in "${importerName}")`;
}
result += `
Please remove the "plugins" setting from either config or remove either plugin installation.
If you still can't figure out the problem, please see https://eslint.org/docs/latest/use/troubleshooting.
`;
return result;
};
@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2019 Coveo Solutions Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
@@ -0,0 +1,63 @@
/**
* Creates a `transformPagePoint` function that accounts for SVG viewBox scaling.
*
* When dragging SVG elements inside an SVG with a viewBox that differs from
* the rendered dimensions (e.g., `viewBox="0 0 100 100"` but rendered at 500x500 pixels),
* pointer coordinates need to be transformed to match the SVG's coordinate system.
*
* @example
* ```jsx
* function App() {
* const svgRef = useRef<SVGSVGElement>(null)
*
* return (
* <MotionConfig transformPagePoint={transformViewBoxPoint(svgRef)}>
* <svg ref={svgRef} viewBox="0 0 100 100" width={500} height={500}>
* <motion.rect drag width={10} height={10} />
* </svg>
* </MotionConfig>
* )
* }
* ```
*
* @param svgRef - A React ref to the SVG element
* @returns A transformPagePoint function for use with MotionConfig
*
* @public
*/
function transformViewBoxPoint(svgRef) {
return (point) => {
const svg = svgRef.current;
if (!svg) {
return point;
}
// Get the viewBox attribute
const viewBox = svg.viewBox?.baseVal;
if (!viewBox || (viewBox.width === 0 && viewBox.height === 0)) {
// No viewBox or empty viewBox - no transformation needed
return point;
}
// Get the rendered dimensions of the SVG
const bbox = svg.getBoundingClientRect();
if (bbox.width === 0 || bbox.height === 0) {
return point;
}
// Calculate scale factors
const scaleX = viewBox.width / bbox.width;
const scaleY = viewBox.height / bbox.height;
// Get the SVG's position on the page
const svgX = bbox.left + window.scrollX;
const svgY = bbox.top + window.scrollY;
// Transform the point:
// 1. Calculate position relative to SVG
// 2. Scale by viewBox/viewport ratio
// 3. Add back the SVG position (but in SVG coordinates)
return {
x: (point.x - svgX) * scaleX + svgX,
y: (point.y - svgY) * scaleY + svgY,
};
};
}
export { transformViewBoxPoint };
//# sourceMappingURL=transform-viewbox-point.mjs.map
@@ -0,0 +1,162 @@
/**
* Helpers.
*/
var s = 1000;
var m = s * 60;
var h = m * 60;
var d = h * 24;
var w = d * 7;
var y = d * 365.25;
/**
* Parse or format the given `val`.
*
* Options:
*
* - `long` verbose formatting [false]
*
* @param {String|Number} val
* @param {Object} [options]
* @throws {Error} throw an error if val is not a non-empty string or a number
* @return {String|Number}
* @api public
*/
module.exports = function (val, options) {
options = options || {};
var type = typeof val;
if (type === 'string' && val.length > 0) {
return parse(val);
} else if (type === 'number' && isFinite(val)) {
return options.long ? fmtLong(val) : fmtShort(val);
}
throw new Error(
'val is not a non-empty string or a valid number. val=' +
JSON.stringify(val)
);
};
/**
* Parse the given `str` and return milliseconds.
*
* @param {String} str
* @return {Number}
* @api private
*/
function parse(str) {
str = String(str);
if (str.length > 100) {
return;
}
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
str
);
if (!match) {
return;
}
var n = parseFloat(match[1]);
var type = (match[2] || 'ms').toLowerCase();
switch (type) {
case 'years':
case 'year':
case 'yrs':
case 'yr':
case 'y':
return n * y;
case 'weeks':
case 'week':
case 'w':
return n * w;
case 'days':
case 'day':
case 'd':
return n * d;
case 'hours':
case 'hour':
case 'hrs':
case 'hr':
case 'h':
return n * h;
case 'minutes':
case 'minute':
case 'mins':
case 'min':
case 'm':
return n * m;
case 'seconds':
case 'second':
case 'secs':
case 'sec':
case 's':
return n * s;
case 'milliseconds':
case 'millisecond':
case 'msecs':
case 'msec':
case 'ms':
return n;
default:
return undefined;
}
}
/**
* Short format for `ms`.
*
* @param {Number} ms
* @return {String}
* @api private
*/
function fmtShort(ms) {
var msAbs = Math.abs(ms);
if (msAbs >= d) {
return Math.round(ms / d) + 'd';
}
if (msAbs >= h) {
return Math.round(ms / h) + 'h';
}
if (msAbs >= m) {
return Math.round(ms / m) + 'm';
}
if (msAbs >= s) {
return Math.round(ms / s) + 's';
}
return ms + 'ms';
}
/**
* Long format for `ms`.
*
* @param {Number} ms
* @return {String}
* @api private
*/
function fmtLong(ms) {
var msAbs = Math.abs(ms);
if (msAbs >= d) {
return plural(ms, msAbs, d, 'day');
}
if (msAbs >= h) {
return plural(ms, msAbs, h, 'hour');
}
if (msAbs >= m) {
return plural(ms, msAbs, m, 'minute');
}
if (msAbs >= s) {
return plural(ms, msAbs, s, 'second');
}
return ms + ' ms';
}
/**
* Pluralization helper.
*/
function plural(ms, msAbs, n, name) {
var isPlural = msAbs >= n * 1.5;
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
}
@@ -0,0 +1,3 @@
declare const RangeError: RangeErrorConstructor;
export = RangeError;
@@ -0,0 +1 @@
{"version":3,"file":"clipboard-copy.js","sources":["../../../src/icons/clipboard-copy.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ClipboardCopy\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iOCIgaGVpZ2h0PSI0IiB4PSI4IiB5PSIyIiByeD0iMSIgcnk9IjEiIC8+CiAgPHBhdGggZD0iTTggNEg2YTIgMiAwIDAgMC0yIDJ2MTRhMiAyIDAgMCAwIDIgMmgxMmEyIDIgMCAwIDAgMi0ydi0yIiAvPgogIDxwYXRoIGQ9Ik0xNiA0aDJhMiAyIDAgMCAxIDIgMnY0IiAvPgogIDxwYXRoIGQ9Ik0yMSAxNEgxMSIgLz4KICA8cGF0aCBkPSJtMTUgMTAtNCA0IDQgNCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/clipboard-copy\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ClipboardCopy = createLucideIcon('ClipboardCopy', [\n ['rect', { width: '8', height: '4', x: '8', y: '2', rx: '1', ry: '1', key: 'tgr4d6' }],\n ['path', { d: 'M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2', key: '4jdomd' }],\n ['path', { d: 'M16 4h2a2 2 0 0 1 2 2v4', key: '3hqy98' }],\n ['path', { d: 'M21 14H11', key: '1bme5i' }],\n ['path', { d: 'm15 10-4 4 4 4', key: '5dvupr' }],\n]);\n\nexport default ClipboardCopy;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgB,iBAAiB,eAAiB,CAAA,CAAA,CAAA;AAAA,CAAA,CACtD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,KAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAQ,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,EAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,KAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAA,EAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAU,CAAA,CAAA;AAAA,CAAA,CACrF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,79 @@
import type {CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition} from "../../types"
import type {KeywordCxt} from "../../compile/validate"
import {checkDataTypes, getSchemaTypes, DataType} from "../../compile/validate/dataType"
import {_, str, Name} from "../../compile/codegen"
import {useFunc} from "../../compile/util"
import equal from "../../runtime/equal"
export type UniqueItemsError = ErrorObject<
"uniqueItems",
{i: number; j: number},
boolean | {$data: string}
>
const error: KeywordErrorDefinition = {
message: ({params: {i, j}}) =>
str`must NOT have duplicate items (items ## ${j} and ${i} are identical)`,
params: ({params: {i, j}}) => _`{i: ${i}, j: ${j}}`,
}
const def: CodeKeywordDefinition = {
keyword: "uniqueItems",
type: "array",
schemaType: "boolean",
$data: true,
error,
code(cxt: KeywordCxt) {
const {gen, data, $data, schema, parentSchema, schemaCode, it} = cxt
if (!$data && !schema) return
const valid = gen.let("valid")
const itemTypes = parentSchema.items ? getSchemaTypes(parentSchema.items) : []
cxt.block$data(valid, validateUniqueItems, _`${schemaCode} === false`)
cxt.ok(valid)
function validateUniqueItems(): void {
const i = gen.let("i", _`${data}.length`)
const j = gen.let("j")
cxt.setParams({i, j})
gen.assign(valid, true)
gen.if(_`${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j))
}
function canOptimize(): boolean {
return itemTypes.length > 0 && !itemTypes.some((t) => t === "object" || t === "array")
}
function loopN(i: Name, j: Name): void {
const item = gen.name("item")
const wrongType = checkDataTypes(itemTypes, item, it.opts.strictNumbers, DataType.Wrong)
const indices = gen.const("indices", _`{}`)
gen.for(_`;${i}--;`, () => {
gen.let(item, _`${data}[${i}]`)
gen.if(wrongType, _`continue`)
if (itemTypes.length > 1) gen.if(_`typeof ${item} == "string"`, _`${item} += "_"`)
gen
.if(_`typeof ${indices}[${item}] == "number"`, () => {
gen.assign(j, _`${indices}[${item}]`)
cxt.error()
gen.assign(valid, false).break()
})
.code(_`${indices}[${item}] = ${i}`)
})
}
function loopN2(i: Name, j: Name): void {
const eql = useFunc(gen, equal)
const outer = gen.name("outer")
gen.label(outer).for(_`;${i}--;`, () =>
gen.for(_`${j} = ${i}; ${j}--;`, () =>
gen.if(_`${eql}(${data}[${i}], ${data}[${j}])`, () => {
cxt.error()
gen.assign(valid, false).break(outer)
})
)
)
}
},
}
export default def
@@ -0,0 +1 @@
{"version":3,"file":"useMatch.js","names":[],"sources":["../../src/useMatch.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport { useStore } from '@tanstack/react-store'\nimport { invariant, replaceEqualDeep } from '@tanstack/router-core'\nimport { isServer } from '@tanstack/router-core/isServer'\nimport { dummyMatchContext, matchContext } from './matchContext'\nimport { useRouter } from './useRouter'\nimport type {\n StructuralSharingOption,\n ValidateSelected,\n} from './structuralSharing'\nimport type {\n AnyRouter,\n MakeRouteMatch,\n MakeRouteMatchUnion,\n RegisteredRouter,\n StrictOrFrom,\n ThrowConstraint,\n ThrowOrOptional,\n} from '@tanstack/router-core'\n\nconst dummyStore = {\n get: () => undefined,\n subscribe: () => ({ unsubscribe: () => {} }),\n} as any\n\nexport interface UseMatchBaseOptions<\n TRouter extends AnyRouter,\n TFrom,\n TStrict extends boolean,\n TThrow extends boolean,\n TSelected,\n TStructuralSharing extends boolean,\n> {\n select?: (\n match: MakeRouteMatch<TRouter['routeTree'], TFrom, TStrict>,\n ) => ValidateSelected<TRouter, TSelected, TStructuralSharing>\n shouldThrow?: TThrow\n}\n\nexport type UseMatchRoute<out TFrom> = <\n TRouter extends AnyRouter = RegisteredRouter,\n TSelected = unknown,\n TStructuralSharing extends boolean = boolean,\n>(\n opts?: UseMatchBaseOptions<\n TRouter,\n TFrom,\n true,\n true,\n TSelected,\n TStructuralSharing\n > &\n StructuralSharingOption<TRouter, TSelected, TStructuralSharing>,\n) => UseMatchResult<TRouter, TFrom, true, TSelected>\n\nexport type UseMatchOptions<\n TRouter extends AnyRouter,\n TFrom extends string | undefined,\n TStrict extends boolean,\n TThrow extends boolean,\n TSelected,\n TStructuralSharing extends boolean,\n> = StrictOrFrom<TRouter, TFrom, TStrict> &\n UseMatchBaseOptions<\n TRouter,\n TFrom,\n TStrict,\n TThrow,\n TSelected,\n TStructuralSharing\n > &\n StructuralSharingOption<TRouter, TSelected, TStructuralSharing>\n\nexport type UseMatchResult<\n TRouter extends AnyRouter,\n TFrom,\n TStrict extends boolean,\n TSelected,\n> = unknown extends TSelected\n ? TStrict extends true\n ? MakeRouteMatch<TRouter['routeTree'], TFrom, TStrict>\n : MakeRouteMatchUnion<TRouter>\n : TSelected\n\n/**\n * Read and select the nearest or targeted route match.\n * @link https://tanstack.com/router/latest/docs/framework/react/api/router/useMatchHook\n */\nexport function useMatch<\n TRouter extends AnyRouter = RegisteredRouter,\n const TFrom extends string | undefined = undefined,\n TStrict extends boolean = true,\n TThrow extends boolean = true,\n TSelected = unknown,\n TStructuralSharing extends boolean = boolean,\n>(\n opts: UseMatchOptions<\n TRouter,\n TFrom,\n TStrict,\n ThrowConstraint<TStrict, TThrow>,\n TSelected,\n TStructuralSharing\n >,\n): ThrowOrOptional<UseMatchResult<TRouter, TFrom, TStrict, TSelected>, TThrow> {\n const router = useRouter<TRouter>()\n const nearestMatchId = React.useContext(\n opts.from ? dummyMatchContext : matchContext,\n )\n\n const key = opts.from ?? nearestMatchId\n const matchStore = key\n ? opts.from\n ? router.stores.getRouteMatchStore(key)\n : router.stores.matchStores.get(key)\n : undefined\n\n if (isServer ?? router.isServer) {\n const match = matchStore?.get()\n if ((opts.shouldThrow ?? true) && !match) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n `Invariant failed: Could not find ${opts.from ? `an active match from \"${opts.from}\"` : 'a nearest match!'}`,\n )\n }\n\n invariant()\n }\n\n if (match === undefined) {\n return undefined as any\n }\n\n return (opts.select ? opts.select(match as any) : match) as any\n }\n\n const previousResult =\n // eslint-disable-next-line react-hooks/rules-of-hooks -- condition is static\n React.useRef<ValidateSelected<TRouter, TSelected, TStructuralSharing>>(\n undefined,\n )\n\n // eslint-disable-next-line react-hooks/rules-of-hooks -- condition is static\n return useStore(matchStore ?? dummyStore, (match) => {\n if ((opts.shouldThrow ?? true) && !match) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n `Invariant failed: Could not find ${opts.from ? `an active match from \"${opts.from}\"` : 'a nearest match!'}`,\n )\n }\n\n invariant()\n }\n\n if (match === undefined) {\n return undefined\n }\n\n const selected = (\n opts.select ? opts.select(match as any) : match\n ) as ValidateSelected<TRouter, TSelected, TStructuralSharing>\n\n if (opts.structuralSharing ?? router.options.defaultStructuralSharing) {\n const shared = replaceEqualDeep(previousResult.current, selected)\n previousResult.current = shared\n return shared\n }\n\n return selected\n }) as any\n}\n"],"mappings":";;;;;Line truncated
@@ -0,0 +1,824 @@
export default `flf2a$ 8 7 20 -1 6
Katakana.flf by Vinney Thai <ssfiit@eris.cs.umb.edu> Date: August 11, 1994
based on Banner by Ryan Youck <youck@cs.uregina.ca>
a-A i-B u-C e-D o-E ka-F ki-G ku-H ke-I ko-J sa-K shi-L su-M se-N so-O ta-P
chi-Q tsu-R te-S to-T na-U ni-V nu-W ne-X no-Y ha-Z hi-a fu-b he-c ho-d ma-e
mi-f mu-g me-h mo-i ya-j yu-k e-l yo-m ra-n ri-o ru-p re-q ro-r wa-s i-t wo-u
n-v
$$$@
$$$@
$$$@
$$$@
$$$@
$$$@
$$$@
$$$@@
###$@
###$@
###$@
# $@
$@
###$@
###$@
$@@
### ###$@
### ###$@
# # $@
$ $@
$ $@
$@
$@
$@@
# # $@
# # $@
#######$@
# # $@
#######$@
# # $@
# # $@
$@@
##### $@
# # #$@
# # $@
##### $@
# #$@
# # #$@
##### $@
$@@
### #$@
# # # $@
### # $@
# $@
# ###$@
# # #$@
# ###$@
$@@
## $@
# # $@
## $@
### $@
# # #$@
# # $@
### #$@
$@@
###$@
###$@
# $@
# $@
$@
$@
$@
$@@
##$@
# $@
# $@
# $@
# $@
# $@
##$@
$@@
## $@
# $@
#$@
#$@
#$@
# $@
## $@
$@@
$@
# # $@
# # $@
#######$@
# # $@
# # $@
$@
$@@
$@
# $@
# $@
#####$@
# $@
# $@
$@
$@@
$@
$@
$@
$@
###$@
###$@
# $@
# $@@
$@
$@
$@
#####$@
$@
$@
$@
$@@
$@
$@
$@
$@
###$@
###$@
###$@
$@@
#$@
# $@
# $@
# $@
# $@
# $@
# $@
$@@
### $@
# # $@
# #$@
# #$@
# #$@
# # $@
### $@
$@@
# $@
## $@
# # $@
# $@
# $@
# $@
#####$@
$@@
##### $@
# #$@
#$@
##### $@
# $@
# $@
#######$@
$@@
##### $@
# #$@
#$@
##### $@
#$@
# #$@
##### $@
$@@
# $@
# # $@
# # $@
# # $@
#######$@
# $@
# $@
$@@
#######$@
# $@
# $@
###### $@
#$@
# #$@
##### $@
$@@
##### $@
# #$@
# $@
###### $@
# #$@
# #$@
##### $@
$@@
#######$@
# # $@
# $@
# $@
# $@
# $@
# $@
$@@
##### $@
# #$@
# #$@
##### $@
# #$@
# #$@
##### $@
$@@
##### $@
# #$@
# #$@
######$@
#$@
# #$@
##### $@
$@@
# $@
###$@
# $@
$@
# $@
###$@
# $@
$@@
$@
###$@
###$@
$@
###$@
###$@
# $@
# $@@
#$@
# $@
# $@
# $@
# $@
# $@
#$@
$@@
$@
$@
#####$@
$@
#####$@
$@
$@
$@@
# $@
# $@
# $@
#$@
# $@
# $@
# $@
$@@
##### $@
# #$@
#$@
### $@
# $@
$@
# $@
$@@
##### $@
# #$@
# ### #$@
# ### #$@
# #### $@
# $@
##### $@
$@@
##########$@
### $@
# $@
# $@
# $@
# $@
# $@
$@@
##$@
## $@
## # $@
## # $@
# $@
# $@
# $@
$@@
# $@
##########$@
# #$@
## $@
## $@
## $@
## $@
$@@
$@
####### $@
# $@
# $@
# $@
# $@
##########$@
$@@
# $@
##########$@
## $@
## # $@
## # $@
## ## $@
# $@
$@@
# $@
##########$@
# #$@
# #$@
# #$@
# # # $@
# # $@
$@@
# # $@
# # $@
# # # $@
# $@
# # $@
# # $@
#$@
$@@
# $@
########$@
# #$@
# ## $@
## $@
## $@
## $@
$@@
# $@
########$@
# # $@
# # $@
# $@
# $@
# $@
$@@
$@
##########$@
#$@
#$@
#$@
#$@
######### $@
$@@
# # $@
##########$@
# # $@
# $@
# $@
# $@
# $@
$@@
# #$@
# # # $@
# # $@
## $@
## $@
## $@
## $@
$@@
########$@
#$@
# $@
## $@
## # $@
## # $@
# #$@
$@@
# $@
# $@
##########$@
# # $@
# $@
# $@
###### $@
$@@
# #$@
# #$@
# $@
# $@
## $@
## $@
## $@
$@@
# $@
#######$@
# # $@
# # # $@
### $@
## $@
## $@
$@@
## $@
###### $@
# $@
##########$@
# $@
# $@
## $@
$@@
# # #$@
# # #$@
# $@
# $@
## $@
## $@
## $@
$@@
###### $@
$@
##########$@
# $@
# $@
# $@
## $@
$@@
# $@
# $@
## $@
# # $@
# #$@
# $@
# $@
$@@
# $@
##########$@
# $@
# $@
# $@
# $@
## $@
$@@
$@
$@
###### $@
$@
$@
##########$@
$@
$@@
##########$@
#$@
# # $@
# ## $@
## $@
## # $@
## # $@
$@@
# $@
##########$@
# $@
### $@
###### $@
## # ##$@
# $@
$@@
#$@
#$@
# $@
# $@
## $@
## $@
## $@
$@@
$@
$@
# # $@
# # $@
# #$@
# $@
$@
$@@
#####$@
# $@
# $@
# $@
# $@
# $@
#####$@
$@@
# $@
# $@
# $@
# $@
# $@
# $@
#$@
$@@
#####$@
#$@
#$@
#$@
#$@
#$@
#####$@
$@@
# $@
# # $@
# #$@
$@
$@
$@
$@
$@@
$@
$@
$@
$@
$@
$@
$@
#######$@@
###$@
###$@
# $@
#$@
$@
$@
$@
$@@
# $@
# ### $@
#### $@
# $@
# $@
# $@
#######$@
$@@
########$@
#$@
#$@
# $@
## $@
## $@
## $@
$@@
$@
$@
## $@
# ## $@
# ## $@
##$@
$@
$@@
# $@
##########$@
# $@
# # # $@
# # # $@
# ## #$@
# $@
$@@
$@
##########$@
# $@
# $@
# # $@
# $@
# $@
$@@
#### $@
##$@
### $@
###$@
$@
### $@
###$@
$@@
# $@
# $@
# $@
# $@
# # $@
######### $@
#$@
$@@
#$@
# $@
# # $@
# # $@
# $@
## # $@
## # $@
$@@
###### $@
# $@
##########$@
# $@
# $@
# $@
#### $@
$@@
# ## $@
# ## # $@
### $@
# # $@
# $@
# $@
# $@
$@@
$@
###### $@
# $@
# $@
# $@
##########$@
$@
$@@
$@
###### $@
# $@
# $@
# $@
##########$@
$@
$@@
#########$@
#$@
#$@
######## $@
# $@
# $@
######## $@
$@@
###### $@
$@
##########$@
# #$@
## $@
## $@
## $@
$@@
# #$@
# #$@
# #$@
# #$@
# $@
# $@
## $@
$@@
# # $@
# # $@
# # $@
# # #$@
# # # $@
# # # $@
# ## $@
$@@
# $@
# $@
# $@
# ##$@
# ## $@
# ## $@
## $@
$@@
$@
#########$@
# #$@
# #$@
# #$@
#########$@
$@
$@@
##########$@
# #$@
# $@
# $@
# $@
## $@
## $@
$@@
# $@
####### $@
# # $@
# # $@
##########$@
# $@
# $@
$@@
##########$@
#$@
# $@
######## $@
## $@
## $@
## $@
$@@
#$@
# #$@
# # $@
# $@
## $@
## $@
## $@
$@@
$@
$@
$@
$@
$@
$@
$@
$@@
$@
$@
$@
$@
$@
$@
$@
$@@
$@
$@
$@
$@
$@
$@
$@
$@@
$@
$@
$@
$@
$@
$@
$@
$@@
###$@
# $@
# $@
## $@
# $@
# $@
###$@
$@@
#$@
#$@
#$@
$@
#$@
#$@
#$@
$@@
### $@
# $@
# $@
##$@
# $@
# $@
### $@
$@@
## $@
# # #$@
## $@
$@
$@
$@
$@
$@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
`
@@ -0,0 +1,144 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const util = __importStar(require("../core/util.cjs"));
const error = () => {
const Sizable = {
string: { unit: "სიმბოლო", verb: "უნდა შეიცავდეს" },
file: { unit: "ბაიტი", verb: "უნდა შეიცავდეს" },
array: { unit: "ელემენტი", verb: "უნდა შეიცავდეს" },
set: { unit: "ელემენტი", verb: "უნდა შეიცავდეს" },
map: { unit: "ელემენტი", verb: "უნდა შეიცავდეს" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const FormatDictionary = {
regex: "შეყვანა",
email: "ელ-ფოსტის მისამართი",
url: "URL",
emoji: "ემოჯი",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "თარიღი-დრო",
date: "თარიღი",
time: "დრო",
duration: "ხანგრძლივობა",
ipv4: "IPv4 მისამართი",
ipv6: "IPv6 მისამართი",
mac: "MAC მისამართი",
cidrv4: "IPv4 დიაპაზონი",
cidrv6: "IPv6 დიაპაზონი",
base64: "base64-კოდირებული ველი",
base64url: "base64url-კოდირებული ველი",
json_string: "JSON ველი",
e164: "E.164 ნომერი",
credit_card: "საკრედიტო ბარათის ნომერი",
currency_code: "ვალუტის კოდი",
iban: "IBAN",
jwt: "JWT",
template_literal: "შეყვანა",
};
const TypeDictionary = {
nan: "NaN",
number: "რიცხვი",
string: "ველი",
boolean: "ბულეანი",
function: "ფუნქცია",
array: "მასივი",
};
return (issue) => {
switch (issue.code) {
case "invalid_type": {
const expected = TypeDictionary[issue.expected] ?? issue.expected;
const receivedType = util.parsedType(issue.input);
const received = TypeDictionary[receivedType] ?? receivedType;
if (/^[A-Z]/.test(issue.expected)) {
return `არასწორი შეყვანა: მოსალოდნელი instanceof ${issue.expected}, მიღებული ${received}`;
}
return `არასწორი შეყვანა: მოსალოდნელი ${expected}, მიღებული ${received}`;
}
case "invalid_value":
if (issue.values.length === 1)
return `არასწორი შეყვანა: მოსალოდნელი ${util.stringifyPrimitive(issue.values[0])}`;
return `არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${util.joinValues(issue.values, "|")}-დან`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `ზედმეტად დიდი: მოსალოდნელი ${issue.origin ?? "მნიშვნელობა"} ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit}`;
return `ზედმეტად დიდი: მოსალოდნელი ${issue.origin ?? "მნიშვნელობა"} იყოს ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `ზედმეტად პატარა: მოსალოდნელი ${issue.origin} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `ზედმეტად პატარა: მოსალოდნელი ${issue.origin} იყოს ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with") {
return `არასწორი ველი: უნდა იწყებოდეს "${_issue.prefix}"-ით`;
}
if (_issue.format === "ends_with")
return `არასწორი ველი: უნდა მთავრდებოდეს "${_issue.suffix}"-ით`;
if (_issue.format === "includes")
return `არასწორი ველი: უნდა შეიცავდეს "${_issue.includes}"-ს`;
if (_issue.format === "regex")
return `არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${_issue.pattern}`;
return `არასწორი ${FormatDictionary[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `არასწორი რიცხვი: უნდა იყოს ${issue.divisor}-ის ჯერადი`;
case "unrecognized_keys":
return `უცნობი გასაღებ${issue.keys.length > 1 ? "ები" : "ი"}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `არასწორი გასაღები ${issue.origin}-ში`;
case "invalid_union":
return "არასწორი შეყვანა";
case "invalid_element":
return `არასწორი მნიშვნელობა ${issue.origin}-ში`;
default:
return `არასწორი შეყვანა`;
}
};
};
function default_1() {
return {
localeError: error(),
};
}
module.exports = exports.default;
@@ -0,0 +1,39 @@
1.1.2 / 2017-09-23
==================
* perf: improve header token parsing speed
1.1.1 / 2017-03-20
==================
* perf: hoist regular expression
1.1.0 / 2015-09-29
==================
* Only accept valid field names in the `field` argument
- Ensures the resulting string is a valid HTTP header value
1.0.1 / 2015-07-08
==================
* Fix setting empty header from empty `field`
* perf: enable strict mode
* perf: remove argument reassignments
1.0.0 / 2014-08-10
==================
* Accept valid `Vary` header string as `field`
* Add `vary.append` for low-level string manipulation
* Move to `jshttp` orgainzation
0.1.0 / 2014-06-05
==================
* Support array of fields to set
0.0.0 / 2014-06-04
==================
* Initial release
@@ -0,0 +1,365 @@
/**
* @fileoverview Rule to flag statements that use magic numbers (adapted from https://github.com/danielstjules/buddy.js)
* @author Vincent Lemeunier
*/
"use strict";
const astUtils = require("./utils/ast-utils");
// Maximum array length by the ECMAScript Specification.
const MAX_ARRAY_LENGTH = 2 ** 32 - 1;
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/**
* Convert the value to bigint if it's a string. Otherwise return the value as-is.
* @param {bigint|number|string} x The value to normalize.
* @returns {bigint|number} The normalized value.
*/
function normalizeIgnoreValue(x) {
if (typeof x === "string") {
return BigInt(x.slice(0, -1));
}
return x;
}
/**
* Checks if the node parent is a TypeScript enum member
* @param {ASTNode} node The node to be validated
* @returns {boolean} True if the node parent is a TypeScript enum member
*/
function isParentTSEnumDeclaration(node) {
return node.parent.type === "TSEnumMember";
}
/**
* Checks if the node is a valid TypeScript numeric literal type.
* @param {ASTNode} node The node to be validated
* @returns {boolean} True if the node is a TypeScript numeric literal type
*/
function isTSNumericLiteralType(node) {
let ancestor = node.parent;
// Go up while we're part of a type union
while (ancestor.parent.type === "TSUnionType") {
ancestor = ancestor.parent;
}
// Check if the final ancestor is in a type alias declaration
return ancestor.parent.type === "TSTypeAliasDeclaration";
}
/**
* Checks if the node parent is a readonly class property
* @param {ASTNode} node The node to be validated
* @returns {boolean} True if the node parent is a readonly class property
*/
function isParentTSReadonlyPropertyDefinition(node) {
if (node.parent?.type === "PropertyDefinition" && node.parent.readonly) {
return true;
}
return false;
}
/**
* Checks if the node is part of a type indexed access (eg. Foo[4])
* @param {ASTNode} node The node to be validated
* @returns {boolean} True if the node is part of an indexed access
*/
function isAncestorTSIndexedAccessType(node) {
let ancestor = node.parent;
/*
* Go up another level while we're part of a type union (eg. 1 | 2) or
* intersection (eg. 1 & 2)
*/
while (
ancestor.parent.type === "TSUnionType" ||
ancestor.parent.type === "TSIntersectionType"
) {
ancestor = ancestor.parent;
}
return ancestor.parent.type === "TSIndexedAccessType";
}
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
dialects: ["typescript", "javascript"],
language: "javascript",
docs: {
description: "Disallow magic numbers",
recommended: false,
frozen: true,
url: "https://eslint.org/docs/latest/rules/no-magic-numbers",
},
schema: [
{
type: "object",
properties: {
detectObjects: {
type: "boolean",
default: false,
},
enforceConst: {
type: "boolean",
default: false,
},
ignore: {
type: "array",
items: {
anyOf: [
{ type: "number" },
{
type: "string",
pattern: "^[+-]?(?:0|[1-9][0-9]*)n$",
},
],
},
uniqueItems: true,
},
ignoreArrayIndexes: {
type: "boolean",
default: false,
},
ignoreDefaultValues: {
type: "boolean",
default: false,
},
ignoreClassFieldInitialValues: {
type: "boolean",
default: false,
},
ignoreEnums: {
type: "boolean",
default: false,
},
ignoreNumericLiteralTypes: {
type: "boolean",
default: false,
},
ignoreReadonlyClassProperties: {
type: "boolean",
default: false,
},
ignoreTypeIndexes: {
type: "boolean",
default: false,
},
},
additionalProperties: false,
},
],
messages: {
useConst: "Number constants declarations must use 'const'.",
noMagic: "No magic number: {{raw}}.",
},
},
create(context) {
const config = context.options[0] || {},
detectObjects = !!config.detectObjects,
enforceConst = !!config.enforceConst,
ignore = new Set((config.ignore || []).map(normalizeIgnoreValue)),
ignoreArrayIndexes = !!config.ignoreArrayIndexes,
ignoreDefaultValues = !!config.ignoreDefaultValues,
ignoreClassFieldInitialValues =
!!config.ignoreClassFieldInitialValues,
ignoreEnums = !!config.ignoreEnums,
ignoreNumericLiteralTypes = !!config.ignoreNumericLiteralTypes,
ignoreReadonlyClassProperties =
!!config.ignoreReadonlyClassProperties,
ignoreTypeIndexes = !!config.ignoreTypeIndexes;
const okTypes = detectObjects
? []
: ["ObjectExpression", "Property", "AssignmentExpression"];
/**
* Returns whether the rule is configured to ignore the given value
* @param {bigint|number} value The value to check
* @returns {boolean} true if the value is ignored
*/
function isIgnoredValue(value) {
return ignore.has(value);
}
/**
* Returns whether the number is a default value assignment.
* @param {ASTNode} fullNumberNode `Literal` or `UnaryExpression` full number node
* @returns {boolean} true if the number is a default value
*/
function isDefaultValue(fullNumberNode) {
const parent = fullNumberNode.parent;
return (
parent.type === "AssignmentPattern" &&
parent.right === fullNumberNode
);
}
/**
* Returns whether the number is the initial value of a class field.
* @param {ASTNode} fullNumberNode `Literal` or `UnaryExpression` full number node
* @returns {boolean} true if the number is the initial value of a class field.
*/
function isClassFieldInitialValue(fullNumberNode) {
const parent = fullNumberNode.parent;
return (
parent.type === "PropertyDefinition" &&
parent.value === fullNumberNode
);
}
/**
* Returns whether the given node is used as a radix within parseInt() or Number.parseInt()
* @param {ASTNode} fullNumberNode `Literal` or `UnaryExpression` full number node
* @returns {boolean} true if the node is radix
*/
function isParseIntRadix(fullNumberNode) {
const parent = fullNumberNode.parent;
return (
parent.type === "CallExpression" &&
fullNumberNode === parent.arguments[1] &&
(astUtils.isSpecificId(parent.callee, "parseInt") ||
astUtils.isSpecificMemberAccess(
parent.callee,
"Number",
"parseInt",
))
);
}
/**
* Returns whether the given node is a direct child of a JSX node.
* In particular, it aims to detect numbers used as prop values in JSX tags.
* Example: <input maxLength={10} />
* @param {ASTNode} fullNumberNode `Literal` or `UnaryExpression` full number node
* @returns {boolean} true if the node is a JSX number
*/
function isJSXNumber(fullNumberNode) {
return fullNumberNode.parent.type.indexOf("JSX") === 0;
}
/**
* Returns whether the given node is used as an array index.
* Value must coerce to a valid array index name: "0", "1", "2" ... "4294967294".
*
* All other values, like "-1", "2.5", or "4294967295", are just "normal" object properties,
* which can be created and accessed on an array in addition to the array index properties,
* but they don't affect array's length and are not considered by methods such as .map(), .forEach() etc.
*
* The maximum array length by the specification is 2 ** 32 - 1 = 4294967295,
* thus the maximum valid index is 2 ** 32 - 2 = 4294967294.
*
* All notations are allowed, as long as the value coerces to one of "0", "1", "2" ... "4294967294".
*
* Valid examples:
* a[0], a[1], a[1.2e1], a[0xAB], a[0n], a[1n]
* a[-0] (same as a[0] because -0 coerces to "0")
* a[-0n] (-0n evaluates to 0n)
*
* Invalid examples:
* a[-1], a[-0xAB], a[-1n], a[2.5], a[1.23e1], a[12e-1]
* a[4294967295] (above the max index, it's an access to a regular property a["4294967295"])
* a[999999999999999999999] (even if it wasn't above the max index, it would be a["1e+21"])
* a[1e310] (same as a["Infinity"])
* @param {ASTNode} fullNumberNode `Literal` or `UnaryExpression` full number node
* @param {bigint|number} value Value expressed by the fullNumberNode
* @returns {boolean} true if the node is a valid array index
*/
function isArrayIndex(fullNumberNode, value) {
const parent = fullNumberNode.parent;
return (
parent.type === "MemberExpression" &&
parent.property === fullNumberNode &&
(Number.isInteger(value) || typeof value === "bigint") &&
value >= 0 &&
value < MAX_ARRAY_LENGTH
);
}
return {
Literal(node) {
if (!astUtils.isNumericLiteral(node)) {
return;
}
let fullNumberNode;
let value;
let raw;
// Treat unary minus/plus as a part of the number
if (
node.parent.type === "UnaryExpression" &&
["-", "+"].includes(node.parent.operator)
) {
fullNumberNode = node.parent;
value =
node.parent.operator === "-" ? -node.value : node.value;
raw = `${node.parent.operator}${node.raw}`;
} else {
fullNumberNode = node;
value = node.value;
raw = node.raw;
}
const parent = fullNumberNode.parent;
// Always allow radix arguments and JSX props
if (
isIgnoredValue(value) ||
(ignoreDefaultValues && isDefaultValue(fullNumberNode)) ||
(ignoreClassFieldInitialValues &&
isClassFieldInitialValue(fullNumberNode)) ||
(ignoreEnums &&
isParentTSEnumDeclaration(fullNumberNode)) ||
(ignoreNumericLiteralTypes &&
isTSNumericLiteralType(fullNumberNode)) ||
(ignoreTypeIndexes &&
isAncestorTSIndexedAccessType(fullNumberNode)) ||
(ignoreReadonlyClassProperties &&
isParentTSReadonlyPropertyDefinition(fullNumberNode)) ||
isParseIntRadix(fullNumberNode) ||
isJSXNumber(fullNumberNode) ||
(ignoreArrayIndexes && isArrayIndex(fullNumberNode, value))
) {
return;
}
if (parent.type === "VariableDeclarator") {
if (enforceConst && parent.parent.kind !== "const") {
context.report({
node: fullNumberNode,
messageId: "useConst",
});
}
} else if (
!okTypes.includes(parent.type) ||
(parent.type === "AssignmentExpression" &&
parent.left.type === "Identifier")
) {
context.report({
node: fullNumberNode,
messageId: "noMagic",
data: {
raw,
},
});
}
},
};
},
};
@@ -0,0 +1,423 @@
export default `flf2a$ 4 3 9 -1 13
linux by Larry Smith 5/12/95 - based on .sig of Roberth Karman.
Figlet release 2.0 -- August 5, 1993
Explanation of first line:
flf2 - "magic number" for file identification
a - should always be \`a', for now
- the "hardblank" -- prints as a blank, but can't be smushed
4 - height of a character
3 - height of a character, not including descenders
9 - max line length (excluding comment lines) + a fudge factor
-1 - default smushmode for this font (like "-m 15" on command line)
13 - number of comment lines
$@
$@
$@
$@@
.-.@
\`v'@
o @
@@
||@
@
@
@@
|| @
= =@
|| @
@@
.-|-.@
\\|\\ @
\`-|-'@
@@
o ,-,@
/ / @
\`-' o@
@@
a @
n @
d@
@@
|@
@
@
@@
,-,@
( ( @
\`-\`@
@@
.-. @
) )@
'-' @
@@
\\|/@
-*-@
/|\\@
@@
# @
###@
# @
@@
@
@
/@
@@
@
###@
@
@@
@
@
O@
@@
.-.@
/ / @
'-' @
@@
.----.@
| || |@
\`----'@
@@
/.@
||@
--@
@@
.---,@
/ / @
\`---'@
@@
.---.@
-||@
\`---'@
@@
,--.@
'-| |@
\`-'@
@@
,---@
\\ \\@
\`--'@
@@
,-. @
| /-.@
\`---'@
@@
.---.@
\`-/ /@
\`-' @
@@
.--.@
\`//.@
\`--'@
@@
.--.@
\`/ /@
\`-' @
@@
$@
o$@
o$@
$@@
$@
o$@
/$@
$@@
$ __$@
$/ /$@
$\`-\`$@
$ $@@
$___$@
$---$@
$ $@
@@
$__ $@
$\\ \\$@
$'-'$@
$ $@@
,--.@
\`// @
o @
@@
e @
a@
@
@@
.---.@
| | |@
\`-^-'@
@@
.--.@
|-< @
\`--'@
@@
.---.@
| | @
\`---'@
@@
.--. @
| \\ \\@
\`-'-'@
@@
.---.@
| |- @
\`---'@
@@
.---.@
| |- @
\`-' @
@@
.---.@
| |'_@
\`-'-/@
@@
.-. .-.@
| |=| |@
\`-' \`-'@
@@
.-.@
| |@
\`-'@
@@
.-.@
,| |@
\`---'@
@@
.-.,-.@
| . < @
\`-'\`-'@
@@
.-. @
| |__ @
\`----'@
@@
.-.-.-.@
| | | |@
\`-'-'-'@
@@
.-..-.@
| .\` |@
\`-'\`-'@
@@
.----.@
| || |@
\`----'@
@@
.---.@
| |-'@
\`-' @
@@
.---.@
| O ,@
\`-'\\\\@
@@
.---. @
| |-< @
\`-'\`-'@
@@
.---.@
\\ \\ @
\`---'@
@@
.---.@
\`| |'@
\`-' @
@@
.-..-.@
| || |@
\`----'@
@@
.-..-.@
\\ / @
\`' @
@@
.-.-.-.@
| | | |@
\`-----'@
@@
.-..-.@
> < @
'-'\`-\`@
@@
.-..-.@
> / @
\`-' @
@@
.---,@
/ / @
\`---'@
@@
,,-@
|| @
\`\`-@
@@
.-. @
\\ \\ @
\`-'@
@@
-..@
||@
-''@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
.---.@
| | |@
\`-^-'@
@@
.--.@
|-< @
\`--'@
@@
.---.@
| | @
\`---'@
@@
.--. @
| \\ \\@
\`-'-'@
@@
.---.@
| |- @
\`---'@
@@
.---.@
| |- @
\`-' @
@@
.---.@
| |'_@
\`-'-/@
@@
.-. .-.@
| |=| |@
\`-' \`-'@
@@
.-.@
| |@
\`-'@
@@
.-.@
,| |@
\`---'@
@@
.-.,-.@
| . < @
\`-'\`-'@
@@
.-. @
| |__ @
\`----'@
@@
.-.-.-.@
| | | |@
\`-'-'-'@
@@
.-..-.@
| .\` |@
\`-'\`-'@
@@
.----.@
| || |@
\`----'@
@@
.---.@
| |-'@
\`-' @
@@
.---.@
| O ,@
\`-'\\\\@
@@
.---. @
| |-< @
\`-'\`-'@
@@
.---.@
\\ \\ @
\`---'@
@@
.---.@
\`| |'@
\`-' @
@@
.-..-.@
| || |@
\`----'@
@@
.-..-.@
\\ / @
\`' @
@@
.-.-.-.@
| | | |@
\`-----'@
@@
.-..-.@
> < @
'-'\`-\`@
@@
.-..-.@
> / @
\`-' @
@@
.---,@
/ / @
\`---'@
@@
/@
{ @
\\@
@@
.-.@
| |@
| |@
\`-'@@
\\ @
}@
/ @
@@
@
,-._,@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
`
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"_A","2":"_Z"},B:{"1":"_J"},C:{"1":"_lD _iD","2":"_tG","129":"_JH EC","769":"FC gC","1281":"_JS"},D:{"1":"_5L","2":"_pG","33":"_XK KB"},E:{"1":"_VL","2":"_qH"},F:{"1":"_a","2":"_T"},G:{"1":"E _s","2":"_d _uI"},H:{"2":"1D"},I:{"1":"_X","2":"_W"},J:{"1":"A","2":"D"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"1":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:2,C:"High Resolution Time API",D:true};
@@ -0,0 +1,75 @@
"use strict"
var Buffer = require("safer-buffer").Buffer
// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that
// correspond to encoded bytes (if 128 - then lower half is ASCII).
exports._sbcs = SBCSCodec
function SBCSCodec (codecOptions, iconv) {
if (!codecOptions) {
throw new Error("SBCS codec is called without the data.")
}
// Prepare char buffer for decoding.
if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256)) {
throw new Error("Encoding '" + codecOptions.type + "' has incorrect 'chars' (must be of len 128 or 256)")
}
if (codecOptions.chars.length === 128) {
var asciiString = ""
for (var i = 0; i < 128; i++) {
asciiString += String.fromCharCode(i)
}
codecOptions.chars = asciiString + codecOptions.chars
}
this.decodeBuf = Buffer.from(codecOptions.chars, "ucs2")
// Encoding buffer.
var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0))
for (var i = 0; i < codecOptions.chars.length; i++) {
encodeBuf[codecOptions.chars.charCodeAt(i)] = i
}
this.encodeBuf = encodeBuf
}
SBCSCodec.prototype.encoder = SBCSEncoder
SBCSCodec.prototype.decoder = SBCSDecoder
function SBCSEncoder (options, codec) {
this.encodeBuf = codec.encodeBuf
}
SBCSEncoder.prototype.write = function (str) {
var buf = Buffer.alloc(str.length)
for (var i = 0; i < str.length; i++) {
buf[i] = this.encodeBuf[str.charCodeAt(i)]
}
return buf
}
SBCSEncoder.prototype.end = function () {
}
function SBCSDecoder (options, codec) {
this.decodeBuf = codec.decodeBuf
}
SBCSDecoder.prototype.write = function (buf) {
// Strings are immutable in JS -> we use ucs2 buffer to speed up computations.
var decodeBuf = this.decodeBuf
var newBuf = Buffer.alloc(buf.length * 2)
var idx1 = 0; var idx2 = 0
for (var i = 0; i < buf.length; i++) {
idx1 = buf[i] * 2; idx2 = i * 2
newBuf[idx2] = decodeBuf[idx1]
newBuf[idx2 + 1] = decodeBuf[idx1 + 1]
}
return newBuf.toString("ucs2")
}
SBCSDecoder.prototype.end = function () {
}
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './square-parking.js';
//# sourceMappingURL=parking-square.js.map
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RuleTester = void 0;
/* eslint-disable @typescript-eslint/no-deprecated */
const eslint_1 = require("eslint");
/**
* @deprecated Use `@typescript-eslint/rule-tester` instead.
*/
class RuleTester extends eslint_1.RuleTester {
}
exports.RuleTester = RuleTester;
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './square-equal.js';
//# sourceMappingURL=equal-square.js.map
@@ -0,0 +1 @@
{"version":3,"file":"package-x.js","sources":["../../../src/icons/package-x.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PackageX\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjEgMTBWOGEyIDIgMCAwIDAtMS0xLjczbC03LTRhMiAyIDAgMCAwLTIgMGwtNyA0QTIgMiAwIDAgMCAzIDh2OGEyIDIgMCAwIDAgMSAxLjczbDcgNGEyIDIgMCAwIDAgMiAwbDItMS4xNCIgLz4KICA8cGF0aCBkPSJtNy41IDQuMjcgOSA1LjE1IiAvPgogIDxwb2x5bGluZSBwb2ludHM9IjMuMjkgNyAxMiAxMiAyMC43MSA3IiAvPgogIDxsaW5lIHgxPSIxMiIgeDI9IjEyIiB5MT0iMjIiIHkyPSIxMiIgLz4KICA8cGF0aCBkPSJtMTcgMTMgNSA1bS01IDAgNS01IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/package-x\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst PackageX = createLucideIcon('PackageX', [\n [\n 'path',\n {\n d: 'M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14',\n key: 'e7tb2h',\n },\n ],\n ['path', { d: 'm7.5 4.27 9 5.15', key: '1c824w' }],\n ['polyline', { points: '3.29 7 12 12 20.71 7', key: 'ousv84' }],\n ['line', { x1: '12', x2: '12', y1: '22', y2: '12', key: 'a4e8g8' }],\n ['path', { d: 'm17 13 5 5m-5 0 5-5', key: 'im3w4b' }],\n]);\n\nexport default PackageX;\n"],"names":[],"mappings":"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"}
@@ -0,0 +1 @@
{"version":3,"file":"divide.js","sources":["../../../src/icons/divide.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Divide\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjYiIHI9IjEiIC8+CiAgPGxpbmUgeDE9IjUiIHgyPSIxOSIgeTE9IjEyIiB5Mj0iMTIiIC8+CiAgPGNpcmNsZSBjeD0iMTIiIGN5PSIxOCIgcj0iMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/divide\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Divide = createLucideIcon('Divide', [\n ['circle', { cx: '12', cy: '6', r: '1', key: '1bh7o1' }],\n ['line', { x1: '5', x2: '19', y1: '12', y2: '12', key: '13b5wn' }],\n ['circle', { cx: '12', cy: '18', r: '1', key: 'lqb9t5' }],\n]);\n\nexport default Divide;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CACxC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACvD,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACjE,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AAC1D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,209 @@
var addSorting = (function() {
'use strict';
var cols,
currentSort = {
index: 0,
desc: false
};
// returns the summary table element
function getTable() {
return document.querySelector('.coverage-summary');
}
// returns the thead element of the summary table
function getTableHeader() {
return getTable().querySelector('thead tr');
}
// returns the tbody element of the summary table
function getTableBody() {
return getTable().querySelector('tbody');
}
// returns the th element for nth column
function getNthColumn(n) {
return getTableHeader().querySelectorAll('th')[n];
}
function onFilterInput() {
const searchValue = document.getElementById('fileSearch').value;
const rows = document.getElementsByTagName('tbody')[0].children;
// Try to create a RegExp from the searchValue. If it fails (invalid regex),
// it will be treated as a plain text search
let searchRegex;
try {
searchRegex = new RegExp(searchValue, 'i'); // 'i' for case-insensitive
} catch (error) {
searchRegex = null;
}
for (let i = 0; i < rows.length; i++) {
const row = rows[i];
let isMatch = false;
if (searchRegex) {
// If a valid regex was created, use it for matching
isMatch = searchRegex.test(row.textContent);
} else {
// Otherwise, fall back to the original plain text search
isMatch = row.textContent
.toLowerCase()
.includes(searchValue.toLowerCase());
}
row.style.display = isMatch ? '' : 'none';
}
}
// loads the search box
function addSearchBox() {
var template = document.getElementById('filterTemplate');
var templateClone = template.content.cloneNode(true);
templateClone.getElementById('fileSearch').oninput = onFilterInput;
template.parentElement.appendChild(templateClone);
}
// loads all columns
function loadColumns() {
var colNodes = getTableHeader().querySelectorAll('th'),
colNode,
cols = [],
col,
i;
for (i = 0; i < colNodes.length; i += 1) {
colNode = colNodes[i];
col = {
key: colNode.getAttribute('data-col'),
sortable: !colNode.getAttribute('data-nosort'),
type: colNode.getAttribute('data-type') || 'string'
};
cols.push(col);
if (col.sortable) {
col.defaultDescSort = col.type === 'number';
colNode.innerHTML =
colNode.innerHTML + '<span class="sorter"></span>';
}
}
return cols;
}
// attaches a data attribute to every tr element with an object
// of data values keyed by column name
function loadRowData(tableRow) {
var tableCols = tableRow.querySelectorAll('td'),
colNode,
col,
data = {},
i,
val;
for (i = 0; i < tableCols.length; i += 1) {
colNode = tableCols[i];
col = cols[i];
val = colNode.getAttribute('data-value');
if (col.type === 'number') {
val = Number(val);
}
data[col.key] = val;
}
return data;
}
// loads all row data
function loadData() {
var rows = getTableBody().querySelectorAll('tr'),
i;
for (i = 0; i < rows.length; i += 1) {
rows[i].data = loadRowData(rows[i]);
}
}
// sorts the table using the data for the ith column
function sortByIndex(index, desc) {
var key = cols[index].key,
sorter = function(a, b) {
a = a.data[key];
b = b.data[key];
return a < b ? -1 : a > b ? 1 : 0;
},
finalSorter = sorter,
tableBody = document.querySelector('.coverage-summary tbody'),
rowNodes = tableBody.querySelectorAll('tr'),
rows = [],
i;
if (desc) {
finalSorter = function(a, b) {
return -1 * sorter(a, b);
};
}
for (i = 0; i < rowNodes.length; i += 1) {
rows.push(rowNodes[i]);
tableBody.removeChild(rowNodes[i]);
}
rows.sort(finalSorter);
for (i = 0; i < rows.length; i += 1) {
tableBody.appendChild(rows[i]);
}
}
// removes sort indicators for current column being sorted
function removeSortIndicators() {
var col = getNthColumn(currentSort.index),
cls = col.className;
cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
col.className = cls;
}
// adds sort indicators for current column being sorted
function addSortIndicators() {
getNthColumn(currentSort.index).className += currentSort.desc
? ' sorted-desc'
: ' sorted';
}
// adds event listeners for all sorter widgets
function enableUI() {
var i,
el,
ithSorter = function ithSorter(i) {
var col = cols[i];
return function() {
var desc = col.defaultDescSort;
if (currentSort.index === i) {
desc = !currentSort.desc;
}
sortByIndex(i, desc);
removeSortIndicators();
currentSort.index = i;
currentSort.desc = desc;
addSortIndicators();
};
};
for (i = 0; i < cols.length; i += 1) {
if (cols[i].sortable) {
// add the click event handler on the th so users
// dont have to click on those tiny arrows
el = getNthColumn(i).querySelector('.sorter').parentElement;
if (el.addEventListener) {
el.addEventListener('click', ithSorter(i));
} else {
el.attachEvent('onclick', ithSorter(i));
}
}
}
}
// adds sorting functionality to the UI
return function() {
if (!getTable()) {
return;
}
cols = loadColumns();
loadData();
addSearchBox();
addSortIndicators();
enableUI();
};
})();
window.addEventListener('load', addSorting);
@@ -0,0 +1,15 @@
import { isBezierDefinition } from 'motion-utils';
import { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';
import { supportedWaapiEasing } from './supported.mjs';
function isWaapiSupportedEasing(easing) {
return Boolean((typeof easing === "function" && supportsLinearEasing()) ||
!easing ||
(typeof easing === "string" &&
(easing in supportedWaapiEasing || supportsLinearEasing())) ||
isBezierDefinition(easing) ||
(Array.isArray(easing) && easing.every(isWaapiSupportedEasing)));
}
export { isWaapiSupportedEasing };
//# sourceMappingURL=is-supported.mjs.map
@@ -0,0 +1,38 @@
{
"name": "escape-string-regexp",
"version": "4.0.0",
"description": "Escape RegExp special characters",
"license": "MIT",
"repository": "sindresorhus/escape-string-regexp",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"engines": {
"node": ">=10"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"escape",
"regex",
"regexp",
"regular",
"expression",
"string",
"special",
"characters"
],
"devDependencies": {
"ava": "^1.4.1",
"tsd": "^0.11.0",
"xo": "^0.28.3"
}
}
@@ -0,0 +1,5 @@
'use strict';
/** @type {import('./maxValue')} */
// eslint-disable-next-line no-extra-parens
module.exports = /** @type {import('./maxValue')} */ (Number.MAX_VALUE) || 1.7976931348623157e+308;
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RemoveScroll = void 0;
var tslib_1 = require("tslib");
var Combination_1 = tslib_1.__importDefault(require("./Combination"));
exports.RemoveScroll = Combination_1.default;