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":"plane-landing.js","sources":["../../../src/icons/plane-landing.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PlaneLanding\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMiAyMmgyMCIgLz4KICA8cGF0aCBkPSJNMy43NyAxMC43NyAyIDlsMi00LjUgMS4xLjU1Yy41NS4yOC45Ljg0LjkgMS40NXMuMzUgMS4xNy45IDEuNDVMOCA4LjVsMy02IDEuMDUuNTNhMiAyIDAgMCAxIDEuMDkgMS41MmwuNzIgNS40YTIgMiAwIDAgMCAxLjA5IDEuNTJsNC40IDIuMmMuNDIuMjIuNzguNTUgMS4wMS45NmwuNiAxLjAzYy40OS44OC0uMDYgMS45OC0xLjA2IDIuMWwtMS4xOC4xNWMtLjQ3LjA2LS45NS0uMDItMS4zNy0uMjRMNC4yOSAxMS4xNWEyIDIgMCAwIDEtLjUyLS4zOFoiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/plane-landing\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 PlaneLanding = createLucideIcon('PlaneLanding', [\n ['path', { d: 'M2 22h20', key: '272qi7' }],\n [\n 'path',\n {\n d: 'M3.77 10.77 2 9l2-4.5 1.1.55c.55.28.9.84.9 1.45s.35 1.17.9 1.45L8 8.5l3-6 1.05.53a2 2 0 0 1 1.09 1.52l.72 5.4a2 2 0 0 0 1.09 1.52l4.4 2.2c.42.22.78.55 1.01.96l.6 1.03c.49.88-.06 1.98-1.06 2.1l-1.18.15c-.47.06-.95-.02-1.37-.24L4.29 11.15a2 2 0 0 1-.52-.38Z',\n key: '1ma21e',\n },\n ],\n]);\n\nexport default PlaneLanding;\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,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACzC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,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,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,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,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,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,33 @@
import { parseDef } from "../parseDef.js";
import { primitiveMappings } from "./union.js";
export function parseNullableDef(def, refs) {
if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(def.innerType._def.typeName) &&
(!def.innerType._def.checks || !def.innerType._def.checks.length)) {
if (refs.target === "openApi3") {
return {
type: primitiveMappings[def.innerType._def.typeName],
nullable: true,
};
}
return {
type: [
primitiveMappings[def.innerType._def.typeName],
"null",
],
};
}
if (refs.target === "openApi3") {
const base = parseDef(def.innerType._def, {
...refs,
currentPath: [...refs.currentPath],
});
if (base && "$ref" in base)
return { allOf: [base], nullable: true };
return base && { ...base, nullable: true };
}
const base = parseDef(def.innerType._def, {
...refs,
currentPath: [...refs.currentPath, "anyOf", "0"],
});
return base && { anyOf: [base, { type: "null" }] };
}
@@ -0,0 +1 @@
{"version":3,"file":"simpleStatelessStreamableHttp.js","sourceRoot":"","sources":["../../../../src/examples/server/simpleStatelessStreamableHttp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,gDAAgD;AAChD,sEAA+E;AAC/E,0CAA4B;AAE5B,wDAA8D;AAE9D,MAAM,SAAS,GAAG,GAAG,EAAE;IACnB,mDAAmD;IACnD,MAAM,MAAM,GAAG,IAAI,kBAAS,CACxB;QACI,IAAI,EAAE,kCAAkC;QACxC,OAAO,EAAE,OAAO;KACnB,EACD,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,CACpC,CAAC;IAEF,2BAA2B;IAC3B,MAAM,CAAC,cAAc,CACjB,mBAAmB,EACnB;QACI,WAAW,EAAE,mCAAmC;QAChD,UAAU,EAAE;YACR,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;SAC3D;KACJ,EACD,KAAK,EAAE,EAAE,IAAI,EAAE,EAA4B,EAAE;QACzC,OAAO;YACH,QAAQ,EAAE;gBACN;oBACI,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE;wBACL,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,gBAAgB,IAAI,wBAAwB;qBACrD;iBACJ;aACJ;SACJ,CAAC;IACN,CAAC,CACJ,CAAC;IAEF,wDAAwD;IACxD,MAAM,CAAC,YAAY,CACf,2BAA2B,EAC3B;QACI,WAAW,EAAE,gEAAgE;QAC7E,WAAW,EAAE;YACT,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gDAAgD,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;YAC5F,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;SACxF;KACJ,EACD,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,KAAK,EAA2B,EAAE;QAC1D,MAAM,KAAK,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;QAC9E,IAAI,OAAO,GAAG,CAAC,CAAC;QAEhB,OAAO,KAAK,KAAK,CAAC,IAAI,OAAO,GAAG,KAAK,EAAE,CAAC;YACpC,OAAO,EAAE,CAAC;YACV,IAAI,CAAC;gBACD,MAAM,MAAM,CAAC,kBAAkB,CAC3B;oBACI,KAAK,EAAE,MAAM;oBACb,IAAI,EAAE,0BAA0B,OAAO,OAAO,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE;iBAC3E,EACD,KAAK,CAAC,SAAS,CAClB,CAAC;YACN,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAC;YACxD,CAAC;YACD,kCAAkC;YAClC,MAAM,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC1B,CAAC;QAED,OAAO;YACH,OAAO,EAAE;gBACL;oBACI,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,gDAAgD,QAAQ,IAAI;iBACrE;aACJ;SACJ,CAAC;IACN,CAAC,CACJ,CAAC;IAEF,0CAA0C;IAC1C,MAAM,CAAC,gBAAgB,CACnB,mBAAmB,EACnB,uCAAuC,EACvC,EAAE,QAAQ,EAAE,YAAY,EAAE,EAC1B,KAAK,IAAiC,EAAE;QACpC,OAAO;YACH,QAAQ,EAAE;gBACN;oBACI,GAAG,EAAE,uCAAuC;oBAC5C,IAAI,EAAE,eAAe;iBACxB;aACJ;SACJ,CAAC;IACN,CAAC,CACJ,CAAC;IACF,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,GAAG,GAAG,IAAA,gCAAmB,GAAE,CAAC;AAElC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,IAAI,CAAC;QACD,MAAM,SAAS,GAAkC,IAAI,iDAA6B,CAAC;YAC/E,kBAAkB,EAAE,SAAS;SAChC,CAAC,CAAC;QACH,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAChC,MAAM,SAAS,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;QAClD,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;YACjB,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;YAC9B,SAAS,CAAC,KAAK,EAAE,CAAC;YAClB,MAAM,CAAC,KAAK,EAAE,CAAC;QACnB,CAAC,CAAC,CAAC;IACP,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAC;QACpD,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;YACnB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;gBACjB,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE;oBACH,IAAI,EAAE,CAAC,KAAK;oBACZ,OAAO,EAAE,uBAAuB;iBACnC;gBACD,EAAE,EAAE,IAAI;aACX,CAAC,CAAC;QACP,CAAC;IACL,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,EAAE;IAClD,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;IACxC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,CAClB,IAAI,CAAC,SAAS,CAAC;QACX,OAAO,EAAE,KAAK;QACd,KAAK,EAAE;YACH,IAAI,EAAE,CAAC,KAAK;YACZ,OAAO,EAAE,qBAAqB;SACjC;QACD,EAAE,EAAE,IAAI;KACX,CAAC,CACL,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,EAAE;IACrD,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;IAC3C,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,CAClB,IAAI,CAAC,SAAS,CAAC;QACX,OAAO,EAAE,KAAK;QACd,KAAK,EAAE;YACH,IAAI,EAAE,CAAC,KAAK;YACZ,OAAO,EAAE,qBAAqB;SACjC;QACD,EAAE,EAAE,IAAI;KACX,CAAC,CACL,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,mBAAmB;AACnB,MAAM,IAAI,GAAG,IAAI,CAAC;AAClB,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;IACrB,IAAI,KAAK,EAAE,CAAC;QACR,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,0DAA0D,IAAI,EAAE,CAAC,CAAC;AAClF,CAAC,CAAC,CAAC;AAEH,yBAAyB;AACzB,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;IAC5B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IACvC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
@@ -0,0 +1 @@
{"version":3,"file":"chevron-down-square.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,118 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.es5 = void 0;
const base_config_1 = require("./base-config");
const decorators_1 = require("./decorators");
const decorators_legacy_1 = require("./decorators.legacy");
exports.es5 = {
libs: [decorators_1.decorators, decorators_legacy_1.decorators_legacy],
variables: [
['Symbol', base_config_1.TYPE],
['PropertyKey', base_config_1.TYPE],
['PropertyDescriptor', base_config_1.TYPE],
['PropertyDescriptorMap', base_config_1.TYPE],
['Object', base_config_1.TYPE_VALUE],
['ObjectConstructor', base_config_1.TYPE],
['Function', base_config_1.TYPE_VALUE],
['FunctionConstructor', base_config_1.TYPE],
['ThisParameterType', base_config_1.TYPE],
['OmitThisParameter', base_config_1.TYPE],
['CallableFunction', base_config_1.TYPE],
['NewableFunction', base_config_1.TYPE],
['IArguments', base_config_1.TYPE],
['String', base_config_1.TYPE_VALUE],
['StringConstructor', base_config_1.TYPE],
['Boolean', base_config_1.TYPE_VALUE],
['BooleanConstructor', base_config_1.TYPE],
['Number', base_config_1.TYPE_VALUE],
['NumberConstructor', base_config_1.TYPE],
['TemplateStringsArray', base_config_1.TYPE],
['ImportMeta', base_config_1.TYPE],
['ImportCallOptions', base_config_1.TYPE],
['ImportAssertions', base_config_1.TYPE],
['ImportAttributes', base_config_1.TYPE],
['Math', base_config_1.TYPE_VALUE],
['Date', base_config_1.TYPE_VALUE],
['DateConstructor', base_config_1.TYPE],
['RegExpMatchArray', base_config_1.TYPE],
['RegExpExecArray', base_config_1.TYPE],
['RegExp', base_config_1.TYPE_VALUE],
['RegExpConstructor', base_config_1.TYPE],
['Error', base_config_1.TYPE_VALUE],
['ErrorConstructor', base_config_1.TYPE],
['EvalError', base_config_1.TYPE_VALUE],
['EvalErrorConstructor', base_config_1.TYPE],
['RangeError', base_config_1.TYPE_VALUE],
['RangeErrorConstructor', base_config_1.TYPE],
['ReferenceError', base_config_1.TYPE_VALUE],
['ReferenceErrorConstructor', base_config_1.TYPE],
['SyntaxError', base_config_1.TYPE_VALUE],
['SyntaxErrorConstructor', base_config_1.TYPE],
['TypeError', base_config_1.TYPE_VALUE],
['TypeErrorConstructor', base_config_1.TYPE],
['URIError', base_config_1.TYPE_VALUE],
['URIErrorConstructor', base_config_1.TYPE],
['JSON', base_config_1.TYPE_VALUE],
['ReadonlyArray', base_config_1.TYPE],
['ConcatArray', base_config_1.TYPE],
['Array', base_config_1.TYPE_VALUE],
['ArrayConstructor', base_config_1.TYPE],
['TypedPropertyDescriptor', base_config_1.TYPE],
['PromiseConstructorLike', base_config_1.TYPE],
['PromiseLike', base_config_1.TYPE],
['Promise', base_config_1.TYPE],
['Awaited', base_config_1.TYPE],
['ArrayLike', base_config_1.TYPE],
['Partial', base_config_1.TYPE],
['Required', base_config_1.TYPE],
['Readonly', base_config_1.TYPE],
['Pick', base_config_1.TYPE],
['Record', base_config_1.TYPE],
['Exclude', base_config_1.TYPE],
['Extract', base_config_1.TYPE],
['Omit', base_config_1.TYPE],
['NonNullable', base_config_1.TYPE],
['Parameters', base_config_1.TYPE],
['ConstructorParameters', base_config_1.TYPE],
['ReturnType', base_config_1.TYPE],
['InstanceType', base_config_1.TYPE],
['Uppercase', base_config_1.TYPE],
['Lowercase', base_config_1.TYPE],
['Capitalize', base_config_1.TYPE],
['Uncapitalize', base_config_1.TYPE],
['NoInfer', base_config_1.TYPE],
['ThisType', base_config_1.TYPE],
['WeakKeyTypes', base_config_1.TYPE],
['WeakKey', base_config_1.TYPE],
['ArrayBuffer', base_config_1.TYPE_VALUE],
['ArrayBufferTypes', base_config_1.TYPE],
['ArrayBufferLike', base_config_1.TYPE],
['ArrayBufferConstructor', base_config_1.TYPE],
['ArrayBufferView', base_config_1.TYPE],
['DataView', base_config_1.TYPE_VALUE],
['DataViewConstructor', base_config_1.TYPE],
['Int8Array', base_config_1.TYPE_VALUE],
['Int8ArrayConstructor', base_config_1.TYPE],
['Uint8Array', base_config_1.TYPE_VALUE],
['Uint8ArrayConstructor', base_config_1.TYPE],
['Uint8ClampedArray', base_config_1.TYPE_VALUE],
['Uint8ClampedArrayConstructor', base_config_1.TYPE],
['Int16Array', base_config_1.TYPE_VALUE],
['Int16ArrayConstructor', base_config_1.TYPE],
['Uint16Array', base_config_1.TYPE_VALUE],
['Uint16ArrayConstructor', base_config_1.TYPE],
['Int32Array', base_config_1.TYPE_VALUE],
['Int32ArrayConstructor', base_config_1.TYPE],
['Uint32Array', base_config_1.TYPE_VALUE],
['Uint32ArrayConstructor', base_config_1.TYPE],
['Float32Array', base_config_1.TYPE_VALUE],
['Float32ArrayConstructor', base_config_1.TYPE],
['Float64Array', base_config_1.TYPE_VALUE],
['Float64ArrayConstructor', base_config_1.TYPE],
['Intl', base_config_1.TYPE_VALUE],
],
};
@@ -0,0 +1,5 @@
var lr=Object.defineProperty;var cr=Object.getPrototypeOf;var ur=Reflect.get;var kn=t=>{throw TypeError(t)};var _n=(t,e)=>{for(var n in e)lr(t,n,{get:e[n],enumerable:!0})};var vt=(t,e,n)=>e.has(t)||kn("Cannot "+n);var z=(t,e,n)=>(vt(t,e,"read from private field"),n?n.call(t):e.get(t)),De=(t,e,n)=>e.has(t)?kn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),wt=(t,e,n,s)=>(vt(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),w=(t,e,n)=>(vt(t,e,"access private method"),n);var In=(t,e,n)=>ur(cr(t),n,e);var or={};_n(or,{parsers:()=>Cn});var Cn={};_n(Cn,{__ng_action:()=>Ko,__ng_binding:()=>Zo,__ng_directive:()=>ta,__ng_interpolation:()=>ea});function pr(t){return typeof t=="string"?e=>e===t:e=>t.test(e)}function An(t,e,n){let s=pr(e);for(let i=n;i<t.length;i++){let r=t[i];if(s(r))return i}throw new Error(`Cannot find character ${e} from index ${n} in ${JSON.stringify(t)}`)}function Pn(t){return t.slice(0,1).toLowerCase()+t.slice(1)}function Be(t){let{start:e,end:n}=t;return{start:e,end:n,range:[e,n]}}function Nn(t){return!!t.extra?.parenthesized}function ye(t){return t.type==="TSNonNullExpression"&&!Nn(t)?ye(t.expression):(t.type==="OptionalCallExpression"||t.type==="OptionalMemberExpression")&&!Nn(t)}var ra=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g");var x;(function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t[t.ATTRIBUTE_NO_BINDING=6]="ATTRIBUTE_NO_BINDING"})(x||(x={}));var K,Ln="svg",hr="math",Bs="",$n="*",yt=()=>Object.create(null);function fr(){return K||(K=yt(),B(x.HTML,void 0,[["iframe",["srcdoc"]],["*",["innerHTML","outerHTML"]]]),B(x.STYLE,void 0,[["*",["style"]]]),B(x.URL,void 0,[["*",["formAction"]],["area",["href"]],["a",["href","xlink:href"]],["form",["action"]],["img",["src"]],["video",["src"]]]),B(x.URL,hr,[["*",["href","xlink:href"]]]),B(x.RESOURCE_URL,void 0,[["base",["href"]],["embed",["src"]],["frame",["src"]],["iframe",["src"]],["link",["href"]],["object",["codebase","data"]]]),B(x.URL,Ln,[["a",["href","xlink:href"]]]),B(x.ATTRIBUTE_NO_BINDING,Ln,[["animate",["attributeName","values","to","from"]],["set",["to","attributeName"]],["animateMotion",["attributeName"]],["animateTransform",["attributeName"]]]),B(x.ATTRIBUTE_NO_BINDING,void 0,[["unknown",["attributeName","values","to","from","sandbox","allow","allowFullscreen","referrerPolicy","csp","fetchPriority","credentialless"]],["iframe",["sandbox","allow","allowFullscreen","referrerPolicy","csp","fetchPriority","credentialless"]]]),K)}function B(t,e,n){let s=e??Bs;for(let[i,r]of n){let a=i.toLowerCase();for(let u of r){let h=u.toLowerCase(),d=K[h]??(K[h]=yt()),g=d[s]??(d[s]=yt());g[a]=t}}}function dr(t,e,n){let i=fr()[e.toLowerCase()];if(!i)return x.NONE;let r=t.toLowerCase(),a;if(n){let u=i[n];u&&(a=u[r]??u[$n])}if(a===void 0){let u=i[Bs];u&&(a=u[r]??u[$n])}return a??x.NONE}var Mn;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t[t.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom"})(Mn||(Mn={}));var Rn;(function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t[t.Eager=1]="Eager"})(Rn||(Rn={}));var On;(function(t){t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform"})(On||(On={}));var Dn={name:"custom-elements"},Bn={name:"no-errors-schema"};var Fn;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"})(Fn||(Fn={}));var Vn;(function(t){t[t.Directive=0]="Directive",t[t.Component=1]="Component",t[t.Injectable=2]="Injectable",t[t.Pipe=3]="Pipe",t[t.NgModule=4]="NgModule",t[t.Service=5]="Service"})(Vn||(Vn={}));var Hn;(function(t){t[t.Directive=0]="Directive",t[t.Pipe=1]="Pipe",t[t.NgModule=2]="NgModule"})(Hn||(Hn={}));var Un;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t[t.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom"})(Un||(Un={}));var Wn;(function(t){t[t.Little=0]="Little",t[t.Big=1]="Big"})(Wn||(Wn={}));var qn;(function(t){t[t.None=0]="None",t[t.Const=1]="Const"})(qn||(qn={}));var jn;(function(t){t[t.Dynamic=0]="Dynamic",t[t.Bool=1]="Bool",t[t.String=2]="String",t[t.Int=3]="Int",t[t.Number=4]="Number",t[t.Function=5]="Function",t[t.Inferred=6]="Inferred",t[t.None=7]="None"})(jn||(jn={}));var zn;(function(t){t[t.Minus=0]="Minus",t[t.Plus=1]="Plus"})(zn||(zn={}));var p;(function(t){t[t.Equals=0]="Equals",t[t.NotEquals=1]="NotEquals",t[t.Assign=2]="Assign",t[t.Identical=3]="Identical",t[t.NotIdentical=4]="NotIdentical",t[t.Minus=5]="Minus",t[t.Plus=6]="Plus",t[t.Divide=7]="Divide",t[t.Multiply=8]="Multiply",t[t.Modulo=9]="Modulo",t[t.And=10]="And",t[t.Or=11]="Or",t[t.BitwiseOr=12]="BitwiseOr",t[t.BitwiseAnd=13]="BitwiseAnd",t[t.Lower=14]="Lower",t[t.LowerEquals=15]="LowerEquals",t[t.Bigger=16]="Bigger",t[t.BiggerEqualsLine truncated
`&&++u==n)););for(a=0,u=0;a<e&&r<s.length-1&&(r++,a++,!(s[r]==`
`&&++u==n)););return{before:s.substring(i,this.offset),after:s.substring(this.offset,r+1)}}return null}},et=class{content;url;constructor(e,n){this.content=e,this.url=n}},tt=class{start;end;fullStart;details;constructor(e,n,s=e,i=null){this.start=e,this.end=n,this.fullStart=s,this.details=i}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}},nt;(function(t){t[t.WARNING=0]="WARNING",t[t.ERROR=1]="ERROR"})(nt||(nt={}));var Re=class extends Error{span;msg;level;relatedError;constructor(e,n,s=nt.ERROR,i){super(n),this.span=e,this.msg=n,this.level=s,this.relatedError=i,Object.setPrototypeOf(this,new.target.prototype)}contextualMessage(){let e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${nt[this.level]} ->]${e.after}")`:this.msg}toString(){let e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}};var os;(function(t){t[t.Inline=0]="Inline",t[t.SideEffect=1]="SideEffect",t[t.Omit=2]="Omit"})(os||(os={}));var as;(function(t){t[t.Global=0]="Global",t[t.Local=1]="Local",t[t.Isolated=2]="Isolated"})(as||(as={}));var ls;(function(t){t[t.Directive=0]="Directive",t[t.Pipe=1]="Pipe",t[t.NgModule=2]="NgModule"})(ls||(ls={}));var Vr="(:(where|is)\\()?";var Xs="-shadowcsshost",Hr="-shadowcsscontext",tn="[^)(]*",Ur=`(?:\\(${tn}\\)|${tn})+?`,Wr=`(?:\\(${Ur}\\)|${tn})+?`,fn=`(?:\\((${Wr})\\))`,ca=new RegExp("(:nth-[-\\w]+)"+fn,"g"),ua=new RegExp(Xs+fn+"?([^,{]*)","gim"),qr=Hr+fn+"([^{]*)",pa=new RegExp(`${Vr}(${qr})`,"gim"),jr=Xs+"-no-combinator",ha=new RegExp(`${jr}(?![^(]*\\))`,"g");var Qs="%COMMENT%",fa=new RegExp(Qs,"g");var da=new RegExp(`(\\s*(?:${Qs}\\s*)*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))`,"g");var zr="%COMMA_IN_PLACEHOLDER%",Gr="%SEMI_IN_PLACEHOLDER%",Xr="%COLON_IN_PLACEHOLDER%",ma=new RegExp(zr,"g"),ga=new RegExp(Gr,"g"),va=new RegExp(Xr,"g");var l;(function(t){t[t.ListEnd=0]="ListEnd",t[t.Statement=1]="Statement",t[t.Variable=2]="Variable",t[t.ElementStart=3]="ElementStart",t[t.Element=4]="Element",t[t.Template=5]="Template",t[t.ElementEnd=6]="ElementEnd",t[t.ContainerStart=7]="ContainerStart",t[t.Container=8]="Container",t[t.ContainerEnd=9]="ContainerEnd",t[t.DisableBindings=10]="DisableBindings",t[t.ConditionalCreate=11]="ConditionalCreate",t[t.ConditionalBranchCreate=12]="ConditionalBranchCreate",t[t.Conditional=13]="Conditional",t[t.EnableBindings=14]="EnableBindings",t[t.Text=15]="Text",t[t.Listener=16]="Listener",t[t.InterpolateText=17]="InterpolateText",t[t.Binding=18]="Binding",t[t.Property=19]="Property",t[t.StyleProp=20]="StyleProp",t[t.ClassProp=21]="ClassProp",t[t.StyleMap=22]="StyleMap",t[t.ClassMap=23]="ClassMap",t[t.Advance=24]="Advance",t[t.Pipe=25]="Pipe",t[t.Attribute=26]="Attribute",t[t.ExtractedAttribute=27]="ExtractedAttribute",t[t.Defer=28]="Defer",t[t.DeferOn=29]="DeferOn",t[t.DeferWhen=30]="DeferWhen",t[t.I18nMessage=31]="I18nMessage",t[t.DomProperty=32]="DomProperty",t[t.Namespace=33]="Namespace",t[t.ProjectionDef=34]="ProjectionDef",t[t.EnableIncrementalHydrationRuntime=35]="EnableIncrementalHydrationRuntime",t[t.Projection=36]="Projection",t[t.RepeaterCreate=37]="RepeaterCreate",t[t.Repeater=38]="Repeater",t[t.TwoWayProperty=39]="TwoWayProperty",t[t.TwoWayListener=40]="TwoWayListener",t[t.DeclareLet=41]="DeclareLet",t[t.StoreLet=42]="StoreLet",t[t.I18nStart=43]="I18nStart",t[t.I18n=44]="I18n",t[t.I18nEnd=45]="I18nEnd",t[t.I18nExpression=46]="I18nExpression",t[t.I18nApply=47]="I18nApply",t[t.IcuStart=48]="IcuStart",t[t.IcuEnd=49]="IcuEnd",t[t.IcuPlaceholder=50]="IcuPlaceholder",t[t.I18nContext=51]="I18nContext",t[t.I18nAttributes=52]="I18nAttributes",t[t.SourceLocation=53]="SourceLocation",t[t.Animation=54]="Animation",t[t.AnimationString=55]="AnimationString",t[t.AnimationBinding=56]="AnimationBinding",t[t.AnimationListener=57]="AnimationListener",t[t.Control=58]="Control",t[t.ControlCreate=59]="ControlCreate"})(l||(l={}));var te;(function(t){t[t.LexicalRead=0]="LexicalRead",t[t.Context=1]="Context",t[t.TrackContext=2]="TrackContext",t[t.ReadVariable=3]="ReadVariable",t[t.NextContext=4]="NextContext",t[t.Reference=5]="Reference",t[t.StoreLet=6]="StoreLet",t[t.ContextLetReference=7]="ContextLetReference",t[t.GetCurrentView=8]="GetCurrentView",t[t.RestoreView=9]="RestoreView",t[t.ResetView=10]="ResetView",t[t.PureFunctionExpr=11]="PureFunctionExpr",t[t.PureFunctionParameterExpr=12]="PureFunctionParameterExpr",t[t.PipeBinding=13]="PipeBinding",t[t.PipeBindingVariadic=14]="PipeBindingVariadic",t[t.SafePropertyRead=15]="SafePropertyRead",t[t.SafeKeyedRead=16]="SafeKeyedRead",t[t.SafeNavigationMigration=17]="SafeNavigationMigration",t[t.SafeTernaryExpr=18]="SafeTernaryExpr",t[t.EmptyExpr=19]="EmptyExpr",t[t.AssignTemporaryExpr=20]="AssignTemporaryExpr",t[t.ReadTemporaryExpr=21]="ReadTemporaryExpr",t[t.SlotLiteralExpr=22]="SlotLiteralExpr",t[t.ConditionalCase=23]="ConditionalCase",t[t.ConstCollected=24]="ConstCollected",t[t.TwoWayBindingSet=25]="TwoWayBindingSeLine truncated
\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`,Na=new RegExp(`[^${Ys}]`),Aa=new RegExp(`[${Ys}]{2,}`,"g");var f;(function(t){t[t.Character=0]="Character",t[t.Identifier=1]="Identifier",t[t.PrivateIdentifier=2]="PrivateIdentifier",t[t.Keyword=3]="Keyword",t[t.String=4]="String",t[t.Operator=5]="Operator",t[t.Number=6]="Number",t[t.RegExpBody=7]="RegExpBody",t[t.RegExpFlags=8]="RegExpFlags",t[t.Error=9]="Error"})(f||(f={}));var W;(function(t){t[t.Plain=0]="Plain",t[t.TemplateLiteralPart=1]="TemplateLiteralPart",t[t.TemplateLiteralEnd=2]="TemplateLiteralEnd"})(W||(W={}));var to=["var","let","as","null","undefined","true","false","if","else","this","typeof","void","in","instanceof"],Oe=class{tokenize(e){return new rn(e).scan()}},I=class{index;end;type;numValue;strValue;constructor(e,n,s,i,r){this.index=e,this.end=n,this.type=s,this.numValue=i,this.strValue=r}isCharacter(e){return this.type===f.Character&&this.numValue===e}isNumber(){return this.type===f.Number}isString(){return this.type===f.String}isOperator(e){return this.type===f.Operator&&this.strValue===e}isIdentifier(){return this.type===f.Identifier}isPrivateIdentifier(){return this.type===f.PrivateIdentifier}isKeyword(){return this.type===f.Keyword}isKeywordLet(){return this.type===f.Keyword&&this.strValue==="let"}isKeywordAs(){return this.type===f.Keyword&&this.strValue==="as"}isKeywordNull(){return this.type===f.Keyword&&this.strValue==="null"}isKeywordUndefined(){return this.type===f.Keyword&&this.strValue==="undefined"}isKeywordTrue(){return this.type===f.Keyword&&this.strValue==="true"}isKeywordFalse(){return this.type===f.Keyword&&this.strValue==="false"}isKeywordThis(){return this.type===f.Keyword&&this.strValue==="this"}isKeywordTypeof(){return this.type===f.Keyword&&this.strValue==="typeof"}isKeywordVoid(){return this.type===f.Keyword&&this.strValue==="void"}isKeywordIn(){return this.type===f.Keyword&&this.strValue==="in"}isKeywordInstanceOf(){return this.type===f.Keyword&&this.strValue==="instanceof"}isError(){return this.type===f.Error}isRegExpBody(){return this.type===f.RegExpBody}isRegExpFlags(){return this.type===f.RegExpFlags}toNumber(){return this.type===f.Number?this.numValue:-1}isTemplateLiteralPart(){return this.isString()&&this.kind===W.TemplateLiteralPart}isTemplateLiteralEnd(){return this.isString()&&this.kind===W.TemplateLiteralEnd}isTemplateLiteralInterpolationStart(){return this.isOperator("${")}toString(){switch(this.type){case f.Character:case f.Identifier:case f.Keyword:case f.Operator:case f.PrivateIdentifier:case f.String:case f.Error:case f.RegExpBody:case f.RegExpFlags:return this.strValue;case f.Number:return this.numValue.toString();default:return null}}},Ae=class extends I{kind;constructor(e,n,s,i){super(e,n,f.String,0,s),this.kind=i}};function Ce(t,e,n){return new I(t,e,f.Character,n,String.fromCharCode(n))}function no(t,e,n){return new I(t,e,f.Identifier,0,n)}function so(t,e,n){return new I(t,e,f.PrivateIdentifier,0,n)}function io(t,e,n){return new I(t,e,f.Keyword,0,n)}function F(t,e,n){return new I(t,e,f.Operator,0,n)}function ro(t,e,n){return new I(t,e,f.Number,n,"")}function oo(t,e,n){return new I(t,e,f.Error,0,n)}function ao(t,e,n){return new I(t,e,f.RegExpBody,0,n)}function lo(t,e,n){return new I(t,e,f.RegExpFlags,0,n)}var be=new I(-1,-1,f.Character,0,""),rn=class{input;tokens=[];length;peek=0;index=-1;braceStack=[];constructor(e){this.input=e,this.length=e.length,this.advance()}scan(){let e=this.scanToken();for(;e!==null;)this.tokens.push(e),e=this.scanToken();return this.tokens}advance(){this.peek=++this.index>=this.length?Ee:this.input.charCodeAt(this.index)}scanToken(){let e=this.input,n=this.length,s=this.peek,i=this.index;for(;s<=Vs;)if(++i>=n){s=Ee;break}else s=e.charCodeAt(i);if(this.peek=s,this.index=i,i>=n)return null;if(Ts(s))return this.scanIdentifier();if(X(s))return this.scanNumber(i);let r=i;switch(s){case G:return this.advance(),X(this.peek)?this.scanNumber(r):this.peek!==G?Ce(r,this.index,G):(this.advance(),this.peek===G?(this.advance(),F(r,this.index,"...")):this.error(`Unexpected character [${String.fromCharCode(s)}]`,0));case Q:case L:case ce:case Z:case V:case J:case Te:return this.scanCharacter(r,s);case Ne:return this.scanOpenBrace(r,s);case oe:return this.scanCloseBrace(r,s);case Us:case Hs:return this.scanString();case Zt:return this.advance(),this.scanTemplateLiteralPart(r);case Tr:return this.scanPrivateIdentifier();case Ws:return this.scanComplexOperator(r,"+",C,"=");case qs:return this.scanComplexOperator(r,"-",C,"=");case Ke:return this.isStartOfRegex()?this.scanRegex(i):this.scanComplexOperator(r,"/",C,"=");case kr:return this.scanComplexOperator(r,"%",C,"=");case Pr:return this.scanOperator(r,"^");case ts:return this.scanStar(r);case ss:return this.scanQuestion(r);case _r:case ns:return this.scanComplexOperator(r,String.fromCharCode(s),C,"=");case br:return this.scanComplexOperator(r,"!",C,"=",C,"=");case C:return this.scanEquals(r);case es:return this.scanCoLine truncated
If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let n=Fe(e),s=this._schema.get(n)||this._schema.get("unknown");return Array.from(s.keys()).map(i=>Eo.get(i)??i)}allKnownEventsOfElement(e){let n=Fe(e);return Array.from(this._eventSchema.get(n)??[])}normalizeAnimationStyleProperty(e){return wr(e)}normalizeAnimationStyleValue(e,n,s){let i="",r=s.toString().trim(),a=null;if(Co(e)&&s!==0&&s!=="0")if(typeof s=="number")i="px";else{let u=s.match(/^[+-]?[\d\.]+([a-z]*)$/);u&&u[1].length==0&&(a=`Please provide a CSS unit value for ${n}:${s}`)}return{error:a,value:r+i}}};function Co(t){switch(t){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var Pa=new ge(new Oe);function $(t){return e=>e.kind===t}function Pe(t,e){return n=>n.kind===t&&e===n.expression instanceof me}function bo(t){return(t.kind===l.Property||t.kind===l.TwoWayProperty)&&!(t.expression instanceof me)}var La=[{test:$(l.StyleMap),transform:rt},{test:$(l.ClassMap),transform:rt},{test:$(l.StyleProp)},{test:$(l.ClassProp)},{test:Pe(l.Attribute,!0)},{test:Pe(l.Property,!0)},{test:bo},{test:Pe(l.Attribute,!1)},{test:$(l.Control)}],$a=[{test:Pe(l.DomProperty,!0)},{test:Pe(l.DomProperty,!1)},{test:$(l.Attribute)},{test:$(l.StyleMap),transform:rt},{test:$(l.ClassMap),transform:rt},{test:$(l.StyleProp)},{test:$(l.ClassProp)}],Ma=new Set([l.Listener,l.TwoWayListener,l.AnimationListener,l.StyleMap,l.ClassMap,l.StyleProp,l.ClassProp,l.Property,l.TwoWayProperty,l.DomProperty,l.Attribute,l.Animation,l.Control]);function rt(t){return t.slice(t.length-1)}var Ra=new Map([[O.Idle,{none:c.deferOnIdle,prefetch:c.deferPrefetchOnIdle,hydrate:c.deferHydrateOnIdle}],[O.Immediate,{none:c.deferOnImmediate,prefetch:c.deferPrefetchOnImmediate,hydrate:c.deferHydrateOnImmediate}],[O.Timer,{none:c.deferOnTimer,prefetch:c.deferPrefetchOnTimer,hydrate:c.deferHydrateOnTimer}],[O.Hover,{none:c.deferOnHover,prefetch:c.deferPrefetchOnHover,hydrate:c.deferHydrateOnHover}],[O.Interaction,{none:c.deferOnInteraction,prefetch:c.deferPrefetchOnInteraction,hydrate:c.deferHydrateOnInteraction}],[O.Viewport,{none:c.deferOnViewport,prefetch:c.deferPrefetchOnViewport,hydrate:c.deferHydrateOnViewport}],[O.Never,{none:c.deferHydrateNever,prefetch:c.deferHydrateNever,hydrate:c.deferHydrateNever}]]);var Oa=[c.pipeBind1,c.pipeBind2,c.pipeBind3,c.pipeBind4];var Da={constant:[c.interpolate,c.interpolate1,c.interpolate2,c.interpolate3,c.interpolate4,c.interpolate5,c.interpolate6,c.interpolate7,c.interpolate8],variable:c.interpolateV,mapping:t=>{if(t%2===0)throw new Error("Expected odd number of arguments");return(t-1)/2}};var Ba=new Map([["window",c.resolveWindow],["document",c.resolveDocument],["body",c.resolveBody]]);var Fa=new Map([[x.HTML,c.sanitizeHtml],[x.RESOURCE_URL,c.sanitizeResourceUrl],[x.SCRIPT,c.sanitizeScript],[x.STYLE,c.sanitizeStyle],[x.URL,c.sanitizeUrl],[x.ATTRIBUTE_NO_BINDING,c.validateAttribute]]),Va=new Map([[x.HTML,c.trustConstantHtml],[x.RESOURCE_URL,c.trustConstantResourceUrl]]);var Is;(function(t){t[t.None=0]="None",t[t.ViewContextRead=1]="ViewContextRead",t[t.ViewContextWrite=2]="ViewContextWrite",t[t.SideEffectful=4]="SideEffectful"})(Is||(Is={}));var Ha=new Map([[M.Property,R.Property],[M.TwoWay,R.TwoWayProperty],[M.Attribute,R.Attribute],[M.Class,R.ClassName],[M.Style,R.StyleProperty],[M.LegacyAnimation,R.LegacyAnimation],[M.Animation,R.Animation]]);var Ns;(function(t){t[t.NG_CONTENT=0]="NG_CONTENT",t[t.STYLE=1]="STYLE",t[t.STYLESHEET=2]="STYLESHEET",t[t.SCRIPT=3]="SCRIPT",t[t.OTHER=4]="OTHER"})(Ns||(Ns={}));var As;(function(t){t.IDLE="idle",t.TIMER="timer",t.INTERACTION="interaction",t.IMMEDIATE="immediate",t.HOVER="hover",t.VIEWPORT="viewport",t.NEVER="never"})(As||(As={}));var Zs="%COMP%",Ua=`_nghost-${Zs}`,Wa=`_ngcontent-${Zs}`;var Ps;(function(t){t[t.Selector=0]="Selector",t[t.HostDirective=1]="HostDirective"})(Ps||(Ps={}));var Ls;(function(t){t[t.Extract=0]="Extract",t[t.Merge=1]="Merge"})(Ls||(Ls={}));var qa=new Dt("22.0.6");var $s;(function(t){t.DIAGNOSTIC="D",t.EXPRESSION_TYPE_IDENTIFIER="T"})($s||($s={}));var Ms;(function(t){t.DIRECTIVE="DIR",t.HOST_DIRECTIVE="HOSTDIR",t.COMPONENT_COMPLETION="COMPCOMP",t.EVENT_PARAMETER="EP",t.VARIABLE_AS_EXPRESSION="VAE"})(Ms||(Ms={}));var Rs;(function(t){t[Line truncated
@@ -0,0 +1,24 @@
/**
* @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 PencilOff = createLucideIcon("PencilOff", [
[
"path",
{
d: "m10 10-6.157 6.162a2 2 0 0 0-.5.833l-1.322 4.36a.5.5 0 0 0 .622.624l4.358-1.323a2 2 0 0 0 .83-.5L14 13.982",
key: "bjo8r8"
}
],
["path", { d: "m12.829 7.172 4.359-4.346a1 1 0 1 1 3.986 3.986l-4.353 4.353", key: "16h5ne" }],
["path", { d: "m15 5 4 4", key: "1mk7zo" }],
["path", { d: "m2 2 20 20", key: "1ooewy" }]
]);
export { PencilOff as default };
//# sourceMappingURL=pencil-off.js.map
@@ -0,0 +1,16 @@
export declare const enum OptionKeys {
ArrayDestructuring = "arrayDestructuring",
ArrowParameter = "arrowParameter",
MemberVariableDeclaration = "memberVariableDeclaration",
ObjectDestructuring = "objectDestructuring",
Parameter = "parameter",
PropertyDeclaration = "propertyDeclaration",
VariableDeclaration = "variableDeclaration",
VariableDeclarationIgnoreFunction = "variableDeclarationIgnoreFunction"
}
export type Options = [Partial<Record<OptionKeys, boolean>>];
export type MessageIds = 'expectedTypedef' | 'expectedTypedefNamed';
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,142 @@
import * as util from "../core/util.js";
const error = () => {
const Sizable = {
string: { unit: "caracteres" },
file: { unit: "bytes" },
array: { unit: "elementos" },
set: { unit: "elementos" },
map: { unit: "entradas" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const FormatDictionary = {
regex: "a entrada",
email: "o endereço de e-mail",
url: "o URL",
emoji: "o emoji",
uuid: "o UUID",
uuidv4: "o UUIDv4",
uuidv6: "o UUIDv6",
nanoid: "o nanoid",
guid: "o GUID",
cuid: "o cuid",
cuid2: "o cuid2",
ulid: "o ULID",
xid: "o XID",
ksuid: "o KSUID",
datetime: "a data e hora ISO",
date: "a data ISO",
time: "a hora ISO",
duration: "a duração ISO",
ipv4: "o endereço IPv4",
ipv6: "o endereço IPv6",
mac: "o endereço MAC",
cidrv4: "o intervalo de endereços IPv4",
cidrv6: "o intervalo de endereços IPv6",
base64: "o texto codificado em base64",
base64url: "o texto codificado em base64url",
json_string: "o texto JSON",
e164: "o número E.164",
credit_card: "o número de cartão de crédito",
currency_code: "o código de moeda",
iban: "o IBAN",
jwt: "o JWT",
template_literal: "a entrada",
};
const Gender = {
masculine: { definite: "o", indefinite: "um" },
feminine: { definite: "a", indefinite: "uma" },
};
const TypeDictionary = {
string: { name: "texto", articles: Gender.masculine },
number: { name: "número", articles: Gender.masculine },
int: { name: "número inteiro", articles: Gender.masculine },
boolean: { name: "valor booleano", articles: Gender.masculine },
bigint: { name: "número bigint", articles: Gender.masculine },
symbol: { name: "símbolo", articles: Gender.masculine },
undefined: { name: 'valor "undefined"', articles: Gender.masculine },
null: { name: 'valor "nulo"', articles: Gender.masculine },
never: { name: 'valor "never"', articles: Gender.masculine },
void: { name: 'valor "void"', articles: Gender.masculine },
date: { name: "data", articles: Gender.feminine },
array: { name: "vetor", articles: Gender.masculine },
object: { name: "objeto", articles: Gender.masculine },
tuple: { name: "tuplo", articles: Gender.masculine },
record: { name: "registo", articles: Gender.masculine },
map: { name: "mapa", articles: Gender.masculine },
set: { name: "conjunto", articles: Gender.masculine },
file: { name: "ficheiro", articles: Gender.masculine },
nonoptional: { name: "valor não opcional", articles: Gender.masculine },
nan: { name: 'valor "NaN"', articles: Gender.masculine }, // Compatibility: "nan" -> "NaN" for display
function: { name: "função", articles: Gender.feminine },
};
function translateOriginWithArticle(type, articleType) {
const translatedValue = TypeDictionary[type] ?? { name: `valor "${type}"`, articles: Gender.masculine };
return `${translatedValue.articles[articleType]} ${translatedValue.name}`;
}
return (issue) => {
switch (issue.code) {
case "invalid_type": {
const expected = translateOriginWithArticle(issue.expected, "indefinite");
const receivedType = util.parsedType(issue.input);
const received = translateOriginWithArticle(receivedType, "indefinite");
return `Entrada inválida: esperava ${expected}, recebeu ${received}`;
}
case "invalid_value":
if (issue.values.length === 1)
return `Entrada inválida: esperava ${util.stringifyPrimitive(issue.values[0])}`;
return `Opção inválida: esperava uma das seguintes opções: ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Demasiado grande: esperava que ${translateOriginWithArticle(issue.origin, "definite")} tivesse ${adj} ${issue.maximum.toString()} ${sizing.unit ?? "elementos"}`;
return `Demasiado grande: esperava que ${translateOriginWithArticle(issue.origin, "definite")} fosse ${adj} ${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Demasiado pequeno: esperava que ${translateOriginWithArticle(issue.origin, "definite")} tivesse ${adj} ${issue.minimum.toString()} ${sizing.unit ?? "elementos"}`;
}
return `Demasiado pequeno: esperava que ${translateOriginWithArticle(issue.origin, "definite")} fosse ${adj} ${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Texto inválido: deve começar por "${_issue.prefix}"`;
if (_issue.format === "ends_with")
return `Texto inválido: deve terminar em "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Texto inválido: deve incluir "${_issue.includes}"`;
if (_issue.format === "regex")
return `Texto inválido: deve corresponder ao padrão ${_issue.pattern}`;
return `Formato d${FormatDictionary[_issue.format] ?? issue.format} inválido`;
}
case "not_multiple_of":
return `Número inválido: deve ser múltiplo de ${issue.divisor}`;
case "unrecognized_keys": {
const plural = issue.keys.length > 1 ? "s" : "";
return `Chave${plural} inválida${plural}: ${util.joinValues(issue.keys, ", ")}`;
}
case "invalid_key":
return `Entrada inválida n${translateOriginWithArticle(issue.origin, "definite")}`;
case "invalid_union":
if (issue.options && Array.isArray(issue.options) && issue.options.length > 0) {
const opts = issue.options.map((o) => `'${o}'`).join(" | ");
return `Valor de discriminação inválido. Esperava ${opts}`;
}
return "Entrada inválida";
case "invalid_element":
return `Entrada inválida n${translateOriginWithArticle(issue.origin, "definite")}`;
default:
return `Entrada inválida`;
}
};
};
export default function () {
return {
localeError: error(),
};
}
@@ -0,0 +1,28 @@
{
"name": "node-releases",
"version": "2.0.59",
"description": "Node.js releases data",
"type": "module",
"files": [
"data"
],
"scripts": {
"build": "node scripts/build.js"
},
"repository": {
"type": "git",
"url": "https://github.com/chicoxyzzy/node-releases.git"
},
"keywords": [
"nodejs",
"releases"
],
"author": "Sergey Rubanov <chi187@gmail.com>",
"license": "MIT",
"engines": {
"node": ">=18"
},
"devDependencies": {
"semver": "^7.3.5"
}
}
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/primitive.tsx"],
"sourcesContent": ["import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { createSlot } from '@radix-ui/react-slot';\n\ndeclare module 'react' {\n interface CSSProperties {\n [varName: `--radix-${string}`]: string | number | undefined | null;\n }\n}\n\nconst NODES = [\n 'a',\n 'button',\n 'div',\n 'form',\n 'h2',\n 'h3',\n 'img',\n 'input',\n 'label',\n 'li',\n 'nav',\n 'ol',\n 'p',\n 'select',\n 'span',\n 'svg',\n 'ul',\n] as const;\n\ntype Primitives = { [E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E> };\ntype PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {\n asChild?: boolean;\n};\n\ninterface PrimitiveForwardRefComponent<\n E extends React.ElementType,\n> extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {}\n\n/* -------------------------------------------------------------------------------------------------\n * Primitive\n * -----------------------------------------------------------------------------------------------*/\n\nconst Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props: PrimitivePropsWithRef<typeof node>, forwardedRef: any) => {\n const { asChild, ...primitiveProps } = props;\n const Comp: any = asChild ? Slot : node;\n\n if (typeof window !== 'undefined') {\n (window as any)[Symbol.for('radix-ui')] = true;\n }\n\n return <Comp {...primitiveProps} ref={forwardedRef} />;\n });\n\n Node.displayName = `Primitive.${node}`;\n\n return { ...primitive, [node]: Node };\n}, {} as Primitives);\n\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Flush custom event dispatch\n * https://github.com/radix-ui/primitives/pull/1378\n *\n * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.\n *\n * Internally, React prioritises events in the following order:\n * - discrete\n * - continuous\n * - default\n *\n * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350\n *\n * `discrete` is an important distinction as updates within these events are applied immediately.\n * React however, is not able to infer the priority of custom event types due to how they are detected internally.\n * Because of this, it's possible for updates from custom events to be unexpectedly batched when\n * dispatched by another `discrete` event.\n *\n * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.\n * This utility should be used when dispatching a custom event from within another `discrete` event, this utility\n * is not necessary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.\n * For example:\n *\n * dispatching a known click \uD83D\uDC4E\n * target.dispatchEvent(new Event(\u2018click\u2019))\n *\n * dispatching a custom type within a non-discrete event \uD83D\uDC4E\n * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(\u2018customType\u2019))}\n *\n * dispatching a custom type within a `discrete` event \uD83D\uDC4D\n * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(\u2018customType\u2019))}\n *\n * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use\n * this utility with them. This is because it's possible for those handlers to be called implicitly during render\n * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.\n */\n\nfunction dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Primitive;\n\nexport {\n Primitive,\n //\n Root,\n //\n dispatchDiscreteCustomEvent,\n};\nexport type { PrimitivePropsWithRef };\n"],
"mappings": ";AAAA,YAAY,WAAW;AACvB,YAAY,cAAc;AAC1B,SAAS,kBAAkB;AAmDhB;AA3CX,IAAM,QAAQ;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAeA,IAAM,YAAY,MAAM,OAAO,CAAC,WAAW,SAAS;AAClD,QAAM,OAAO,WAAW,aAAa,IAAI,EAAE;AAC3C,QAAM,OAAa,iBAAW,CAAC,OAA2C,iBAAsB;AAC9F,UAAM,EAAE,SAAS,GAAG,eAAe,IAAI;AACvC,UAAM,OAAY,UAAU,OAAO;AAEnC,QAAI,OAAO,WAAW,aAAa;AACjC,MAAC,OAAe,OAAO,IAAI,UAAU,CAAC,IAAI;AAAA,IAC5C;AAEA,WAAO,oBAAC,QAAM,GAAG,gBAAgB,KAAK,cAAc;AAAA,EACtD,CAAC;AAED,OAAK,cAAc,aAAa,IAAI;AAEpC,SAAO,EAAE,GAAG,WAAW,CAAC,IAAI,GAAG,KAAK;AACtC,GAAG,CAAC,CAAe;AA2CnB,SAAS,4BAAmD,QAAqB,OAAU;AACzF,MAAI,OAAQ,CAAS,mBAAU,MAAM,OAAO,cAAc,KAAK,CAAC;AAClE;AAIA,IAAM,OAAO;",
"names": []
}
@@ -0,0 +1 @@
{"version":3,"names":["_genMapping","require","_traceMapping","SourceMap","constructor","opts","code","_opts$sourceFileName","_map","_rawMappings","_sourceFileName","_lastGenLine","_lastSourceLine","_lastSourceColumn","_inputMap","map","GenMapping","sourceRoot","sourceFileName","replace","undefined","inputSourceMap","TraceMap","resolvedSources","length","i","_this$_inputMap$sourc","setSourceContent","sourcesContent","Object","keys","get","toEncodedMap","getDecoded","toDecodedMap","getRawMappings","allMappings","mark","generated","line","column","identifierName","identifierNamePos","filename","_originalMapping","originalMapping","originalPositionFor","name","originalIdentifierMapping","source","maybeAddMapping","original","exports","default"],"sources":["../src/source-map.ts"],"sourcesContent":["import {\n GenMapping,\n maybeAddMapping,\n setSourceContent,\n allMappings,\n toEncodedMap,\n toDecodedMap,\n} from \"@jridgewell/gen-mapping\";\n\nimport type {\n EncodedSourceMap,\n DecodedSourceMap,\n Mapping,\n} from \"@jridgewell/gen-mapping\";\n\nimport type {\n InvalidOriginalMapping,\n OriginalMapping,\n SourceMapInput,\n} from \"@jridgewell/trace-mapping\";\nimport { originalPositionFor, TraceMap } from \"@jridgewell/trace-mapping\";\n\n/**\n * Build a sourcemap.\n */\n\nexport default class SourceMap {\n private _map: GenMapping;\n private _rawMappings: Mapping[] | undefined;\n private _sourceFileName: string | undefined;\n\n // Any real line is > 0, so init to 0 is fine.\n private _lastGenLine = 0;\n private _lastSourceLine = 0;\n\n // Source columns can be 0, but we only check in unison with sourceLine, which\n // inits to an impossible value. So init to 0 is fine.\n private _lastSourceColumn = 0;\n\n public _inputMap: TraceMap | null = null;\n\n constructor(\n opts: {\n sourceFileName?: string;\n sourceRoot?: string;\n inputSourceMap?: SourceMapInput;\n },\n code: string | Record<string, string> | null | undefined,\n ) {\n const map = (this._map = new GenMapping({ sourceRoot: opts.sourceRoot }));\n this._sourceFileName = opts.sourceFileName?.replace(/\\\\/g, \"/\");\n this._rawMappings = undefined;\n\n if (opts.inputSourceMap) {\n this._inputMap = new TraceMap(opts.inputSourceMap);\n const resolvedSources = this._inputMap.resolvedSources;\n if (resolvedSources.length) {\n for (let i = 0; i < resolvedSources.length; i++) {\n setSourceContent(\n map,\n resolvedSources[i],\n // @ts-expect-error FIXME: this._inputMap.sourcesContent?.[i] may be undefined, which is not acceptable by setSourceContent\n this._inputMap.sourcesContent?.[i],\n );\n }\n }\n }\n\n if (typeof code === \"string\" && !opts.inputSourceMap) {\n setSourceContent(map, this._sourceFileName!, code);\n } else if (typeof code === \"object\") {\n for (const sourceFileName of Object.keys(code!)) {\n setSourceContent(\n map,\n sourceFileName.replace(/\\\\/g, \"/\"),\n code![sourceFileName],\n );\n }\n }\n }\n\n /**\n * Get the sourcemap.\n */\n get(): EncodedSourceMap {\n return toEncodedMap(this._map);\n }\n\n getDecoded(): DecodedSourceMap {\n return toDecodedMap(this._map);\n }\n\n getRawMappings(): Mapping[] {\n return (this._rawMappings ||= allMappings(this._map));\n }\n\n /**\n * Mark the current generated position with a source position. May also be passed null line/column\n * values to insert a mapping to nothing.\n */\n\n mark(\n generated: { line: number; column: number },\n line?: number,\n column?: number,\n identifierName?: string | null,\n identifierNamePos?: { line: number; column: number },\n filename?: string | null,\n ) {\n this._rawMappings = undefined;\n\n let originalMapping: OriginalMapping | InvalidOriginalMapping | undefined;\n\n if (line != null) {\n if (this._inputMap) {\n // This is the lookup for this mark\n originalMapping = originalPositionFor(this._inputMap, {\n line,\n column: column!,\n });\n\n // Prefer the original name from the input sourcemap when marking an\n // identifier token at the same column, or when marking a related\n // token such as `(` via identifierNamePos.\n if (\n originalMapping.name &&\n (identifierNamePos ||\n (identifierName != null && originalMapping.column === column))\n ) {\n identifierName = originalMapping.name;\n } else if (identifierNamePos) {\n // Maybe we're marking a `(` and the input map already had a name attached there,\n // or we're marking a `(` and the sourcemap spanned a `foo(`,\n // or we're marking an identifier, etc.\n // We're trying to mark a `(` (as that's the only thing that provides\n // an identifierNamePos currently), and Line truncated
@@ -0,0 +1 @@
{"version":3,"file":"address-error.js","sourceRoot":"","sources":["../src/address-error.ts"],"names":[],"mappings":";;;AAAA,MAAa,YAAa,SAAQ,KAAK;IAcrC,YAAY,OAAe,EAAE,YAAqB;QAChD,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAE3B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;CACF;AArBD,oCAqBC","sourcesContent":["export class AddressError extends Error {\n /**\n * The offending address with the portion that failed to parse wrapped in\n * `<span class=\"parse-error\">`, e.g. `2001:db8<span\n * class=\"parse-error\">:::</span>1`. Present only on errors thrown from a\n * parse path that can point at a specific substring.\n *\n * This is an HTML fragment intended for an address-inspector UI. The\n * address content is HTML-escaped, so it is safe to insert as-is; treat it\n * as markup rather than as a plain-text message, and use `message` for\n * anything that renders as text.\n */\n parseMessage?: string;\n\n constructor(message: string, parseMessage?: string) {\n super(message);\n\n this.name = 'AddressError';\n\n this.parseMessage = parseMessage;\n }\n}\n"]}
@@ -0,0 +1,625 @@
export default `flf2a$ 6 5 12 -1 11 0 7999 0
Author : LG Beard
Date : 2006/7/3 23:58:25
Version: 1.0
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
$ #
$ #
$ #
$ #
$ #
$ ##
_ #
| | #
| | #
| | #
(_) #
##
"#
#
#
#
#
##
_ _ #
\\ \\\\ \\ _ #
[\\ \\\\ \\_] #
[_\\ \\\\ \\] #
\\_\\\\_\\ #
##
_ #
_.-./ \\ #
[/ _ \\ |] #
|_\\\`._/ #
#
##
_ #
_ / / #
(_)/ /_ #
/ /(_) #
/_/ #
##
&#
#
#
#
#
##
_ #
|_| #
#
#
#
##
__ #
/ _| #
/ / #
\\ \\_ #
\\__| #
##
__ #
|_ \\ #
\\ \\ #
_/ / #
|__/ #
##
*#
#
#
#
#
##
_ #
_| |_ #
|_ _| #
|_| #
#
##
#
#
#
_ #
)_/ #
##
#
____ #
[____] #
#
#
##
#
#
_ #
(_) #
#
##
_ #
/ / #
/ / #
/ / #
/_/ #
##
_____ #
.' ___ '. #
| (___) | #
'._____.' #
#
##
_ _ #
| /___\\ | #
\\______ | #
/_| #
#
##
_ __ #
| /_.\`_ | #
\\ .'| | #
\`-\` |_| #
#
##
_ _ #
/ \\ \\ \\ #
| //\\_| | #
\\_______/ #
#
##
__ #
/_ | #
//_||__ #
/__ __| #
|_| #
##
__ _ #
| \`._\\ | #
| |\`. / #
|_| '-' #
#
##
_______ #
|__ ___ \\ #
| \\_/ | #
\`,___,\` #
#
##
_ #
/ \\ #
| /_____ #
\\ ______/ #
#
##
__ __ #
.' '' '.#
| () () |#
'.__..__.'#
#
##
__ #
.\` _\`. #
| /_\\|__ #
\\_______| #
#
##
_ #
(_) #
#
_ #
(_) #
##
_ #
(_) #
#
_ #
)_/ #
##
<#
#
#
#
#
##
____ #
[____] #
____ #
[____] #
#
##
>#
#
#
#
#
##
__ #
.\`__/ #
/_'-. #
|_| #
(_) #
##
@#
#
#
#
#
##
______ #
.\` _ ._| #
\\ \\_||_ #
\`._____| #
#
##
_______ #
| | #
| o v o | #
'._.'._.' #
#
##
_______ #
/ _____ \\ #
| \\ / | #
\\_/ \\_/ #
#
##
_______ #
| ___ | #
| '._.' | #
'._____.' #
#
##
_______ #
| ._ _. | #
| \\ v / | #
|_/ \\_| #
#
##
_______ #
| _ ___| #
| ||_\\ #
|_/ #
#
##
_______ #
/ .---. \\ #
| \\ .-\`_/ #
\\_/ |.\` #
#
##
_______ #
\\__ __\\ #
__| |__ #
\\_______\\ #
#
##
_ _ #
| |___| | #
| ___ | #
|_| |_| #
#
##
_ __ #
| /___\\ \\ #
| ______/ #
|_\\ #
#
##
_______ #
|_ _| #
.\` _ \`. #
|_.\` \`._| #
#
##
_______ #
/______ \\ #
/ | #
\\_| #
#
##
_______ #
\`._ __| #
_< <__ #
/_______| #
#
##
_______ #
\`._ __| #
_\`. \`._ #
|_______| #
#
##
_______ #
/ ____ \\ #
| /___/ | #
\\_______/ #
#
##
_______ #
/ ___ __| #
| \\_/ | #
\`.___.\` #
#
##
_______ #
/ ____ \\#
| \\___\\ |#
\\_____\\_(#
#
##
_______ #
/ ___ _| #
| \\_/ \\ #
\`.__.\`\\_| #
#
##
__ #
.-. \\ \\ #
/ _ \\_\\ | #
|_\\\`.___/ #
#
##
_ #
| /_____ #
| ______/ #
|_\\ #
#
##
______ #
/_____ \`. #
_____\\ | #
\\______.\` #
#
##
_____ #
\`-.___ \\ #
____.\` | #
/______/ #
#
##
_______ #
\`._ __| #
_> >__ #
.\`______| #
#
##
_ _ #
\\_'._.'_/ #
_> _ <_ #
/_.' '._\\ #
#
##
_ #
|_\`.____ #
.\` .___| #
|_.\` #
#
##
_ _ #
| | .\` | #
| |.\`_. | #
|__.\` |_| #
#
##
___ #
| _| #
| | #
| |_ #
|___| #
##
_ #
\\ \\ #
\\ \\ #
\\ \\ #
\\_\\ #
##
___ #
|_ | #
| | #
_| | #
|___| #
##
__ #
/ \\ #
/_/\\_\\ #
#
#
##
#
#
#
#
________ #
[________]##
__ #
\\_\\ #
#
#
#
##
______ #
.\` _ ._| #
\\ \\_||_ #
\`._____| #
#
##
_______ #
| | #
| o v o | #
'._.'._.' #
#
##
_______ #
/ _____ \\ #
| \\ / | #
\\_/ \\_/ #
#
##
_______ #
| ___ | #
| '._.' | #
'._____.' #
#
##
_______ #
| ._ _. | #
| \\ v / | #
|_/ \\_| #
#
##
_______ #
| _ ___| #
| ||_\\ #
|_/ #
#
##
_______ #
/ .---. \\ #
| \\ .-\`_/ #
\\_/ |.\` #
#
##
_______ #
\\__ __\\ #
__| |__ #
\\_______\\ #
#
##
_ _ #
| |___| | #
| ___ | #
|_| |_| #
#
##
_ __ #
| /___\\ \\ #
| ______/ #
|_\\ #
#
##
_______ #
|_ _| #
.\` _ \`. #
|_.\` \`._| #
#
##
_______ #
/______ \\ #
/ | #
\\_| #
#
##
_______ #
\`._ __| #
_< <__ #
/_______| #
#
##
_______ #
\`._ __| #
_\`. \`._ #
|_______| #
#
##
_______ #
/ ____ \\ #
| /___/ | #
\\_______/ #
#
##
_______ #
/ ___ __| #
| \\_/ | #
\`.___.\` #
#
##
_______ #
/ ____ \\#
| \\___\\ |#
\\_____\\_(#
#
##
_______ #
/ ___ _| #
| \\_/ \\ #
\`.__.\`\\_| #
#
##
__ #
.-. \\ \\ #
/ _ \\_\\ | #
|_\\\`.___/ #
#
##
_ #
| /_____ #
| ______/ #
|_\\ #
#
##
______ #
/_____ \`. #
_____\\ | #
\\______.\` #
#
##
_____ #
\`-.___ \\ #
____.\` | #
/______/ #
#
##
_______ #
\`._ __| #
_> >__ #
.\`______| #
#
##
_ _ #
\\_'._.'_/ #
_> _ <_ #
/_.' '._\\ #
#
##
_ #
|_\`.____ #
.\` .___| #
|_.\` #
#
##
_ _ #
| | .\` | #
| |.\`_. | #
|__.\` |_| #
#
##
___ #
| _| #
/ | #
\\ |_ #
|___| #
##
_ #
| | #
| | #
| | #
|_| #
##
___ #
|_ | #
| \\ #
_| / #
|___| #
##
~#
#
#
#
#
##
______ #
.\` _ ._| #
\\ \\_||_ #
\`._____| #
#
##
_______ #
/ ____ \\ #
| /___/ | #
\\_______/ #
#
##
______ #
/_____ \`. #
_____\\ | #
\\______.\` #
#
##
______ #
.\` _ ._| #
\\ \\_||_ #
\`._____| #
#
##
_______ #
/ ____ \\ #
| /___/ | #
\\_______/ #
#
##
______ #
/_____ \`. #
_____\\ | #
\\______.\` #
#
##
�#
#
#
#
#
##
`
@@ -0,0 +1,7 @@
import { AnyRouter } from './router.cjs';
/**
* @private
* Handles hash-based scrolling after navigation completes.
* To be used in framework-specific <Transitioner> components during the onResolved event.
*/
export declare function handleHashScroll(router: AnyRouter): void;
@@ -0,0 +1 @@
{"version":3,"file":"star-off.js","sources":["../../../src/icons/star-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name StarOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOC4zNCA4LjM0IDIgOS4yN2w1IDQuODdMNS44MiAyMSAxMiAxNy43NyAxOC4xOCAyMWwtLjU5LTMuNDMiIC8+CiAgPHBhdGggZD0iTTE4LjQyIDEyLjc2IDIyIDkuMjdsLTYuOTEtMUwxMiAybC0xLjQ0IDIuOTEiIC8+CiAgPGxpbmUgeDE9IjIiIHgyPSIyMiIgeTE9IjIiIHkyPSIyMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/star-off\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 StarOff = createLucideIcon('StarOff', [\n ['path', { d: 'M8.34 8.34 2 9.27l5 4.87L5.82 21 12 17.77 18.18 21l-.59-3.43', key: '16m0ql' }],\n ['path', { d: 'M18.42 12.76 22 9.27l-6.91-1L12 2l-1.44 2.91', key: '1vt8nq' }],\n ['line', { x1: '2', x2: '22', y1: '2', y2: '22', key: 'a6p6uj' }],\n]);\n\nexport default StarOff;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgE,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,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC7F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgD,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,CAC7E,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,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAClE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,205 @@
# yallist
Yet Another Linked List
There are many doubly-linked list implementations like it, but this
one is mine.
For when an array would be too big, and a Map can't be iterated in
reverse order.
## basic usage
```js
import { Yallist } from 'yallist'
var myList = new Yallist([1, 2, 3])
myList.push('foo')
myList.unshift('bar')
// of course pop() and shift() are there, too
console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo']
myList.forEach(function (k) {
// walk the list head to tail
})
myList.forEachReverse(function (k, index, list) {
// walk the list tail to head
})
var myDoubledList = myList.map(function (k) {
return k + k
})
// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo']
// mapReverse is also a thing
var myDoubledListReverse = myList.mapReverse(function (k) {
return k + k
}) // ['foofoo', 6, 4, 2, 'barbar']
var reduced = myList.reduce(function (set, entry) {
set += entry
return set
}, 'start')
console.log(reduced) // 'startfoo123bar'
```
## api
The whole API is considered "public".
Functions with the same name as an Array method work more or less the
same way.
There's reverse versions of most things because that's the point.
### Yallist
Default export, the class that holds and manages a list.
Call it with either a forEach-able (like an array) or a set of
arguments, to initialize the list.
The Array-ish methods all act like you'd expect. No magic length,
though, so if you change that it won't automatically prune or add
empty spots.
### Yallist.create(..)
Alias for Yallist function. Some people like factories.
#### yallist.head
The first node in the list
#### yallist.tail
The last node in the list
#### yallist.length
The number of nodes in the list. (Change this at your peril. It is
not magic like Array length.)
#### yallist.toArray()
Convert the list to an array.
#### yallist.forEach(fn, [thisp])
Call a function on each item in the list.
#### yallist.forEachReverse(fn, [thisp])
Call a function on each item in the list, in reverse order.
#### yallist.get(n)
Get the data at position `n` in the list. If you use this a lot,
probably better off just using an Array.
#### yallist.getReverse(n)
Get the data at position `n`, counting from the tail.
#### yallist.map(fn, thisp)
Create a new Yallist with the result of calling the function on each
item.
#### yallist.mapReverse(fn, thisp)
Same as `map`, but in reverse.
#### yallist.pop()
Get the data from the list tail, and remove the tail from the list.
#### yallist.push(item, ...)
Insert one or more items to the tail of the list.
#### yallist.reduce(fn, initialValue)
Like Array.reduce.
#### yallist.reduceReverse
Like Array.reduce, but in reverse.
#### yallist.reverse
Reverse the list in place.
#### yallist.shift()
Get the data from the list head, and remove the head from the list.
#### yallist.slice([from], [to])
Just like Array.slice, but returns a new Yallist.
#### yallist.sliceReverse([from], [to])
Just like yallist.slice, but the result is returned in reverse.
#### yallist.splice(start, deleteCount, ...)
Like Array.splice.
#### yallist.toArray()
Create an array representation of the list.
#### yallist.toArrayReverse()
Create a reversed array representation of the list.
#### yallist.unshift(item, ...)
Insert one or more items to the head of the list.
#### yallist.unshiftNode(node)
Move a Node object to the front of the list. (That is, pull it out of
wherever it lives, and make it the new head.)
If the node belongs to a different list, then that list will remove it
first.
#### yallist.pushNode(node)
Move a Node object to the end of the list. (That is, pull it out of
wherever it lives, and make it the new tail.)
If the node belongs to a list already, then that list will remove it
first.
#### yallist.removeNode(node)
Remove a node from the list, preserving referential integrity of head
and tail and other nodes.
Will throw an error if you try to have a list remove a node that
doesn't belong to it.
### Yallist.Node
The class that holds the data and is actually the list.
Call with `const n = new Node(value, previousNode, nextNode)`
Note that if you do direct operations on Nodes themselves, it's very
easy to get into weird states where the list is broken. Be careful :)
#### node.next
The next node in the list.
#### node.prev
The previous node in the list.
#### node.value
The data the node contains.
#### node.list
The list to which this node belongs. (Null if it does not belong to
any list.)
@@ -0,0 +1,4 @@
import { parseAnyDef } from "./any.js";
export function parseUnknownDef(refs) {
return parseAnyDef(refs);
}
@@ -0,0 +1,96 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = isReferenced;
function isReferenced(node, parent, grandparent) {
switch (parent.type) {
case "MemberExpression":
case "OptionalMemberExpression":
if (parent.property === node) {
return !!parent.computed;
}
return parent.object === node;
case "JSXMemberExpression":
return parent.object === node;
case "VariableDeclarator":
return parent.init === node;
case "ArrowFunctionExpression":
return parent.body === node;
case "PrivateName":
return false;
case "ClassMethod":
case "ClassPrivateMethod":
case "ObjectMethod":
if (parent.key === node) {
return !!parent.computed;
}
return false;
case "ObjectProperty":
if (parent.key === node) {
return !!parent.computed;
}
return (grandparent == null ? void 0 : grandparent.type) !== "ObjectPattern";
case "ClassProperty":
case "ClassAccessorProperty":
if (parent.key === node) {
return !!parent.computed;
}
return true;
case "ClassPrivateProperty":
return parent.key !== node;
case "ClassDeclaration":
case "ClassExpression":
return parent.superClass === node;
case "AssignmentExpression":
return parent.right === node;
case "AssignmentPattern":
return parent.right === node;
case "LabeledStatement":
return false;
case "CatchClause":
return false;
case "RestElement":
return false;
case "BreakStatement":
case "ContinueStatement":
return false;
case "FunctionDeclaration":
case "FunctionExpression":
return false;
case "ExportNamespaceSpecifier":
case "ExportDefaultSpecifier":
return false;
case "ExportSpecifier":
if (grandparent != null && grandparent.source) {
return false;
}
return parent.local === node;
case "ImportDefaultSpecifier":
case "ImportNamespaceSpecifier":
case "ImportSpecifier":
return false;
case "ImportAttribute":
return false;
case "JSXAttribute":
return false;
case "ObjectPattern":
case "ArrayPattern":
return false;
case "MetaProperty":
return false;
case "ObjectTypeProperty":
return parent.key !== node;
case "TSEnumMember":
return parent.id !== node;
case "TSPropertySignature":
if (parent.key === node) {
return !!parent.computed;
}
return true;
}
return true;
}
//# sourceMappingURL=isReferenced.js.map
@@ -0,0 +1,26 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.scripthost = void 0;
const base_config_1 = require("./base-config");
exports.scripthost = {
libs: [],
variables: [
['ActiveXObject', base_config_1.TYPE_VALUE],
['ITextWriter', base_config_1.TYPE],
['TextStreamBase', base_config_1.TYPE],
['TextStreamWriter', base_config_1.TYPE],
['TextStreamReader', base_config_1.TYPE],
['SafeArray', base_config_1.TYPE_VALUE],
['Enumerator', base_config_1.TYPE_VALUE],
['EnumeratorConstructor', base_config_1.TYPE],
['VBArray', base_config_1.TYPE_VALUE],
['VBArrayConstructor', base_config_1.TYPE],
['VarDate', base_config_1.TYPE_VALUE],
['DateConstructor', base_config_1.TYPE],
['Date', base_config_1.TYPE],
],
};
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _toConsumableArray;
var _arrayWithoutHoles = require("./arrayWithoutHoles.js");
var _iterableToArray = require("./iterableToArray.js");
var _unsupportedIterableToArray = require("./unsupportedIterableToArray.js");
var _nonIterableSpread = require("./nonIterableSpread.js");
function _toConsumableArray(arr) {
return (0, _arrayWithoutHoles.default)(arr) || (0, _iterableToArray.default)(arr) || (0, _unsupportedIterableToArray.default)(arr) || (0, _nonIterableSpread.default)();
}
//# sourceMappingURL=toConsumableArray.js.map
@@ -0,0 +1,14 @@
import { expect, test } from "vitest";
import * as z from "zod/mini";
test("z.function", () => {
expect(true).toEqual(true);
});
test("implement exposes the function schema at runtime", () => {
const schema = z.function({ input: [z.string()], output: z.number() });
const fn = schema.implement((s) => s.length);
expect((fn as any)._zod).toBe(schema._zod);
expect(fn("asdf")).toBe(4);
});
@@ -0,0 +1,172 @@
import { sha256 } from "../../utils/crypto.js";
import { cloneRawRequest } from "../../request.js";
//#region src/middleware/cache/index.ts
/**
* status codes that can be cached by default.
*/
const defaultCacheableStatusCodes = [200];
const defaultMaxQueryBodySize = 65536;
const cacheKeyPath = "/.hono/cache";
const cacheKeyParameter = "__hono_cache_key";
const cacheMethodKeyParameter = "__hono_cache_method";
const queryDigestKeyParameter = "__hono_query_digest";
const cacheVaryKeyParameter = "__hono_cache_vary";
const queryRepresentationMetadataHeaders = [
"content-type",
"content-encoding",
"content-language",
"content-location"
];
const shouldSkipCacheControl = (cacheControl) => !!cacheControl && /(?:^|,\s*)(?:private|no-(?:store|cache))(?:\s*(?:=|,|$))/i.test(cacheControl);
const parseVaryDirectives = (vary) => {
if (vary == null) return [];
return (Array.isArray(vary) ? vary : vary.split(",")).map((directive) => directive.trim().toLowerCase()).filter(Boolean);
};
const createCacheKey = (key, requestUrl, request, varyHeaders) => {
const url = new URL(cacheKeyPath, requestUrl);
url.searchParams.append(cacheKeyParameter, key);
url.searchParams.append(cacheMethodKeyParameter, request.method);
if (request.method === "QUERY") url.searchParams.append(queryDigestKeyParameter, request.digest);
for (const header of varyHeaders) url.searchParams.append(cacheVaryKeyParameter, JSON.stringify(header));
return url.href;
};
const shouldSkipCache = (res, optionsVaryDirectives, responseVary) => responseVary.length && (!optionsVaryDirectives || responseVary.some((name) => !optionsVaryDirectives.has(name))) || shouldSkipCacheControl(res.headers.get("Cache-Control")) || res.headers.has("Set-Cookie");
const reportCacheNotAvailable = (onCacheNotAvailable, reason) => {
if (onCacheNotAvailable === false) {} else if (onCacheNotAvailable) onCacheNotAvailable(reason);
else console.log(reason);
};
const createQueryDigest = async (c, maxQueryBodySize) => {
if (!globalThis.crypto?.subtle) return;
if (c.req.raw.bodyUsed && Object.keys(c.req.bodyCache)[0] === "formData") return;
try {
const requestHeaders = c.req.raw.headers;
const metadata = new TextEncoder().encode(JSON.stringify(queryRepresentationMetadataHeaders.map((header) => [header, requestHeaders.get(header)])));
const body = (await cloneRawRequest(c.req)).body;
const chunks = [];
let bodySize = 0;
if (body) {
const reader = body.getReader();
for (;;) {
const { done, value } = await reader.read();
if (done) break;
bodySize += value.byteLength;
if (bodySize > maxQueryBodySize) {
reader.cancel().catch(() => {});
return;
}
chunks.push(value);
}
}
const data = new Uint8Array(metadata.byteLength + bodySize);
data.set(metadata);
let offset = metadata.byteLength;
for (const chunk of chunks) {
data.set(chunk, offset);
offset += chunk.byteLength;
}
return await sha256(data) ?? void 0;
} catch {
return;
}
};
/**
* Cache Middleware for Hono.
*
* @see {@link https://hono.dev/docs/middleware/builtin/cache}
*
* @param {Object} options - The options for the cache middleware.
* @param {string | Function} options.cacheName - The name of the cache. Can be used to store multiple caches with different identifiers.
* @param {boolean} [options.wait=false] - A boolean indicating if Hono should wait for the Promise of the `cache.put` function to resolve before continuing with the request. Required to be true for the Deno environment.
* @param {string} [options.cacheControl] - A string of directives for the `Cache-Control` header.
* @param {string | string[]} [options.vary] - Adds the configured request headers to the cache key variants and sets the `Vary` header in the response. If the original response header already contains a `Vary` header, the values are merged, removing any duplicates.
* @param {Function} [options.keyGenerator] - Generates keys for every request in the `cacheName` store. This can be used to cache data based on request parameters or context parameters. QUERY keys additionally include a digest of the request content and its representation metadata.
* @param {number} [options.maxQueryBodySize=65536] - The maximum QUERY request body size in bytes that can be cached. Larger QUERY requests bypass the cache.
* @param {number[]} [options.cacheableStatusCodes=[200]] - An array of status codes that can be cached.
* @param {Function | false} [options.onCacheNotAvailable] - A callback invoked with the reason when `globalThis.caches` is not available or QUERY caching cannot use Web Crypto. By default, the reason is logged to the console. Set to `false` to suppress the log, or provide a custom function.
* @returns {MiddlewareHandler} The middleware handler function.
* @throws {Error} If the `vary` option includes "*".
*
* @example
* ```ts
* app.use(
* '*',
* cache({
* cacheName: 'my-app',
* cacheControl: 'max-age=3600',
* })
* )
* ```
*/
const cache = (options) => {
if (!globalThis.caches) {
reportCacheNotAvailable(options.onCacheNotAvailable, "Cache Middleware is not enabled because caches is not defined.");
return async (_c, next) => await next();
}
if (!globalThis.crypto?.subtle) reportCacheNotAvailable(options.onCacheNotAvailable, "Cache Middleware cannot cache QUERY requests because Web Crypto is not available.");
if (options.wait === void 0) options.wait = false;
const cacheControlDirectives = options.cacheControl?.split(",").map((directive) => directive.toLowerCase());
const optionsVaryList = parseVaryDirectives(options.vary);
const varyDirectives = optionsVaryList.length ? new Set(optionsVaryList) : void 0;
if (varyDirectives?.has("*")) throw new Error("Middleware vary configuration cannot include \"*\", as it disallows effective caching.");
const cacheableStatusCodes = new Set(options.cacheableStatusCodes ?? defaultCacheableStatusCodes);
const maxQueryBodySize = options.maxQueryBodySize ?? defaultMaxQueryBodySize;
const addHeader = (c, responseVary) => {
if (cacheControlDirectives) {
const existingDirectives = c.res.headers.get("Cache-Control")?.split(",").map((d) => d.trim().split("=", 1)[0].toLowerCase()) ?? [];
for (const directive of cacheControlDirectives) {
let [name, value] = directive.trim().split("=", 2);
name = name.toLowerCase();
if (!existingDirectives.includes(name)) c.header("Cache-Control", `${name}${value ? `=${value}` : ""}`, { append: true });
}
}
if (varyDirectives) {
if (responseVary.length === 0) c.header("Vary", Array.from(varyDirectives).join(", "));
else {
const merged = new Set(varyDirectives);
for (const directive of responseVary) merged.add(directive);
if (merged.has("*")) c.header("Vary", "*");
else c.header("Vary", Array.from(merged).join(", "));
}
}
};
return async function cache(c, next) {
if (c.req.method !== "GET" && c.req.method !== "QUERY" || c.req.raw.headers.has("Authorization")) {
await next();
return;
}
let cacheKeyRequest = { method: "GET" };
if (c.req.method === "QUERY") {
const digest = await createQueryDigest(c, maxQueryBodySize);
if (digest === void 0) {
await next();
return;
}
cacheKeyRequest = {
method: "QUERY",
digest
};
}
let key = c.req.url;
if (options.keyGenerator) key = await options.keyGenerator(c);
const varyHeaders = [];
if (varyDirectives) for (const directive of varyDirectives) {
const value = c.req.raw.headers.get(directive) ?? "";
varyHeaders.push([directive, value]);
}
key = createCacheKey(key, c.req.url, cacheKeyRequest, varyHeaders);
const cacheName = typeof options.cacheName === "function" ? await options.cacheName(c) : options.cacheName;
const cache = await caches.open(cacheName);
const response = await cache.match(key);
if (response) return new Response(response.body, response);
await next();
if (!cacheableStatusCodes.has(c.res.status)) return;
const responseVary = parseVaryDirectives(c.res.headers.get("Vary"));
addHeader(c, responseVary);
if (shouldSkipCache(c.res, varyDirectives, responseVary)) return;
const res = c.res.clone();
if (options.wait) await cache.put(key, res);
else c.executionCtx.waitUntil(cache.put(key, res));
};
};
//#endregion
export { cache };
@@ -0,0 +1 @@
{"version":3,"file":"elements.js","sourceRoot":"","sources":["../../../lib/vocabularies/jtd/elements.ts"],"names":[],"mappings":";;AAEA,6CAAoD;AACpD,kCAAqC;AACrC,mDAA4C;AAC5C,yCAAwC;AACxC,yCAAwC;AACxC,mCAAgD;AAIhD,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,UAAU;IACnB,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAE,IAAA,iBAAS,EAAC,OAAO,CAAC;IACzB,IAAI,CAAC,GAAe;QAClB,IAAA,wBAAa,EAAC,GAAG,CAAC,CAAA;QAClB,MAAM,EAAC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QACnC,IAAI,IAAA,wBAAiB,EAAC,EAAE,EAAE,MAAM,CAAC;YAAE,OAAM;QACzC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAA,wBAAa,EAAC,GAAG,CAAC,CAAA;QAClC,GAAG,CAAC,EAAE,CAAC,IAAA,aAAG,EAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CACtB,GAAG,CAAC,EAAE,CACJ,IAAA,WAAC,EAAA,iBAAiB,IAAI,GAAG,EACzB,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,IAAA,oBAAa,EAAC,GAAG,CAAC,CAAC,EAC3C,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,CAClB,CACF,CAAA;QACD,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;IACf,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"}
@@ -0,0 +1,51 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InMemoryOAuthClientProvider = void 0;
/**
* In-memory OAuth client provider for demonstration purposes
* In production, you should persist tokens securely
*/
class InMemoryOAuthClientProvider {
constructor(_redirectUrl, _clientMetadata, onRedirect, clientMetadataUrl) {
this._redirectUrl = _redirectUrl;
this._clientMetadata = _clientMetadata;
this.clientMetadataUrl = clientMetadataUrl;
this._onRedirect =
onRedirect ||
(url => {
console.log(`Redirect to: ${url.toString()}`);
});
}
get redirectUrl() {
return this._redirectUrl;
}
get clientMetadata() {
return this._clientMetadata;
}
clientInformation() {
return this._clientInformation;
}
saveClientInformation(clientInformation) {
this._clientInformation = clientInformation;
}
tokens() {
return this._tokens;
}
saveTokens(tokens) {
this._tokens = tokens;
}
redirectToAuthorization(authorizationUrl) {
this._onRedirect(authorizationUrl);
}
saveCodeVerifier(codeVerifier) {
this._codeVerifier = codeVerifier;
}
codeVerifier() {
if (!this._codeVerifier) {
throw new Error('No code verifier saved');
}
return this._codeVerifier;
}
}
exports.InMemoryOAuthClientProvider = InMemoryOAuthClientProvider;
//# sourceMappingURL=simpleOAuthClientProvider.js.map
@@ -0,0 +1 @@
{"version":3,"names":["_gensync","data","require","_functional","_index","_item","_caching","_resolveTargets","isEqualDescriptor","a","b","_a$file","_b$file","_a$file2","_b$file2","name","value","options","dirname","alias","ownPass","file","request","resolved","handlerOf","optionsWithResolvedBrowserslistConfigFile","browserslistConfigFile","resolveBrowserslistConfigFile","createCachedDescriptors","plugins","presets","passPerPreset","createCachedPluginDescriptors","createCachedPresetDescriptors","createUncachedDescriptors","once","createPluginDescriptors","createPresetDescriptors","PRESET_DESCRIPTOR_CACHE","WeakMap","makeWeakCacheSync","items","cache","using","dir","makeStrongCacheSync","makeStrongCache","descriptors","map","desc","loadCachedDescriptor","PLUGIN_DESCRIPTOR_CACHE","DEFAULT_OPTIONS","cacheByOptions","get","set","possibilities","includes","matches","filter","possibility","length","push","createDescriptors","type","gensync","all","item","index","createDescriptor","assertNoDuplicates","pair","getItemDescriptor","Array","isArray","undefined","filepath","Error","resolver","loadPlugin","loadPreset","String","__esModule","default","Map","nameMap","Set","has","conflicts","i","JSON","stringify","join","add"],"sources":["../../src/config/config-descriptors.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\nimport { once } from \"../gensync-utils/functional.ts\";\n\nimport { loadPlugin, loadPreset } from \"./files/index.ts\";\n\nimport { getItemDescriptor } from \"./item.ts\";\n\nimport {\n makeWeakCacheSync,\n makeStrongCacheSync,\n makeStrongCache,\n} from \"./caching.ts\";\nimport type { CacheConfigurator } from \"./caching.ts\";\n\nimport type {\n PluginItem,\n InputOptions,\n PresetItem,\n} from \"./validation/options.ts\";\n\nimport { resolveBrowserslistConfigFile } from \"./resolve-targets.ts\";\nimport type { PluginAPI, PresetAPI } from \"./helpers/config-api.ts\";\n\n// Represents a config object and functions to lazily load the descriptors\n// for the plugins and presets so we don't load the plugins/presets unless\n// the options object actually ends up being applicable.\nexport type OptionsAndDescriptors = {\n options: InputOptions;\n plugins: () => Handler<UnloadedDescriptor<PluginAPI>[]>;\n presets: () => Handler<UnloadedDescriptor<PresetAPI>[]>;\n};\n\n// Represents a plugin or presets at a given location in a config object.\n// At this point these have been resolved to a specific object or function,\n// but have not yet been executed to call functions with options.\nexport interface UnloadedDescriptor<API, Options = object | undefined> {\n name: string | undefined;\n value: object | ((api: API, options: Options, dirname: string) => unknown);\n options: Options;\n dirname: string;\n alias: string;\n ownPass?: boolean;\n file?: {\n request: string;\n resolved: string;\n };\n}\n\nfunction isEqualDescriptor<API>(\n a: UnloadedDescriptor<API>,\n b: UnloadedDescriptor<API>,\n): boolean {\n return (\n a.name === b.name &&\n a.value === b.value &&\n a.options === b.options &&\n a.dirname === b.dirname &&\n a.alias === b.alias &&\n a.ownPass === b.ownPass &&\n a.file?.request === b.file?.request &&\n a.file?.resolved === b.file?.resolved\n );\n}\n\nexport type ValidatedFile = {\n filepath: string;\n dirname: string;\n options: InputOptions;\n};\n\n// eslint-disable-next-line require-yield\nfunction* handlerOf<T>(value: T): Handler<T> {\n return value;\n}\n\nfunction optionsWithResolvedBrowserslistConfigFile(\n options: InputOptions,\n dirname: string,\n): InputOptions {\n if (typeof options.browserslistConfigFile === \"string\") {\n options.browserslistConfigFile = resolveBrowserslistConfigFile(\n options.browserslistConfigFile,\n dirname,\n );\n }\n return options;\n}\n\n/**\n * Create a set of descriptors from a given options object, preserving\n * descriptor identity based on the identity of the plugin/preset arrays\n * themselves, and potentially on the identity of the plugins/presets + options.\n */\nexport function createCachedDescriptors(\n dirname: string,\n options: InputOptions,\n alias: string,\n): OptionsAndDescriptors {\n const { plugins, presets, passPerPreset } = options;\n return {\n options: optionsWithResolvedBrowserslistConfigFile(options, dirname),\n plugins: plugins\n ? () =>\n // @ts-expect-error todo(flow->ts) ts complains about incorrect arguments\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n createCachedPluginDescriptors(plugins, dirname)(alias)\n : () => handlerOf([]),\n presets: presets\n ? () =>\n // @ts-expect-error todo(flow->ts) ts complains about incorrect arguments\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n createCachedPresetDescriptors(presets, dirname)(alias)(\n !!passPerPreset,\n )\n : () => handlerOf([]Line truncated
@@ -0,0 +1,187 @@
/* eslint-disable @typescript-eslint/no-empty-interface */
type StrictNullChecksWrapper<Name extends string, Type> = undefined extends null
? `strictNullChecks must be true in tsconfig to use ${Name}`
: Type
type UnionToIntersection<U> = (U extends any ? (_: U) => void : never) extends (_: infer I) => void
? I
: never
export type SomeJSONSchema = UncheckedJSONSchemaType<Known, true>
type UncheckedPartialSchema<T> = Partial<UncheckedJSONSchemaType<T, true>>
export type PartialSchema<T> = StrictNullChecksWrapper<"PartialSchema", UncheckedPartialSchema<T>>
type JSONType<T extends string, IsPartial extends boolean> = IsPartial extends true
? T | undefined
: T
interface NumberKeywords {
minimum?: number
maximum?: number
exclusiveMinimum?: number
exclusiveMaximum?: number
multipleOf?: number
format?: string
}
interface StringKeywords {
minLength?: number
maxLength?: number
pattern?: string
format?: string
}
type UncheckedJSONSchemaType<T, IsPartial extends boolean> = (
| // these two unions allow arbitrary unions of types
{
anyOf: readonly UncheckedJSONSchemaType<T, IsPartial>[]
}
| {
oneOf: readonly UncheckedJSONSchemaType<T, IsPartial>[]
}
// this union allows for { type: (primitive)[] } style schemas
| ({
type: readonly (T extends number
? JSONType<"number" | "integer", IsPartial>
: T extends string
? JSONType<"string", IsPartial>
: T extends boolean
? JSONType<"boolean", IsPartial>
: never)[]
} & UnionToIntersection<
T extends number
? NumberKeywords
: T extends string
? StringKeywords
: T extends boolean
? // eslint-disable-next-line @typescript-eslint/ban-types
{}
: never
>)
// this covers "normal" types; it's last so typescript looks to it first for errors
| ((T extends number
? {
type: JSONType<"number" | "integer", IsPartial>
} & NumberKeywords
: T extends string
? {
type: JSONType<"string", IsPartial>
} & StringKeywords
: T extends boolean
? {
type: JSONType<"boolean", IsPartial>
}
: T extends readonly [any, ...any[]]
? {
// JSON AnySchema for tuple
type: JSONType<"array", IsPartial>
items: {
readonly [K in keyof T]-?: UncheckedJSONSchemaType<T[K], false> & Nullable<T[K]>
} & {length: T["length"]}
minItems: T["length"]
} & ({maxItems: T["length"]} | {additionalItems: false})
: T extends readonly any[]
? {
type: JSONType<"array", IsPartial>
items: UncheckedJSONSchemaType<T[0], false>
contains?: UncheckedPartialSchema<T[0]>
minItems?: number
maxItems?: number
minContains?: number
maxContains?: number
uniqueItems?: true
additionalItems?: never
}
: T extends Record<string, any>
? {
// JSON AnySchema for records and dictionaries
// "required" is not optional because it is often forgotten
// "properties" are optional for more concise dictionary schemas
// "patternProperties" and can be only used with interfaces that have string index
type: JSONType<"object", IsPartial>
additionalProperties?: boolean | UncheckedJSONSchemaType<T[string], false>
unevaluatedProperties?: boolean | UncheckedJSONSchemaType<T[string], false>
properties?: IsPartial extends true
? Partial<UncheckedPropertiesSchema<T>>
: UncheckedPropertiesSchema<T>
patternProperties?: Record<string, UncheckedJSONSchemaType<T[string], false>>
propertyNames?: Omit<UncheckedJSONSchemaType<string, false>, "type"> & {type?: "string"}
dependencies?: {[K in keyof T]?: readonly (keyof T)[] | UncheckedPartialSchema<T>}
dependentRequired?: {[K in keyof T]?: readonly (keyof T)[]}
dependentSchemas?: {[K in keyof T]?: UncheckedPartialSchema<T>}
minProperties?: number
maxProperties?: number
} & (IsPartial extends true // "required" is not necessary if it's a non-partial type with no required keys // are listed it only asserts that optional cannot be listed. // "required" type does not guarantee that all required properties
? {required: readonly (keyof T)[]}
: [UncheckedRequiredMembers<T>] extends [never]
? {required?: readonly UncheckedRequiredMembers<T>[]}
: {required: readonly UncheckedRequiredMembers<T>[]})
: T extends null
? {
type: JSONType<"null", IsPartial>
nullable: true
}
: never) & {
allOf?: readonly UncheckedPartialSchema<T>[]
anyOf?: readonly UncheckedPartialSchema<T>[]
oneOf?: readonly UncheckedPartialSchema<T>[]
if?: UncheckedPartialSchema<T>
then?: UncheckedPartialSchema<T>
else?: UncheckedPartialSchema<T>
not?: UncheckedPartialSchema<T>
})
) & {
[keyword: string]: any
$id?: string
$ref?: string
$defs?: Record<string, UncheckedJSONSchemaType<Known, true>>
definitions?: Record<string, UncheckedJSONSchemaType<Known, true>>
}
export type JSONSchemaType<T> = StrictNullChecksWrapper<
"JSONSchemaType",
UncheckedJSONSchemaType<T, false>
>
type Known =
| {[key: string]: Known}
| [Known, ...Known[]]
| Known[]
| number
| string
| boolean
| null
type UncheckedPropertiesSchema<T> = {
[K in keyof T]-?: (UncheckedJSONSchemaType<T[K], false> & Nullable<T[K]>) | {$ref: string}
}
export type PropertiesSchema<T> = StrictNullChecksWrapper<
"PropertiesSchema",
UncheckedPropertiesSchema<T>
>
type UncheckedRequiredMembers<T> = {
[K in keyof T]-?: undefined extends T[K] ? never : K
}[keyof T]
export type RequiredMembers<T> = StrictNullChecksWrapper<
"RequiredMembers",
UncheckedRequiredMembers<T>
>
type Nullable<T> = undefined extends T
? {
nullable: true
const?: null // any non-null value would fail `const: null`, `null` would fail any other value in const
enum?: readonly (T | null)[] // `null` must be explicitly included in "enum" for `null` to pass
default?: T | null
}
: {
nullable?: false
const?: T
enum?: readonly T[]
default?: T
}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_UL _i","2":"_0 _IK"},C:{"1":"_tO","2":"_o _0Q"},D:{"1":"_UL _l","2":"_v _IK"},E:{"1":"_1C","2":"_pD"},F:{"1":"_H _SP _0P _h","2":"_8 _hF _O"},G:{"1":"_kB","2":"_yC"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"2":"bC"},P:{"1":"_6B","2":"_IL"},Q:{"2":"JE"},R:{"2":"KE"},S:{"1":"ME","2":"LE"}},B:4,C:"CSS Grid animation",D:false};
@@ -0,0 +1,23 @@
"use client";
import { attachFollow, isMotionValue } from 'motion-dom';
import { useContext, useInsertionEffect } from 'react';
import { MotionConfigContext } from '../context/MotionConfigContext.mjs';
import { useMotionValue } from './use-motion-value.mjs';
import { useTransform } from './use-transform.mjs';
function useFollowValue(source, options = {}) {
const { isStatic } = useContext(MotionConfigContext);
const getFromSource = () => (isMotionValue(source) ? source.get() : source);
// isStatic will never change, allowing early hooks return
if (isStatic) {
return useTransform(getFromSource);
}
const value = useMotionValue(getFromSource());
useInsertionEffect(() => {
return attachFollow(value, source, options);
}, [value, JSON.stringify(options)]);
return value;
}
export { useFollowValue };
//# sourceMappingURL=use-follow-value.mjs.map
@@ -0,0 +1,19 @@
import { TSESTree } from '@typescript-eslint/utils';
import type { InferMessageIdsTypeFromRule, InferOptionsTypeFromRule } from '../util';
declare const baseRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unusedExpression", [{
allowShortCircuit?: boolean;
allowTaggedTemplates?: boolean;
allowTernary?: boolean;
}], unknown, {
ExpressionStatement(node: TSESTree.ExpressionStatement): void;
}>;
export type MessageIds = InferMessageIdsTypeFromRule<typeof baseRule>;
export type Options = InferOptionsTypeFromRule<typeof baseRule>;
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unusedExpression", [{
allowShortCircuit?: boolean;
allowTaggedTemplates?: boolean;
allowTernary?: boolean;
}], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
name: string;
};
export default _default;
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_J"},C:{"1":"_QO","2":"_TK"},D:{"1":"_FK","2":"_3J"},E:{"1":"_VI","2":"_5C"},F:{"1":"_8J","2":"_PM"},G:{"1":"_9B","2":"_EB"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"D","16":"A"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_U","2":"J"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:6,C:"Array.prototype.findIndex",D:true};
@@ -0,0 +1,17 @@
/**
* @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 TestTube = createLucideIcon("TestTube", [
["path", { d: "M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2", key: "125lnx" }],
["path", { d: "M8.5 2h7", key: "csnxdl" }],
["path", { d: "M14.5 16h-5", key: "1ox875" }]
]);
export { TestTube as default };
//# sourceMappingURL=test-tube.js.map
@@ -0,0 +1 @@
{"version":3,"file":"gallery-horizontal-end.js","sources":["../../../src/icons/gallery-horizontal-end.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name GalleryHorizontalEnd\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMiA3djEwIiAvPgogIDxwYXRoIGQ9Ik02IDV2MTQiIC8+CiAgPHJlY3Qgd2lkdGg9IjEyIiBoZWlnaHQ9IjE4IiB4PSIxMCIgeT0iMyIgcng9IjIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/gallery-horizontal-end\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 GalleryHorizontalEnd = createLucideIcon('GalleryHorizontalEnd', [\n ['path', { d: 'M2 7v10', key: 'a2pl2d' }],\n ['path', { d: 'M6 5v14', key: '1kq3d7' }],\n ['rect', { width: '12', height: '18', x: '10', y: '3', rx: '2', key: '13i7bc' }],\n]);\n\nexport default GalleryHorizontalEnd;\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,CAAA,CAAA,CAAA,CAAuB,iBAAiB,sBAAwB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpE,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,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,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,68 @@
/**
* @fileoverview Disallow sparse arrays
* @author Nicholas C. Zakas
*/
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "problem",
docs: {
description: "Disallow sparse arrays",
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-sparse-arrays",
},
schema: [],
messages: {
unexpectedSparseArray: "Unexpected comma in middle of array.",
},
},
create(context) {
//--------------------------------------------------------------------------
// Public
//--------------------------------------------------------------------------
return {
ArrayExpression(node) {
if (!node.elements.includes(null)) {
return;
}
const { sourceCode } = context;
let commaToken;
for (const [index, element] of node.elements.entries()) {
if (index === node.elements.length - 1 && element) {
return;
}
commaToken = sourceCode.getTokenAfter(
element ?? commaToken ?? sourceCode.getFirstToken(node),
astUtils.isCommaToken,
);
if (element) {
continue;
}
context.report({
node,
loc: commaToken.loc,
messageId: "unexpectedSparseArray",
});
}
},
};
},
};
@@ -0,0 +1 @@
{"version":3,"file":"download-cloud.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,824 @@
flf2a$ 8 7 20 -1 7
NIPPLES by Ron Fritz 8/94
Figlet Release 2.0
---
Font modified June 17, 2007 by patorjk
This was to widen the space character.
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
{__@
{__@
{__@
{_ @
{_ @
@
{__@
@@
{_ {_@
{_ {_@
@
@
@
@
@
@@
@
{__ {__ @
{______ {____@
{__ {__ @
{__ {__ @
{______ {____@
{__ {__ @
@@
{__ @
{_ {__ @
{__ @
{__ @
{__@
{__ {__ @
{__ @
@@
@
{__ {__ @
{__ @
{__ @
{__ @
{__ @
{__ {__ @
@@
{_ @
{__ {__@
{__ @
{___ @
{__ @
{__ {__@
{_ @
@@
{__@
{_@
@
@
@
@
@
@@
{__@
{__ @
{__ @
{__ @
{__ @
{__ @
{__@
@@
{__ @
{__ @
{__@
{__@
{__@
{__ @
{__ @
@@
{__ @
{__ {__ {__@
{_ {_ {__ @
{____ {_______@
{_ {_ {__ @
{__ {__ {__@
{__ @
@@
@
{__ @
{__ @
{___ {_____@
{__ @
{__ @
@
@@
@
@
@
@
@
@
{__@
{_@@
@
@
@
{_____@
@
@
@
@@
@
@
@
@
@
@
{__@
@@
{__@
{__ @
{__ @
{__ @
{__ @
{__ @
{__ @
@@
@
{__ @
{__ {__ @
{__ {__ @
{__ {__@
{__ {__ @
{___ @
@@
@
{__ @
{__ @
{__ @
{__ @
{__ @
{____@
@@
@
{__ {_ @
{_ {__@
{__ @
{__ @
{__ @
{________ @
@@
@
{__ {__ @
{__ @
{__ @
{__ @
{__@
{_____ @
@@
@
{__ @
{ {__ @
{_ {__ @
{__ {__ @
{____ {_ {__@
{__ @
@@
@
{__ {___ @
{__ @
{___ @
{__ @
{__@
{___ {__ @
@@
@
{__ @
{__ @
{__ @
{_ {__ @
{__ {__@
{__ {__ @
@@
@
{_____ {__@
{__ @
{__ @
{__ @
{__ @
{__ @
@@
@
{_ @
{__ {__ @
{__ {_ @
{__ {_ @
{__ {__@
{____ @
@@
@
{_ {__ @
{__ {__@
{_ {__ @
{_ {__ @
{__ @
{__ @
@@
@
@
@
@
{__@
@
{__@
@@
@
@
@
@
{__@
@
{__@
{_@@
{__@
{__ @
{__ @
{__ @
{__ @
{__ @
{__@
@@
@
@
{______@
@
{______@
@
@
@@
{__ @
{__ @
{__ @
{__@
{__ @
{__ @
{__ @
@@
{___ @
{__ @
{__@
{__ @
{__ @
@
{__ @
@@
@
{___ @
{_ {__ @
{_ {__ {__@
{__ {__{ {__@
{__ ``` @
{__ @
@@
{_ @
{_ __ @
{_ {__ @
{__ {__ @
{______ {__ @
{__ {__ @
{__ {__@
@@
{__ {__ @
{_ {__ @
{_ {__@
{___ {_ @
{_ {__@
{_ {_@
{____ {__ @
@@
{__ @
{__ {__@
{__ @
{__ @
{__ @
{__ {__@
{____ @
@@
{_____ @
{__ {__ @
{__ {__@
{__ {__@
{__ {__@
{__ {__ @
{_____ @
@@
{________@
{__ @
{__ @
{______ @
{__ @
{__ @
{________@
@@
{________@
{__ @
{__ @
{______ @
{__ @
{__ @
{__ @
@@
{____ @
{_ {__ @
{__ @
{__ @
{__ {____@
{__ {_ @
{_____ @
@@
{__ {__@
{__ {__@
{__ {__@
{______ {__@
{__ {__@
{__ {__@
{__ {__@
@@
{__@
{__@
{__@
{__@
{__@
{__@
{__@
@@
{__@
{__@
{__@
{__@
{__@
{_ {__@
{____ @
@@
{__ {__ @
{__ {__ @
{__ {__ @
{_ {_ @
{__ {__ @
{__ {__ @
{__ {__@
@@
{__ @
{__ @
{__ @
{__ @
{__ @
{__ @
{________@
@@
{__ {__@
{_ {__ {___@
{__ {__ { {__@
{__ {__ {__@
{__ {_ {__@
{__ {__@
{__ {__@
@@
{___ {__@
{_ {__ {__@
{__ {__ {__@
{__ {__ {__@
{__ {_ {__@
{__ {_ __@
{__ {__@
@@
{____ @
{__ {__ @
{__ {__@
{__ {__@
{__ {__@
{__ {__ @
{____ @
@@
{_______ @
{__ {__@
{__ {__@
{_______ @
{__ @
{__ @
{__ @
@@
{____ @
{__ {__ @
{__ {__@
{__ {__@
{__ {__@
{__ {_ {__ @
{__ __ @
{_ @@
{_______ @
{__ {__ @
{__ {__ @
{_ {__ @
{__ {__ @
{__ {__ @
{__ {__@
@@
{__ __ @
{__ {__@
{__ @
{__ @
{__ @
{__ {__@
{__ __ @
@@
{___ {______@
{__ @
{__ @
{__ @
{__ @
{__ @
{__ @
@@
{__ {__@
{__ {__@
{__ {__@
{__ {__@
{__ {__@
{__ {__@
{_____ @
@@
{__ {__@
{__ {__ @
{__ {__ @
{__ {__ @
{__ {__ @
{____ @
{__ @
@@
{__ {__@
{__ {__@
{__ {_ {__@
{__ {__ {__@
{__ {_ {__ {__@
{_ {_ {____@
{__ {__@
@@
{__ {__@
{__ {__ @
{__ {__ @
{__ @
{__ {__ @
{__ {__ @
{__ {__@
@@
{__ {__@
{__ {__ @
{__ {__ @
{__ @
{__ @
{__ @
{__ @
@@
{_______ {__@
{__ @
{__ @
{__ @
{__ @
{__ @
{___________@
@@
{____@
{__ @
{__ @
{__ @
{__ @
{__ @
{____@
@@
{__ @
{__ @
{__ @
{__ @
{__ @
{__ @
{__@
@@
{____@
{__@
{__@
{__@
{__@
{__@
{____@
@@
{__ @
{__ {__ @
{__ {__@
@
@
@
@
@@
@
@
@
@
@
@
@
{_____@@
{__@
{_ @
@
@
@
@
@
@@
@
@
{__ @
{__ {__ @
{__ {__ @
{__ {__ @
{__ {___@
@@
{__ @
{__ @
{__ @
{__ {__ @
{__ {__@
{__ {__@
{__ {__ @
@@
@
@
{___@
{__ @
{__ @
{__ @
{___@
@@
{__@
{__@
{__@
{__ {__@
{_ {__@
{_ {__@
{__ {__@
@@
@
@
{__ @
{_ {__ @
{_____ {__@
{_ @
{____ @
@@
{__@
{_ @
{_{_ {_@
{__ @
{__ @
{__ @
{__ @
@@
@
@
{__ @
{__ {__@
{__ {__@
{__ {__@
{__ @
{__ @@
@
{__ @
{__ @
{_ {_ @
{__ {__@
{_ {__@
{__ {__@
@@
@
{_@
@
{__@
{__@
{__@
{__@
@@
@
{__@
@
{__@
{__@
{__@
{__@
{___ @@
{__ @
{__ @
{__ {__@
{__ {__ @
{_{__ @
{__ {__ @
{__ {__@
@@
{__@
{__@
{__@
{__@
{__@
{__@
{___@
@@
@
@
{___ {__ {__ @
{__ {_ {__@
{__ {_ {__@
{__ {_ {__@
{___ {_ {__@
@@
@
@
{__ {__ @
{__ {__@
{__ {__@
{__ {__@
{___ {__@
@@
@
@
{__ @
{__ {__ @
{__ {__@
{__ {__ @
{__ @
@@
@
@
{_ {__ @
{_ {__ @
{_ {__@
{__ {__ @
{__ @
{__ @@
@
@
{__ @
{_ {__ @
{_ {__ @
{__{__ @
{__ @
{___@@
@
@
{_ {___@
{__ @
{__ @
{__ @
{___ @
@@
@
@
{____ @
{__ @
{___ @
{__@
{__ {__@
@@
{__ @
{__ @
{_{_ {_@
{__ @
{__ @
{__ @
{__ @
@@
@
@
{__ {__@
{__ {__@
{__ {__@
{__ {__@
{__{__@
@@
@
@
{__ {__@
{__ {__ @
{__ {__ @
{_{__ @
{__ @
@@
@
@
{__ {___@
{__ _ {__@
{__ {_ {__@
{_ {_ {_{__@
{___ {___@
@@
@
@
{__ {__@
{_ {__ @
{_ @
{_ {__ @
{__ {__@
@@
@
@
{__ {__@
{__ {__ @
{___ @
{__ @
{__ @
{__ @@
@
@
{____ {__@
{__ @
{__ @
{__ @
{________@
@@
{__@
{__ @
{__ @
{__ @
{__ @
{__ @
{__@
@@
{_@
{_@
{_@
@
{_@
{_@
{_@
@@
__} @
__} @
__} @
__}@
__} @
__} @
__} @
@@
{__ {_ @
{_ {__@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@@ -0,0 +1,103 @@
'use strict';
var os = require('node:os');
var stdEnv = require('std-env');
var vite = require('vite');
const isNode = typeof process < "u" && typeof process.stdout < "u" && !process.versions?.deno && !globalThis.window;
const isDeno = typeof process < "u" && typeof process.stdout < "u" && process.versions?.deno !== void 0;
(isNode || isDeno) && process.platform === "win32";
(isNode || isDeno) && process.stdout?.isTTY && !stdEnv.isCI;
// if changed, update also jsdocs and docs
const defaultBrowserPort = 63315;
const defaultInclude = ["**/*.{test,spec}.?(c|m)[jt]s?(x)"];
const defaultExclude = ["**/node_modules/**", "**/.git/**"];
// These are the generic defaults for coverage. Providers may also set some provider specific defaults.
const coverageConfigDefaults = {
provider: "v8",
enabled: false,
clean: true,
cleanOnRerun: true,
reportsDirectory: "./coverage",
exclude: [],
reportOnFailure: false,
reporter: [
"text",
"html",
"clover",
"json"
],
allowExternal: false,
excludeAfterRemap: false,
processingConcurrency: Math.min(20, os.availableParallelism?.() ?? os.cpus().length),
ignoreClassMethods: [],
skipFull: false,
watermarks: {
statements: [50, 80],
functions: [50, 80],
branches: [50, 80],
lines: [50, 80]
}
};
const fakeTimersDefaults = {
loopLimit: 1e4,
shouldClearNativeTimers: true
};
const configDefaults = Object.freeze({
allowOnly: !stdEnv.isCI,
isolate: true,
watch: !stdEnv.isCI && process.stdin.isTTY && !stdEnv.isAgent,
globals: false,
environment: "node",
clearMocks: false,
restoreMocks: false,
mockReset: false,
unstubGlobals: false,
unstubEnvs: false,
include: defaultInclude,
exclude: defaultExclude,
teardownTimeout: 1e4,
forceRerunTriggers: ["**/package.json/**", "**/{vitest,vite}.config.*/**"],
update: false,
reporters: [],
silent: false,
hideSkippedTests: false,
api: false,
ui: false,
uiBase: "/__vitest__/",
open: !stdEnv.isCI,
css: { include: [] },
coverage: coverageConfigDefaults,
fakeTimers: fakeTimersDefaults,
maxConcurrency: 5,
dangerouslyIgnoreUnhandledErrors: false,
typecheck: {
checker: "tsc",
include: ["**/*.{test,spec}-d.?(c|m)[jt]s?(x)"],
exclude: defaultExclude
},
slowTestThreshold: 300,
disableConsoleIntercept: false,
detectAsyncLeaks: false
});
function defineConfig(config) {
return config;
}
function defineProject(config) {
return config;
}
Object.defineProperty(exports, "mergeConfig", {
enumerable: true,
get: function () { return vite.mergeConfig; }
});
exports.configDefaults = configDefaults;
exports.coverageConfigDefaults = coverageConfigDefaults;
exports.defaultBrowserPort = defaultBrowserPort;
exports.defaultExclude = defaultExclude;
exports.defaultInclude = defaultInclude;
exports.defineConfig = defineConfig;
exports.defineProject = defineProject;
@@ -0,0 +1,11 @@
3.3.1 / 2020-06-18
==================
**fixes**
* [[`0d94a24`](http://github.com/thenables/thenify/commit/0d94a24eb933bc835d568f3009f4d269c4c4c17a)] - fix: remove eval (#30) (Yiyu He <<dead_horse@qq.com>>)
3.3.0 / 2017-05-19
==================
* feat: support options.multiArgs and options.withCallback (#27)
@@ -0,0 +1,564 @@
flf2a$ 5 5 10 -1 53
by Jerrad Pierce [http://www.pthbb.org/software/figlet/tsalagi.html]
11/97, 2/02, 8/02
Permission to modify granted, but please send me a copy or notify me.
Also available: best fit/match of characters, allow punctuation like . " ' ?
_______________________________________________________
( )
( __ _ _ _ __ __ )
( / _'_ | | | \ / )
( | | | | \/ )
( | @ \ \ / / )
( \__/ \/\/ @ )
( )
( Syllabry Conversion Table )
( )
( a, a e, ` i, ~ o, q u, Q v, A )
( ------+-------+--------+-------+------+------ ) There is
( ga, s ) rhyme and
( ka, n ge, 1 gi, ! go, w gu, W gv, S ) reason
( ------+-------+--------+-------+------+------ )
( ha, d he, 2 hi, @ ho, e hu, E hv, D ) a ` ~ q Q A
( ------+-------+--------+-------+------+------ ) s
( la, f le, 3 li, # lo, r lu, R lv, F ) n 1 ! w W S
( ------+-------+--------+-------+------+------ ) d 2 @ e E D
( ma, g me, 4 mi, $ mo, t mu, T ) f 3 # r R F
( ------+-------+--------+-------+------+------ ) g 4 $ t T
( na, h ) h
( hna, m ) m
( nah, X ne, 5 ni, % no, y nu, Y nv, G ) X 5 % y Y G
( ------+-------+--------+-------+------+------ ) j 6 ^ u U H
( qua, j que, 6 qui, ^ quo, u quu, U quv, H ) k
( ------+-------+--------+-------+------+------ ) C 7 & i I J
( sa, k ) l 8 * o O K
( s, C se, 7 si, & so, i su, I sv, J ) / 9 (
( ------+-------+--------+-------+------+------ ) V
( da, l de, 8 di, * do, o du, O dv, K ) Z 0 ) p P L
( ta, / te, 9 ti, ( ) B < _ [ { N
( ------+-------+--------+-------+------+------ ) v > + ] } M
( dla, V ) b \ | z x c
( tla, Z tle, 0 tli, ) tlo, p tlu, P tlv, L )
( ------+-------+--------+-------+------+------ )
( tsa, B tse, < tsi, _ tso, [ tsu, { tsv, N )
( ------+-------+--------+-------+------+------ )
( wa, v we, > wi, + wo, ] wu, } wv, M )
( ------+-------+--------+-------+------+------ )
( ya, b ye, \ yi, | yo, z yu, x yv, c )
( )
(_______________________________________________________)
This uses the mapping of Joan Touzet's Freeware Cherokee font v1.02
font: http://www.atypical.net//Cherokee.html
keymap: http://www.atypical.net//CherTabl.html
$$ #
$$ #
$$ #
$$ #
$$ ##
__ __ #
\ / #
\/ #
/ #
@ ##
| | #
` ' #
#
#
##
__ #
| | #
| `' #
| #
_|_ ##
_ _ #
| | #
|__| #
| | #
| | ##
___ #
| #
|__ #
| | #
_| |_ ##
___ #
| #
|_ #
| \ #
_|_/ ##
| | #
^ #
#
#
##
___ #
| | #
| #
/| #
@/ |_ ##
__, #
/ ' #
| #
| #
\__/ ##
___ #
| #
| #
/| #
@/ |_ ##
_ #
/ \ #
|~| | #
| |_| #
\_/ ##
#
#
#
| #
/ ##
#
#
--- #
#
##
#
#
#
/\ #
\/ ##
#
| | | |#
| | | |#
| \ /#
\/ \/ ##
___ #
| #
| #
| #
_|__| ##
_____ #
| #
|/u #
| #
__|__ ##
____ #
`___ \ #
| | #
|--' #
_|_ ##
/\ #
_| @#
/ | #
| | #
\_| ##
_ #
/ \ | #
| \| #
| /| #
\_/ | ##
#
/\ #
| \ #
| \ #
@| _|_##
#
__ #
/ \ #
| #
(_|_/ ##
#
/| #
/_|_, #
| ' #
_|_ ##
__ #
/ ' #
\_ #
\ #
`__/ ##
____ #
| | #
| _ #
| \ #
\_/ ##
/\ #
\/ #
#
/\ #
\/ ##
/\ #
\/ #
#
| #
/ ##
___ #
| | | #
| / #
| / #
|/ ##
#
#
--- #
--- #
##
/\#
/\ `|#
/ | | |#
| |/ |#
\|__/ ##
/~~\ #
| #
~~ #
/\ #
\/ ##
_ #
/ \ #
|_| #
| | #
@/ @/ ##
_ #
<_> #
#
| #
_|_ ##
__ #
/ _'_ #
| #
| @ #
\__/ ##
__ #
/ \ #
_ |#
/\| |#
\/ \_/ ##
#
/\ #
| | #
| | | _#
\_\'_/##
____ #
| | #
| #
| #
_|_ ##
_ #
` | #
|-_| #
| #
_|_ ##
__ #
/ \ #
| |"#
| | #
\__/ ##
__ #
/ ' #
\_ #
/ _ #
\__, ##
_ #
() / '#
/~\ #
| | #
\_/ ##
_____ #
| \ #
|__/ #
| \ #
_| \_ ##
_ #
/\/ '#
/\ #
| | #
\/ ##
____ #
| \ #
|__/ #
| #
.|__ ##
_ #
/ ' #
| __ #
|' \ #
\__/ ##
__ #
/ ~~ #
| #
| ~ #
\__/ ##
__ #
/ | #
\_ #
\ #
|__/ ##
_ #
/\/ \ #
_| \ ' #
/| #
\/ ##
_ #
/ \ #
| |) #
| | #
\_/ ##
_ #
|\ /| #
| | | #
| | #
.| |_##
#
|--\ #
|_ #
| #
|--/ ##
__ #
\ / #
\/ #
_ / #
\/ ##
_ #
/ ` \ #
| _ |#
| | ' |#
\_\_/ ##
/\ #
\/\_ #
/ / \#
/\ | |#
\/ \_/##
___ #
| #
| #
. | #
\_/ ##
__, #
/ ' #
| #
| -+- #
\__| ##
_ #
/ | #
_ | #
`-| #
_|_ ##
_ #
| ' #
| #
| #
_|__| ##
___ _ #
| / #
|/\ #
| \ #
_|_ _\_##
__ #
| | #
|-< #
| | #
>|__' ##
_ _ #
/| ` \#
|/ |#
| |#
\___/ ##
_ #
/ \/\ #
/\' #
| | #
\/ ##
___ #
| #
| #
|/|' #
_| | ##
___ #
| \ #
|__/ #
| \ #
| \ ##
__ #
| \ #
| \ #
| / #
|__/ ##
__ #
` \ #
_ |#
| | |#
\_|_/ ##
____ #
| > #
|-< #
| \ #
_|__/ ##
___ #
| #
(>|__ #
| / #
|/ ##
___ #
| #
|_, #
| ' #
_|_ ##
_ _ _ #
| | | #
| | | #
\ \ / #
\/\/ ##
___ #
|_-_#
`\/\ #
| | #
\/ ##
__ #
/ \ #
|____| #
| | #
\__/ ##
___ #
| #
.|() #
()|' #
_|_ ##
___ #
| | | #
| #
| #
|_|_| ##
___ _ #
| | #
|---| #
| | #
\_/ ##
___ #
| #
| #
| . #
`__' ##
-|- #
| #
| #
| _ #
_| ##
__ #
` \ #
| #
|) / #
\_/ ##
___ __#
| |#
\ |#
\ / #
\/ ##
___ #
| #
(|_|_ #
| | #
`_' ##
___ #
|__ #
_/ \#
/ \ |#
\ / `_/##
__ #
/ ' #
| ,_ #
| ' | #
\__/ ##
__ #
/ \ #
__\___ #
\ #
\__/ ##
___ #
/ \ #
` | #
| #
\_/ ##
#
, |~,#
@| | #
| / #
\/ ##
__ #
/ ' #
| _ #
| | #
\_/|` ##
#
#
/| #
/_| #
_/ \_##
__ #
/ '~ #
| #
| _ #
\__| ##
____ #
| / #
/ #
/ #
/___| ##
_ #
/ ' #
/_ #
| | #
_| | ##
___ #
| #
_| #
/ | #
\_' ##
___ #
| #
/ \ #
/ |#
\/ ('/ ##
_ #
/ \ #
| | #
\ | #
@_/ ##
_____ #
| | |#
| #
| #
_|_ ##
#
#
#
#
Ä ##
#
#
#
#
Ö ##
#
#
#
#
Ü ##
#
#
#
#
ä ##
#
#
#
#
ö ##
#
#
#
#
ü ##
#
#
#
#
ß ##
@@ -0,0 +1,35 @@
name: Release the package
on:
workflow_dispatch:
inputs:
semver:
description: 'Release bump type'
required: true
type: choice
options:
- patch
- minor
- major
- prepatch
- preminor
- premajor
- prerelease
preid:
description: 'Prerelease identifier (e.g. rc), used by the pre* bump types'
required: false
type: string
permissions: {}
jobs:
release:
permissions:
id-token: write # required for npm provenance via OIDC
contents: write # required to push the release commit and the tag
uses: fastify/workflows/.github/workflows/reusable-release.yml@b0a2ab2d8259b6bd574b804cd6874bbd75c3577c
with:
semver: ${{ inputs.semver }}
preid: ${{ inputs.preid }}
dist-tag: ${{ startsWith(inputs.semver, 'pre') && 'three-next' || 'three' }}
make-latest: false
@@ -0,0 +1,223 @@
'use strict'
const {
MAX_SAFE_COMPONENT_LENGTH,
MAX_SAFE_BUILD_LENGTH,
MAX_LENGTH,
} = require('./constants')
const debug = require('./debug')
exports = module.exports = {}
// The actual regexps go on exports.re
const re = exports.re = []
const safeRe = exports.safeRe = []
const src = exports.src = []
const safeSrc = exports.safeSrc = []
const t = exports.t = {}
let R = 0
const LETTERDASHNUMBER = '[a-zA-Z0-9-]'
// Replace some greedy regex tokens to prevent regex dos issues. These regex are
// used internally via the safeRe object since all inputs in this library get
// normalized first to trim and collapse all extra whitespace. The original
// regexes are exported for userland consumption and lower level usage. A
// future breaking change could export the safer regex only with a note that
// all input should have extra whitespace removed.
const safeRegexReplacements = [
['\\s', 1],
['\\d', MAX_LENGTH],
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],
]
const makeSafeRegex = (value) => {
for (const [token, max] of safeRegexReplacements) {
value = value
.split(`${token}*`).join(`${token}{0,${max}}`)
.split(`${token}+`).join(`${token}{1,${max}}`)
}
return value
}
const createToken = (name, value, isGlobal) => {
const safe = makeSafeRegex(value)
const index = R++
debug(name, index, value)
t[name] = index
src[index] = value
safeSrc[index] = safe
re[index] = new RegExp(value, isGlobal ? 'g' : undefined)
safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)
}
// The following Regular Expressions can be used for tokenizing,
// validating, and parsing SemVer version strings.
// ## Numeric Identifier
// A single `0`, or a non-zero digit followed by zero or more digits.
createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*')
createToken('NUMERICIDENTIFIERLOOSE', '\\d+')
// ## Non-numeric Identifier
// Zero or more digits, followed by a letter or hyphen, and then zero or
// more letters, digits, or hyphens.
createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)
// ## Main Version
// Three dot-separated numeric identifiers.
createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` +
`(${src[t.NUMERICIDENTIFIER]})\\.` +
`(${src[t.NUMERICIDENTIFIER]})`)
createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
`(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
`(${src[t.NUMERICIDENTIFIERLOOSE]})`)
// ## Pre-release Version Identifier
// A numeric identifier, or a non-numeric identifier.
// Non-numeric identifiers include numeric identifiers but can be longer.
// Therefore non-numeric identifiers must go first.
createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER]
}|${src[t.NUMERICIDENTIFIER]})`)
createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NONNUMERICIDENTIFIER]
}|${src[t.NUMERICIDENTIFIERLOOSE]})`)
// ## Pre-release Version
// Hyphen, followed by one or more dot-separated pre-release version
// identifiers.
createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]
}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`)
createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]
}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)
// ## Build Metadata Identifier
// Any combination of digits, letters, or hyphens.
createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)
// ## Build Metadata
// Plus sign, followed by one or more period-separated build metadata
// identifiers.
createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER]
}(?:\\.${src[t.BUILDIDENTIFIER]})*))`)
// ## Full Version String
// A main version, followed optionally by a pre-release version and
// build metadata.
// Note that the only major, minor, patch, and pre-release sections of
// the version string are capturing groups. The build metadata is not a
// capturing group, because it should not ever be used in version
// comparison.
createToken('FULLPLAIN', `v?${src[t.MAINVERSION]
}${src[t.PRERELEASE]}?${
src[t.BUILD]}?`)
createToken('FULL', `^${src[t.FULLPLAIN]}$`)
// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
// common in the npm registry.
createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE]
}${src[t.PRERELEASELOOSE]}?${
src[t.BUILD]}?`)
createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)
createToken('GTLT', '((?:<|>)?=?)')
// Something like "2.*" or "1.2.x".
// Note that "x.x" is a valid xRange identifer, meaning "any version"
// Only the first item is strictly required.
createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`)
createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`)
createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` +
`(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
`(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
`(?:${src[t.PRERELEASE]})?${
src[t.BUILD]}?` +
`)?)?`)
createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +
`(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
`(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
`(?:${src[t.PRERELEASELOOSE]})?${
src[t.BUILD]}?` +
`)?)?`)
createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`)
createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`)
// Coercion.
// Extract anything that could conceivably be a part of a valid semver
createToken('COERCEPLAIN', `${'(^|[^\\d])' +
'(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)
createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`)
createToken('COERCEFULL', src[t.COERCEPLAIN] +
`(?:${src[t.PRERELEASE]})?` +
`(?:${src[t.BUILD]})?` +
`(?:$|[^\\d])`)
createToken('COERCERTL', src[t.COERCE], true)
createToken('COERCERTLFULL', src[t.COERCEFULL], true)
// Tilde ranges.
// Meaning is "reasonably at or greater than"
createToken('LONETILDE', '(?:~>?)')
createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true)
exports.tildeTrimReplace = '$1~'
createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)
createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)
// Caret ranges.
// Meaning is "at least and backwards compatible with"
createToken('LONECARET', '(?:\\^)')
createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true)
exports.caretTrimReplace = '$1^'
createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)
createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)
// A simple gt/lt/eq thing, or just "" to indicate "any version"
createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`)
createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`)
// An expression to strip any whitespace between the gtlt and the thing
// it modifies, so that `> 1.2.3` ==> `>1.2.3`
createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT]
}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)
exports.comparatorTrimReplace = '$1$2$3'
// Something like `1.2.3 - 1.2.4`
// Note that these all use the loose form, because they'll be
// checked against either the strict or loose comparator form
// later.
createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` +
`\\s+-\\s+` +
`(${src[t.XRANGEPLAIN]})` +
`\\s*$`)
createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` +
`\\s+-\\s+` +
`(${src[t.XRANGEPLAINLOOSE]})` +
`\\s*$`)
// Star ranges basically just allow anything at all.
createToken('STAR', '(<|>)?=?\\s*\\*')
// >=0.0.0 is like a star
createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$')
createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$')
@@ -0,0 +1 @@
{"version":3,"file":"presentation.js","sources":["../../../src/icons/presentation.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Presentation\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMiAzaDIwIiAvPgogIDxwYXRoIGQ9Ik0yMSAzdjExYTIgMiAwIDAgMS0yIDJINWEyIDIgMCAwIDEtMi0yVjMiIC8+CiAgPHBhdGggZD0ibTcgMjEgNS01IDUgNSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/presentation\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 Presentation = createLucideIcon('Presentation', [\n ['path', { d: 'M2 3h20', key: '91anmk' }],\n ['path', { d: 'M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3', key: '2k9sn8' }],\n ['path', { d: 'm7 21 5-5 5 5', key: 'bip4we' }],\n]);\n\nexport default Presentation;\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,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,CAA4C,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,CACzE,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 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_J"},C:{"1":"_kR","2":"_KP"},D:{"1":"_ZO","2":"_gJ","130":"_EC oB"},E:{"1":"_VI","2":"_ZC","130":"D"},F:{"1":"_uN","2":"_T","130":"_VB"},G:{"1":"_9B","2":"_r","130":"gD"},H:{"2":"1D"},I:{"1":"_YD","2":"_W","130":"6D"},J:{"2":"D","130":"A"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:1,C:"URL API",D:true};
@@ -0,0 +1 @@
{"version":3,"names":["_t","require","_t2","react","cloneNode","jsxExpressionContainer","variableDeclaration","variableDeclarator","referenceVisitor","ReferencedIdentifier","path","state","isJSXIdentifier","isCompatTag","node","name","parentPath","isJSXMemberExpression","scope","isFunction","isArrowFunctionExpression","parent","breakOnScopePaths","push","binding","getBinding","violation","constantViolations","mutableBinding","stop","bindings","PathHoister","constructor","scopes","attachAfter","isCompatibleScope","key","Object","keys","bindingIdentifierEquals","identifier","getCompatibleScopes","includes","getAttachmentPath","_getAttachmentPath","targetScope","isProgram","hasOwnBinding","kind","parentKey","bindingParentPath","getAttachmentParentForPath","violationPath","pop","hasOwnParamBindings","bodies","get","i","length","_blockHoist","getNextScopeAttachmentParent","Array","isArray","container","isStatement","constant","run","traverse","attachTo","getFunctionParent","uid","generateUidIdentifier","declarator","insertFn","attached","isVariableDeclarator","isJSXElement","children","replaceWith","exports","default"],"sources":["../../../src/path/lib/hoister.ts"],"sourcesContent":["// TODO: Remove this file in Babel 8\n\nimport { react } from \"@babel/types\";\nimport {\n cloneNode,\n jsxExpressionContainer,\n variableDeclaration,\n variableDeclarator,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type Scope from \"../../scope/index.ts\";\nimport type NodePath from \"../index.ts\";\nimport type Binding from \"../../scope/binding.ts\";\nimport type { Visitor } from \"../../types.ts\";\n\nconst referenceVisitor: Visitor<PathHoister> = {\n // This visitor looks for bindings to establish a topmost scope for hoisting.\n ReferencedIdentifier(path, state) {\n // Don't hoist regular JSX identifiers ('div', 'span', etc).\n // We do have to consider member expressions for hoisting (e.g. `this.component`)\n if (\n path.isJSXIdentifier() &&\n react.isCompatTag(path.node.name) &&\n !path.parentPath.isJSXMemberExpression()\n ) {\n return;\n }\n\n // If the identifier refers to `this`, we need to break on the closest non-arrow scope.\n if (path.node.name === \"this\") {\n let scope: Scope | undefined = path.scope;\n do {\n if (\n scope.path.isFunction() &&\n !scope.path.isArrowFunctionExpression()\n ) {\n break;\n }\n } while ((scope = scope.parent));\n if (scope) state.breakOnScopePaths.push(scope.path);\n }\n\n // direct references that we need to track to hoist this to the highest scope we can\n const binding = path.scope.getBinding(path.node.name);\n if (!binding) return;\n\n // we can handle reassignments only if they happen in the same scope as the declaration\n for (const violation of binding.constantViolations) {\n if (violation.scope !== binding.path.scope) {\n state.mutableBinding = true;\n path.stop();\n return;\n }\n }\n\n // this binding isn't accessible from the parent scope so we can safely ignore it\n // eg. it's in a closure etc\n if (binding !== state.scope.getBinding(path.node.name)) return;\n\n state.bindings[path.node.name] = binding;\n },\n};\n\nexport default class PathHoister<T extends t.Node = t.Node> {\n breakOnScopePaths: NodePath[];\n bindings: Record<string, Binding>;\n mutableBinding: boolean;\n private scopes: Scope[];\n scope: Scope;\n private path: NodePath<T>;\n private attachAfter: boolean;\n\n constructor(path: NodePath<T>, scope: Scope) {\n // Storage for scopes we can't hoist above.\n this.breakOnScopePaths = [];\n // Storage for bindings that may affect what path we can hoist to.\n this.bindings = {};\n // \"true\" if the current path contains a reference to a binding whose\n // value can change and thus can't be safely hoisted.\n this.mutableBinding = false;\n // Storage for eligible scopes.\n this.scopes = [];\n // Our original scope and path.\n this.scope = scope;\n this.path = path;\n // By default, we attach as far up as we can; but if we're trying\n // to avoid referencing a binding, we may have to go after.\n this.attachAfter = false;\n }\n\n // A scope is compatible if all required bindings are reachable.\n isCompatibleScope(scope: Scope) {\n for (const key of Object.keys(this.bindings)) {\n const binding = this.bindings[key];\n if (!scope.bindingIdentifierEquals(key, binding.identifier)) {\n return false;\n }\n }\n\n return true;\n }\n\n // Look through all scopes and push compatible ones.\n getCompatibleScopes() {\n let scope: Scope | undefined = this.path.scope;\n do {\n if (this.isCompatibleScope(scope)) {\n this.scopes.push(scope);\n } else {\n break;\n }\n\n // deopt: These scopes are set in the visitor on const violations\n if (thiLine truncated
@@ -0,0 +1 @@
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/v6/helpers.ts"],"names":[],"mappings":";;AAAA,gCAOC;AAKD,sCAEC;AAKD,0BASC;AASD,8CAIC;AAMD,kCAUC;AAzDD,SAAgB,UAAU,CAAC,CAAS;IAClC,OAAO,CAAC;SACL,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC;SACvB,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC5B,CAAC;AAED;;GAEG;AACH,SAAgB,aAAa,CAAC,CAAS;IACrC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,8BAA8B,CAAC,CAAC;AACxE,CAAC;AAED;;GAEG;AACH,SAAgB,OAAO,CAAC,CAAS,EAAE,SAAiB,CAAC;IACnD,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAE5B,OAAO,OAAO;SACX,GAAG,CACF,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACP,4BAA4B,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,MAAM,KAAK,aAAa,CAAC,CAAC,CAAC,SAAS,CACjG;SACA,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC;AAED,SAAS,uBAAuB,CAAC,KAAa;IAC5C,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,8BAA8B,CAAC,CAAC;AAC5E,CAAC;AAED;;GAEG;AACH,SAAgB,iBAAiB,CAAC,OAAe;IAC/C,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAElC,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACjE,CAAC;AAED;;;GAGG;AACH,SAAgB,WAAW,CAAC,aAAqB,EAAE,SAAiB,CAAC;IACnE,MAAM,MAAM,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAExC,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACzB,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;YACvB,OAAO,CAAC,CAAC;QACX,CAAC;QAED,OAAO,kCAAkC,CAAC,GAAG,MAAM,KAAK,uBAAuB,CAAC,CAAC,CAAC,SAAS,CAAC;IAC9F,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["export function escapeHtml(s: string): string {\n return s\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n .replace(/\"/g, '&quot;')\n .replace(/'/g, '&#39;');\n}\n\n/**\n * @returns {String} the string with all zeroes contained in a <span>\n */\nexport function spanAllZeroes(s: string): string {\n return escapeHtml(s).replace(/(0+)/g, '<span class=\"zero\">$1</span>');\n}\n\n/**\n * @returns {String} the string with each character contained in a <span>\n */\nexport function spanAll(s: string, offset: number = 0): string {\n const letters = s.split('');\n\n return letters\n .map(\n (n, i) =>\n `<span class=\"digit value-${escapeHtml(n)} position-${i + offset}\">${spanAllZeroes(n)}</span>`,\n )\n .join('');\n}\n\nfunction spanLeadingZeroesSimple(group: string): string {\n return escapeHtml(group).replace(/^(0+)/, '<span class=\"zero\">$1</span>');\n}\n\n/**\n * @returns {String} the string with leading zeroes contained in a <span>\n */\nexport function spanLeadingZeroes(address: string): string {\n const groups = address.split(':');\n\n return groups.map((g) => spanLeadingZeroesSimple(g)).join(':');\n}\n\n/**\n * Groups an address\n * @returns {String} a grouped address\n */\nexport function simpleGroup(addressString: string, offset: number = 0): string[] {\n const groups = addressString.split(':');\n\n return groups.map((g, i) => {\n if (/group-v4/.test(g)) {\n return g;\n }\n\n return `<span class=\"hover-group group-${i + offset}\">${spanLeadingZeroesSimple(g)}</span>`;\n });\n}\n"]}
@@ -0,0 +1,317 @@
"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.$ZodRealError = exports.$ZodError = void 0;
exports.flattenError = flattenError;
exports.formatError = formatError;
exports.treeifyError = treeifyError;
exports.toDotPath = toDotPath;
exports.prettifyError = prettifyError;
const core_js_1 = require("./core.cjs");
const util = __importStar(require("./util.cjs"));
/* Computing the message eagerly is expensive (pretty-printed JSON of all
* issues), so defer it until first read. The accessor functions and
* descriptors are shared across instances to keep error construction
* cheap; the computed message is cached on the internals object. The
* setter preserves plain assignment semantics for consumers that
* overwrite `message`. */
function _getMessage() {
const internals = this._zod;
internals.message ?? (internals.message = JSON.stringify(internals.def, util.jsonStringifyReplacer, 2));
return internals.message;
}
function _setMessage(value) {
this._zod.message = value;
}
const _messageDesc = {
get: _getMessage,
set: _setMessage,
enumerable: true,
configurable: true,
};
const _issuesDesc = { value: undefined, enumerable: false };
/* Prototypes that already carry the lazy `toString`. Seeded with the
* intrinsics so that `init` on a foreign object — it accepts any object —
* can never install an accessor onto a prototype we do not own. */
const _installedToString = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
const initializer = (inst, def) => {
inst.name = "$ZodError";
// `_zod` is already non-enumerable: $constructor's init defined it with this same descriptor
_issuesDesc.value = def;
Object.defineProperty(inst, "issues", _issuesDesc);
// Clear the shared slot; a retained `value` pins the last error's issues.
_issuesDesc.value = undefined;
Object.defineProperty(inst, "message", _messageDesc);
/* `toString` lives as a non-enumerable lazy getter on the shared
* prototype; on first access it caches a per-instance closure so
* detached usage still works. */
const proto = Object.getPrototypeOf(inst);
if (!_installedToString.has(proto)) {
_installedToString.add(proto);
Object.defineProperty(proto, "toString", {
configurable: true,
enumerable: false,
get() {
const value = () => this.message;
Object.defineProperty(this, "toString", { value, configurable: true, writable: true });
return value;
},
set(value) {
Object.defineProperty(this, "toString", { value, configurable: true, writable: true });
},
});
}
};
exports.$ZodError = (0, core_js_1.$constructor)("$ZodError", initializer);
exports.$ZodRealError = (0, core_js_1.$constructor)("$ZodError", initializer, undefined, {
Parent: Error,
});
/** Get-or-create `obj[key]` as an own data property. A path segment naming an inherited member
* ("toString", "constructor") would otherwise read through to the prototype, and assigning
* "__proto__" would hit the setter instead of creating a key. */
function node(obj, key, make) {
if (!Object.prototype.hasOwnProperty.call(obj, key)) {
if (key === "__proto__") {
Object.defineProperty(obj, key, { value: make(), writable: true, enumerable: true, configurable: true });
}
else {
obj[key] = make();
}
}
return obj[key];
}
function flattenError(error, mapper = (issue) => issue.message) {
const fieldErrors = {};
const formErrors = [];
for (const sub of error.issues) {
if (sub.path.length > 0) {
node(fieldErrors, sub.path[0], () => []).push(mapper(sub));
}
else {
formErrors.push(mapper(sub));
}
}
return { formErrors, fieldErrors };
}
function formatError(error, mapper = (issue) => issue.message) {
const fieldErrors = { _errors: [] };
const processError = (error, path = []) => {
for (const issue of error.issues) {
if (issue.code === "invalid_union" && issue.errors.length) {
issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));
}
else if (issue.code === "invalid_key") {
processError({ issues: issue.issues }, [...path, ...issue.path]);
}
else if (issue.code === "invalid_element") {
processError({ issues: issue.issues }, [...path, ...issue.path]);
}
else {
const fullpath = [...path, ...issue.path];
if (fullpath.length === 0) {
fieldErrors._errors.push(mapper(issue));
}
else {
let curr = fieldErrors;
let i = 0;
while (i < fullpath.length) {
const el = fullpath[i];
const terminal = i === fullpath.length - 1;
// `_errors` is reserved by this legacy format, so merge a matching path segment into the current node instead of treating its array as a child.
if (el === "_errors") {
if (terminal)
curr._errors.push(mapper(issue));
i++;
continue;
}
// A path element may collide with an inherited property name such as
// "__proto__" or "constructor". Truthiness checks read the prototype
// (so no node is created, then ._errors.push throws), and bracket
// assignment of "__proto__" hits the setter instead of creating an
// own key. Guard the read with hasOwnProperty and create the node
// with defineProperty so any path element becomes a real own key.
if (!Object.prototype.hasOwnProperty.call(curr, el)) {
Object.defineProperty(curr, el, {
value: { _errors: [] },
enumerable: true,
writable: true,
configurable: true,
});
}
const node = curr[el];
if (terminal) {
node._errors.push(mapper(issue));
}
curr = node;
i++;
}
}
}
}
};
processError(error);
return fieldErrors;
}
function treeifyError(error, mapper = (issue) => issue.message) {
const result = { errors: [] };
const processError = (error, path = []) => {
var _a;
for (const issue of error.issues) {
if (issue.code === "invalid_union" && issue.errors.length) {
// regular union error
issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));
}
else if (issue.code === "invalid_key") {
processError({ issues: issue.issues }, [...path, ...issue.path]);
}
else if (issue.code === "invalid_element") {
processError({ issues: issue.issues }, [...path, ...issue.path]);
}
else {
const fullpath = [...path, ...issue.path];
if (fullpath.length === 0) {
result.errors.push(mapper(issue));
continue;
}
let curr = result;
let i = 0;
while (i < fullpath.length) {
const el = fullpath[i];
const terminal = i === fullpath.length - 1;
if (typeof el === "string") {
curr.properties ?? (curr.properties = {});
// el may collide with an inherited property name ("__proto__",
// "constructor", ...); ??= reads the prototype so the node is never
// created and curr.errors.push throws. Guard with hasOwnProperty and
// create the node with defineProperty so "__proto__" becomes a real
// own key rather than invoking the prototype setter.
if (!Object.prototype.hasOwnProperty.call(curr.properties, el)) {
Object.defineProperty(curr.properties, el, {
value: { errors: [] },
enumerable: true,
writable: true,
configurable: true,
});
}
curr = curr.properties[el];
}
else {
curr.items ?? (curr.items = []);
(_a = curr.items)[el] ?? (_a[el] = { errors: [] });
curr = curr.items[el];
}
if (terminal) {
curr.errors.push(mapper(issue));
}
i++;
}
}
}
};
processError(error);
return result;
}
/** Format a ZodError as a human-readable string in the following form.
*
* From
*
* ```ts
* ZodError {
* issues: [
* {
* expected: 'string',
* code: 'invalid_type',
* path: [ 'username' ],
* message: 'Invalid input: expected string'
* },
* {
* expected: 'number',
* code: 'invalid_type',
* path: [ 'favoriteNumbers', 1 ],
* message: 'Invalid input: expected number'
* }
* ];
* }
* ```
*
* to
*
* ```
* username
* ✖ Expected number, received string at "username
* favoriteNumbers[0]
* ✖ Invalid input: expected number
* ```
*/
function toDotPath(_path) {
const segs = [];
const path = _path.map((seg) => (typeof seg === "object" ? seg.key : seg));
for (const seg of path) {
if (typeof seg === "number")
segs.push(`[${seg}]`);
else if (typeof seg === "symbol")
segs.push(`[${JSON.stringify(String(seg))}]`);
else if (/[^\w$]/.test(seg))
segs.push(`[${JSON.stringify(seg)}]`);
else {
if (segs.length)
segs.push(".");
segs.push(seg);
}
}
return segs.join("");
}
function prettifyError(error) {
const lines = [];
// sort by path length
const issues = [...error.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
// Process each issue
for (const issue of issues) {
lines.push(`✖ ${issue.message}`);
if (issue.path?.length)
lines.push(` → at ${toDotPath(issue.path)}`);
}
// Convert Map to formatted string
return lines.join("\n");
}
// seal-cjs-exports
(function () {
var keys = Object.getOwnPropertyNames(exports);
for (var i = 0; i < keys.length; i++) {
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
if (!desc || !desc.get || !desc.configurable) continue;
var value;
try {
value = desc.get();
} catch (e) {
continue;
}
// a circular require may not have settled this one yet, so leave it live
if (value === undefined) continue;
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
}
Object.freeze(exports);
})();
@@ -0,0 +1,3 @@
# esbuild
This is the Linux 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details.
@@ -0,0 +1,6 @@
function eachAxis(callback) {
return [callback("x"), callback("y")];
}
export { eachAxis };
//# sourceMappingURL=each-axis.mjs.map
@@ -0,0 +1,143 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.isAsync = exports.isValid = exports.isDirty = exports.isAborted = exports.OK = exports.DIRTY = exports.INVALID = exports.ParseStatus = exports.EMPTY_PATH = exports.makeIssue = void 0;
exports.addIssueToContext = addIssueToContext;
const errors_js_1 = require("../errors.cjs");
const en_js_1 = __importDefault(require("../locales/en.cjs"));
const makeIssue = (params) => {
const { data, path, errorMaps, issueData } = params;
const fullPath = [...path, ...(issueData.path || [])];
const fullIssue = {
...issueData,
path: fullPath,
};
if (issueData.message !== undefined) {
return {
...issueData,
path: fullPath,
message: issueData.message,
};
}
let errorMessage = "";
const maps = errorMaps
.filter((m) => !!m)
.slice()
.reverse();
for (const map of maps) {
errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;
}
return {
...issueData,
path: fullPath,
message: errorMessage,
};
};
exports.makeIssue = makeIssue;
exports.EMPTY_PATH = [];
function addIssueToContext(ctx, issueData) {
const overrideMap = (0, errors_js_1.getErrorMap)();
const issue = (0, exports.makeIssue)({
issueData: issueData,
data: ctx.data,
path: ctx.path,
errorMaps: [
ctx.common.contextualErrorMap, // contextual error map is first priority
ctx.schemaErrorMap, // then schema-bound map if available
overrideMap, // then global override map
overrideMap === en_js_1.default ? undefined : en_js_1.default, // then global default map
].filter((x) => !!x),
});
ctx.common.issues.push(issue);
}
class ParseStatus {
constructor() {
this.value = "valid";
}
dirty() {
if (this.value === "valid")
this.value = "dirty";
}
abort() {
if (this.value !== "aborted")
this.value = "aborted";
}
static mergeArray(status, results) {
const arrayValue = [];
for (const s of results) {
if (s.status === "aborted")
return exports.INVALID;
if (s.status === "dirty")
status.dirty();
arrayValue.push(s.value);
}
return { status: status.value, value: arrayValue };
}
static async mergeObjectAsync(status, pairs) {
const syncPairs = [];
for (const pair of pairs) {
const key = await pair.key;
const value = await pair.value;
syncPairs.push({
key,
value,
});
}
return ParseStatus.mergeObjectSync(status, syncPairs);
}
static mergeObjectSync(status, pairs) {
const finalObject = {};
for (const pair of pairs) {
const { key, value } = pair;
if (key.status === "aborted")
return exports.INVALID;
if (value.status === "aborted")
return exports.INVALID;
if (key.status === "dirty")
status.dirty();
if (value.status === "dirty")
status.dirty();
if (key.value !== "__proto__" && (typeof value.value !== "undefined" || pair.alwaysSet)) {
finalObject[key.value] = value.value;
}
}
return { status: status.value, value: finalObject };
}
}
exports.ParseStatus = ParseStatus;
exports.INVALID = Object.freeze({
status: "aborted",
});
const DIRTY = (value) => ({ status: "dirty", value });
exports.DIRTY = DIRTY;
const OK = (value) => ({ status: "valid", value });
exports.OK = OK;
const isAborted = (x) => x.status === "aborted";
exports.isAborted = isAborted;
const isDirty = (x) => x.status === "dirty";
exports.isDirty = isDirty;
const isValid = (x) => x.status === "valid";
exports.isValid = isValid;
const isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
exports.isAsync = isAsync;
// seal-cjs-exports
(function () {
var keys = Object.getOwnPropertyNames(exports);
for (var i = 0; i < keys.length; i++) {
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
if (!desc || !desc.get || !desc.configurable) continue;
var value;
try {
value = desc.get();
} catch (e) {
continue;
}
// a circular require may not have settled this one yet, so leave it live
if (value === undefined) continue;
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
}
Object.freeze(exports);
})();
@@ -0,0 +1,28 @@
/**
* @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 FolderPen = createLucideIcon("FolderPen", [
[
"path",
{
d: "M2 11.5V5a2 2 0 0 1 2-2h3.9c.7 0 1.3.3 1.7.9l.8 1.2c.4.6 1 .9 1.7.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-9.5",
key: "a8xqs0"
}
],
[
"path",
{
d: "M11.378 13.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",
key: "1saktj"
}
]
]);
export { FolderPen as default };
//# sourceMappingURL=folder-pen.js.map
@@ -0,0 +1,373 @@
flf2a$ 1 1 11 -1 12 0
octal.flf by Karlton Wirsing based on
binary.flf (C) 1994 by Victor Parada (vparada@inf.utfsm.cl) 94/12/05
figlet 2.1 font, includes ISO Latin-1, excludes "-D" option chars.
Spaces are not shown as binary. If this is required, change "$@" below
to "20 @". Change to "@" to remove the hardspace between words.
Note that figlet always removes spaces when it moves words to a new line.
Try option "-m 0" to remove the space between letters (octets).
$@
041 @
042 @
043 @
044 @
045 @
046 @
047 @
050 @
051 @
052 @
053 @
054 @
055 @
056 @
057 @
060 @
061 @
062 @
063 @
064 @
065 @
066 @
067 @
070 @
071 @
072 @
073 @
074 @
075 @
076 @
077 @
100 @
101 @
102 @
103 @
104 @
105 @
106 @
107 @
110 @
111 @
112 @
113 @
114 @
115 @
116 @
117 @
120 @
121 @
122 @
123 @
124 @
125 @
126 @
127 @
130 @
131 @
132 @
133 @
134 @
135 @
136 @
137 @
140 @
141 @
142 @
143 @
144 @
145 @
146 @
147 @
150 @
151 @
152 @
153 @
154 @
155 @
156 @
157 @
160 @
161 @
162 @
163 @
164 @
165 @
166 @
167 @
170 @
171 @
172 @
173 @
174 @
175 @
176 @
@
@
@
@
@
@
@
127
177 @
128
200 @
129
201 @
130
202 @
131
203 @
132
204 @
133
205 @
134
206 @
135
207 @
136
210 @
137
211 @
138
212 @
139
213 @
140
214 @
141
215 @
142
216 @
143
217 @
144
220 @
145
221 @
146
222 @
147
223 @
148
224 @
149
225 @
150
226 @
151
227 @
152
230 @
153
231 @
154
232 @
155
233 @
156
234 @
157
235 @
158
236 @
159
237 @
160
240 @
161
241 @
162
242 @
163
243 @
164
244 @
165
245 @
166
246 @
167
247 @
168
250 @
169
251 @
170
252 @
171
253 @
172
254 @
173
255 @
174
256 @
175
257 @
176
260 @
177
261 @
178
262 @
179
263 @
180
264 @
181
265 @
182
266 @
183
267 @
184
270 @
185
271 @
186
272 @
187
273 @
188
274 @
189
275 @
190
276 @
191
277 @
192
300 @
193
301 @
194
302 @
195
303 @
196
304 @
197
305 @
198
306 @
199
307 @
200
310 @
201
311 @
202
312 @
203
313 @
204
314 @
205
315 @
206
316 @
207
317 @
208
320 @
209
321 @
210
322 @
211
323 @
212
324 @
213
325 @
214
326 @
215
327 @
216
330 @
217
331 @
218
332 @
219
333 @
220
334 @
221
335 @
222
336 @
223
337 @
224
340 @
225
341 @
226
342 @
227
343 @
228
344 @
229
345 @
230
346 @
231
347 @
232
350 @
233
351 @
234
352 @
235
353 @
236
354 @
237
355 @
238
356 @
239
357 @
240
360 @
241
361 @
242
362 @
243
363 @
244
364 @
245
365 @
246
366 @
247
367 @
248
370 @
249
371 @
250
372 @
251
373 @
252
374 @
253
375 @
254
376 @
255
377 @
@@ -0,0 +1,28 @@
// Hand-maintained declaration for lib/migrate.js (sqlite3.migrate). The
// runner itself is JSDoc-documented in the implementation file.
import type { Database } from './native.js';
/**
* One migration: a name, and either a SQL script or a programmatic body.
*/
export interface Migration {
/** The migration's name (for errors and reporting). */
name: string;
/** The SQL script (or use `up`). */
sql?: string;
/** A programmatic body; receives the transaction connection. */
up?(tx: Database): unknown;
}
/**
* Runs every pending migration against the connection, in order, each in
* one transaction with `PRAGMA user_version` tracking the position.
* Idempotent.
*
* @since 9.1.0
*/
export declare function migrate(
db: Database,
migrations: string | Migration[],
): Promise<{ applied: string[]; from: number; to: number }>;
@@ -0,0 +1,168 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.testElement = testElement;
exports.getElements = getElements;
exports.getElementById = getElementById;
exports.getElementsByTagName = getElementsByTagName;
exports.getElementsByClassName = getElementsByClassName;
exports.getElementsByTagType = getElementsByTagType;
var domhandler_1 = require("domhandler");
var querying_js_1 = require("./querying.js");
/**
* A map of functions to check nodes against.
*/
var Checks = {
tag_name: function (name) {
if (typeof name === "function") {
return function (elem) { return (0, domhandler_1.isTag)(elem) && name(elem.name); };
}
else if (name === "*") {
return domhandler_1.isTag;
}
return function (elem) { return (0, domhandler_1.isTag)(elem) && elem.name === name; };
},
tag_type: function (type) {
if (typeof type === "function") {
return function (elem) { return type(elem.type); };
}
return function (elem) { return elem.type === type; };
},
tag_contains: function (data) {
if (typeof data === "function") {
return function (elem) { return (0, domhandler_1.isText)(elem) && data(elem.data); };
}
return function (elem) { return (0, domhandler_1.isText)(elem) && elem.data === data; };
},
};
/**
* Returns a function to check whether a node has an attribute with a particular
* value.
*
* @param attrib Attribute to check.
* @param value Attribute value to look for.
* @returns A function to check whether the a node has an attribute with a
* particular value.
*/
function getAttribCheck(attrib, value) {
if (typeof value === "function") {
return function (elem) { return (0, domhandler_1.isTag)(elem) && value(elem.attribs[attrib]); };
}
return function (elem) { return (0, domhandler_1.isTag)(elem) && elem.attribs[attrib] === value; };
}
/**
* Returns a function that returns `true` if either of the input functions
* returns `true` for a node.
*
* @param a First function to combine.
* @param b Second function to combine.
* @returns A function taking a node and returning `true` if either of the input
* functions returns `true` for the node.
*/
function combineFuncs(a, b) {
return function (elem) { return a(elem) || b(elem); };
}
/**
* Returns a function that executes all checks in `options` and returns `true`
* if any of them match a node.
*
* @param options An object describing nodes to look for.
* @returns A function that executes all checks in `options` and returns `true`
* if any of them match a node.
*/
function compileTest(options) {
var funcs = Object.keys(options).map(function (key) {
var value = options[key];
return Object.prototype.hasOwnProperty.call(Checks, key)
? Checks[key](value)
: getAttribCheck(key, value);
});
return funcs.length === 0 ? null : funcs.reduce(combineFuncs);
}
/**
* Checks whether a node matches the description in `options`.
*
* @category Legacy Query Functions
* @param options An object describing nodes to look for.
* @param node The element to test.
* @returns Whether the element matches the description in `options`.
*/
function testElement(options, node) {
var test = compileTest(options);
return test ? test(node) : true;
}
/**
* Returns all nodes that match `options`.
*
* @category Legacy Query Functions
* @param options An object describing nodes to look for.
* @param nodes Nodes to search through.
* @param recurse Also consider child nodes.
* @param limit Maximum number of nodes to return.
* @returns All nodes that match `options`.
*/
function getElements(options, nodes, recurse, limit) {
if (limit === void 0) { limit = Infinity; }
var test = compileTest(options);
return test ? (0, querying_js_1.filter)(test, nodes, recurse, limit) : [];
}
/**
* Returns the node with the supplied ID.
*
* @category Legacy Query Functions
* @param id The unique ID attribute value to look for.
* @param nodes Nodes to search through.
* @param recurse Also consider child nodes.
* @returns The node with the supplied ID.
*/
function getElementById(id, nodes, recurse) {
if (recurse === void 0) { recurse = true; }
if (!Array.isArray(nodes))
nodes = [nodes];
return (0, querying_js_1.findOne)(getAttribCheck("id", id), nodes, recurse);
}
/**
* Returns all nodes with the supplied `tagName`.
*
* @category Legacy Query Functions
* @param tagName Tag name to search for.
* @param nodes Nodes to search through.
* @param recurse Also consider child nodes.
* @param limit Maximum number of nodes to return.
* @returns All nodes with the supplied `tagName`.
*/
function getElementsByTagName(tagName, nodes, recurse, limit) {
if (recurse === void 0) { recurse = true; }
if (limit === void 0) { limit = Infinity; }
return (0, querying_js_1.filter)(Checks["tag_name"](tagName), nodes, recurse, limit);
}
/**
* Returns all nodes with the supplied `className`.
*
* @category Legacy Query Functions
* @param className Class name to search for.
* @param nodes Nodes to search through.
* @param recurse Also consider child nodes.
* @param limit Maximum number of nodes to return.
* @returns All nodes with the supplied `className`.
*/
function getElementsByClassName(className, nodes, recurse, limit) {
if (recurse === void 0) { recurse = true; }
if (limit === void 0) { limit = Infinity; }
return (0, querying_js_1.filter)(getAttribCheck("class", className), nodes, recurse, limit);
}
/**
* Returns all nodes with the supplied `type`.
*
* @category Legacy Query Functions
* @param type Element type to look for.
* @param nodes Nodes to search through.
* @param recurse Also consider child nodes.
* @param limit Maximum number of nodes to return.
* @returns All nodes with the supplied `type`.
*/
function getElementsByTagType(type, nodes, recurse, limit) {
if (recurse === void 0) { recurse = true; }
if (limit === void 0) { limit = Infinity; }
return (0, querying_js_1.filter)(Checks["tag_type"](type), nodes, recurse, limit);
}
//# sourceMappingURL=legacy.js.map
@@ -0,0 +1,16 @@
var inspect = require('../');
var test = require('tape');
test('circular', function (t) {
t.plan(2);
var obj = { a: 1, b: [3, 4] };
obj.c = obj;
t.equal(inspect(obj), '{ a: 1, b: [ 3, 4 ], c: [Circular] }');
var double = {};
double.a = [double];
double.b = {};
double.b.inner = double.b;
double.b.obj = double;
t.equal(inspect(double), '{ a: [ [Circular] ], b: { inner: [Circular], obj: [Circular] } }');
});
@@ -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 './tv-minimal.js';
//# sourceMappingURL=tv-2.js.map
@@ -0,0 +1,137 @@
export type BuiltInMergeStrategy = $typests.BuiltInMergeStrategy;
export type BuiltInValidationStrategy = $typests.BuiltInValidationStrategy;
export type CustomMergeStrategy = $typests.CustomMergeStrategy;
export type CustomValidationStrategy = $typests.CustomValidationStrategy;
export type ObjectDefinition = $typests.ObjectDefinition;
export type PropertyDefinition = $typests.PropertyDefinition;
export type PropertyDefinitionWithSchema = $typests.PropertyDefinitionWithSchema;
export type PropertyDefinitionWithStrategies = $typests.PropertyDefinitionWithStrategies;
/**
* @fileoverview Merge Strategy
*/
/**
* Container class for several different merge strategies.
*/
export class MergeStrategy {
/**
* Merges two keys by overwriting the first with the second.
* @template TValue1 The type of the value from the first object key.
* @template TValue2 The type of the value from the second object key.
* @param {TValue1} value1 The value from the first object key.
* @param {TValue2} value2 The value from the second object key.
* @returns {TValue2} The second value.
*/
static overwrite<TValue1, TValue2>(value1: TValue1, value2: TValue2): TValue2;
/**
* Merges two keys by replacing the first with the second only if the
* second is defined.
* @template TValue1 The type of the value from the first object key.
* @template TValue2 The type of the value from the second object key.
* @param {TValue1} value1 The value from the first object key.
* @param {TValue2} value2 The value from the second object key.
* @returns {TValue1 | TValue2} The second value if it is defined.
*/
static replace<TValue1, TValue2>(value1: TValue1, value2: TValue2): TValue1 | TValue2;
/**
* Merges two properties by assigning properties from the second to the first.
* @template {Record<string | number | symbol, unknown> | undefined} TValue1 The type of the value from the first object key.
* @template {Record<string | number | symbol, unknown>} TValue2 The type of the value from the second object key.
* @param {TValue1} value1 The value from the first object key.
* @param {TValue2} value2 The value from the second object key.
* @returns {Omit<TValue1, keyof TValue2> & TValue2} A new object containing properties from both value1 and
* value2.
*/
static assign<TValue1 extends Record<string | number | symbol, unknown> | undefined, TValue2 extends Record<string | number | symbol, unknown>>(value1: TValue1, value2: TValue2): Omit<TValue1, keyof TValue2> & TValue2;
}
/**
* Represents an object validation/merging schema.
*/
export class ObjectSchema {
/**
* Creates a new instance.
* @param {ObjectDefinition} definitions The schema definitions.
* @throws {Error} When the definitions are missing or invalid.
*/
constructor(definitions: ObjectDefinition);
/**
* Determines if a strategy has been registered for the given object key.
* @param {string} key The object key to find a strategy for.
* @returns {boolean} True if the key has a strategy registered, false if not.
*/
hasKey(key: string): boolean;
/**
* Merges objects together to create a new object comprised of the keys
* of the all objects. Keys are merged based on the each key's merge
* strategy.
* @param {...Object} objects The objects to merge.
* @returns {Object} A new object with a mix of all objects' keys.
* @throws {TypeError} If any object is invalid.
*/
merge(...objects: any[]): any;
/**
* Validates an object's keys based on the validate strategy for each key.
* @param {Object} object The object to validate.
* @returns {void}
* @throws {Error} When the object is invalid.
*/
validate(object: any): void;
#private;
}
/**
* @fileoverview Validation Strategy
*/
/**
* Container class for several different validation strategies.
*/
export class ValidationStrategy {
/**
* Validates that a value is an array.
* @param {unknown} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static array(value: unknown): void;
/**
* Validates that a value is a boolean.
* @param {unknown} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static boolean(value: unknown): void;
/**
* Validates that a value is a number.
* @param {unknown} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static number(value: unknown): void;
/**
* Validates that a value is an object.
* @param {unknown} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static object(value: unknown): void;
/**
* Validates that a value is an object or null.
* @param {unknown} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static "object?"(value: unknown): void;
/**
* Validates that a value is a string.
* @param {unknown} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static string(value: unknown): void;
/**
* Validates that a value is a non-empty string.
* @param {unknown} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static "string!"(value: unknown): void;
}
import type * as $typests from "./types.cts";
@@ -0,0 +1,30 @@
import { createParser } from "./index.js";
import { ParseError } from "./index.js";
class EventSourceParserStream extends TransformStream {
constructor({ onError, onRetry, onComment, maxBufferSize } = {}) {
let parser;
super({
start(controller) {
parser = createParser({
onEvent: (event) => {
controller.enqueue(event);
},
onError(error) {
typeof onError == "function" && onError(error), (onError === "terminate" || error.type === "max-buffer-size-exceeded") && controller.error(error);
},
onRetry,
onComment,
maxBufferSize
});
},
transform(chunk) {
parser.feed(chunk);
}
});
}
}
export {
EventSourceParserStream,
ParseError
};
//# sourceMappingURL=stream.js.map
@@ -0,0 +1,349 @@
<div align="center">
<h1>🏎 side car</h1>
<br/>
Alternative way to code splitting
<br/>
<a href="https://www.npmjs.com/package/use-sidecar">
<img src="https://img.shields.io/npm/v/use-sidecar.svg?style=flat-square" />
</a>
<a href="https://travis-ci.org/theKashey/use-sidecar">
<img src="https://img.shields.io/travis/theKashey/use-sidecar.svg?style=flat-square" alt="Build status">
</a>
<a href="https://www.npmjs.com/package/use-sidecar">
<img src="https://img.shields.io/npm/dm/use-sidecar.svg" alt="npm downloads">
</a>
<a href="https://bundlephobia.com/result?p=use-sidecar">
<img src="https://img.shields.io/bundlephobia/minzip/use-sidecar.svg" alt="bundle size">
</a>
<br/>
</div>
UI/Effects code splitting pattern
- [read the original article](https://dev.to/thekashey/sidecar-for-a-code-splitting-1o8g) to understand concepts behind.
- [read how Google](https://medium.com/@cramforce/designing-very-large-javascript-applications-6e013a3291a3) split view and logic.
- [watch how Facebook](https://developers.facebook.com/videos/2019/building-the-new-facebookcom-with-react-graphql-and-relay/) defers "interactivity" effects.
## Terminology:
- `sidecar` - non UI component, which may carry effects for a paired UI component.
- `UI` - UI component, which interactivity is moved to a `sidecar`.
`UI` is a _view_, `sidecar` is the _logic_ for it. Like Batman(UI) and his sidekick Robin(effects).
## Concept
- a `package` exposes __3 entry points__ using a [nested `package.json` format](https://github.com/theKashey/multiple-entry-points-example):
- default aka `combination`, and lets hope tree shaking will save you
- `UI`, with only UI part
- `sidecar`, with all the logic
- > `UI` + `sidecar` === `combination`. The size of `UI+sidecar` might a bit bigger than size of their `combination`.
Use [size-limit](https://github.com/ai/size-limit) to control their size independently.
- package uses a `medium` to talk with own sidecar, breaking explicit dependency.
- if package depends on another _sidecar_ package:
- it shall export dependency side car among own sidecar.
- package imports own sidecar via `medium`, thus able to export multiple sidecars via one export.
- final consumer uses `sidecar` or `useSidecar` to combine pieces together.
## Rules
- `UI` components might use/import any other `UI` components
- `sidecar` could use/import any other `sidecar`
That would form two different code branches, you may load separately - UI first, and effect sidecar later.
That also leads to a obvious consequence - __one sidecar may export all sidecars__.
- to decouple `sidecars` from module exports, and be able to pick "the right" one at any point
you have to use `exportSidecar(medium, component)` to export it, and use the same `medium` to import it back.
- this limitation is for __libraries only__, as long as in the usercode you might
dynamically import whatever and whenever you want.
- `useMedium` is always async - action would be executed in a next tick, or on the logic load.
- `sidecar` is always async - is does not matter have you loaded logic or not - component would be
rendered at least in the next tick.
> except `medium.read`, which synchronously read the data from a medium,
and `medium.assingSyncMedium` which changes `useMedium` to be sync.
## SSR and usage tracking
Sidecar pattern is clear:
- you dont need to use/render any `sidecars` on server.
- you dont have to load `sidecars` prior main render.
Thus - no usage tracking, and literally no SSR. It's just skipped.
# API
## createMedium()
- Type: Util. Creates shared effect medium for algebraic effect.
- Goal: To decouple modules from each other.
- Usage: `use` in UI side, and `assign` from side-car. All effects would be executed.
- Analog: WeakMap, React.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
```js
const medium = createMedium(defaultValue);
const cancelCb = medium.useMedium(someData);
// like
useEffect(() => medium.useMedium(someData), []);
medium.assignMedium(someDataProcessor)
// createSidecarMedium is a helper for createMedium to create a "sidecar" symbol
const effectCar = createSidecarMedium();
```
> ! For consistence `useMedium` is async - sidecar load status should not affect function behavior,
thus effect would be always executed at least in the "next tick". You may alter
this behavior by using `medium.assingSyncMedium`.
## exportSidecar(medium, component)
- Type: HOC
- Goal: store `component` inside `medium` and return external wrapper
- Solving: decoupling module exports to support exporting multiple sidecars via a single entry point.
- Usage: use to export a `sidecar`
- Analog: WeakMap
```js
import {effectCar} from './medium';
import {EffectComponent} from './Effect';
// !!! - to prevent Effect from being imported
// `effectCar` medium __have__ to be defined in another file
// const effectCar = createSidecarMedium();
export default exportSidecar(effectCar, EffectComponent);
```
## sidecar(importer)
- Type: HOC
- Goal: React.lazy analog for code splitting, but does not require `Suspense`, might provide error failback.
- Usage: like React.lazy to load a side-car component.
- Analog: React.Lazy
```js
import {sidecar} from "use-sidecar";
const Sidecar = sidecar(() => import('./sidecar'), <span>on fail</span>);
<>
<Sidecar />
<UI />
</>
```
### Importing `exportedSidecar`
Would require additional prop to be set - ```<Sidecar sideCar={effectCar} />```
## useSidecar(importer)
- Type: hook, loads a `sideCar` using provided `importer` which shall follow React.lazy API
- Goal: to load a side car without displaying any "spinners".
- Usage: load side car for a component
- Analog: none
```js
import {useSidecar} from 'use-sidecar';
const [Car, error] = useSidecar(() => import('./sideCar'));
return (
<>
{Car ? <Car {...props} /> : null}
<UIComponent {...props}>
</>
);
```
### Importing `exportedSideCar`
You have to specify __effect medium__ to read data from, as long as __export itself is empty__.
```js
import {useSidecar} from 'use-sidecar';
/* medium.js: */ export const effectCar = useMedium({});
/* sideCar.js: */export default exportSidecar(effectCar, EffectComponent);
const [Car, error] = useSidecar(() => import('./sideCar'), effectCar);
return (
<>
{Car ? <Car {...props} /> : null}
<UIComponent {...props}>
</>
);
```
## renderCar(Component)
- Type: HOC, moves renderProp component to a side channel
- Goal: Provide render prop support, ie defer component loading keeping tree untouched.
- Usage: Provide `defaults` and use them until sidecar is loaded letting you code split (non visual) render-prop component
- Analog: - Analog: code split library like [react-imported-library](https://github.com/theKashey/react-imported-library) or [@loadable/lib](https://www.smooth-code.com/open-source/loadable-components/docs/library-splitting/).
```js
import {renderCar, sidecar} from "use-sidecar";
const RenderCar = renderCar(
// will move side car to a side channel
sidecar(() => import('react-powerplug').then(imports => imports.Value)),
// default render props
[{value: 0}]
);
<RenderCar>
{({value}) => <span>{value}</span>}
</RenderCar>
```
## setConfig(config)
```js
setConfig({
onError, // sets default error handler
});
```
# Examples
## Deferred effect
Let's imagine - on element focus you have to do "something", for example focus anther element
#### Original code
```js
onFocus = event => {
if (event.currentTarget === event.target) {
document.querySelectorAll('button', event.currentTarget)
}
}
```
#### Sidecar code
3. Use medium (yes, .3)
```js
// we are calling medium with an original event as an argument
const onFocus = event => focusMedium.useMedium(event);
```
2. Define reaction
```js
// in a sidecar
// we are setting handler for the effect medium
// effect is complicated - we are skipping event "bubbling",
// and focusing some button inside a parent
focusMedium.assignMedium(event => {
if (event.currentTarget === event.target) {
document.querySelectorAll('button', event.currentTarget)
}
});
```
1. Create medium
Having these constrains - we have to clone `event`, as long as React would eventually reuse SyntheticEvent, thus not
preserve `target` and `currentTarget`.
```js
//
const focusMedium = createMedium(null, event => ({...event}));
```
Now medium side effect is ok to be async
__Example__: [Effect for react-focus-lock](https://github.com/theKashey/react-focus-lock/blob/8c69c644ecfeed2ec9dc0dc4b5b30e896a366738/src/Lock.js#L48) - 1kb UI, 4kb sidecar
### Medium callback
Like a library level code splitting
#### Original code
```js
import {x, y} from './utils';
useEffect(() => {
if (x()) {
y()
}
}, []);
```
#### Sidecar code
```js
// medium
const utilMedium = createMedium();
// utils
const x = () => { /* ... */};
const y = () => { /* ... */};
// medium will callback with exports exposed
utilMedium.assignMedium(cb => cb({
x, y
}));
// UI
// not importing x and y from the module system, but would be given via callback
useEffect(() => {
utilMedium.useMedium(({x,y}) => {
if (x()) {
y()
}
})
}, []);
```
- Hint: there is a easy way to type it
```js
const utilMedium = createMedium<(cb: typeof import('./utils')) => void>();
```
__Example__: [Callback API for react-focus-lock](https://github.com/theKashey/react-focus-lock/blob/8c69c644ecfeed2ec9dc0dc4b5b30e896a366738/src/MoveFocusInside.js#L12)
### Split effects
Lets take an example from a Google - Calendar app, with view and logic separated.
To be honest - it's not easy to extract logic from application like calendar - usually it's tight coupled.
#### Original code
```js
const CalendarUI = () => {
const [date, setDate] = useState();
const onButtonClick = useCallback(() => setDate(Date.now), []);
return (
<>
<input type="date" onChange={setDate} value={date} />
<input type="button" onClick={onButtonClick}>Set Today</button>
</>
)
}
```
#### Sidecar code
```js
const CalendarUI = () => {
const [events, setEvents] = useState({});
const [date, setDate] = useState();
return (
<>
<Sidecar setDate={setDate} setEvents={setEvents}/>
<UILayout {...events} date={date}/>
</>
)
}
const UILayout = ({onDateChange, onButtonClick, date}) => (
<>
<input type="date" onChange={onDateChange} value={date} />
<input type="button" onClick={onButtonClick}>Set Today</button>
</>
);
// in a sidecar
// we are providing callbacks back to UI
const Sidecar = ({setDate, setEvents}) => {
useEffect(() => setEvents({
onDateChange:setDate,
onButtonClick: () => setDate(Date.now),
}), []);
return null;
}
```
While in this example this looks a bit, you know, strange - there are 3 times more code
that in the original example - that would make a sense for a real Calendar, especially
if some helper library, like `moment`, has been used.
__Example__: [Effect for react-remove-scroll](https://github.com/theKashey/react-remove-scroll/blob/666472d5c77fb6c4e5beffdde87c53ae63ef42c5/src/SideEffect.tsx#L166) - 300b UI, 2kb sidecar
# Licence
MIT
@@ -0,0 +1,13 @@
//#region src/utils/concurrent.d.ts
/**
* @module
* Concurrent utility.
*/
export interface Pool {
run<T>(fn: () => T): Promise<T>;
}
export declare const createPool: ({ concurrency, interval }?: {
concurrency?: number;
interval?: number;
}) => Pool;
//#endregion
@@ -0,0 +1 @@
{"version":3,"file":"normalize-windows-path.js","sourceRoot":"","sources":["../../src/normalize-windows-path.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,gDAAgD;AAChD,sEAAsE;AACtE,qEAAqE;;;AAErE,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,OAAO,CAAC,QAAQ,CAAA;AAE7D,QAAA,oBAAoB,GAC/B,QAAQ,KAAK,OAAO,CAAC,CAAC;IACpB,CAAC,CAAU,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC,CAAU,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA","sourcesContent":["// on windows, either \\ or / are valid directory separators.\n// on unix, \\ is a valid character in filenames.\n// so, on windows, and only on windows, we replace all \\ chars with /,\n// so that we can use / as our one and only directory separator char.\n\nconst platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform\n\nexport const normalizeWindowsPath: (p: unknown) => string =\n platform !== 'win32' ?\n (p: unknown) => String(p)\n : (p: unknown) => String(p).replaceAll(/\\\\/g, '/')\n"]}
@@ -0,0 +1,148 @@
/**
* @fileoverview Rule to flag when a function has too many parameters
* @author Ilya Volodin
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
const { upperCaseFirst } = require("../shared/string-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
dialects: ["typescript", "javascript"],
language: "javascript",
docs: {
description:
"Enforce a maximum number of parameters in function definitions",
recommended: false,
url: "https://eslint.org/docs/latest/rules/max-params",
},
schema: [
{
oneOf: [
{
type: "integer",
minimum: 0,
},
{
type: "object",
properties: {
maximum: {
type: "integer",
minimum: 0,
},
max: {
type: "integer",
minimum: 0,
},
countVoidThis: {
type: "boolean",
description:
"Whether to count a `this` declaration when the type is `void`.",
},
countThis: {
enum: ["never", "except-void", "always"],
description:
"Whether to count a `this` declaration.",
},
},
additionalProperties: false,
not: { required: ["countVoidThis", "countThis"] },
},
],
},
],
messages: {
exceed: "{{name}} has too many parameters ({{count}}). Maximum allowed is {{max}}.",
},
},
create(context) {
const sourceCode = context.sourceCode;
const option = context.options[0];
let numParams = 3;
let countThis = "except-void";
if (typeof option === "object") {
if (
Object.hasOwn(option, "maximum") ||
Object.hasOwn(option, "max")
) {
numParams = option.maximum || option.max;
}
countThis = option.countThis;
if (!countThis && Object.hasOwn(option, "countVoidThis")) {
countThis = option.countVoidThis ? "always" : "except-void";
}
countThis ||= "except-void";
}
if (typeof option === "number") {
numParams = option;
}
/**
* Checks a function to see if it has too many parameters.
* @param {ASTNode} node The node to check.
* @returns {void}
* @private
*/
function checkFunction(node) {
const thisParam =
node.params.length > 0 &&
node.params[0].type === "Identifier" &&
node.params[0].name === "this"
? node.params[0]
: null;
let effectiveParamCount = node.params.length;
if (thisParam) {
if (countThis === "never") {
effectiveParamCount = node.params.length - 1;
} else if (
countThis === "except-void" &&
thisParam.typeAnnotation?.typeAnnotation.type ===
"TSVoidKeyword"
) {
effectiveParamCount = node.params.length - 1;
}
}
if (effectiveParamCount > numParams) {
context.report({
loc: astUtils.getFunctionHeadLoc(node, sourceCode),
node,
messageId: "exceed",
data: {
name: upperCaseFirst(
astUtils.getFunctionNameWithKind(node),
),
count: effectiveParamCount,
max: numParams,
},
});
}
}
return {
FunctionDeclaration: checkFunction,
ArrowFunctionExpression: checkFunction,
FunctionExpression: checkFunction,
TSDeclareFunction: checkFunction,
TSFunctionType: checkFunction,
};
},
};
@@ -0,0 +1,506 @@
'use strict';
var compileSchema = require('./compile')
, resolve = require('./compile/resolve')
, Cache = require('./cache')
, SchemaObject = require('./compile/schema_obj')
, stableStringify = require('fast-json-stable-stringify')
, formats = require('./compile/formats')
, rules = require('./compile/rules')
, $dataMetaSchema = require('./data')
, util = require('./compile/util');
module.exports = Ajv;
Ajv.prototype.validate = validate;
Ajv.prototype.compile = compile;
Ajv.prototype.addSchema = addSchema;
Ajv.prototype.addMetaSchema = addMetaSchema;
Ajv.prototype.validateSchema = validateSchema;
Ajv.prototype.getSchema = getSchema;
Ajv.prototype.removeSchema = removeSchema;
Ajv.prototype.addFormat = addFormat;
Ajv.prototype.errorsText = errorsText;
Ajv.prototype._addSchema = _addSchema;
Ajv.prototype._compile = _compile;
Ajv.prototype.compileAsync = require('./compile/async');
var customKeyword = require('./keyword');
Ajv.prototype.addKeyword = customKeyword.add;
Ajv.prototype.getKeyword = customKeyword.get;
Ajv.prototype.removeKeyword = customKeyword.remove;
Ajv.prototype.validateKeyword = customKeyword.validate;
var errorClasses = require('./compile/error_classes');
Ajv.ValidationError = errorClasses.Validation;
Ajv.MissingRefError = errorClasses.MissingRef;
Ajv.$dataMetaSchema = $dataMetaSchema;
var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema';
var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ];
var META_SUPPORT_DATA = ['/properties'];
/**
* Creates validator instance.
* Usage: `Ajv(opts)`
* @param {Object} opts optional options
* @return {Object} ajv instance
*/
function Ajv(opts) {
if (!(this instanceof Ajv)) return new Ajv(opts);
opts = this._opts = util.copy(opts) || {};
setLogger(this);
this._schemas = {};
this._refs = {};
this._fragments = {};
this._formats = formats(opts.format);
this._cache = opts.cache || new Cache;
this._loadingSchemas = {};
this._compilations = [];
this.RULES = rules();
this._getId = chooseGetId(opts);
opts.loopRequired = opts.loopRequired || Infinity;
if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;
if (opts.serialize === undefined) opts.serialize = stableStringify;
this._metaOpts = getMetaSchemaOptions(this);
if (opts.formats) addInitialFormats(this);
if (opts.keywords) addInitialKeywords(this);
addDefaultMetaSchema(this);
if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta);
if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}});
addInitialSchemas(this);
}
/**
* Validate data using schema
* Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize.
* @this Ajv
* @param {String|Object} schemaKeyRef key, ref or schema object
* @param {Any} data to be validated
* @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).
*/
function validate(schemaKeyRef, data) {
var v;
if (typeof schemaKeyRef == 'string') {
v = this.getSchema(schemaKeyRef);
if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"');
} else {
var schemaObj = this._addSchema(schemaKeyRef);
v = schemaObj.validate || this._compile(schemaObj);
}
var valid = v(data);
if (v.$async !== true) this.errors = v.errors;
return valid;
}
/**
* Create validating function for passed schema.
* @this Ajv
* @param {Object} schema schema object
* @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords.
* @return {Function} validating function
*/
function compile(schema, _meta) {
var schemaObj = this._addSchema(schema, undefined, _meta);
return schemaObj.validate || this._compile(schemaObj);
}
/**
* Adds schema to the instance.
* @this Ajv
* @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.
* @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
* @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead.
* @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.
* @return {Ajv} this for method chaining
*/
function addSchema(schema, key, _skipValidation, _meta) {
if (Array.isArray(schema)){
for (var i=0; i<schema.length; i++) this.addSchema(schema[i], undefined, _skipValidation, _meta);
return this;
}
var id = this._getId(schema);
if (id !== undefined && typeof id != 'string')
throw new Error('schema id must be string');
key = resolve.normalizeId(key || id);
checkUnique(this, key);
this._schemas[key] = this._addSchema(schema, _skipValidation, _meta, true);
return this;
}
/**
* Add schema that will be used to validate other schemas
* options in META_IGNORE_OPTIONS are alway set to false
* @this Ajv
* @param {Object} schema schema object
* @param {String} key optional schema key
* @param {Boolean} skipValidation true to skip schema validation, can be used to override validateSchema option for meta-schema
* @return {Ajv} this for method chaining
*/
function addMetaSchema(schema, key, skipValidation) {
this.addSchema(schema, key, skipValidation, true);
return this;
}
/**
* Validate schema
* @this Ajv
* @param {Object} schema schema to validate
* @param {Boolean} throwOrLogError pass true to throw (or log) an error if invalid
* @return {Boolean} true if schema is valid
*/
function validateSchema(schema, throwOrLogError) {
var $schema = schema.$schema;
if ($schema !== undefined && typeof $schema != 'string')
throw new Error('$schema must be a string');
$schema = $schema || this._opts.defaultMeta || defaultMeta(this);
if (!$schema) {
this.logger.warn('meta-schema not available');
this.errors = null;
return true;
}
var valid = this.validate($schema, schema);
if (!valid && throwOrLogError) {
var message = 'schema is invalid: ' + this.errorsText();
if (this._opts.validateSchema == 'log') this.logger.error(message);
else throw new Error(message);
}
return valid;
}
function defaultMeta(self) {
var meta = self._opts.meta;
self._opts.defaultMeta = typeof meta == 'object'
? self._getId(meta) || meta
: self.getSchema(META_SCHEMA_ID)
? META_SCHEMA_ID
: undefined;
return self._opts.defaultMeta;
}
/**
* Get compiled schema from the instance by `key` or `ref`.
* @this Ajv
* @param {String} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id).
* @return {Function} schema validating function (with property `schema`).
*/
function getSchema(keyRef) {
var schemaObj = _getSchemaObj(this, keyRef);
switch (typeof schemaObj) {
case 'object': return schemaObj.validate || this._compile(schemaObj);
case 'string': return this.getSchema(schemaObj);
case 'undefined': return _getSchemaFragment(this, keyRef);
}
}
function _getSchemaFragment(self, ref) {
var res = resolve.schema.call(self, { schema: {} }, ref);
if (res) {
var schema = res.schema
, root = res.root
, baseId = res.baseId;
var v = compileSchema.call(self, schema, root, undefined, baseId);
self._fragments[ref] = new SchemaObject({
ref: ref,
fragment: true,
schema: schema,
root: root,
baseId: baseId,
validate: v
});
return v;
}
}
function _getSchemaObj(self, keyRef) {
keyRef = resolve.normalizeId(keyRef);
return self._schemas[keyRef] || self._refs[keyRef] || self._fragments[keyRef];
}
/**
* Remove cached schema(s).
* If no parameter is passed all schemas but meta-schemas are removed.
* If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
* Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
* @this Ajv
* @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object
* @return {Ajv} this for method chaining
*/
function removeSchema(schemaKeyRef) {
if (schemaKeyRef instanceof RegExp) {
_removeAllSchemas(this, this._schemas, schemaKeyRef);
_removeAllSchemas(this, this._refs, schemaKeyRef);
return this;
}
switch (typeof schemaKeyRef) {
case 'undefined':
_removeAllSchemas(this, this._schemas);
_removeAllSchemas(this, this._refs);
this._cache.clear();
return this;
case 'string':
var schemaObj = _getSchemaObj(this, schemaKeyRef);
if (schemaObj) this._cache.del(schemaObj.cacheKey);
delete this._schemas[schemaKeyRef];
delete this._refs[schemaKeyRef];
return this;
case 'object':
var serialize = this._opts.serialize;
var cacheKey = serialize ? serialize(schemaKeyRef) : schemaKeyRef;
this._cache.del(cacheKey);
var id = this._getId(schemaKeyRef);
if (id) {
id = resolve.normalizeId(id);
delete this._schemas[id];
delete this._refs[id];
}
}
return this;
}
function _removeAllSchemas(self, schemas, regex) {
for (var keyRef in schemas) {
var schemaObj = schemas[keyRef];
if (!schemaObj.meta && (!regex || regex.test(keyRef))) {
self._cache.del(schemaObj.cacheKey);
delete schemas[keyRef];
}
}
}
/* @this Ajv */
function _addSchema(schema, skipValidation, meta, shouldAddSchema) {
if (typeof schema != 'object' && typeof schema != 'boolean')
throw new Error('schema should be object or boolean');
var serialize = this._opts.serialize;
var cacheKey = serialize ? serialize(schema) : schema;
var cached = this._cache.get(cacheKey);
if (cached) return cached;
shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false;
var id = resolve.normalizeId(this._getId(schema));
if (id && shouldAddSchema) checkUnique(this, id);
var willValidate = this._opts.validateSchema !== false && !skipValidation;
var recursiveMeta;
if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema.$schema)))
this.validateSchema(schema, true);
var localRefs = resolve.ids.call(this, schema);
var schemaObj = new SchemaObject({
id: id,
schema: schema,
localRefs: localRefs,
cacheKey: cacheKey,
meta: meta
});
if (id[0] != '#' && shouldAddSchema) this._refs[id] = schemaObj;
this._cache.put(cacheKey, schemaObj);
if (willValidate && recursiveMeta) this.validateSchema(schema, true);
return schemaObj;
}
/* @this Ajv */
function _compile(schemaObj, root) {
if (schemaObj.compiling) {
schemaObj.validate = callValidate;
callValidate.schema = schemaObj.schema;
callValidate.errors = null;
callValidate.root = root ? root : callValidate;
if (schemaObj.schema.$async === true)
callValidate.$async = true;
return callValidate;
}
schemaObj.compiling = true;
var currentOpts;
if (schemaObj.meta) {
currentOpts = this._opts;
this._opts = this._metaOpts;
}
var v;
try { v = compileSchema.call(this, schemaObj.schema, root, schemaObj.localRefs); }
catch(e) {
delete schemaObj.validate;
throw e;
}
finally {
schemaObj.compiling = false;
if (schemaObj.meta) this._opts = currentOpts;
}
schemaObj.validate = v;
schemaObj.refs = v.refs;
schemaObj.refVal = v.refVal;
schemaObj.root = v.root;
return v;
/* @this {*} - custom context, see passContext option */
function callValidate() {
/* jshint validthis: true */
var _validate = schemaObj.validate;
var result = _validate.apply(this, arguments);
callValidate.errors = _validate.errors;
return result;
}
}
function chooseGetId(opts) {
switch (opts.schemaId) {
case 'auto': return _get$IdOrId;
case 'id': return _getId;
default: return _get$Id;
}
}
/* @this Ajv */
function _getId(schema) {
if (schema.$id) this.logger.warn('schema $id ignored', schema.$id);
return schema.id;
}
/* @this Ajv */
function _get$Id(schema) {
if (schema.id) this.logger.warn('schema id ignored', schema.id);
return schema.$id;
}
function _get$IdOrId(schema) {
if (schema.$id && schema.id && schema.$id != schema.id)
throw new Error('schema $id is different from id');
return schema.$id || schema.id;
}
/**
* Convert array of error message objects to string
* @this Ajv
* @param {Array<Object>} errors optional array of validation errors, if not passed errors from the instance are used.
* @param {Object} options optional options with properties `separator` and `dataVar`.
* @return {String} human readable string with all errors descriptions
*/
function errorsText(errors, options) {
errors = errors || this.errors;
if (!errors) return 'No errors';
options = options || {};
var separator = options.separator === undefined ? ', ' : options.separator;
var dataVar = options.dataVar === undefined ? 'data' : options.dataVar;
var text = '';
for (var i=0; i<errors.length; i++) {
var e = errors[i];
if (e) text += dataVar + e.dataPath + ' ' + e.message + separator;
}
return text.slice(0, -separator.length);
}
/**
* Add custom format
* @this Ajv
* @param {String} name format name
* @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
* @return {Ajv} this for method chaining
*/
function addFormat(name, format) {
if (typeof format == 'string') format = new RegExp(format);
this._formats[name] = format;
return this;
}
function addDefaultMetaSchema(self) {
var $dataSchema;
if (self._opts.$data) {
$dataSchema = require('./refs/data.json');
self.addMetaSchema($dataSchema, $dataSchema.$id, true);
}
if (self._opts.meta === false) return;
var metaSchema = require('./refs/json-schema-draft-07.json');
if (self._opts.$data) metaSchema = $dataMetaSchema(metaSchema, META_SUPPORT_DATA);
self.addMetaSchema(metaSchema, META_SCHEMA_ID, true);
self._refs['http://json-schema.org/schema'] = META_SCHEMA_ID;
}
function addInitialSchemas(self) {
var optsSchemas = self._opts.schemas;
if (!optsSchemas) return;
if (Array.isArray(optsSchemas)) self.addSchema(optsSchemas);
else for (var key in optsSchemas) self.addSchema(optsSchemas[key], key);
}
function addInitialFormats(self) {
for (var name in self._opts.formats) {
var format = self._opts.formats[name];
self.addFormat(name, format);
}
}
function addInitialKeywords(self) {
for (var name in self._opts.keywords) {
var keyword = self._opts.keywords[name];
self.addKeyword(name, keyword);
}
}
function checkUnique(self, id) {
if (self._schemas[id] || self._refs[id])
throw new Error('schema with key or id "' + id + '" already exists');
}
function getMetaSchemaOptions(self) {
var metaOpts = util.copy(self._opts);
for (var i=0; i<META_IGNORE_OPTIONS.length; i++)
delete metaOpts[META_IGNORE_OPTIONS[i]];
return metaOpts;
}
function setLogger(self) {
var logger = self._opts.logger;
if (logger === false) {
self.logger = {log: noop, warn: noop, error: noop};
} else {
if (logger === undefined) logger = console;
if (!(typeof logger == 'object' && logger.log && logger.warn && logger.error))
throw new Error('logger must implement log, warn and error methods');
self.logger = logger;
}
}
function noop() {}