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,11 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
// @ts-ignore `terser` may not be installed
export type * as Terser from 'terser'
// @ts-ignore `terser` may not be installed
import type * as Terser from 'terser'
/* eslint-enable @typescript-eslint/ban-ts-comment */
export type TerserMinifyOptions = Terser.MinifyOptions
export type TerserMinifyOutput = Terser.MinifyOutput
@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Clock5 = createLucideIcon("Clock5", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["polyline", { points: "12 6 12 12 14.5 16", key: "1pcbox" }]
]);
export { Clock5 as default };
//# sourceMappingURL=clock-5.js.map
@@ -0,0 +1 @@
{"version":3,"file":"image-plus.js","sources":["../../../src/icons/image-plus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ImagePlus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTYgNWg2IiAvPgogIDxwYXRoIGQ9Ik0xOSAydjYiIC8+CiAgPHBhdGggZD0iTTIxIDExLjVWMTlhMiAyIDAgMCAxLTIgMkg1YTIgMiAwIDAgMS0yLTJWNWEyIDIgMCAwIDEgMi0yaDcuNSIgLz4KICA8cGF0aCBkPSJtMjEgMTUtMy4wODYtMy4wODZhMiAyIDAgMCAwLTIuODI4IDBMNiAyMSIgLz4KICA8Y2lyY2xlIGN4PSI5IiBjeT0iOSIgcj0iMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/image-plus\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ImagePlus = createLucideIcon('ImagePlus', [\n ['path', { d: 'M16 5h6', key: '1vod17' }],\n ['path', { d: 'M19 2v6', key: '4bpg5p' }],\n ['path', { d: 'M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5', key: '1ue2ih' }],\n ['path', { d: 'm21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21', key: '1xmnt7' }],\n ['circle', { cx: '9', cy: '9', r: '2', key: 'af1f0g' }],\n]);\n\nexport default ImagePlus;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC9F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC1E,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AACxD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"train.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1 @@
{"version":3,"file":"egg-off.js","sources":["../../../src/icons/egg-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name EggOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNi4zOTkgNi4zOTlDNS4zNjIgOC4xNTcgNC42NSAxMC4xODkgNC41IDEyYy0uMzcgNC40MyAxLjI3IDkuOTUgNy41IDEwIDMuMjU2LS4wMjYgNS4yNTktMS41NDcgNi4zNzUtMy42MjUiIC8+CiAgPHBhdGggZD0iTTE5LjUzMiAxMy44NzVBMTQuMDcgMTQuMDcgMCAwIDAgMTkuNSAxMmMtLjM2LTQuMzQtMy45NS05Ljk2LTcuNS0xMC0xLjA0LjAxMi0yLjA4Mi41MDItMy4wNDYgMS4yOTciIC8+CiAgPGxpbmUgeDE9IjIiIHgyPSIyMiIgeTE9IjIiIHkyPSIyMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/egg-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 EggOff = createLucideIcon('EggOff', [\n [\n 'path',\n {\n d: 'M6.399 6.399C5.362 8.157 4.65 10.189 4.5 12c-.37 4.43 1.27 9.95 7.5 10 3.256-.026 5.259-1.547 6.375-3.625',\n key: '6et380',\n },\n ],\n [\n 'path',\n {\n d: 'M19.532 13.875A14.07 14.07 0 0 0 19.5 12c-.36-4.34-3.95-9.96-7.5-10-1.04.012-2.082.502-3.046 1.297',\n key: 'gcdc3f',\n },\n ],\n ['line', { x1: '2', x2: '22', y1: '2', y2: '22', key: 'a6p6uj' }],\n]);\n\nexport default EggOff;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CACxC,CAAA,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;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,CAAA;AAAA,CACA,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;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,CAAA;AAAA,CACA,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,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 './utensils.js';
//# sourceMappingURL=fork-knife.js.map
@@ -0,0 +1,87 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const path = require("path");
const DescriptionFileUtils = require("./DescriptionFileUtils");
/** @typedef {import("./Resolver")} Resolver */
/** @typedef {import("./Resolver").JsonObject} JsonObject */
/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */
/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */
/** @typedef {{ name: string | string[], forceRelative: boolean }} MainFieldOptions */
const alreadyTriedMainField = Symbol("alreadyTriedMainField");
module.exports = class MainFieldPlugin {
/**
* @param {string | ResolveStepHook} source source
* @param {MainFieldOptions} options options
* @param {string | ResolveStepHook} target target
*/
constructor(source, options, target) {
this.source = source;
this.options = options;
this.target = target;
}
/**
* @param {Resolver} resolver the resolver
* @returns {void}
*/
apply(resolver) {
const target = resolver.ensureHook(this.target);
resolver
.getHook(this.source)
.tapAsync("MainFieldPlugin", (request, resolveContext, callback) => {
if (
request.path !== request.descriptionFileRoot ||
/** @type {ResolveRequest & { [alreadyTriedMainField]?: string }} */
(request)[alreadyTriedMainField] === request.descriptionFilePath ||
!request.descriptionFilePath
) {
return callback();
}
const filename = path.basename(request.descriptionFilePath);
let mainModule =
/** @type {string | null | undefined} */
(
DescriptionFileUtils.getField(
/** @type {JsonObject} */ (request.descriptionFileData),
this.options.name,
)
);
if (
!mainModule ||
typeof mainModule !== "string" ||
mainModule === "." ||
mainModule === "./"
) {
return callback();
}
if (this.options.forceRelative && !/^\.\.?\//.test(mainModule)) {
mainModule = `./${mainModule}`;
}
/** @type {ResolveRequest & { [alreadyTriedMainField]?: string }} */
const obj = {
...request,
request: mainModule,
module: false,
directory: mainModule.endsWith("/"),
[alreadyTriedMainField]: request.descriptionFilePath,
};
return resolver.doResolve(
target,
obj,
`use ${mainModule} from ${this.options.name} in ${filename}`,
resolveContext,
callback,
);
});
}
};
@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Axe = createLucideIcon("Axe", [
["path", { d: "m14 12-8.5 8.5a2.12 2.12 0 1 1-3-3L11 9", key: "csbz4o" }],
["path", { d: "M15 13 9 7l4-4 6 6h3a8 8 0 0 1-7 7z", key: "113wfo" }]
]);
export { Axe as default };
//# sourceMappingURL=axe.js.map
@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Clock3 = createLucideIcon("Clock3", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["polyline", { points: "12 6 12 12 16.5 12", key: "1aq6pp" }]
]);
export { Clock3 as default };
//# sourceMappingURL=clock-3.js.map
@@ -0,0 +1 @@
{"version":3,"file":"parallelToolCallsClient.js","sourceRoot":"","sources":["../../../../src/examples/client/parallelToolCallsClient.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,935 @@
flf2a$ 9 8 13 16 16
Epic by Claude Martins 12/94
Figlet release 2.1 -- 12 Aug 1994
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
Explanation of first line:
flf2 - "magic number" for file identification
a - should always be `a', for now
$ - the "hardblank" -- prints as a blank, but can't be smushed
9 - height of a character
8 - height of a character, not including descenders
13 - max line length (excluding comment lines) + a fudge factor
16 - default smushmode for this font
16 - number of comment lines
$$@
$$@
$$@
$$@
$$@
$$@
$$@
$$@
$$@@
_ @
( )@
| |@
| |@
| |@
(_)@
_ @
(_)@
@@
_ _ @
( )( )@
\||/ @
@
@
@
@
@
@@
_ _ @
( ) ( ) @
_| |_| |_ @
(_ _ _)@
_| (_) |_ @
(_ _ _)@
| | | | @
(_) (_) @
@@
_ @
__|_|___@
( _____/@
| (|_|__ @
(_____ )@
/\_|_|) |@
\_______)@
|_| @
@@
@
/\@
() / /@
/ / @
/ / @
/ / @
/ / ()@
\/ @
@@
__ @
/__\ @
( \/ ) @
\ / @
/ \/\@
/ /\ /@
( \/ \@
\___/\/@
@@
_ @
( )@
|/ @
@
@
@
@
@
@@
_ @
/ )@
/ / @
( ( @
| | @
( ( @
\ \ @
\_)@
@@
_ @
( \ @
\ \ @
) )@
| |@
) )@
/ / @
(_/ @
@@
@
/\ /\ @
\ \ / / @
_) () (_ @
(_ _)@
) () ( @
/ / \ \ @
\/ \/ @
@@
_ @
( ) @
| | @
__| |__ @
(__ __)@
| | @
| | @
(_) @
@@
@
@
@
@
@
@
_ @
( )@
|/ @@
@
@
@
_____ @
(_____)@
@
@
@
@@
@
@
@
@
@
@
_ @
(_)@
@@
@
/\@
/ /@
/ / @
/ / @
/ / @
/ / @
\/ @
@@
_______ @
( __ )@
| ( ) |@
| | / |@
| (/ /) |@
| / | |@
| (__) |@
(_______)@
@@
__ @
/ \ @
\/) ) @
| | @
| | @
| | @
__) (_@
\____/@
@@
_______ @
/ ___ )@
\/ ) |@
/ )@
_/ / @
/ _/ @
( (__/\@
\_______/@
@@
______ @
/ ___ \ @
\/ \ \@
___) /@
(___ ( @
) \@
/\___/ /@
\______/ @
@@
___ @
/ ) @
/ /) | @
/ (_) (_ @
(____ _)@
) ( @
| | @
(_) @
@@
_______ @
( ____ \@
| ( \/@
| (____ @
(_____ \ @
) )@
/\____) )@
\______/ @
@@
______ @
/ ____ \@
( ( \/@
| (____ @
| ___ \ @
| ( ) )@
( (___) )@
\_____/ @
@@
______ @
/ ___ \ @
\/ ) )@
/ / @
/ / @
/ / @
/ / @
\_/ @
@@
_____ @
/ ___ \ @
( (___) )@
\ / @
/ ___ \ @
( ( ) )@
( (___) )@
\_____/ @
@@
_____ @
/ ___ \ @
( ( ) )@
( (___) |@
\____ |@
) |@
/\____) )@
\______/ @
@@
@
@
_ @
(_)@
@
_ @
(_)@
@
@@
@
@
@
_ @
(_)@
@
_ @
( )@
|/ @@
_ @
/ )@
/ / @
/ / @
( ( @
\ \ @
\ \ @
\_)@
@@
@
@
___ @
(___)@
___ @
(___)@
@
@
@@
_ @
( \ @
\ \ @
\ \ @
) )@
/ / @
/ / @
(_/ @
@@
_____ @
/ ___ \ @
( ( ) )@
\/ / / @
( ( @
| | @
(_) @
_ @
(_) @@
_____ @
/ ___ \ @
/ / _ \ \ @
( ( / \ ) )@
| |(()// / @
( ( \___/ @
\ \____/\ @
\______/ @
@@
_______ @
( ___ )@
| ( ) |@
| (___) |@
| ___ |@
| ( ) |@
| ) ( |@
|/ \|@
@@
______ @
( ___ \ @
| ( ) )@
| (__/ / @
| __ ( @
| ( \ \ @
| )___) )@
|/ \___/ @
@@
_______ @
( ____ \@
| ( \/@
| | @
| | @
| | @
| (____/\@
(_______/@
@@
______ @
( __ \ @
| ( \ )@
| | ) |@
| | | |@
| | ) |@
| (__/ )@
(______/ @
@@
_______ @
( ____ \@
| ( \/@
| (__ @
| __) @
| ( @
| (____/\@
(_______/@
@@
_______ @
( ____ \@
| ( \/@
| (__ @
| __) @
| ( @
| ) @
|/ @
@@
_______ @
( ____ \@
| ( \/@
| | @
| | ____ @
| | \_ )@
| (___) |@
(_______)@
@@
@
|\ /|@
| ) ( |@
| (___) |@
| ___ |@
| ( ) |@
| ) ( |@
|/ \|@
@@
_________@
\__ __/@
) ( @
| | @
| | @
| | @
___) (___@
\_______/@
@@
_________@
\__ _/@
) ( @
| | @
| | @
| | @
|\_) ) @
(____/ @
@@
_ @
| \ /\@
| \ / /@
| (_/ / @
| _ ( @
| ( \ \ @
| / \ \@
|_/ \/@
@@
_ @
( \ @
| ( @
| | @
| | @
| | @
| (____/\@
(_______/@
@@
_______ @
( )@
| () () |@
| || || |@
| |(_)| |@
| | | |@
| ) ( |@
|/ \|@
@@
_ @
( ( /|@
| \ ( |@
| \ | |@
| (\ \) |@
| | \ |@
| ) \ |@
|/ )_)@
@@
_______ @
( ___ )@
| ( ) |@
| | | |@
| | | |@
| | | |@
| (___) |@
(_______)@
@@
_______ @
( ____ )@
| ( )|@
| (____)|@
| _____)@
| ( @
| ) @
|/ @
@@
_______ @
( ___ )@
| ( ) |@
| | | |@
| | | |@
| | /\| |@
| (_\ \ |@
(____\/_)@
@@
_______ @
( ____ )@
| ( )|@
| (____)|@
| __)@
| (\ ( @
| ) \ \__@
|/ \__/@
@@
_______ @
( ____ \@
| ( \/@
| (_____ @
(_____ )@
) |@
/\____) |@
\_______)@
@@
_________@
\__ __/@
) ( @
| | @
| | @
| | @
| | @
)_( @
@@
@
|\ /|@
| ) ( |@
| | | |@
| | | |@
| | | |@
| (___) |@
(_______)@
@@
@
|\ /|@
| ) ( |@
| | | |@
( ( ) )@
\ \_/ / @
\ / @
\_/ @
@@
@
|\ /|@
| ) ( |@
| | _ | |@
| |( )| |@
| || || |@
| () () |@
(_______)@
@@
@
|\ /|@
( \ / )@
\ (_) / @
) _ ( @
/ ( ) \ @
( / \ )@
|/ \|@
@@
@
|\ /|@
( \ / )@
\ (_) / @
\ / @
) ( @
| | @
\_/ @
@@
_______ @
/ ___ )@
\/ ) |@
/ )@
/ / @
/ / @
/ (_/\@
(_______/@
@@
____ @
( __)@
| ( @
| | @
| | @
| | @
| (__ @
(____)@
@@
@
/\ @
\ \ @
\ \ @
\ \ @
\ \ @
\ \@
\/@
@@
____ @
(__ )@
) |@
| |@
| |@
| |@
__) |@
(____)@
@@
/\ @
(/\)@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
_____ @
(_____)@@
_ @
( )@
\|@
@
@
@
@
@
@@
_______ @
( ___ )@
| ( ) |@
| (___) |@
| ___ |@
| ( ) |@
| ) ( |@
|/ \|@
@@
______ @
( ___ \ @
| ( ) )@
| (__/ / @
| __ ( @
| ( \ \ @
| )___) )@
|/ \___/ @
@@
_______ @
( ____ \@
| ( \/@
| | @
| | @
| | @
| (____/\@
(_______/@
@@
______ @
( __ \ @
| ( \ )@
| | ) |@
| | | |@
| | ) |@
| (__/ )@
(______/ @
@@
_______ @
( ____ \@
| ( \/@
| (__ @
| __) @
| ( @
| (____/\@
(_______/@
@@
_______ @
( ____ \@
| ( \/@
| (__ @
| __) @
| ( @
| ) @
|/ @
@@
_______ @
( ____ \@
| ( \/@
| | @
| | ____ @
| | \_ )@
| (___) |@
(_______)@
@@
@
|\ /|@
| ) ( |@
| (___) |@
| ___ |@
| ( ) |@
| ) ( |@
|/ \|@
@@
_________@
\__ __/@
) ( @
| | @
| | @
| | @
___) (___@
\_______/@
@@
_________@
\__ _/@
) ( @
| | @
| | @
| | @
|\_) ) @
(____/ @
@@
_ @
| \ /\@
| \ / /@
| (_/ / @
| _ ( @
| ( \ \ @
| / \ \@
|_/ \/@
@@
_ @
( \ @
| ( @
| | @
| | @
| | @
| (____/\@
(_______/@
@@
_______ @
( )@
| () () |@
| || || |@
| |(_)| |@
| | | |@
| ) ( |@
|/ \|@
@@
_ @
( ( /|@
| \ ( |@
| \ | |@
| (\ \) |@
| | \ |@
| ) \ |@
|/ )_)@
@@
_______ @
( ___ )@
| ( ) |@
| | | |@
| | | |@
| | | |@
| (___) |@
(_______)@
@@
_______ @
( ____ )@
| ( )|@
| (____)|@
| _____)@
| ( @
| ) @
|/ @
@@
_______ @
( ___ )@
| ( ) |@
| | | |@
| | | |@
| | /\| |@
| (_\ \ |@
(____\/_)@
@@
_______ @
( ____ )@
| ( )|@
| (____)|@
| __)@
| (\ ( @
| ) \ \__@
|/ \__/@
@@
_______ @
( ____ \@
| ( \/@
| (_____ @
(_____ )@
) |@
/\____) |@
\_______)@
@@
_________@
\__ __/@
) ( @
| | @
| | @
| | @
| | @
)_( @
@@
@
|\ /|@
| ) ( |@
| | | |@
| | | |@
| | | |@
| (___) |@
(_______)@
@@
@
|\ /|@
| ) ( |@
| | | |@
( ( ) )@
\ \_/ / @
\ / @
\_/ @
@@
@
|\ /|@
| ) ( |@
| | _ | |@
| |( )| |@
| || || |@
| () () |@
(_______)@
@@
@
|\ /|@
( \ / )@
\ (_) / @
) _ ( @
/ ( ) \ @
( / \ )@
|/ \|@
@@
@
|\ /|@
( \ / )@
\ (_) / @
\ / @
) ( @
| | @
\_/ @
@@
_______ @
/ ___ )@
\/ ) |@
/ )@
/ / @
/ / @
/ (_/\@
(_______/@
@@
__ @
( _)@
)( @
/ | @
\ | @
)(_ @
(__)@
@
@@
_ @
( )@
| |@
(_)@
_ @
( )@
| |@
(_)@
@@
__ @
(_ ) @
)( @
| \@
| /@
_)( @
(__) @
@
@@
_ @
/_\_/)@
(/ \_/ @
@
@
@
@
@
@@
__ __ @
(__) (__)@
_______ @
( ___ )@
| (___) |@
| ___ |@
| ) ( |@
|/ \|@
@@
__ __ @
(__) (__)@
_______ @
( ___ )@
| ( ) |@
| | | |@
| (___) |@
(_______)@
@@
__ __ @
(__) (__)@
@
|\ /|@
| ) ( |@
| | | |@
| (___) |@
(_______)@
@@
__ __ @
(__) (__)@
_______ @
( ___ )@
| (___) |@
| ___ |@
| ) ( |@
|/ \|@
@@
__ __ @
(__) (__)@
_______ @
( ___ )@
| ( ) |@
| | | |@
| (___) |@
(_______)@
@@
__ __ @
(__) (__)@
@
|\ /|@
| ) ( |@
| | | |@
| (___) |@
(_______)@
@@
______ @
( ___ \ @
| (___) )@
| ___ / @
| (___)\ @
| |\___/ @
| ) @
|/ @
@@
@@ -0,0 +1,25 @@
/**
* @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 SunSnow = createLucideIcon("SunSnow", [
["path", { d: "M10 21v-1", key: "1u8rkd" }],
["path", { d: "M10 4V3", key: "pkzwkn" }],
["path", { d: "M10 9a3 3 0 0 0 0 6", key: "gv75dk" }],
["path", { d: "m14 20 1.25-2.5L18 18", key: "1chtki" }],
["path", { d: "m14 4 1.25 2.5L18 6", key: "1b4wsy" }],
["path", { d: "m17 21-3-6 1.5-3H22", key: "o5qa3v" }],
["path", { d: "m17 3-3 6 1.5 3", key: "11697g" }],
["path", { d: "M2 12h1", key: "1uaihz" }],
["path", { d: "m20 10-1.5 2 1.5 2", key: "1swlpi" }],
["path", { d: "m3.64 18.36.7-.7", key: "105rm9" }],
["path", { d: "m4.34 6.34-.7-.7", key: "d3unjp" }]
]);
export { SunSnow as default };
//# sourceMappingURL=sun-snow.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"B","2":"_Z","164":"A"},B:{"1":"_J"},C:{"1":"_JQ _uB","2":"_2C","8":"_fC _aH","328":"_aC _mE"},D:{"1":"_RL","2":"_cL","8":"_1B _UO","584":"_nC"},E:{"1":"_YE","2":"_4C","8":"_iC _FE _zB _ID","1096":"aC"},F:{"1":"_SI","2":"_T","8":"_MD vB","584":"wB xB yB"},G:{"1":"_iP _TD","8":"_IF","6148":"qD"},H:{"2":"1D"},I:{"1":"I","8":"_G"},J:{"8":"_B"},K:{"1":"H","2":"A","8":"_bD"},L:{"1":"I"},M:{"1":"YC"},N:{"1":"B","36":"A"},O:{"1":"bC"},P:{"1":"_hB","2":"8D","8":"J"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"ME","328":"LE"}},B:2,C:"Pointer events",D:true};
@@ -0,0 +1,27 @@
class WithPromise {
constructor() {
this.updateFinished();
}
get finished() {
return this._finished;
}
updateFinished() {
this._finished = new Promise((resolve) => {
this.resolve = resolve;
});
}
notifyFinished() {
this.resolve();
}
/**
* Allows the animation to be awaited.
*
* @deprecated Use `finished` instead.
*/
then(onResolve, onReject) {
return this.finished.then(onResolve, onReject);
}
}
export { WithPromise };
//# sourceMappingURL=WithPromise.mjs.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_2D","2":"C"},C:{"1":"_kR","2":"_KP"},D:{"1":"_IS","2":"_xR"},E:{"1":"_QB","2":"_TB"},F:{"1":"_AN _vB","2":"_j _WF _O"},G:{"1":"_BB","2":"_OB"},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:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:6,C:"ES6 Generators",D:true};
@@ -0,0 +1,21 @@
require("./_virtual/_rolldown/runtime.cjs");
let _tanstack_router_core = require("@tanstack/router-core");
let _tanstack_react_store = require("@tanstack/react-store");
let _tanstack_router_core_isServer = require("@tanstack/router-core/isServer");
//#region src/routerStores.ts
var getStoreFactory = (opts) => {
if (_tanstack_router_core_isServer.isServer ?? opts.isServer) return {
createMutableStore: _tanstack_router_core.createNonReactiveMutableStore,
createReadonlyStore: _tanstack_router_core.createNonReactiveReadonlyStore,
batch: (fn) => fn()
};
return {
createMutableStore: _tanstack_react_store.createAtom,
createReadonlyStore: _tanstack_react_store.createAtom,
batch: _tanstack_react_store.batch
};
};
//#endregion
exports.getStoreFactory = getStoreFactory;
//# sourceMappingURL=routerStores.cjs.map
@@ -0,0 +1,43 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _tokenizer = require('../parser/tokenizer');
var _types = require('../parser/tokenizer/types');
var _JSXTransformer = require('../transformers/JSXTransformer');
var _getJSXPragmaInfo = require('./getJSXPragmaInfo'); var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
function getNonTypeIdentifiers(tokens, options) {
const jsxPragmaInfo = _getJSXPragmaInfo2.default.call(void 0, options);
const nonTypeIdentifiers = new Set();
for (let i = 0; i < tokens.tokens.length; i++) {
const token = tokens.tokens[i];
if (
token.type === _types.TokenType.name &&
!token.isType &&
(token.identifierRole === _tokenizer.IdentifierRole.Access ||
token.identifierRole === _tokenizer.IdentifierRole.ObjectShorthand ||
token.identifierRole === _tokenizer.IdentifierRole.ExportAccess) &&
!token.shadowsGlobal
) {
nonTypeIdentifiers.add(tokens.identifierNameForToken(token));
}
if (token.type === _types.TokenType.jsxTagStart) {
nonTypeIdentifiers.add(jsxPragmaInfo.base);
}
if (
token.type === _types.TokenType.jsxTagStart &&
i + 1 < tokens.tokens.length &&
tokens.tokens[i + 1].type === _types.TokenType.jsxTagEnd
) {
nonTypeIdentifiers.add(jsxPragmaInfo.base);
nonTypeIdentifiers.add(jsxPragmaInfo.fragmentBase);
}
if (token.type === _types.TokenType.jsxName && token.identifierRole === _tokenizer.IdentifierRole.Access) {
const identifierName = tokens.identifierNameForToken(token);
// Lower-case single-component tag names like "div" don't count.
if (!_JSXTransformer.startsWithLowerCase.call(void 0, identifierName) || tokens.tokens[i + 1].type === _types.TokenType.dot) {
nonTypeIdentifiers.add(tokens.identifierNameForToken(token));
}
}
}
return nonTypeIdentifiers;
} exports.getNonTypeIdentifiers = getNonTypeIdentifiers;
@@ -0,0 +1,423 @@
flf2a$ 4 3 11 0 14
Fourtops by Randall Ransom 4/94 <ransom@girtab.usc.edu>
Figlet release 2.0 -- August 5, 1993
Date: 9 Apr 1994
Explanation of first line:
flf2 - "magic number" for file identification
a - should always be `a', for now
$ - the "hardblank" -- prints as a blank, but can't be smushed
4 - height of a character
3 - height of a character, not including descenders
11 - max line length (excluding comment lines) + a fudge factor
0 - default smushmode for this font (like "-m 0" on command line)
14 - number of comment lines
$$@
$$@
$$@
$$@@
|@
|@
.@
$@@
||@
$$@
$$@
$$@@
. .$@
-|-|-@
-|-|-@
' '$@@
||@
(~@
_)@
||@@
. /@
$/$@
/ .@
$ $@@
$|@
(~@
(_@
$|@@
/@
$@
$@
$@@
/@
| @
| @
\@@
\ @
|@
|@
/ @@
\ /@
-X-@
/ \@
$ $@@
$.$@
-+-@
$'$@
$ $@@
$@
$@
$@
/@@
$ $@
---@
$ $@
$ $@@
$@
$@
.@
$@@
/@
/ @
/ @
@@
/~~\ @
| |@
\__/ @
@@
/| @
| @
_|_@
@@
/~\@
,/@
/__@
@@
/~\@
<@
\_/@
@@
/| @
/_|_@
| @
@@
|~~@
`~\@
__/@
@@
/~~@
Y~\@
\_/@
@@
~~/@
/ @
/ @
@@
(~)@
/~\@
\_/@
@@
/~\@
`-/@
/ @
@@
$@
.@
.@
$@@
$@
.@
$@
/@@
/@
/ @
\ @
\@@
$ $@
---@
---@
$ $@@
\ @
\@
/@
/ @@
/~\@
_/@
! @
@@
$/~~\$@
| (|_|@
$\__ $@
$ $@@
/\ @
/__\ @
/ \@
@@
|~~\@
|--<@
|__/@
@@
/~~@
| @
\__@
@@
|~~\ @
| |@
|__/ @
@@
|~~@
|--@
|__@
@@
|~~@
|--@
| @
@@
/~~\@
| __@
\__/@
@@
| |@
|--|@
| |@
@@
~|~@
| @
_|_@
@@
~~|~@
| @
\_| @
@@
| /@
|( @
| \@
@@
| @
| @
|__@
@@
|\ /|@
| \/ |@
| |@
@@
|\ |@
| \ |@
| \|@
@@
/~~\ @
| |@
\__/ @
@@
|~~\@
|__/@
| @
@@
/~~\ @
| |@
\__X @
@@
|~~\@
|__/@
| \@
@@
/~~\@
`--.@
\__/@
@@
~~|~~@
| @
| @
@@
| |@
| |@
\_/ @
@@
| |@
\ / @
\/ @
@@
| | |@
| | |@
\/ \/ @
@@
\ /@
X @
/ \@
@@
\ /@
\ / @
| @
@@
~~/@
/ @
/__@
@@
|~@
| @
| @
|_@@
\ @
\ @
\@
@@
~|@
|@
|@
_|@@
/\@
$$@
$$@
$$@@
$$@
$$@
__@
$$@@
\@
$@
$@
$@@
@
/~~|@
\__|@
@@
| @
|~~\@
|__/@
@@
@
/~~@
\__@
@@
|@
/~~|@
\__|@
@@
@
/~/@
\/_@
@@
/~\@
-|- @
| @
@@
@
/~~|@
\__|@
\__|@@
| @
|/~\ @
| |@
@@
'@
|@
|@
@@
'@
|@
|@
\__|@@
| @
|_/@
| \@
@@
|@
|@
|@
@@
@
|/~\ /~\ @
| | |@
@@
@
|/~\ @
| |@
@@
@
/~\@
\_/@
@@
@
|~~\@
|__/@
| @@
@
/~~| @
\__| @
|/@@
@
|/~\@
| @
@@
@
(~@
_)@
@@
| @
~|~@
| @
@@
@
| |@
\_/|@
@@
@
\ /@
\/ @
@@
@
\ /@
\/\/ @
@@
@
\/@
/\@
@@
@
\ /@
\/ @
_/ @@
@
~/@
/_@
@@
|~@
/ @
\ @
|_@@
|@
|@
|@
|@@
~| @
\@
/@
_| @@
@
_-_-@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@@ -0,0 +1,3 @@
import { getConnInfo } from "./conninfo.js";
import { handle } from "./handler.js";
export { getConnInfo, handle };
@@ -0,0 +1,638 @@
'use strict'
const { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require('./headers')
const { extractBody, cloneBody, mixinBody, streamRegistry, bodyUnusable } = require('./body')
const util = require('../../core/util')
const nodeUtil = require('node:util')
const { kEnumerableProperty } = util
const {
isValidReasonPhrase,
isCancelled,
isAborted,
isErrorLike,
environmentSettingsObject: relevantRealm
} = require('./util')
const {
redirectStatusSet,
nullBodyStatus
} = require('./constants')
const { webidl } = require('../webidl')
const { URLSerializer } = require('./data-url')
const { kConstruct } = require('../../core/symbols')
const assert = require('node:assert')
const { isomorphicEncode, serializeJavascriptValueToJSONString } = require('../infra')
const textEncoder = new TextEncoder('utf-8')
let getResponseHeaders, setResponseHeaders, getResponseState, setResponseState
// https://fetch.spec.whatwg.org/#response-class
class Response {
/** @type {Headers} */
#headers
#state
// Creates network error Response.
static error () {
// The static error() method steps are to return the result of creating a
// Response object, given a new network error, "immutable", and this’s
// relevant Realm.
const responseObject = fromInnerResponse(makeNetworkError(), 'immutable')
return responseObject
}
// https://fetch.spec.whatwg.org/#dom-response-json
static json (data, init = undefined) {
webidl.argumentLengthCheck(arguments, 1, 'Response.json')
init = webidl.converters.ResponseInit(init)
// 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data.
const bytes = textEncoder.encode(
serializeJavascriptValueToJSONString(data)
)
// 2. Let body be the result of extracting bytes.
const body = extractBody(bytes)
// 3. Let responseObject be the result of creating a Response object, given a new response,
// "response", and this’s relevant Realm.
const responseObject = fromInnerResponse(makeResponse({}), 'response')
// 4. Perform initialize a response given responseObject, init, and (body, "application/json").
initializeResponse(responseObject, init, { body: body[0], type: 'application/json' })
// 5. Return responseObject.
return responseObject
}
// Creates a redirect Response that redirects to url with status status.
static redirect (url, status = 302) {
webidl.argumentLengthCheck(arguments, 1, 'Response.redirect')
url = webidl.converters.USVString(url)
status = webidl.converters['unsigned short'](status)
// 1. Let parsedURL be the result of parsing url with current settings
// object’s API base URL.
// 2. If parsedURL is failure, then throw a TypeError.
// TODO: base-URL?
let parsedURL
try {
parsedURL = new URL(url, relevantRealm.settingsObject.baseUrl)
} catch (err) {
throw new TypeError(`Failed to parse URL from ${url}`, { cause: err })
}
// 3. If status is not a redirect status, then throw a RangeError.
if (!redirectStatusSet.has(status)) {
throw new RangeError(`Invalid status code ${status}`)
}
// 4. Let responseObject be the result of creating a Response object,
// given a new response, "immutable", and this’s relevant Realm.
const responseObject = fromInnerResponse(makeResponse({}), 'immutable')
// 5. Set responseObject’s response’s status to status.
responseObject.#state.status = status
// 6. Let value be parsedURL, serialized and isomorphic encoded.
const value = isomorphicEncode(URLSerializer(parsedURL))
// 7. Append `Location`/value to responseObject’s response’s header list.
responseObject.#state.headersList.append('location', value, true)
// 8. Return responseObject.
return responseObject
}
// https://fetch.spec.whatwg.org/#dom-response
constructor (body = null, init = undefined) {
webidl.util.markAsUncloneable(this)
if (body === kConstruct) {
return
}
if (body !== null) {
body = webidl.converters.BodyInit(body, 'Response', 'body')
}
init = webidl.converters.ResponseInit(init)
// 1. Set this’s response to a new response.
this.#state = makeResponse({})
// 2. Set this’s headers to a new Headers object with this’s relevant
// Realm, whose header list is this’s response’s header list and guard
// is "response".
this.#headers = new Headers(kConstruct)
setHeadersGuard(this.#headers, 'response')
setHeadersList(this.#headers, this.#state.headersList)
// 3. Let bodyWithType be null.
let bodyWithType = null
// 4. If body is non-null, then set bodyWithType to the result of extracting body.
if (body != null) {
const [extractedBody, type] = extractBody(body)
bodyWithType = { body: extractedBody, type }
}
// 5. Perform initialize a response given this, init, and bodyWithType.
initializeResponse(this, init, bodyWithType)
}
// Returns response’s type, e.g., "cors".
get type () {
webidl.brandCheck(this, webidl.is.Response)
// The type getter steps are to return this’s response’s type.
return this.#state.type
}
// Returns response’s URL, if it has one; otherwise the empty string.
get url () {
webidl.brandCheck(this, webidl.is.Response)
const urlList = this.#state.urlList
// The url getter steps are to return the empty string if this’s
// response’s URL is null; otherwise this’s response’s URL,
// serialized with exclude fragment set to true.
const url = urlList[urlList.length - 1] ?? null
if (url === null) {
return ''
}
return URLSerializer(url, true)
}
// Returns whether response was obtained through a redirect.
get redirected () {
webidl.brandCheck(this, webidl.is.Response)
// The redirected getter steps are to return true if this’s response’s URL
// list has more than one item; otherwise false.
return this.#state.urlList.length > 1
}
// Returns response’s status.
get status () {
webidl.brandCheck(this, webidl.is.Response)
// The status getter steps are to return this’s response’s status.
return this.#state.status
}
// Returns whether response’s status is an ok status.
get ok () {
webidl.brandCheck(this, webidl.is.Response)
// The ok getter steps are to return true if this’s response’s status is an
// ok status; otherwise false.
return this.#state.status >= 200 && this.#state.status <= 299
}
// Returns response’s status message.
get statusText () {
webidl.brandCheck(this, webidl.is.Response)
// The statusText getter steps are to return this’s response’s status
// message.
return this.#state.statusText
}
// Returns response’s headers as Headers.
get headers () {
webidl.brandCheck(this, webidl.is.Response)
// The headers getter steps are to return this’s headers.
return this.#headers
}
get body () {
webidl.brandCheck(this, webidl.is.Response)
return this.#state.body ? this.#state.body.stream : null
}
get bodyUsed () {
webidl.brandCheck(this, webidl.is.Response)
return !!this.#state.body && util.isDisturbed(this.#state.body.stream)
}
// Returns a clone of response.
clone () {
webidl.brandCheck(this, webidl.is.Response)
// 1. If this is unusable, then throw a TypeError.
if (bodyUnusable(this.#state)) {
throw webidl.errors.exception({
header: 'Response.clone',
message: 'Body has already been consumed.'
})
}
// 2. Let clonedResponse be the result of cloning this’s response.
const clonedResponse = cloneResponse(this.#state)
// Note: To re-register because of a new stream.
// Don't set finalizers other than for fetch responses.
if (this.#state.urlList.length !== 0 && this.#state.body?.stream) {
streamRegistry.register(this, new WeakRef(this.#state.body.stream))
}
// 3. Return the result of creating a Response object, given
// clonedResponse, this’s headers’s guard, and this’s relevant Realm.
return fromInnerResponse(clonedResponse, getHeadersGuard(this.#headers))
}
[nodeUtil.inspect.custom] (depth, options) {
if (options.depth === null) {
options.depth = 2
}
options.colors ??= true
const properties = {
status: this.status,
statusText: this.statusText,
headers: this.headers,
body: this.body,
bodyUsed: this.bodyUsed,
ok: this.ok,
redirected: this.redirected,
type: this.type,
url: this.url
}
return `Response ${nodeUtil.formatWithOptions(options, properties)}`
}
static {
/**
* @param {Response} response
*/
getResponseHeaders = (response) => {
return response.#headers
}
/**
* @param {Response} response
* @param {Headers} newHeaders
*/
setResponseHeaders = (response, newHeaders) => {
response.#headers = newHeaders
}
/**
* @param {Response} response
*/
getResponseState = (response) => {
return response.#state
}
/**
* @param {Response} response
* @param {any} newState
*/
setResponseState = (response, newState) => {
response.#state = newState
}
webidl.is.Response = (arg) => {
return arg != null && typeof arg === 'object' && #state in arg
}
}
}
mixinBody(Response, getResponseState, webidl.is.Response)
Object.defineProperties(Response.prototype, {
type: kEnumerableProperty,
url: kEnumerableProperty,
status: kEnumerableProperty,
ok: kEnumerableProperty,
redirected: kEnumerableProperty,
statusText: kEnumerableProperty,
headers: kEnumerableProperty,
clone: kEnumerableProperty,
body: kEnumerableProperty,
bodyUsed: kEnumerableProperty,
[Symbol.toStringTag]: {
value: 'Response',
configurable: true
}
})
Object.defineProperties(Response, {
json: kEnumerableProperty,
redirect: kEnumerableProperty,
error: kEnumerableProperty
})
// https://fetch.spec.whatwg.org/#concept-response-clone
function cloneResponse (response) {
// To clone a response response, run these steps:
// 1. If response is a filtered response, then return a new identical
// filtered response whose internal response is a clone of response’s
// internal response.
if (response.internalResponse) {
return filterResponse(
cloneResponse(response.internalResponse),
response.type
)
}
// 2. Let newResponse be a copy of response, except for its body.
const newResponse = makeResponse({ ...response, body: null })
// 3. If response’s body is non-null, then set newResponse’s body to the
// result of cloning response’s body.
if (response.body != null) {
newResponse.body = cloneBody(response.body)
}
// 4. Return newResponse.
return newResponse
}
function makeResponse (init) {
return {
aborted: false,
rangeRequested: false,
timingAllowPassed: false,
requestIncludesCredentials: false,
type: 'default',
status: 200,
timingInfo: null,
cacheState: '',
statusText: '',
...init,
headersList: init?.headersList
? new HeadersList(init?.headersList)
: new HeadersList(),
urlList: init?.urlList ? [...init.urlList] : []
}
}
function makeNetworkError (reason) {
const isError = isErrorLike(reason)
return makeResponse({
type: 'error',
status: 0,
error: isError
? reason
: new Error(reason ? String(reason) : reason),
aborted: reason && reason.name === 'AbortError'
})
}
// @see https://fetch.spec.whatwg.org/#concept-network-error
function isNetworkError (response) {
return (
// A network error is a response whose type is "error",
response.type === 'error' &&
// status is 0
response.status === 0
)
}
function makeFilteredResponse (response, state) {
state = {
internalResponse: response,
...state
}
return new Proxy(response, {
get (target, p) {
return p in state ? state[p] : target[p]
},
set (target, p, value) {
assert(!(p in state))
target[p] = value
return true
}
})
}
// https://fetch.spec.whatwg.org/#concept-filtered-response
function filterResponse (response, type) {
// Set response to the following filtered response with response as its
// internal response, depending on request’s response tainting:
if (type === 'basic') {
// A basic filtered response is a filtered response whose type is "basic"
// and header list excludes any headers in internal response’s header list
// whose name is a forbidden response-header name.
// Note: undici does not implement forbidden response-header names
return makeFilteredResponse(response, {
type: 'basic',
headersList: response.headersList
})
} else if (type === 'cors') {
// A CORS filtered response is a filtered response whose type is "cors"
// and header list excludes any headers in internal response’s header
// list whose name is not a CORS-safelisted response-header name, given
// internal response’s CORS-exposed header-name list.
// Note: undici does not implement CORS-safelisted response-header names
return makeFilteredResponse(response, {
type: 'cors',
headersList: response.headersList
})
} else if (type === 'opaque') {
// An opaque filtered response is a filtered response whose type is
// "opaque", URL list is the empty list, status is 0, status message
// is the empty byte sequence, header list is empty, and body is null.
return makeFilteredResponse(response, {
type: 'opaque',
urlList: [],
status: 0,
statusText: '',
body: null
})
} else if (type === 'opaqueredirect') {
// An opaque-redirect filtered response is a filtered response whose type
// is "opaqueredirect", status is 0, status message is the empty byte
// sequence, header list is empty, and body is null.
return makeFilteredResponse(response, {
type: 'opaqueredirect',
status: 0,
statusText: '',
headersList: [],
body: null
})
} else {
assert(false)
}
}
// https://fetch.spec.whatwg.org/#appropriate-network-error
function makeAppropriateNetworkError (fetchParams, err = null) {
// 1. Assert: fetchParams is canceled.
assert(isCancelled(fetchParams))
// 2. Return an aborted network error if fetchParams is aborted;
// otherwise return a network error.
return isAborted(fetchParams)
? makeNetworkError(Object.assign(new DOMException('The operation was aborted.', 'AbortError'), { cause: err }))
: makeNetworkError(Object.assign(new DOMException('Request was cancelled.'), { cause: err }))
}
// https://whatpr.org/fetch/1392.html#initialize-a-response
function initializeResponse (response, init, body) {
// 1. If init["status"] is not in the range 200 to 599, inclusive, then
// throw a RangeError.
if (init.status !== null && (init.status < 200 || init.status > 599)) {
throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.')
}
// 2. If init["statusText"] does not match the reason-phrase token production,
// then throw a TypeError.
if ('statusText' in init && init.statusText != null) {
// See, https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2:
// reason-phrase = *( HTAB / SP / VCHAR / obs-text )
if (!isValidReasonPhrase(String(init.statusText))) {
throw new TypeError('Invalid statusText')
}
}
// 3. Set response’s response’s status to init["status"].
if ('status' in init && init.status != null) {
getResponseState(response).status = init.status
}
// 4. Set response’s response’s status message to init["statusText"].
if ('statusText' in init && init.statusText != null) {
getResponseState(response).statusText = init.statusText
}
// 5. If init["headers"] exists, then fill response’s headers with init["headers"].
if ('headers' in init && init.headers != null) {
fill(getResponseHeaders(response), init.headers)
}
// 6. If body was given, then:
if (body) {
// 1. If response's status is a null body status, then throw a TypeError.
if (nullBodyStatus.includes(response.status)) {
throw webidl.errors.exception({
header: 'Response constructor',
message: `Invalid response status code ${response.status}`
})
}
// 2. Set response's body to body's body.
getResponseState(response).body = body.body
// 3. If body's type is non-null and response's header list does not contain
// `Content-Type`, then append (`Content-Type`, body's type) to response's header list.
if (body.type != null && !getResponseState(response).headersList.contains('content-type', true)) {
getResponseState(response).headersList.append('content-type', body.type, true)
}
}
}
/**
* @see https://fetch.spec.whatwg.org/#response-create
* @param {any} innerResponse
* @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard
* @returns {Response}
*/
function fromInnerResponse (innerResponse, guard) {
const response = new Response(kConstruct)
setResponseState(response, innerResponse)
const headers = new Headers(kConstruct)
setResponseHeaders(response, headers)
setHeadersList(headers, innerResponse.headersList)
setHeadersGuard(headers, guard)
// Note: If innerResponse's urlList contains a URL, it is a fetch response.
if (innerResponse.urlList.length !== 0 && innerResponse.body?.stream) {
// If the target (response) is reclaimed, the cleanup callback may be called at some point with
// the held value provided for it (innerResponse.body.stream). The held value can be any value:
// a primitive or an object, even undefined. If the held value is an object, the registry keeps
// a strong reference to it (so it can pass it to the cleanup callback later). Reworded from
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry
streamRegistry.register(response, new WeakRef(innerResponse.body.stream))
}
return response
}
// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit
webidl.converters.XMLHttpRequestBodyInit = function (V, prefix, name) {
if (typeof V === 'string') {
return webidl.converters.USVString(V, prefix, name)
}
if (webidl.is.Blob(V)) {
return V
}
if (webidl.is.BufferSource(V)) {
return V
}
if (webidl.is.FormData(V)) {
return V
}
if (webidl.is.URLSearchParams(V)) {
return V
}
return webidl.converters.DOMString(V, prefix, name)
}
// https://fetch.spec.whatwg.org/#bodyinit
webidl.converters.BodyInit = function (V, prefix, argument) {
if (webidl.is.ReadableStream(V)) {
return V
}
// Note: the spec doesn't include async iterables,
// this is an undici extension.
if (V?.[Symbol.asyncIterator]) {
return V
}
return webidl.converters.XMLHttpRequestBodyInit(V, prefix, argument)
}
webidl.converters.ResponseInit = webidl.dictionaryConverter([
{
key: 'status',
converter: webidl.converters['unsigned short'],
defaultValue: () => 200
},
{
key: 'statusText',
converter: webidl.converters.ByteString,
defaultValue: () => ''
},
{
key: 'headers',
converter: webidl.converters.HeadersInit
}
])
module.exports = {
isNetworkError,
makeNetworkError,
makeResponse,
makeAppropriateNetworkError,
filterResponse,
Response,
cloneResponse,
fromInnerResponse,
getResponseState
}
@@ -0,0 +1,16 @@
"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.esnext_collection = void 0;
const base_config_1 = require("./base-config");
const es2025_collection_1 = require("./es2025.collection");
exports.esnext_collection = {
libs: [es2025_collection_1.es2025_collection],
variables: [
['Map', base_config_1.TYPE],
['WeakMap', base_config_1.TYPE],
],
};
@@ -0,0 +1,14 @@
import { memo } from 'motion-utils';
const supportsPartialKeyframes = /*@__PURE__*/ memo(() => {
try {
document.createElement("div").animate({ opacity: [1] });
}
catch (e) {
return false;
}
return true;
});
export { supportsPartialKeyframes };
//# sourceMappingURL=partial-keyframes.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"resolve-dynamic-variants.mjs","sources":["../../../../src/render/utils/resolve-dynamic-variants.ts"],"sourcesContent":["import type {\n AnimationDefinition,\n TargetAndTransition,\n TargetResolver,\n} from \"../../node/types\"\nimport { resolveVariantFromProps } from \"./resolve-variants\"\n\n/**\n * Resolves a variant if it's a variant resolver.\n * Uses `any` type for visualElement to avoid circular dependencies.\n */\nexport function resolveVariant(\n visualElement: any,\n definition?: TargetAndTransition | TargetResolver,\n custom?: any\n): TargetAndTransition\nexport function resolveVariant(\n visualElement: any,\n definition?: AnimationDefinition,\n custom?: any\n): TargetAndTransition | undefined\nexport function resolveVariant(\n visualElement: any,\n definition?: AnimationDefinition,\n custom?: any\n) {\n const props = visualElement.getProps()\n return resolveVariantFromProps(\n props,\n definition,\n custom !== undefined ? custom : props.custom,\n visualElement\n )\n}\n"],"names":[],"mappings":";;SAqBgB,cAAc,CAC1B,aAAkB,EAClB,UAAgC,EAChC,MAAY,EAAA;AAEZ,IAAA,MAAM,KAAK,GAAG,aAAa,CAAC,QAAQ,EAAE;IACtC,OAAO,uBAAuB,CAC1B,KAAK,EACL,UAAU,EACV,MAAM,KAAK,SAAS,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,EAC5C,aAAa,CAChB;AACL;;;;"}
@@ -0,0 +1,14 @@
import { StructuralSharingOption, ValidateSelected } from './structuralSharing.js';
import { AnyRouter, MakeRouteMatch, MakeRouteMatchUnion, RegisteredRouter, StrictOrFrom, ThrowConstraint, ThrowOrOptional } from '@tanstack/router-core';
export interface UseMatchBaseOptions<TRouter extends AnyRouter, TFrom, TStrict extends boolean, TThrow extends boolean, TSelected, TStructuralSharing extends boolean> {
select?: (match: MakeRouteMatch<TRouter['routeTree'], TFrom, TStrict>) => ValidateSelected<TRouter, TSelected, TStructuralSharing>;
shouldThrow?: TThrow;
}
export type UseMatchRoute<out TFrom> = <TRouter extends AnyRouter = RegisteredRouter, TSelected = unknown, TStructuralSharing extends boolean = boolean>(opts?: UseMatchBaseOptions<TRouter, TFrom, true, true, TSelected, TStructuralSharing> & StructuralSharingOption<TRouter, TSelected, TStructuralSharing>) => UseMatchResult<TRouter, TFrom, true, TSelected>;
export type UseMatchOptions<TRouter extends AnyRouter, TFrom extends string | undefined, TStrict extends boolean, TThrow extends boolean, TSelected, TStructuralSharing extends boolean> = StrictOrFrom<TRouter, TFrom, TStrict> & UseMatchBaseOptions<TRouter, TFrom, TStrict, TThrow, TSelected, TStructuralSharing> & StructuralSharingOption<TRouter, TSelected, TStructuralSharing>;
export type UseMatchResult<TRouter extends AnyRouter, TFrom, TStrict extends boolean, TSelected> = unknown extends TSelected ? TStrict extends true ? MakeRouteMatch<TRouter['routeTree'], TFrom, TStrict> : MakeRouteMatchUnion<TRouter> : TSelected;
/**
* Read and select the nearest or targeted route match.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useMatchHook
*/
export declare function useMatch<TRouter extends AnyRouter = RegisteredRouter, const TFrom extends string | undefined = undefined, TStrict extends boolean = true, TThrow extends boolean = true, TSelected = unknown, TStructuralSharing extends boolean = boolean>(opts: UseMatchOptions<TRouter, TFrom, TStrict, ThrowConstraint<TStrict, TThrow>, TSelected, TStructuralSharing>): ThrowOrOptional<UseMatchResult<TRouter, TFrom, TStrict, TSelected>, TThrow>;
@@ -0,0 +1,268 @@
# Porting to the Buffer.from/Buffer.alloc API
<a id="overview"></a>
## Overview
- [Variant 1: Drop support for Node.js ≤ 4.4.x and 5.0.0 — 5.9.x.](#variant-1) (*recommended*)
- [Variant 2: Use a polyfill](#variant-2)
- [Variant 3: manual detection, with safeguards](#variant-3)
### Finding problematic bits of code using grep
Just run `grep -nrE '[^a-zA-Z](Slow)?Buffer\s*\(' --exclude-dir node_modules`.
It will find all the potentially unsafe places in your own code (with some considerably unlikely
exceptions).
### Finding problematic bits of code using Node.js 8
If you’re using Node.js ≥ 8.0.0 (which is recommended), Node.js exposes multiple options that help with finding the relevant pieces of code:
- `--trace-warnings` will make Node.js show a stack trace for this warning and other warnings that are printed by Node.js.
- `--trace-deprecation` does the same thing, but only for deprecation warnings.
- `--pending-deprecation` will show more types of deprecation warnings. In particular, it will show the `Buffer()` deprecation warning, even on Node.js 8.
You can set these flags using an environment variable:
```console
$ export NODE_OPTIONS='--trace-warnings --pending-deprecation'
$ cat example.js
'use strict';
const foo = new Buffer('foo');
$ node example.js
(node:7147) [DEP0005] DeprecationWarning: The Buffer() and new Buffer() constructors are not recommended for use due to security and usability concerns. Please use the new Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() construction methods instead.
at showFlaggedDeprecation (buffer.js:127:13)
at new Buffer (buffer.js:148:3)
at Object.<anonymous> (/path/to/example.js:2:13)
[... more stack trace lines ...]
```
### Finding problematic bits of code using linters
Eslint rules [no-buffer-constructor](https://eslint.org/docs/rules/no-buffer-constructor)
or
[node/no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-deprecated-api.md)
also find calls to deprecated `Buffer()` API. Those rules are included in some pre-sets.
There is a drawback, though, that it doesn't always
[work correctly](https://github.com/chalker/safer-buffer#why-not-safe-buffer) when `Buffer` is
overriden e.g. with a polyfill, so recommended is a combination of this and some other method
described above.
<a id="variant-1"></a>
## Variant 1: Drop support for Node.js ≤ 4.4.x and 5.0.0 — 5.9.x.
This is the recommended solution nowadays that would imply only minimal overhead.
The Node.js 5.x release line has been unsupported since July 2016, and the Node.js 4.x release line reaches its End of Life in April 2018 (→ [Schedule](https://github.com/nodejs/Release#release-schedule)). This means that these versions of Node.js will *not* receive any updates, even in case of security issues, so using these release lines should be avoided, if at all possible.
What you would do in this case is to convert all `new Buffer()` or `Buffer()` calls to use `Buffer.alloc()` or `Buffer.from()`, in the following way:
- For `new Buffer(number)`, replace it with `Buffer.alloc(number)`.
- For `new Buffer(string)` (or `new Buffer(string, encoding)`), replace it with `Buffer.from(string)` (or `Buffer.from(string, encoding)`).
- For all other combinations of arguments (these are much rarer), also replace `new Buffer(...arguments)` with `Buffer.from(...arguments)`.
Note that `Buffer.alloc()` is also _faster_ on the current Node.js versions than
`new Buffer(size).fill(0)`, which is what you would otherwise need to ensure zero-filling.
Enabling eslint rule [no-buffer-constructor](https://eslint.org/docs/rules/no-buffer-constructor)
or
[node/no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-deprecated-api.md)
is recommended to avoid accidential unsafe Buffer API usage.
There is also a [JSCodeshift codemod](https://github.com/joyeecheung/node-dep-codemod#dep005)
for automatically migrating Buffer constructors to `Buffer.alloc()` or `Buffer.from()`.
Note that it currently only works with cases where the arguments are literals or where the
constructor is invoked with two arguments.
_If you currently support those older Node.js versions and dropping them would be a semver-major change
for you, or if you support older branches of your packages, consider using [Variant 2](#variant-2)
or [Variant 3](#variant-3) on older branches, so people using those older branches will also receive
the fix. That way, you will eradicate potential issues caused by unguarded Buffer API usage and
your users will not observe a runtime deprecation warning when running your code on Node.js 10._
<a id="variant-2"></a>
## Variant 2: Use a polyfill
Utilize [safer-buffer](https://www.npmjs.com/package/safer-buffer) as a polyfill to support older
Node.js versions.
You would take exacly the same steps as in [Variant 1](#variant-1), but with a polyfill
`const Buffer = require('safer-buffer').Buffer` in all files where you use the new `Buffer` api.
Make sure that you do not use old `new Buffer` API — in any files where the line above is added,
using old `new Buffer()` API will _throw_. It will be easy to notice that in CI, though.
Alternatively, you could use [buffer-from](https://www.npmjs.com/package/buffer-from) and/or
[buffer-alloc](https://www.npmjs.com/package/buffer-alloc) [ponyfills](https://ponyfill.com/) —
those are great, the only downsides being 4 deps in the tree and slightly more code changes to
migrate off them (as you would be using e.g. `Buffer.from` under a different name). If you need only
`Buffer.from` polyfilled — `buffer-from` alone which comes with no extra dependencies.
_Alternatively, you could use [safe-buffer](https://www.npmjs.com/package/safe-buffer) — it also
provides a polyfill, but takes a different approach which has
[it's drawbacks](https://github.com/chalker/safer-buffer#why-not-safe-buffer). It will allow you
to also use the older `new Buffer()` API in your code, though — but that's arguably a benefit, as
it is problematic, can cause issues in your code, and will start emitting runtime deprecation
warnings starting with Node.js 10._
Note that in either case, it is important that you also remove all calls to the old Buffer
API manually — just throwing in `safe-buffer` doesn't fix the problem by itself, it just provides
a polyfill for the new API. I have seen people doing that mistake.
Enabling eslint rule [no-buffer-constructor](https://eslint.org/docs/rules/no-buffer-constructor)
or
[node/no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-deprecated-api.md)
is recommended.
_Don't forget to drop the polyfill usage once you drop support for Node.js < 4.5.0._
<a id="variant-3"></a>
## Variant 3 — manual detection, with safeguards
This is useful if you create Buffer instances in only a few places (e.g. one), or you have your own
wrapper around them.
### Buffer(0)
This special case for creating empty buffers can be safely replaced with `Buffer.concat([])`, which
returns the same result all the way down to Node.js 0.8.x.
### Buffer(notNumber)
Before:
```js
var buf = new Buffer(notNumber, encoding);
```
After:
```js
var buf;
if (Buffer.from && Buffer.from !== Uint8Array.from) {
buf = Buffer.from(notNumber, encoding);
} else {
if (typeof notNumber === 'number')
throw new Error('The "size" argument must be of type number.');
buf = new Buffer(notNumber, encoding);
}
```
`encoding` is optional.
Note that the `typeof notNumber` before `new Buffer` is required (for cases when `notNumber` argument is not
hard-coded) and _is not caused by the deprecation of Buffer constructor_ — it's exactly _why_ the
Buffer constructor is deprecated. Ecosystem packages lacking this type-check caused numereous
security issues — situations when unsanitized user input could end up in the `Buffer(arg)` create
problems ranging from DoS to leaking sensitive information to the attacker from the process memory.
When `notNumber` argument is hardcoded (e.g. literal `"abc"` or `[0,1,2]`), the `typeof` check can
be omitted.
Also note that using TypeScript does not fix this problem for you — when libs written in
`TypeScript` are used from JS, or when user input ends up there — it behaves exactly as pure JS, as
all type checks are translation-time only and are not present in the actual JS code which TS
compiles to.
### Buffer(number)
For Node.js 0.10.x (and below) support:
```js
var buf;
if (Buffer.alloc) {
buf = Buffer.alloc(number);
} else {
buf = new Buffer(number);
buf.fill(0);
}
```
Otherwise (Node.js ≥ 0.12.x):
```js
const buf = Buffer.alloc ? Buffer.alloc(number) : new Buffer(number).fill(0);
```
## Regarding Buffer.allocUnsafe
Be extra cautious when using `Buffer.allocUnsafe`:
* Don't use it if you don't have a good reason to
* e.g. you probably won't ever see a performance difference for small buffers, in fact, those
might be even faster with `Buffer.alloc()`,
* if your code is not in the hot code path — you also probably won't notice a difference,
* keep in mind that zero-filling minimizes the potential risks.
* If you use it, make sure that you never return the buffer in a partially-filled state,
* if you are writing to it sequentially — always truncate it to the actuall written length
Errors in handling buffers allocated with `Buffer.allocUnsafe` could result in various issues,
ranged from undefined behaviour of your code to sensitive data (user input, passwords, certs)
leaking to the remote attacker.
_Note that the same applies to `new Buffer` usage without zero-filling, depending on the Node.js
version (and lacking type checks also adds DoS to the list of potential problems)._
<a id="faq"></a>
## FAQ
<a id="design-flaws"></a>
### What is wrong with the `Buffer` constructor?
The `Buffer` constructor could be used to create a buffer in many different ways:
- `new Buffer(42)` creates a `Buffer` of 42 bytes. Before Node.js 8, this buffer contained
*arbitrary memory* for performance reasons, which could include anything ranging from
program source code to passwords and encryption keys.
- `new Buffer('abc')` creates a `Buffer` that contains the UTF-8-encoded version of
the string `'abc'`. A second argument could specify another encoding: For example,
`new Buffer(string, 'base64')` could be used to convert a Base64 string into the original
sequence of bytes that it represents.
- There are several other combinations of arguments.
This meant that, in code like `var buffer = new Buffer(foo);`, *it is not possible to tell
what exactly the contents of the generated buffer are* without knowing the type of `foo`.
Sometimes, the value of `foo` comes from an external source. For example, this function
could be exposed as a service on a web server, converting a UTF-8 string into its Base64 form:
```
function stringToBase64(req, res) {
// The request body should have the format of `{ string: 'foobar' }`
const rawBytes = new Buffer(req.body.string)
const encoded = rawBytes.toString('base64')
res.end({ encoded: encoded })
}
```
Note that this code does *not* validate the type of `req.body.string`:
- `req.body.string` is expected to be a string. If this is the case, all goes well.
- `req.body.string` is controlled by the client that sends the request.
- If `req.body.string` is the *number* `50`, the `rawBytes` would be 50 bytes:
- Before Node.js 8, the content would be uninitialized
- After Node.js 8, the content would be `50` bytes with the value `0`
Because of the missing type check, an attacker could intentionally send a number
as part of the request. Using this, they can either:
- Read uninitialized memory. This **will** leak passwords, encryption keys and other
kinds of sensitive information. (Information leak)
- Force the program to allocate a large amount of memory. For example, when specifying
`500000000` as the input value, each request will allocate 500MB of memory.
This can be used to either exhaust the memory available of a program completely
and make it crash, or slow it down significantly. (Denial of Service)
Both of these scenarios are considered serious security issues in a real-world
web server context.
when using `Buffer.from(req.body.string)` instead, passing a number will always
throw an exception instead, giving a controlled behaviour that can always be
handled by the program.
<a id="ecosystem-usage"></a>
### The `Buffer()` constructor has been deprecated for a while. Is this really an issue?
Surveys of code in the `npm` ecosystem have shown that the `Buffer()` constructor is still
widely used. This includes new code, and overall usage of such code has actually been
*increasing*.
@@ -0,0 +1,51 @@
# which
Like the unix `which` utility.
Finds the first instance of a specified executable in the PATH
environment variable. Does not cache the results, so `hash -r` is not
needed when the PATH changes.
## USAGE
```javascript
const which = require('which')
// async usage
// rejects if not found
const resolved = await which('node')
// if nothrow option is used, returns null if not found
const resolvedOrNull = await which('node', { nothrow: true })
// sync usage
// throws if not found
const resolved = which.sync('node')
// if nothrow option is used, returns null if not found
const resolvedOrNull = which.sync('node', { nothrow: true })
// Pass options to override the PATH and PATHEXT environment vars.
await which('node', { path: someOtherPath, pathExt: somePathExt })
```
## CLI USAGE
Just like the BSD `which(1)` binary but using `node-which`.
```
usage: node-which [-as] program ...
```
You can learn more about why the binary is `node-which` and not `which`
[here](https://github.com/npm/node-which/pull/67)
## OPTIONS
You may pass an options object as the second argument.
- `path`: Use instead of the `PATH` environment variable.
- `pathExt`: Use instead of the `PATHEXT` environment variable.
- `all`: Return all matches, instead of just the first one. Note that
this means the function returns an array of strings instead of a
single string.
@@ -0,0 +1,23 @@
"use strict";
let mappingsWasm = null;
module.exports = function readWasm() {
if (typeof mappingsWasm === "string") {
return fetch(mappingsWasm).then(response => response.arrayBuffer());
}
if (mappingsWasm instanceof ArrayBuffer) {
return Promise.resolve(mappingsWasm);
}
throw new Error(
"You must provide the string URL or ArrayBuffer contents " +
"of lib/mappings.wasm by calling " +
"SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) " +
"before using SourceMapConsumer"
);
};
module.exports.initialize = input => {
mappingsWasm = input;
};
@@ -0,0 +1 @@
{"version":3,"file":"scroll-restoration.js","names":[],"sources":["../../src/scroll-restoration.tsx"],"sourcesContent":["import { getScrollRestorationScriptForRouter } from '@tanstack/router-core/scroll-restoration-script'\nimport { useRouter } from './useRouter'\nimport { ScriptOnce } from './ScriptOnce'\n\nexport function ScrollRestoration() {\n const router = useRouter()\n const script = getScrollRestorationScriptForRouter(router)\n\n if (!script) {\n return null\n }\n\n return <ScriptOnce children={script} />\n}\n"],"mappings":";;;;;AAIA,SAAgB,oBAAoB;CAElC,MAAM,SAAS,oCADA,WAAW,CACgC;AAE1D,KAAI,CAAC,OACH,QAAO;AAGT,QAAO,oBAAC,YAAD,EAAY,UAAU,QAAU,CAAA"}
@@ -0,0 +1,84 @@
export declare type CallbackFunction<T = string> = (error: Error | null, result?: T) => void;
declare type CustomFont = string & {};
export declare interface FigletDefaults {
font: FontName;
fontPath: string;
fetchFontIfMissing: boolean;
}
declare class FigletFont {
options: FontMetadata;
comment: string;
numChars: number;
[charCode: number]: string[];
constructor();
}
declare interface FigletModule {
loadFont: (font: FontName, callback?: CallbackFunction<FontMetadata>) => Promise<FontMetadata | null>;
loadFontSync: (font: FontName) => FontMetadata;
fonts: (callback?: CallbackFunction<FontName[]>) => Promise<FontName[]>;
fontsSync: () => FontName[];
parseFont: (font: FontName, data: string, override?: boolean) => FontMetadata;
preloadFonts: (fonts: FontName[], callback?: (error?: Error) => void) => Promise<void>;
loadedFonts: () => string[];
clearLoadedFonts: () => void;
textSync: (text: string, options?: FigletOptions) => string;
text: (text: string, optionsOrFontOrCallback?: FigletOptions | FontName | CallbackFunction<string>, callback?: CallbackFunction<string>) => Promise<string>;
(text: string, optionsOrFontOrCallback?: FigletOptions | FontName | CallbackFunction<string>, callback?: CallbackFunction<string>): Promise<string>;
figFonts: Record<string, FigletFont>;
defaults: (opts?: Partial<FigletDefaults>) => FigletDefaults;
metadata: (fontName: FontName, callback?: (error: Error | null, fontOptions?: FontMetadata, comment?: string) => void) => Promise<[FontMetadata, string] | null>;
}
export declare interface FigletOptions {
font?: FontName;
horizontalLayout?: KerningMethods;
verticalLayout?: KerningMethods;
width?: number;
whitespaceBreak?: boolean;
printDirection?: PrintDirection;
showHardBlanks?: boolean;
}
declare interface FittingRules {
hLayout: number;
hRule1: boolean;
hRule2: boolean;
hRule3: boolean;
hRule4: boolean;
hRule5: boolean;
hRule6: boolean;
vLayout: number;
vRule1: boolean;
vRule2: boolean;
vRule3: boolean;
vRule4: boolean;
vRule5: boolean;
}
export declare interface FontMetadata {
baseline?: number;
codeTagCount?: number | null;
fittingRules: FittingRules;
fullLayout?: number | null;
hardBlank?: string;
height?: number;
maxLength?: number;
numCommentLines?: number;
oldLayout?: number;
printDirection?: PrintDirection;
}
export declare type FontName = "1Row" | "3-D" | "3D Diagonal" | "3D-ASCII" | "3x5" | "4Max" | "5 Line Oblique" | "Standard" | "Ghost" | "Big" | "Block" | "Bubble" | "Digital" | "Ivrit" | "Mini" | "Script" | "Shadow" | "Slant" | "Small" | "Speed" | "Tinker-Toy" | CustomFont;
declare type KerningMethods = "default" | "full" | "fitted" | "controlled smushing" | "universal smushing";
declare const nodeFiglet: FigletModule;
export default nodeFiglet;
declare type PrintDirection = -1 | 0 | 1;
export { }
@@ -0,0 +1 @@
{"version":3,"file":"mcp-DIH4cS6P.mjs","names":["COMPLETABLE_SYMBOL: unique symbol","onerror?: (error: Error) => void","honored: SubscriptionFilter","controller!: ReadableStreamDefaultController<Uint8Array>","unsubscribe: (() => void) | undefined","keepAliveTimer: ReturnType<typeof setInterval> | undefined","abortCleanup: (() => void) | undefined","CHANGE_NOTIFICATION_METHODS: ReadonlySet<string>","_maxSubscriptions: number","uriParam: unknown","out: NotificationBody[]","out: ListenCloseFrame[]","_host: LegacyInputRequiredShimHost","responses: Record<string, unknown> | undefined","coerced: [string, CoercedEmbeddedInputRequest][]","legOptions: RequestOptions","ctxNext: ServerContext","INPUT_REQUIRED_CAPABLE_METHODS: ReadonlySet<string>","writeClientIdentity: (server: Server, identity: PerRequestClientIdentity) => void","installDiscoverHandler: (server: Server, servedModernVersions: readonly string[]) => void","readServerIdentity: (server: Server) => Implementation","_serverInfo: Implementation","transportSessionId: string | undefined","threshold: LoggingLevel | undefined","rawRequestState: unknown","result: Result","formParams: ElicitRequestFormParams","stack: unknown[]","uri: URL","toolDefinition: Tool","templateResources: Resource[]","metadata: ResourceMetadata","registeredResource: RegisteredResource","registeredResourceTemplate: RegisteredResourceTemplate","registeredPrompt: RegisteredPrompt","outputSchemaJson: Record<string, unknown> | undefined","registeredTool: RegisteredTool","_callbacks: {\n /**\n * A callback to list all resources matching this template. This is required to be specified, even if `undefined`, to avoid accidentally forgetting resource listing.\n */\n list: ListResourcesCallback | undefined;\n\n /**\n * An optional callback to autocomplete variables within the URI template. Useful for clients and users to discover possible values.\n */\n complete?: {\n [variable: string]: CompleteResourceTemplateCallback;\n };\n }","callback","EMPTY_COMPLETION_RESULT: CompleteResult"],"sources":["../src/server/completable.ts","../src/server/sseKeepAlive.ts","../src/server/serverEventBus.ts","../src/server/listenRouter.ts","../src/server/middleware/bearerAuth.ts","../src/server/middleware/oauthMetadata.ts","../src/server/scopeChallenge.ts","../src/server/legacyInputRequiredShim.ts","../src/server/server.ts","../src/server/mcp.ts"],"sourcesContent":["import type { StandardSchemaV1 } from '@modelcontextprotocol/core-internal';\n\nexport const COMPLETABLE_SYMBOL: unique symbol = Symbol.for('mcp.completable');\n\nexport type CompleteCallback<T extends StandardSchemaV1 = StandardSchemaV1> = (\n value: StandardSchemaV1.InferInput<T>,\n context?: {\n arguments?: Record<string, string>;\n }\n) => StandardSchemaV1.InferInput<T>[] | Promise<StandardSchemaV1.InferInput<T>[]>;\n\nexport type CompletableMeta<T extends StandardSchemaV1 = StandardSchemaV1> = {\n complete: CompleteCallback<T>;\n};\n\nexport type CompletableSchema<T extends StandardSchemaV1> = T & {\n [COMPLETABLE_SYMBOL]: CompletableMeta<T>;\n};\n\n/**\n * Wraps a schema to provide autocompletion capabilities. Useful for, e.g., prompt arguments in MCP.\n *\n * @example\n * ```ts source=\"./completable.examples.ts#completable_basicUsage\"\n * server.registerPrompt(\n * 'review-code',\n * {\n * title: 'Code Review',\n * argsSchema: z.object({\n * language: completable(z.string().describe('Programming language'), value =>\n * ['typescript', 'javascript', 'python', 'rust', 'go'].filter(lang => lang.startsWith(value))\n * )\n * })\n * },\n * ({ language }) => ({\n * messages: [\n * {\n * role: 'user' as const,\n * content: {\n * type: 'text' as const,\n * text: `Review this ${language} code.`\n * }\n * }\n * ]\n * })\n * );\n * ```\n *\n * @see {@linkcode server/mcp.McpServer.registerPrompt | McpServer.registerPrompt} for using completable schemas in prompt argument definitions\n */\nexport function completable<T extends StandardSchemaV1>(schema: T, complete: CompleteCallback<T>): CompletableSchema<T> {\n Object.defineProperty(schema as object, COMPLETABLE_SYMBOL, {\n value: { complete } as CompletableMeta<T>,\n enumerable: false,\n writable: false,\n configurable: false\n });\n return schema as CompletableSchema<T>;\n}\n\n/**\n * Checks if a schema is completable (has completion metadata).\n */\nexport function isCompletable(schema: unknown): schema is CompletableSchema<StandardSchemaV1> {\n return !!schema && typeof schema === 'object' && COMPLETABLE_SYMBOL in (schema as object);\n}\n\n/**\n * Gets the completer callback from a completable schema, if it exists.\Line truncated
@@ -0,0 +1,7 @@
import { createRenderBatcher } from './batcher.mjs';
const { schedule: microtask, cancel: cancelMicrotask } =
/* @__PURE__ */ createRenderBatcher(queueMicrotask, false);
export { cancelMicrotask, microtask };
//# sourceMappingURL=microtask.mjs.map
@@ -0,0 +1,4 @@
import { n as AjvJsonSchemaValidator } from "./ajvProvider-CEoC__sr.mjs";
import process from "node:process";
export { AjvJsonSchemaValidator as DefaultJsonSchemaValidator, process };
@@ -0,0 +1,39 @@
import { expect, test } from "vitest";
import * as z from "zod/v4";
import * as core from "zod/v4/core";
const { allowsEval } = core.util;
// Regression test for the CSP feature-probe issue (#4461, #5414):
// `allowsEval` used to always invoke `new Function("")` even when the
// user had opted into `z.config({ jitless: true })`, producing a
// `securitypolicyviolation` report on strict-CSP pages (no 'unsafe-eval')
// that Chrome DevTools surfaces as an Issue.
//
// The fix: when `globalConfig.jitless` is true, `allowsEval.value` returns `false` without triggering the probe. This test lives in its own file because vitest isolates ESM graphs per file, so the cached `allowsEval.value` is fresh and is never accessed before the config mutation below.
test("globalConfig.jitless=true short-circuits the allowsEval probe", () => {
// Set BEFORE first access to allowsEval.value — the getter is memoised via `cached()`, so the contract is "configure at app entry".
z.config({ jitless: true });
// Sanity: config is wired
expect(core.globalConfig.jitless).toBe(true);
// Spy: if the probe were still attempted, `new Function("")` would be called. Swap the global `Function` constructor with a throwing stub and verify the stub is NEVER invoked.
const origFunction = globalThis.Function;
let probeAttempted = false;
// @ts-expect-error assigning a stub to the Function global for the test
globalThis.Function = function StubFunction(..._args: unknown[]): never {
probeAttempted = true;
throw new Error("allowsEval probe should have been skipped under jitless=true");
};
try {
expect(allowsEval.value).toBe(false);
expect(probeAttempted).toBe(false);
} finally {
globalThis.Function = origFunction;
// Restore config so other test files in the same worker see default
delete core.globalConfig.jitless;
}
});
@@ -0,0 +1,212 @@
# negotiator
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Node.js Version][node-version-image]][node-version-url]
[![Build Status][github-actions-ci-image]][github-actions-ci-url]
[![Test Coverage][coveralls-image]][coveralls-url]
An HTTP content negotiator for Node.js
## Installation
```sh
$ npm install negotiator
```
## API
```js
var Negotiator = require('negotiator')
```
### Accept Negotiation
```js
availableMediaTypes = ['text/html', 'text/plain', 'application/json']
// The negotiator constructor receives a request object
negotiator = new Negotiator(request)
// Let's say Accept header is 'text/html, application/*;q=0.2, image/jpeg;q=0.8'
negotiator.mediaTypes()
// -> ['text/html', 'image/jpeg', 'application/*']
negotiator.mediaTypes(availableMediaTypes)
// -> ['text/html', 'application/json']
negotiator.mediaType(availableMediaTypes)
// -> 'text/html'
```
You can check a working example at `examples/accept.js`.
#### Methods
##### mediaType()
Returns the most preferred media type from the client.
##### mediaType(availableMediaType)
Returns the most preferred media type from a list of available media types.
##### mediaTypes()
Returns an array of preferred media types ordered by the client preference.
##### mediaTypes(availableMediaTypes)
Returns an array of preferred media types ordered by priority from a list of
available media types.
### Accept-Language Negotiation
```js
negotiator = new Negotiator(request)
availableLanguages = ['en', 'es', 'fr']
// Let's say Accept-Language header is 'en;q=0.8, es, pt'
negotiator.languages()
// -> ['es', 'pt', 'en']
negotiator.languages(availableLanguages)
// -> ['es', 'en']
language = negotiator.language(availableLanguages)
// -> 'es'
```
You can check a working example at `examples/language.js`.
#### Methods
##### language()
Returns the most preferred language from the client.
##### language(availableLanguages)
Returns the most preferred language from a list of available languages.
##### languages()
Returns an array of preferred languages ordered by the client preference.
##### languages(availableLanguages)
Returns an array of preferred languages ordered by priority from a list of
available languages.
### Accept-Charset Negotiation
```js
availableCharsets = ['utf-8', 'iso-8859-1', 'iso-8859-5']
negotiator = new Negotiator(request)
// Let's say Accept-Charset header is 'utf-8, iso-8859-1;q=0.8, utf-7;q=0.2'
negotiator.charsets()
// -> ['utf-8', 'iso-8859-1', 'utf-7']
negotiator.charsets(availableCharsets)
// -> ['utf-8', 'iso-8859-1']
negotiator.charset(availableCharsets)
// -> 'utf-8'
```
You can check a working example at `examples/charset.js`.
#### Methods
##### charset()
Returns the most preferred charset from the client.
##### charset(availableCharsets)
Returns the most preferred charset from a list of available charsets.
##### charsets()
Returns an array of preferred charsets ordered by the client preference.
##### charsets(availableCharsets)
Returns an array of preferred charsets ordered by priority from a list of
available charsets.
### Accept-Encoding Negotiation
```js
availableEncodings = ['identity', 'gzip']
negotiator = new Negotiator(request)
// Let's say Accept-Encoding header is 'gzip, compress;q=0.2, identity;q=0.5'
negotiator.encodings()
// -> ['gzip', 'identity', 'compress']
negotiator.encodings(availableEncodings)
// -> ['gzip', 'identity']
negotiator.encoding(availableEncodings)
// -> 'gzip'
```
You can check a working example at `examples/encoding.js`.
#### Methods
##### encoding()
Returns the most preferred encoding from the client.
##### encoding(availableEncodings)
Returns the most preferred encoding from a list of available encodings.
##### encoding(availableEncodings, { preferred })
Returns the most preferred encoding from a list of available encodings, while prioritizing based on `preferred` array between same-quality encodings.
##### encodings()
Returns an array of preferred encodings ordered by the client preference.
##### encodings(availableEncodings)
Returns an array of preferred encodings ordered by priority from a list of
available encodings.
##### encodings(availableEncodings, { preferred })
Returns an array of preferred encodings ordered by priority from a list of
available encodings, while prioritizing based on `preferred` array between same-quality encodings.
## See Also
The [accepts](https://npmjs.org/package/accepts#readme) module builds on
this module and provides an alternative interface, mime type validation,
and more.
## License
[MIT](LICENSE)
[npm-image]: https://img.shields.io/npm/v/negotiator.svg
[npm-url]: https://npmjs.org/package/negotiator
[node-version-image]: https://img.shields.io/node/v/negotiator.svg
[node-version-url]: https://nodejs.org/en/download/
[coveralls-image]: https://img.shields.io/coveralls/jshttp/negotiator/master.svg
[coveralls-url]: https://coveralls.io/r/jshttp/negotiator?branch=master
[downloads-image]: https://img.shields.io/npm/dm/negotiator.svg
[downloads-url]: https://npmjs.org/package/negotiator
[github-actions-ci-image]: https://img.shields.io/github/workflow/status/jshttp/negotiator/ci/master?label=ci
[github-actions-ci-url]: https://github.com/jshttp/negotiator/actions/workflows/ci.yml
@@ -0,0 +1 @@
{"version":3,"file":"revoke.js","sourceRoot":"","sources":["../../../../../src/server/auth/handlers/revoke.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"2":"_pJ _RG","200":"_CD"},C:{"2":"_o _2J _L","200":"_TL _PN"},D:{"2":"_xF _RG","200":"_EF"},E:{"1":"_XQ","2":"_cD","200":"_BJ _lJ"},F:{"2":"_lG 7 9 _j _0S","200":"8"},G:{"1":"_fL","2":"_YC","200":"_yK _lJ"},H:{"2":"1D"},I:{"2":"_P"},J:{"2":"_B"},K:{"2":"_N"},L:{"200":"I"},M:{"200":"YC"},N:{"2":"_A"},O:{"2":"bC"},P:{"2":"_F"},Q:{"2":"JE"},R:{"2":"KE"},S:{"2":"_C"}},B:5,C:"CSS Grid Lanes",D:true};
@@ -0,0 +1,26 @@
/**
* @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 DatabaseBackup = createLucideIcon("DatabaseBackup", [
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
["path", { d: "M3 12a9 3 0 0 0 5 2.69", key: "1ui2ym" }],
["path", { d: "M21 9.3V5", key: "6k6cib" }],
["path", { d: "M3 5v14a9 3 0 0 0 6.47 2.88", key: "i62tjy" }],
["path", { d: "M12 12v4h4", key: "1bxaet" }],
[
"path",
{
d: "M13 20a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L12 16",
key: "1f4ei9"
}
]
]);
export { DatabaseBackup as default };
//# sourceMappingURL=database-backup.js.map
@@ -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 SquareUserRound = createLucideIcon("SquareUserRound", [
["path", { d: "M18 21a6 6 0 0 0-12 0", key: "kaz2du" }],
["circle", { cx: "12", cy: "11", r: "4", key: "1gt34v" }],
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
]);
export { SquareUserRound as default };
//# sourceMappingURL=square-user-round.js.map
@@ -0,0 +1 @@
{"version":3,"file":"popcorn.js","sources":["../../../src/icons/popcorn.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Popcorn\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTggOGEyIDIgMCAwIDAgMC00IDIgMiAwIDAgMC00IDAgMiAyIDAgMCAwLTQgMCAyIDIgMCAwIDAtNCAwIDIgMiAwIDAgMCAwIDQiIC8+CiAgPHBhdGggZD0iTTEwIDIyIDkgOCIgLz4KICA8cGF0aCBkPSJtMTQgMjIgMS0xNCIgLz4KICA8cGF0aCBkPSJNMjAgOGMuNSAwIC45LjQuOCAxbC0yLjYgMTJjLS4xLjUtLjcgMS0xLjIgMUg3Yy0uNiAwLTEuMS0uNC0xLjItMUwzLjIgOWMtLjEtLjYuMy0xIC44LTFaIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/popcorn\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 Popcorn = createLucideIcon('Popcorn', [\n [\n 'path',\n {\n d: 'M18 8a2 2 0 0 0 0-4 2 2 0 0 0-4 0 2 2 0 0 0-4 0 2 2 0 0 0-4 0 2 2 0 0 0 0 4',\n key: '10td1f',\n },\n ],\n ['path', { d: 'M10 22 9 8', key: 'yjptiv' }],\n ['path', { d: 'm14 22 1-14', key: '8jwc8b' }],\n [\n 'path',\n {\n d: 'M20 8c.5 0 .9.4.8 1l-2.6 12c-.1.5-.7 1-1.2 1H7c-.6 0-1.1-.4-1.2-1L3.2 9c-.1-.6.3-1 .8-1Z',\n key: '1qo33t',\n },\n ],\n]);\n\nexport default Popcorn;\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,CAC1C,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;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,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAe,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC5C,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;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,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 './loader-circle.js';
//# sourceMappingURL=loader-2.js.map
@@ -0,0 +1,142 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
const confusingOperators = new Set([
'=',
'==',
'===',
'in',
'instanceof',
]);
function isConfusingOperator(operator) {
return confusingOperators.has(operator);
}
exports.default = (0, util_1.createRule)({
name: 'no-confusing-non-null-assertion',
meta: {
type: 'problem',
docs: {
description: 'Disallow non-null assertion in locations that may be confusing',
recommended: 'stylistic',
},
hasSuggestions: true,
messages: {
confusingAssign: 'Confusing combination of non-null assertion and assignment like `a! = b`, which looks very similar to `a != b`.',
confusingEqual: 'Confusing combination of non-null assertion and equality test like `a! == b`, which looks very similar to `a !== b`.',
confusingOperator: 'Confusing combination of non-null assertion and `{{operator}}` operator like `a! {{operator}} b`, which might be misinterpreted as `!(a {{operator}} b)`.',
notNeedInAssign: 'Remove unnecessary non-null assertion (!) in assignment left-hand side.',
notNeedInEqualTest: 'Remove unnecessary non-null assertion (!) in equality test.',
notNeedInOperator: 'Remove possibly unnecessary non-null assertion (!) in the left operand of the `{{operator}}` operator.',
wrapUpLeft: 'Wrap the left-hand side in parentheses to avoid confusion with "{{operator}}" operator.',
},
schema: [],
},
defaultOptions: [],
create(context) {
function confusingOperatorToMessageData(operator) {
switch (operator) {
case '=':
return {
messageId: 'confusingAssign',
};
case '==':
case '===':
return {
messageId: 'confusingEqual',
};
case 'in':
case 'instanceof':
return {
messageId: 'confusingOperator',
data: { operator },
};
// istanbul ignore next
default:
operator;
throw new Error(`Unexpected operator ${operator}`);
}
}
return {
'BinaryExpression, AssignmentExpression'(node) {
const operator = node.operator;
if (isConfusingOperator(operator)) {
// Look for a non-null assertion as the last token on the left hand side.
// That way, we catch things like `1 + two! === 3`, even though the left
// hand side isn't a non-null assertion AST node.
const leftHandFinalToken = context.sourceCode.getLastToken(node.left);
const tokenAfterLeft = context.sourceCode.getTokenAfter(node.left);
if (leftHandFinalToken?.type === utils_1.AST_TOKEN_TYPES.Punctuator &&
leftHandFinalToken.value === '!' &&
tokenAfterLeft?.value !== ')') {
if (node.left.type === utils_1.AST_NODE_TYPES.TSNonNullExpression) {
let suggestions;
switch (operator) {
case '=':
suggestions = [
{
messageId: 'notNeedInAssign',
fix: (fixer) => fixer.remove(leftHandFinalToken),
},
];
break;
case '==':
case '===':
suggestions = [
{
messageId: 'notNeedInEqualTest',
fix: (fixer) => fixer.remove(leftHandFinalToken),
},
];
break;
case 'in':
case 'instanceof':
suggestions = [
{
messageId: 'notNeedInOperator',
data: { operator },
fix: (fixer) => fixer.remove(leftHandFinalToken),
},
{
messageId: 'wrapUpLeft',
data: { operator },
fix: wrapUpLeftFixer(node),
},
];
break;
// istanbul ignore next
default:
operator;
return;
}
context.report({
node,
...confusingOperatorToMessageData(operator),
suggest: suggestions,
});
}
else {
context.report({
node,
...confusingOperatorToMessageData(operator),
suggest: [
{
messageId: 'wrapUpLeft',
data: { operator },
fix: wrapUpLeftFixer(node),
},
],
});
}
}
}
},
};
},
});
function wrapUpLeftFixer(node) {
return (fixer) => [
fixer.insertTextBefore(node.left, '('),
fixer.insertTextAfter(node.left, ')'),
];
}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_2D","2":"C"},C:{"1":"_kO","2":"_q _cC _L"},D:{"1":"_AK","2":"_jJ"},E:{"1":"_jB","2":"_4C"},F:{"1":"_0J","2":"_j _BC _O"},G:{"1":"_2","2":"_r"},H:{"2":"1D"},I:{"1":"_X","2":"_W"},J:{"2":"_B"},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:4,C:"Canvas blend modes",D:true};
@@ -0,0 +1,70 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_client_fetch_result_please = require("./fetch-result-please.js");
//#region src/client/utils.ts
const mergePath = (base, path) => {
base = base.replace(/\/+$/, "");
base = base + "/";
path = path.replace(/^\/+/, "");
return base + path;
};
const replaceUrlParam = (urlString, params) => {
for (const [k, v] of Object.entries(params)) {
const reg = new RegExp("/:" + k + "(?:{[^/]+})?\\??(?=/|$)");
urlString = urlString.replace(reg, () => v ? `/${v}` : "");
}
return urlString;
};
const buildSearchParams = (query) => {
const searchParams = new URLSearchParams();
for (const [k, v] of Object.entries(query)) {
if (v === void 0) continue;
if (Array.isArray(v)) for (const v2 of v) {
if (v2 === void 0) continue;
searchParams.append(k, v2);
}
else searchParams.set(k, v);
}
return searchParams;
};
const replaceUrlProtocol = (urlString, protocol) => {
switch (protocol) {
case "ws": return urlString.replace(/^http/, "ws");
case "http": return urlString.replace(/^ws/, "http");
}
};
const removeIndexString = (urlString) => {
if (/^https?:\/\/[^\/]+?\/index(?=\?|$)/.test(urlString)) return urlString.replace(/\/index(?=\?|$)/, "/");
return urlString.replace(/\/index(?=\?|$)/, "");
};
function isObject(item) {
return typeof item === "object" && item !== null && !Array.isArray(item);
}
function deepMerge(target, source) {
if (!isObject(target) && !isObject(source)) return source;
const merged = { ...target };
for (const key in source) {
const value = source[key];
if (isObject(merged[key]) && isObject(value)) merged[key] = deepMerge(merged[key], value);
else merged[key] = value;
}
return merged;
}
/**
* Shortcut to get a consumable response from `hc`'s fetch calls (Response), with types inference.
*
* Smartly parse the response data, throwing a structured error if the response is not `ok`. ({@link DetailedError})
*
* @example const result = await parseResponse(client.posts.$get())
*/
async function parseResponse(fetchRes) {
return require_client_fetch_result_please.fetchRP(fetchRes);
}
//#endregion
exports.DetailedError = require_client_fetch_result_please.DetailedError;
exports.buildSearchParams = buildSearchParams;
exports.deepMerge = deepMerge;
exports.mergePath = mergePath;
exports.parseResponse = parseResponse;
exports.removeIndexString = removeIndexString;
exports.replaceUrlParam = replaceUrlParam;
exports.replaceUrlProtocol = replaceUrlProtocol;
@@ -0,0 +1,57 @@
export * as core from "../core/index.js";
export * from "./schemas.js";
export * from "./checks.js";
export * from "./errors.js";
export * from "./parse.js";
export * from "./compat.js";
export type { infer } from "../core/index.js";
export type { JSONType } from "../core/util.js";
export type { CompileOptions } from "../core/index.js";
export {
globalRegistry,
type GlobalMeta,
registry,
config,
memoizer,
$output,
$input,
$brand,
clone,
regexes,
treeifyError,
prettifyError,
formatError,
flattenError,
TimePrecision,
util,
NEVER,
INVALID,
toZod,
compile,
withParser,
ZodCompileAsyncError,
ZodCompileUnsupportedError,
getDiscriminatedOption,
} from "../core/index.js";
export { toJSONSchema } from "../core/json-schema-processors.js";
export { fromJSONSchema } from "./from-json-schema.js";
export { deepPartial } from "./deep-partial.js";
// Types and values both, from one module — re-exporting the types from core would collide.
export { input, output } from "./in-out.js";
export * as locales from "../locales/index.js";
// iso must be exported from top-level https://github.com/colinhacks/zod/issues/4491
export { ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration } from "./iso.js";
export * as iso from "./iso.js";
// coerce
export type {
ZodCoercedString,
ZodCoercedNumber,
ZodCoercedBigInt,
ZodCoercedBoolean,
ZodCoercedDate,
} from "./coerce.js";
export * as coerce from "./coerce.js";
@@ -0,0 +1,13 @@
"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.es2020_number = void 0;
const base_config_1 = require("./base-config");
const es2020_intl_1 = require("./es2020.intl");
exports.es2020_number = {
libs: [es2020_intl_1.es2020_intl],
variables: [['Number', base_config_1.TYPE]],
};
@@ -0,0 +1,39 @@
{{## def.checkMissingProperty:_properties:
{{~ _properties:$propertyKey:$i }}
{{?$i}} || {{?}}
{{
var $prop = it.util.getProperty($propertyKey)
, $useData = $data + $prop;
}}
( ({{# def.noPropertyInData }}) && (missing{{=$lvl}} = {{= it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) }}) )
{{~}}
#}}
{{## def.errorMissingProperty:_error:
{{
var $propertyPath = 'missing' + $lvl
, $missingProperty = '\' + ' + $propertyPath + ' + \'';
if (it.opts._errorDataPathProperty) {
it.errorPath = it.opts.jsonPointers
? it.util.getPathExpr($currentErrorPath, $propertyPath, true)
: $currentErrorPath + ' + ' + $propertyPath;
}
}}
{{# def.error:_error }}
#}}
{{## def.allErrorsMissingProperty:_error:
{{
var $prop = it.util.getProperty($propertyKey)
, $missingProperty = it.util.escapeQuotes($propertyKey)
, $useData = $data + $prop;
if (it.opts._errorDataPathProperty) {
it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
}
}}
if ({{# def.noPropertyInData }}) {
{{# def.addError:_error }}
}
#}}
@@ -0,0 +1,68 @@
/**
* @fileoverview Rule to disallow `javascript:` URLs
* @author Ilya Volodin
*/
/* eslint no-script-url: 0 -- Code is checking to report such URLs */
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "Disallow `javascript:` URLs",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-script-url",
},
schema: [],
messages: {
unexpectedScriptURL: "Script URL is a form of eval.",
},
},
create(context) {
/**
* Check whether a node's static value starts with `javascript:` or not.
* And report an error for unexpected script URL.
* @param {ASTNode} node node to check
* @returns {void}
*/
function check(node) {
const value = astUtils.getStaticStringValue(node);
if (
typeof value === "string" &&
value.toLowerCase().indexOf("javascript:") === 0
) {
context.report({ node, messageId: "unexpectedScriptURL" });
}
}
return {
Literal(node) {
if (node.value && typeof node.value === "string") {
check(node);
}
},
TemplateLiteral(node) {
if (
!(
node.parent &&
node.parent.type === "TaggedTemplateExpression"
)
) {
check(node);
}
},
};
},
};
@@ -0,0 +1,151 @@
'use strict';
/*
Copyright 2012-2015, Yahoo Inc.
Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
const path = require('path');
const { escape } = require('html-escaper');
const { ReportBase } = require('istanbul-lib-report');
class CoberturaReport extends ReportBase {
constructor(opts) {
super();
opts = opts || {};
this.cw = null;
this.xml = null;
this.timestamp = opts.timestamp || Date.now().toString();
this.projectRoot = opts.projectRoot || process.cwd();
this.file = opts.file || 'cobertura-coverage.xml';
}
onStart(root, context) {
this.cw = context.writer.writeFile(this.file);
this.xml = context.getXMLWriter(this.cw);
this.writeRootStats(root);
}
onEnd() {
this.xml.closeAll();
this.cw.close();
}
writeRootStats(node) {
const metrics = node.getCoverageSummary();
this.cw.println('<?xml version="1.0" ?>');
this.cw.println(
'<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">'
);
this.xml.openTag('coverage', {
'lines-valid': metrics.lines.total,
'lines-covered': metrics.lines.covered,
'line-rate': metrics.lines.pct / 100.0,
'branches-valid': metrics.branches.total,
'branches-covered': metrics.branches.covered,
'branch-rate': metrics.branches.pct / 100.0,
timestamp: this.timestamp,
complexity: '0',
version: '0.1'
});
this.xml.openTag('sources');
this.xml.inlineTag('source', null, this.projectRoot);
this.xml.closeTag('sources');
this.xml.openTag('packages');
}
onSummary(node) {
const metrics = node.getCoverageSummary(true);
if (!metrics) {
return;
}
this.xml.openTag('package', {
name: node.isRoot() ? 'main' : escape(asJavaPackage(node)),
'line-rate': metrics.lines.pct / 100.0,
'branch-rate': metrics.branches.pct / 100.0
});
this.xml.openTag('classes');
}
onSummaryEnd(node) {
const metrics = node.getCoverageSummary(true);
if (!metrics) {
return;
}
this.xml.closeTag('classes');
this.xml.closeTag('package');
}
onDetail(node) {
const fileCoverage = node.getFileCoverage();
const metrics = node.getCoverageSummary();
const branchByLine = fileCoverage.getBranchCoverageByLine();
this.xml.openTag('class', {
name: escape(asClassName(node)),
filename: path.relative(this.projectRoot, fileCoverage.path),
'line-rate': metrics.lines.pct / 100.0,
'branch-rate': metrics.branches.pct / 100.0
});
this.xml.openTag('methods');
const fnMap = fileCoverage.fnMap;
Object.entries(fnMap).forEach(([k, { name, decl }]) => {
const hits = fileCoverage.f[k];
this.xml.openTag('method', {
name: escape(name),
hits,
signature: '()V' //fake out a no-args void return
});
this.xml.openTag('lines');
//Add the function definition line and hits so that jenkins cobertura plugin records method hits
this.xml.inlineTag('line', {
number: decl.start.line,
hits
});
this.xml.closeTag('lines');
this.xml.closeTag('method');
});
this.xml.closeTag('methods');
this.xml.openTag('lines');
const lines = fileCoverage.getLineCoverage();
Object.entries(lines).forEach(([k, hits]) => {
const attrs = {
number: k,
hits,
branch: 'false'
};
const branchDetail = branchByLine[k];
if (branchDetail) {
attrs.branch = true;
attrs['condition-coverage'] =
branchDetail.coverage +
'% (' +
branchDetail.covered +
'/' +
branchDetail.total +
')';
}
this.xml.inlineTag('line', attrs);
});
this.xml.closeTag('lines');
this.xml.closeTag('class');
}
}
function asJavaPackage(node) {
return node
.getRelativeName()
.replace(/\//g, '.')
.replace(/\\/g, '.')
.replace(/\.$/, '');
}
function asClassName(node) {
return node.getRelativeName().replace(/.*[\\/]/, '');
}
module.exports = CoberturaReport;
@@ -0,0 +1 @@
{"version":3,"file":"unlock-keyhole.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,19 @@
//! otpauth 9.5.1 | (c) Héctor Molinero Fernández | MIT | https://github.com/hectorm/otpauth
//! noble-hashes 2.2.0 | (c) Paul Miller | MIT | https://github.com/paulmillr/noble-hashes
/// <reference types="./otpauth.d.ts" />
// @ts-nocheck
function t(t,e=""){if("number"!=typeof t)throw new TypeError(`${e&&`"${e}" `}expected number, got ${typeof t}`);if(!Number.isSafeInteger(t)||t<0)throw new RangeError(`${e&&`"${e}" `}expected integer >= 0, got ${t}`)}function e(t,e,s=""){const i=(r=t)instanceof Uint8Array||ArrayBuffer.isView(r)&&"Uint8Array"===r.constructor.name&&"BYTES_PER_ELEMENT"in r&&1===r.BYTES_PER_ELEMENT;var r;const n=t?.length;if(!i||void 0!==e){const e=(s&&`"${s}" `)+"expected Uint8Array, got "+(i?`length=${n}`:"type="+typeof t);if(!i)throw new TypeError(e);throw new RangeError(e)}return t}function s(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function i(t,s){e(t,void 0,"digestInto() output");const i=s.outputLen;if(t.length<i)throw new RangeError('"digestInto() output" expected to be of length >='+i)}function r(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function n(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function o(t,e){return t<<32-e|t>>>e}function h(t,e){return t<<e|t>>>32-e>>>0}function a(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}const c=(()=>68===new Uint8Array(new Uint32Array([287454020]).buffer)[0])()?t=>t:function(t){for(let e=0;e<t.length;e++)t[e]=a(t[e]);return t};function l(t,e={}){const s=(e,s)=>t(s).update(e).digest(),i=t(void 0);return s.outputLen=i.outputLen,s.blockLen=i.blockLen,s.canXOF=i.canXOF,s.create=e=>t(e),Object.assign(s,e),Object.freeze(s)}const u=t=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,t])});class f{update(t){return s(this),this.iHash.update(t),this}digestInto(t){s(this),i(t,this),this.finished=!0;const e=t.subarray(0,this.outputLen);this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:s,finished:i,destroyed:r,blockLen:n,outputLen:o}=this;return t.finished=i,
t.destroyed=r,t.blockLen=n,t.outputLen=o,t.oHash=e._cloneInto(t.oHash),t.iHash=s._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}constructor(s,i){if(this.canXOF=!1,this.finished=!1,this.destroyed=!1,function(e){if("function"!=typeof e||"function"!=typeof e.create)throw new TypeError("Hash must wrapped by utils.createHasher");if(t(e.outputLen),t(e.blockLen),e.outputLen<1)throw new Error('"outputLen" must be >= 1');if(e.blockLen<1)throw new Error('"blockLen" must be >= 1')}(s),e(i,void 0,"key"),this.iHash=s.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,o=new Uint8Array(n);o.set(i.length>n?s.create().update(i).digest():i);for(let t=0;t<o.length;t++)o[t]^=54;this.iHash.update(o),this.oHash=s.create();for(let t=0;t<o.length;t++)o[t]^=106;this.oHash.update(o),r(o)}}const d=(()=>{const t=(t,e,s)=>new f(t,e).update(s).digest();return t.create=(t,e)=>new f(t,e),t})();function b(t,e,s){return t&e^~t&s}function g(t,e,s){return t&e^t&s^e&s}class p{update(t){s(this),e(t);const{view:i,buffer:r,blockLen:o}=this,h=t.length;for(let e=0;e<h;){const s=Math.min(o-this.pos,h-e);if(s===o){const s=n(t);for(;o<=h-e;e+=o)this.process(s,e);continue}r.set(t.subarray(e,e+s),this.pos),this.pos+=s,e+=s,this.pos===o&&(this.process(i,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){s(this),i(t,this),this.finished=!0;const{buffer:e,view:o,blockLen:h,isLE:a}=this;let{pos:c}=this;e[c++]=128,r(this.buffer.subarray(c)),this.padOffset>h-c&&(this.process(o,0),c=0);for(let t=c;t<h;t++)e[t]=0;o.setBigUint64(h-8,BigInt(8*this.length),a),this.process(o,0);const l=n(t),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const f=u/4,d=this.get();if(f>d.length)throw new Error("_sha2: outputLen bigger than state");for(let t=0;t<f;t++)l.setUint32(4*t,d[t],a)}
digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const s=t.slice(0,e);return this.destroy(),s}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:s,length:i,finished:r,destroyed:n,pos:o}=this;return t.destroyed=n,t.finished=r,t.length=i,t.pos=o,i%e&&t.buffer.set(s),t}clone(){return this._cloneInto()}constructor(t,e,s,i){this.canXOF=!1,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=e,this.padOffset=s,this.isLE=i,this.buffer=new Uint8Array(t),this.view=n(this.buffer)}}const w=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),m=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),y=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),A=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),x=Uint32Array.from([1732584193,4023233417,2562383102,271733878,3285377520]),H=new Uint32Array(80);class L extends p{get(){const{A:t,B:e,C:s,D:i,E:r}=this;return[t,e,s,i,r]}set(t,e,s,i,r){this.A=0|t,this.B=0|e,this.C=0|s,this.D=0|i,this.E=0|r}process(t,e){for(let s=0;s<16;s++,e+=4)H[s]=t.getUint32(e,!1);for(let t=16;t<80;t++)H[t]=h(H[t-3]^H[t-8]^H[t-14]^H[t-16],1);let{A:s,B:i,C:r,D:n,E:o}=this;for(let t=0;t<80;t++){let e,a;t<20?(e=b(i,r,n),a=1518500249):t<40?(e=i^r^n,a=1859775393):t<60?(e=g(i,r,n),a=2400959708):(e=i^r^n,a=3395469782);const c=h(s,5)+e+o+a+H[t]|0;o=n,n=r,r=h(i,30),i=s,s=c}s=s+this.A|0,i=i+this.B|0,r=r+this.C|0,n=n+this.D|0,o=o+this.E|0,this.set(s,i,r,n,o)}roundClean(){r(H)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0),r(this.buffer)}constructor(){super(64,20,8,!1),this.A=0|x[0],this.B=0|x[1],this.C=0|x[2],this.D=0|x[3],this.E=0|x[4]}}
const E=l(()=>new L),I=BigInt(2**32-1),B=BigInt(32);function O(t,e=!1){return e?{h:Number(t&I),l:Number(t>>B&I)}:{h:0|Number(t>>B&I),l:0|Number(t&I)}}function U(t,e=!1){const s=t.length;let i=new Uint32Array(s),r=new Uint32Array(s);for(let n=0;n<s;n++){const{h:s,l:o}=O(t[n],e);[i[n],r[n]]=[s,o]}return[i,r]}const S=(t,e,s)=>t>>>s,v=(t,e,s)=>t<<32-s|e>>>s,$=(t,e,s)=>t>>>s|e<<32-s,C=(t,e,s)=>t<<32-s|e>>>s,k=(t,e,s)=>t<<64-s|e>>>s-32,T=(t,e,s)=>t>>>s-32|e<<64-s;function D(t,e,s,i){const r=(e>>>0)+(i>>>0);return{h:t+s+(r/2**32|0)|0,l:0|r}}const F=(t,e,s)=>(t>>>0)+(e>>>0)+(s>>>0),_=(t,e,s,i)=>e+s+i+(t/2**32|0)|0,G=(t,e,s,i)=>(t>>>0)+(e>>>0)+(s>>>0)+(i>>>0),P=(t,e,s,i,r)=>e+s+i+r+(t/2**32|0)|0,R=(t,e,s,i,r)=>(t>>>0)+(e>>>0)+(s>>>0)+(i>>>0)+(r>>>0),j=(t,e,s,i,r,n)=>e+s+i+r+n+(t/2**32|0)|0,X=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),M=new Uint32Array(64);class N extends p{get(){const{A:t,B:e,C:s,D:i,E:r,F:n,G:o,H:h}=this;return[t,e,s,i,r,n,o,h]}set(t,e,s,i,r,n,o,h){this.A=0|t,this.B=0|e,this.C=0|s,this.D=0|i,this.E=0|r,this.F=0|n,this.G=0|o,this.H=0|h}process(t,e){for(let s=0;s<16;s++,e+=4)M[s]=t.getUint32(e,!1);for(let t=16;t<64;t++){const e=M[t-15],s=M[t-2],i=o(e,7)^o(e,18)^e>>>3,r=o(s,17)^o(s,19)^s>>>10;M[t]=r+M[t-7]+i+M[t-16]|0}let{A:s,B:i,C:r,D:n,E:h,F:a,G:c,H:l}=this;for(let t=0;t<64;t++){
const e=l+(o(h,6)^o(h,11)^o(h,25))+b(h,a,c)+X[t]+M[t]|0,u=(o(s,2)^o(s,13)^o(s,22))+g(s,i,r)|0;l=c,c=a,a=h,h=n+e|0,n=r,r=i,i=s,s=e+u|0}s=s+this.A|0,i=i+this.B|0,r=r+this.C|0,n=n+this.D|0,h=h+this.E|0,a=a+this.F|0,c=c+this.G|0,l=l+this.H|0,this.set(s,i,r,n,h,a,c,l)}roundClean(){r(M)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),r(this.buffer)}constructor(t){super(64,t,8,!1)}}class Z extends N{constructor(){super(32),this.A=0|w[0],this.B=0|w[1],this.C=0|w[2],this.D=0|w[3],this.E=0|w[4],this.F=0|w[5],this.G=0|w[6],this.H=0|w[7]}}class V extends N{constructor(){super(28),this.A=0|m[0],this.B=0|m[1],this.C=0|m[2],this.D=0|m[3],this.E=0|m[4],this.F=0|m[5],this.G=0|m[6],this.H=0|m[7]}}
const Y=(()=>U(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))))(),z=(()=>Y[0])(),J=(()=>Y[1])(),K=new Uint32Array(80),Q=new Uint32Array(80);class W extends p{get(){const{Ah:t,Al:e,Bh:s,Bl:i,Ch:r,Cl:n,Dh:o,Dl:h,Eh:a,El:c,Fh:l,Fl:u,Gh:f,Gl:d,Hh:b,Hl:g}=this;return[t,e,s,i,r,n,o,h,a,c,l,u,f,d,b,g]}set(t,e,s,i,r,n,o,h,a,c,l,u,f,d,b,g){this.Ah=0|t,this.Al=0|e,this.Bh=0|s,this.Bl=0|i,this.Ch=0|r,
this.Cl=0|n,this.Dh=0|o,this.Dl=0|h,this.Eh=0|a,this.El=0|c,this.Fh=0|l,this.Fl=0|u,this.Gh=0|f,this.Gl=0|d,this.Hh=0|b,this.Hl=0|g}process(t,e){for(let s=0;s<16;s++,e+=4)K[s]=t.getUint32(e),Q[s]=t.getUint32(e+=4);for(let t=16;t<80;t++){const e=0|K[t-15],s=0|Q[t-15],i=$(e,s,1)^$(e,s,8)^S(e,0,7),r=C(e,s,1)^C(e,s,8)^v(e,s,7),n=0|K[t-2],o=0|Q[t-2],h=$(n,o,19)^k(n,o,61)^S(n,0,6),a=C(n,o,19)^T(n,o,61)^v(n,o,6),c=G(r,a,Q[t-7],Q[t-16]),l=P(c,i,h,K[t-7],K[t-16]);K[t]=0|l,Q[t]=0|c}let{Ah:s,Al:i,Bh:r,Bl:n,Ch:o,Cl:h,Dh:a,Dl:c,Eh:l,El:u,Fh:f,Fl:d,Gh:b,Gl:g,Hh:p,Hl:w}=this;for(let t=0;t<80;t++){const e=$(l,u,14)^$(l,u,18)^k(l,u,41),m=C(l,u,14)^C(l,u,18)^T(l,u,41),y=l&f^~l&b,A=R(w,m,u&d^~u&g,J[t],Q[t]),x=j(A,p,e,y,z[t],K[t]),H=0|A,L=$(s,i,28)^k(s,i,34)^k(s,i,39),E=C(s,i,28)^T(s,i,34)^T(s,i,39),I=s&r^s&o^r&o,B=i&n^i&h^n&h;p=0|b,w=0|g,b=0|f,g=0|d,f=0|l,d=0|u,({h:l,l:u}=D(0|a,0|c,0|x,0|H)),a=0|o,c=0|h,o=0|r,h=0|n,r=0|s,n=0|i;const O=F(H,E,B);s=_(O,x,L,I),i=0|O}({h:s,l:i}=D(0|this.Ah,0|this.Al,0|s,0|i)),({h:r,l:n}=D(0|this.Bh,0|this.Bl,0|r,0|n)),({h:o,l:h}=D(0|this.Ch,0|this.Cl,0|o,0|h)),({h:a,l:c}=D(0|this.Dh,0|this.Dl,0|a,0|c)),({h:l,l:u}=D(0|this.Eh,0|this.El,0|l,0|u)),({h:f,l:d}=D(0|this.Fh,0|this.Fl,0|f,0|d)),({h:b,l:g}=D(0|this.Gh,0|this.Gl,0|b,0|g)),({h:p,l:w}=D(0|this.Hh,0|this.Hl,0|p,0|w)),this.set(s,i,r,n,o,h,a,c,l,u,f,d,b,g,p,w)}roundClean(){r(K,Q)}destroy(){this.destroyed=!0,r(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}constructor(t){super(128,t,16,!1)}}class q extends W{constructor(){super(64),this.Ah=0|A[0],this.Al=0|A[1],this.Bh=0|A[2],this.Bl=0|A[3],this.Ch=0|A[4],this.Cl=0|A[5],this.Dh=0|A[6],this.Dl=0|A[7],this.Eh=0|A[8],this.El=0|A[9],this.Fh=0|A[10],this.Fl=0|A[11],this.Gh=0|A[12],this.Gl=0|A[13],this.Hh=0|A[14],this.Hl=0|A[15]}}class tt extends W{constructor(){super(48),this.Ah=0|y[0],this.Al=0|y[1],this.Bh=0|y[2],this.Bl=0|y[3],this.Ch=0|y[4],this.Cl=0|y[5],this.Dh=0|y[6],this.Dl=0|y[7],this.Eh=0|y[8],this.El=0|y[9],this.Fh=0|y[10],this.Fl=0|y[11],this.Gh=0|y[12],this.Gl=0|y[13],this.Hh=0|y[14],
this.Hl=0|y[15]}}const et=l(()=>new Z,u(1)),st=l(()=>new V,u(4)),it=l(()=>new q,u(3)),rt=l(()=>new tt,u(2)),nt=BigInt(0),ot=BigInt(1),ht=BigInt(2),at=BigInt(7),ct=BigInt(256),lt=BigInt(113),ut=[],ft=[],dt=[];for(let t=0,e=ot,s=1,i=0;t<24;t++){[s,i]=[i,(2*s+3*i)%5],ut.push(2*(5*i+s)),ft.push((t+1)*(t+2)/2%64);let r=nt;for(let t=0;t<7;t++)e=(e<<ot^(e>>at)*lt)%ct,e&ht&&(r^=ot<<(ot<<BigInt(t))-ot);dt.push(r)}const bt=U(dt,!0),gt=bt[0],pt=bt[1],wt=(t,e,s)=>s>32?((t,e,s)=>e<<s-32|t>>>64-s)(t,e,s):((t,e,s)=>t<<s|e>>>32-s)(t,e,s),mt=(t,e,s)=>s>32?((t,e,s)=>t<<s-32|e>>>64-s)(t,e,s):((t,e,s)=>e<<s|t>>>32-s)(t,e,s);class yt{clone(){return this._cloneInto()}keccak(){c(this.state32),function(e,s=24){if(t(s,"rounds"),s<1||s>24)throw new Error('"rounds" expected integer 1..24');const i=new Uint32Array(10);for(let t=24-s;t<24;t++){for(let t=0;t<10;t++)i[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const s=(t+8)%10,r=(t+2)%10,n=i[r],o=i[r+1],h=wt(n,o,1)^i[s],a=mt(n,o,1)^i[s+1];for(let s=0;s<50;s+=10)e[t+s]^=h,e[t+s+1]^=a}let s=e[2],r=e[3];for(let t=0;t<24;t++){const i=ft[t],n=wt(s,r,i),o=mt(s,r,i),h=ut[t];s=e[h],r=e[h+1],e[h]=n,e[h+1]=o}for(let t=0;t<50;t+=10){const s=e[t],i=e[t+1],r=e[t+2],n=e[t+3];e[t]^=~e[t+2]&e[t+4],e[t+1]^=~e[t+3]&e[t+5],e[t+2]^=~e[t+4]&e[t+6],e[t+3]^=~e[t+5]&e[t+7],e[t+4]^=~e[t+6]&e[t+8],e[t+5]^=~e[t+7]&e[t+9],e[t+6]^=~e[t+8]&s,e[t+7]^=~e[t+9]&i,e[t+8]^=~s&r,e[t+9]^=~i&n}e[0]^=gt[t],e[1]^=pt[t]}r(i)}(this.state32,this.rounds),c(this.state32),this.posOut=0,this.pos=0}update(t){s(this),e(t);const{blockLen:i,state:r}=this,n=t.length;for(let e=0;e<n;){const s=Math.min(i-this.pos,n-e);for(let i=0;i<s;i++)r[this.pos++]^=t[e++];this.pos===i&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:e,pos:s,blockLen:i}=this;t[s]^=e,128&e&&s===i-1&&this.keccak(),t[i-1]^=128,this.keccak()}writeInto(t){s(this,!1),e(t),this.finish();const i=this.state,{blockLen:r}=this;for(let e=0,s=t.length;e<s;){this.posOut>=r&&this.keccak();const n=Math.min(r-this.posOut,s-e)
;t.set(i.subarray(this.posOut,this.posOut+n),e),this.posOut+=n,e+=n}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(e){return t(e),this.xofInto(new Uint8Array(e))}digestInto(t){if(i(t,this),this.finished)throw new Error("digest() was already called");this.writeInto(t.subarray(0,this.outputLen)),this.destroy()}digest(){const t=new Uint8Array(this.outputLen);return this.digestInto(t),t}destroy(){this.destroyed=!0,r(this.state)}_cloneInto(t){const{blockLen:e,suffix:s,outputLen:i,rounds:r,enableXOF:n}=this;return t||(t=new yt(e,s,i,n,r)),t.blockLen=e,t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=r,t.suffix=s,t.outputLen=i,t.enableXOF=n,t.canXOF=this.canXOF,t.destroyed=this.destroyed,t}constructor(e,s,i,r=!1,n=24){if(this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=s,this.outputLen=i,this.enableXOF=r,this.canXOF=r,this.rounds=n,t(i,"outputLen"),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");var o;this.state=new Uint8Array(200),this.state32=(o=this.state,new Uint32Array(o.buffer,o.byteOffset,Math.floor(o.byteLength/4)))}}const At=(t,e,s,i={})=>l(()=>new yt(e,t,s),i),xt=At(6,144,28,u(7)),Ht=At(6,136,32,u(8)),Lt=At(6,104,48,u(9)),Et=At(6,72,64,u(10)),It=(()=>{if("object"==typeof globalThis)return globalThis;Object.defineProperty(Object.prototype,"__GLOBALTHIS__",{get(){return this},configurable:!0});try{if("undefined"!=typeof __GLOBALTHIS__)return __GLOBALTHIS__}finally{delete Object.prototype.__GLOBALTHIS__}return"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0})(),Bt={SHA1:E,SHA224:st,SHA256:et,SHA384:rt,SHA512:it,"SHA3-224":xt,"SHA3-256":Ht,"SHA3-384":Lt,"SHA3-512":Et},Ot=t=>{switch(!0){case/^(?:SHA-?1|SSL3-SHA1)$/i.test(t):return"SHA1";case/^SHA(?:2?-)?224$/i.test(t):return"SHA224";case/^SHA(?:2?-)?256$/i.test(t):return"SHA256"
;case/^SHA(?:2?-)?384$/i.test(t):return"SHA384";case/^SHA(?:2?-)?512$/i.test(t):return"SHA512";case/^SHA3-224$/i.test(t):return"SHA3-224";case/^SHA3-256$/i.test(t):return"SHA3-256";case/^SHA3-384$/i.test(t):return"SHA3-384";case/^SHA3-512$/i.test(t):return"SHA3-512";default:throw new TypeError(`Unknown hash algorithm: ${t}`)}},Ut=(t,e,s)=>{if(d){const i=Bt[t]??Bt[Ot(t)];return d(i,e,s)}throw new Error("Missing HMAC function")},St="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",vt=t=>{let e=(t=t.replace(/ /g,"")).length;for(;"="===t[e-1];)--e;t=(e<t.length?t.substring(0,e):t).toUpperCase();const s=new ArrayBuffer(5*t.length/8|0),i=new Uint8Array(s);let r=0,n=0,o=0;for(let e=0;e<t.length;e++){const s=St.indexOf(t[e]);if(-1===s)throw new TypeError(`Invalid character found: ${t[e]}`);n=n<<5|s,r+=5,r>=8&&(r-=8,i[o++]=n>>>r)}return i},$t=t=>{let e=0,s=0,i="";for(let r=0;r<t.length;r++)for(s=s<<8|t[r],e+=8;e>=5;)i+=St[s>>>e-5&31],e-=5;return e>0&&(i+=St[s<<5-e&31]),i},Ct=t=>{t=t.replace(/ /g,"");const e=new ArrayBuffer(t.length/2),s=new Uint8Array(e);for(let e=0;e<t.length;e+=2)s[e/2]=parseInt(t.substring(e,e+2),16);return s},kt=t=>{let e="";for(let s=0;s<t.length;s++){const i=t[s].toString(16);1===i.length&&(e+="0"),e+=i}return e.toUpperCase()},Tt=t=>{const e=new ArrayBuffer(t.length),s=new Uint8Array(e);for(let e=0;e<t.length;e++)s[e]=255&t.charCodeAt(e);return s},Dt=t=>{let e="";for(let s=0;s<t.length;s++)e+=String.fromCharCode(t[s]);return e},Ft=It.TextEncoder?new It.TextEncoder:null,_t=It.TextDecoder?new It.TextDecoder:null,Gt=t=>{if(!Ft)throw new Error("Encoding API not available");return Ft.encode(t)},Pt=t=>{if(!_t)throw new Error("Encoding API not available");return _t.decode(t)};class Rt{static fromLatin1(t){return new Rt({buffer:Tt(t).buffer})}static fromUTF8(t){return new Rt({buffer:Gt(t).buffer})}static fromBase32(t){return new Rt({buffer:vt(t).buffer})}static fromHex(t){return new Rt({buffer:Ct(t).buffer})}get buffer(){return this.bytes.buffer}get latin1(){return Object.defineProperty(this,"latin1",{enumerable:!0,
writable:!1,configurable:!1,value:Dt(this.bytes)}),this.latin1}get utf8(){return Object.defineProperty(this,"utf8",{enumerable:!0,writable:!1,configurable:!1,value:Pt(this.bytes)}),this.utf8}get base32(){return Object.defineProperty(this,"base32",{enumerable:!0,writable:!1,configurable:!1,value:$t(this.bytes)}),this.base32}get hex(){return Object.defineProperty(this,"hex",{enumerable:!0,writable:!1,configurable:!1,value:kt(this.bytes)}),this.hex}constructor({buffer:t,size:e=20}={}){this.bytes=void 0===t?(t=>{if(It.crypto?.getRandomValues)return It.crypto.getRandomValues(new Uint8Array(t));throw new Error("Cryptography API not available")})(e):new Uint8Array(t),Object.defineProperty(this,"bytes",{enumerable:!0,writable:!1,configurable:!1,value:this.bytes})}}class jt{static get defaults(){return{issuer:"",label:"OTPAuth",issuerInLabel:!0,algorithm:"SHA1",digits:6,counter:0,window:1}}static generate({secret:t,algorithm:e=jt.defaults.algorithm,digits:s=jt.defaults.digits,counter:i=jt.defaults.counter,hmac:r=Ut}){const n=(t=>{const e=new ArrayBuffer(8),s=new Uint8Array(e);let i=t;for(let t=7;t>=0&&0!==i;t--)s[t]=255&i,i-=s[t],i/=256;return s})(i),o=r(e,t.bytes,n);if(!o?.byteLength||o.byteLength<19)throw new TypeError("Return value must be at least 19 bytes");const h=15&o[o.byteLength-1];return(((127&o[h])<<24|(255&o[h+1])<<16|(255&o[h+2])<<8|255&o[h+3])%10**s).toString().padStart(s,"0")}generate({counter:t=this.counter++}={}){return jt.generate({secret:this.secret,algorithm:this.algorithm,digits:this.digits,counter:t,hmac:this.hmac})}static validate({token:t,secret:e,algorithm:s,digits:i=jt.defaults.digits,counter:r=jt.defaults.counter,window:n=jt.defaults.window,hmac:o=Ut}){if(t.length!==i)return null;let h=null;const a=n=>{const a=jt.generate({secret:e,algorithm:s,digits:i,counter:n,hmac:o});((t,e)=>{{if(t.length!==e.length)throw new TypeError("Input strings must have the same length");let s=-1,i=0;for(;++s<t.length;)i|=t.charCodeAt(s)^e.charCodeAt(s);return 0===i}})(t,a)&&(h=n-r)};a(r)
;for(let t=1;t<=n&&null===h&&(a(r-t),null===h)&&(a(r+t),null===h);++t);return h}validate({token:t,counter:e=this.counter,window:s}){return jt.validate({token:t,secret:this.secret,algorithm:this.algorithm,digits:this.digits,counter:e,window:s,hmac:this.hmac})}toString(){const t=encodeURIComponent;return"otpauth://hotp/"+(this.issuer.length>0?this.issuerInLabel?`${t(this.issuer)}:${t(this.label)}?issuer=${t(this.issuer)}&`:`${t(this.label)}?issuer=${t(this.issuer)}&`:`${t(this.label)}?`)+`secret=${t(this.secret.base32)}&`+`algorithm=${t(this.algorithm)}&`+`digits=${t(this.digits)}&`+`counter=${t(this.counter)}`}constructor({issuer:t=jt.defaults.issuer,label:e=jt.defaults.label,issuerInLabel:s=jt.defaults.issuerInLabel,secret:i=new Rt,algorithm:r=jt.defaults.algorithm,digits:n=jt.defaults.digits,counter:o=jt.defaults.counter,hmac:h}={}){this.issuer=t,this.label=e,this.issuerInLabel=s,this.secret="string"==typeof i?Rt.fromBase32(i):i,this.algorithm=h?r:Ot(r),this.digits=n,this.counter=o,this.hmac=h}}class Xt{static get defaults(){return{issuer:"",label:"OTPAuth",issuerInLabel:!0,algorithm:"SHA1",digits:6,period:30,window:1}}static counter({period:t=Xt.defaults.period,timestamp:e=Date.now()}={}){return Math.floor(e/1e3/t)}counter({timestamp:t=Date.now()}={}){return Xt.counter({period:this.period,timestamp:t})}static remaining({period:t=Xt.defaults.period,timestamp:e=Date.now()}={}){return 1e3*t-e%(1e3*t)}remaining({timestamp:t=Date.now()}={}){return Xt.remaining({period:this.period,timestamp:t})}static generate({secret:t,algorithm:e,digits:s,period:i=Xt.defaults.period,timestamp:r=Date.now(),hmac:n}){return jt.generate({secret:t,algorithm:e,digits:s,counter:Xt.counter({period:i,timestamp:r}),hmac:n})}generate({timestamp:t=Date.now()}={}){return Xt.generate({secret:this.secret,algorithm:this.algorithm,digits:this.digits,period:this.period,timestamp:t,hmac:this.hmac})}static validate({token:t,secret:e,algorithm:s,digits:i,period:r=Xt.defaults.period,timestamp:n=Date.now(),window:o,hmac:h}){return jt.validate({token:t,
secret:e,algorithm:s,digits:i,counter:Xt.counter({period:r,timestamp:n}),window:o,hmac:h})}validate({token:t,timestamp:e,window:s}){return Xt.validate({token:t,secret:this.secret,algorithm:this.algorithm,digits:this.digits,period:this.period,timestamp:e,window:s,hmac:this.hmac})}toString(){const t=encodeURIComponent;return"otpauth://totp/"+(this.issuer.length>0?this.issuerInLabel?`${t(this.issuer)}:${t(this.label)}?issuer=${t(this.issuer)}&`:`${t(this.label)}?issuer=${t(this.issuer)}&`:`${t(this.label)}?`)+`secret=${t(this.secret.base32)}&`+`algorithm=${t(this.algorithm)}&`+`digits=${t(this.digits)}&`+`period=${t(this.period)}`}constructor({issuer:t=Xt.defaults.issuer,label:e=Xt.defaults.label,issuerInLabel:s=Xt.defaults.issuerInLabel,secret:i=new Rt,algorithm:r=Xt.defaults.algorithm,digits:n=Xt.defaults.digits,period:o=Xt.defaults.period,hmac:h}={}){this.issuer=t,this.label=e,this.issuerInLabel=s,this.secret="string"==typeof i?Rt.fromBase32(i):i,this.algorithm=h?r:Ot(r),this.digits=n,this.period=o,this.hmac=h}}const Mt=/^otpauth:\/\/([ht]otp)\/(.+)\?([A-Z0-9.~_-]+=[^?&]*(?:&[A-Z0-9.~_-]+=[^?&]*)*)$/i,Nt=/^[2-7A-Z]+=*$/i,Zt=/^SHA(?:1|224|256|384|512|3-224|3-256|3-384|3-512)$/i,Vt=/^[A-Z0-9]+(?:[_-][A-Z0-9]+)*$/i,Yt=/^[+-]?\d+$/,zt=/^\+?[1-9]\d*$/;class Jt{static parse(t,{hmac:e}={}){let s;try{s=t.match(Mt)}catch(t){}if(!Array.isArray(s))throw new URIError("Invalid URI format");const i=s[1].toLowerCase(),r=s[2].split(/(?::|%3A) *(.+)/i,2).map(decodeURIComponent),n=s[3].split("&").reduce((t,e)=>{const s=e.split(/=(.*)/,2).map(decodeURIComponent),i=s[0].toLowerCase(),r=s[1],n=t;return n[i]=r,n},{});let o;const h={};if("hotp"===i){if(o=jt,void 0===n.counter||!Yt.test(n.counter))throw new TypeError("Missing or invalid 'counter' parameter");h.counter=parseInt(n.counter,10)}else{if("totp"!==i)throw new TypeError("Unknown OTP type");if(o=Xt,void 0!==n.period){if(!zt.test(n.period))throw new TypeError("Invalid 'period' parameter");h.period=parseInt(n.period,10)}}if(void 0!==n.issuer&&(h.issuer=n.issuer),
2===r.length?(h.label=r[1],void 0===h.issuer||""===h.issuer?h.issuer=r[0]:""===r[0]&&(h.issuerInLabel=!1)):(h.label=r[0],void 0!==h.issuer&&""!==h.issuer&&(h.issuerInLabel=!1)),void 0===n.secret||!Nt.test(n.secret))throw new TypeError("Missing or invalid 'secret' parameter");if(h.secret=n.secret,void 0!==n.algorithm){if(!(e?Vt:Zt).test(n.algorithm))throw new TypeError("Invalid 'algorithm' parameter");h.algorithm=n.algorithm}if(void 0!==n.digits){if(!zt.test(n.digits))throw new TypeError("Invalid 'digits' parameter");h.digits=parseInt(n.digits,10)}return void 0!==e&&(h.hmac=e),new o(h)}static stringify(t){if(t instanceof jt||t instanceof Xt)return t.toString();throw new TypeError("Invalid 'HOTP/TOTP' object")}}const Kt="9.5.1";export{jt as HOTP,Rt as Secret,Xt as TOTP,Jt as URI,Kt as version};
//# sourceMappingURL=otpauth.esm.min.js.map
@@ -0,0 +1 @@
{"version":3,"file":"normalize-windows-path.d.ts","sourceRoot":"","sources":["../../src/normalize-windows-path.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,oBAAoB,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,MAGC,CAAA"}
@@ -0,0 +1,48 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const Hook = require("./Hook");
const HookCodeFactory = require("./HookCodeFactory");
class AsyncSeriesWaterfallHookCodeFactory extends HookCodeFactory {
content({ onError, onResult, _onDone }) {
return this.callTapsSeries({
onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true),
onResult: (i, result, next) => {
let code = "";
code += `if(${result} !== undefined) {\n`;
code += `${this._args[0]} = ${result};\n`;
code += "}\n";
code += next();
return code;
},
onDone: () => onResult(this._args[0])
});
}
}
const factory = new AsyncSeriesWaterfallHookCodeFactory();
function COMPILE(options) {
factory.setup(this, options);
return factory.create(options);
}
function AsyncSeriesWaterfallHook(args = [], name = undefined) {
if (args.length < 1) {
throw new Error("Waterfall hooks must have at least one argument");
}
const hook = new Hook(args, name);
hook.constructor = AsyncSeriesWaterfallHook;
hook.compile = COMPILE;
hook._call = undefined;
hook.call = undefined;
return hook;
}
AsyncSeriesWaterfallHook.prototype = null;
module.exports = AsyncSeriesWaterfallHook;
@@ -0,0 +1 @@
{"version":3,"file":"vlq.d.ts","sourceRoot":"","sources":["../src/vlq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE5D,eAAO,MAAM,KAAK,QAAoB,CAAC;AACvC,eAAO,MAAM,SAAS,QAAoB,CAAC;AAY3C,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAoB5E;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAY1F;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,WAG3D"}
@@ -0,0 +1,105 @@
#!/usr/bin/env python3
"""Unit tests for the cmake.py file."""
import io
import types
import unittest
from gyp.generator import cmake
class TestCustomCommandComment(unittest.TestCase):
def test_ActionMessageIsQuotedAndEscaped(self):
output = io.StringIO()
action = {
"action_name": "gen",
"inputs": ["in.txt"],
"outputs": ["out.txt"],
"action": ["python", "gen.py"],
"message": 'Generating "out.txt"; (see #1)',
}
cmake.WriteActions("tgt", [action], [], [], ".", output)
self.assertIn(
' COMMENT "Generating \\"out.txt\\"\\; (see #1)"\n', output.getvalue()
)
def test_ActionWithoutMessageUsesTargetName(self):
output = io.StringIO()
action = {
"action_name": "gen",
"inputs": [],
"outputs": ["out.txt"],
"action": ["python", "gen.py"],
}
cmake.WriteActions("tgt", [action], [], [], ".", output)
self.assertIn(' COMMENT "tgt__gen"\n', output.getvalue())
def test_RuleMessageKeepsVariableReferences(self):
output = io.StringIO()
rule = {
"rule_name": "compile",
"outputs": ["${RULE_INPUT_ROOT}.o"],
"action": ["cc", "${RULE_INPUT_PATH}"],
"rule_sources": ["foo.c"],
"message": "Compiling ${RULE_INPUT_NAME}",
}
cmake.WriteRules("tgt", [rule], [], [], ".", output)
self.assertIn(' COMMENT "Compiling ${RULE_INPUT_NAME}"\n', output.getvalue())
def test_CopiesMessageIsQuoted(self):
output = io.StringIO()
copies = [{"files": ["a.txt"], "destination": "out"}]
cmake.WriteCopies("tgt", copies, [], ".", output)
self.assertIn('COMMENT "Copying for tgt"\n', output.getvalue())
class TestTargetWithoutSources(unittest.TestCase):
def _WriteTarget(self, target_type, sources=()):
qualified_target = "foo.gyp:foo#target"
spec = {
"target_name": "foo",
"type": target_type,
"toolset": "target",
"sources": list(sources),
}
output = io.StringIO()
cmake.WriteTarget(
cmake.CMakeNamer([qualified_target]),
qualified_target,
{qualified_target: spec},
"out/Default",
"Default",
types.SimpleNamespace(toplevel_dir="."),
{},
[qualified_target],
"linux",
output,
)
return output.getvalue()
def test_DummySourceForEmptyTargets(self):
for target_type, add_target in (
("executable", "add_executable(foo"),
("static_library", "add_library(foo STATIC"),
("shared_library", "add_library(foo SHARED"),
("loadable_module", "add_library(foo MODULE"),
):
with self.subTest(target_type=target_type):
output = self._WriteTarget(target_type)
self.assertIn(' file(WRITE "${foo__dummy_srcs}" "")\n', output)
self.assertIn(add_target + " ${foo__dummy_srcs})\n", output)
def test_NoDummySourceForLibraryWithSources(self):
output = self._WriteTarget("static_library", ["foo.c"])
self.assertIn("add_library(foo STATIC ${foo__c_srcs})\n", output)
self.assertNotIn("dummy", output)
def test_NoDummySourceForNoneTarget(self):
output = self._WriteTarget("none")
self.assertIn("add_custom_target(foo SOURCES)\n", output)
self.assertNotIn("dummy", output)
if __name__ == "__main__":
unittest.main()
@@ -0,0 +1,4 @@
export declare const env: {
isNode: boolean;
forceCache: boolean;
};
@@ -0,0 +1,309 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// lib/v3/index.ts
var index_exports = {};
__export(index_exports, {
ValidationError: () => ValidationError,
createMessageBuilder: () => createMessageBuilder,
errorMap: () => errorMap,
fromError: () => fromError,
fromZodError: () => fromZodError,
fromZodIssue: () => fromZodIssue,
isValidationError: () => isValidationError,
isValidationErrorLike: () => isValidationErrorLike,
isZodErrorLike: () => isZodErrorLike,
toValidationError: () => toValidationError
});
module.exports = __toCommonJS(index_exports);
// lib/v3/isZodErrorLike.ts
function isZodErrorLike(err) {
return err instanceof Error && err.name === "ZodError" && "issues" in err && Array.isArray(err.issues);
}
// lib/v3/ValidationError.ts
var ValidationError = class extends Error {
name;
details;
constructor(message, options) {
super(message, options);
this.name = "ZodValidationError";
this.details = getIssuesFromErrorOptions(options);
}
toString() {
return this.message;
}
};
function getIssuesFromErrorOptions(options) {
if (options) {
const cause = options.cause;
if (isZodErrorLike(cause)) {
return cause.issues;
}
}
return [];
}
// lib/v3/isValidationError.ts
function isValidationError(err) {
return err instanceof ValidationError;
}
// lib/v3/isValidationErrorLike.ts
function isValidationErrorLike(err) {
return err instanceof Error && err.name === "ZodValidationError";
}
// lib/v3/fromZodIssue.ts
var zod2 = __toESM(require("zod/v3"));
// lib/v3/MessageBuilder.ts
var zod = __toESM(require("zod/v3"));
// lib/utils/NonEmptyArray.ts
function isNonEmptyArray(value) {
return value.length !== 0;
}
// lib/utils/stringify.ts
function stringifySymbol(symbol) {
return symbol.description ?? "";
}
// lib/utils/joinPath.ts
var identifierRegex = /[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;
function joinPath(path) {
if (path.length === 1) {
let propertyKey = path[0];
if (typeof propertyKey === "symbol") {
propertyKey = stringifySymbol(propertyKey);
}
return propertyKey.toString() || '""';
}
return path.reduce((acc, propertyKey) => {
if (typeof propertyKey === "number") {
return acc + "[" + propertyKey.toString() + "]";
}
if (typeof propertyKey === "symbol") {
propertyKey = stringifySymbol(propertyKey);
}
if (propertyKey.includes('"')) {
return acc + '["' + escapeQuotes(propertyKey) + '"]';
}
if (!identifierRegex.test(propertyKey)) {
return acc + '["' + propertyKey + '"]';
}
const separator = acc.length === 0 ? "" : ".";
return acc + separator + propertyKey;
}, "");
}
function escapeQuotes(str) {
return str.replace(/"/g, '\\"');
}
// lib/v3/config.ts
var ISSUE_SEPARATOR = "; ";
var MAX_ISSUES_IN_MESSAGE = 99;
var PREFIX = "Validation error";
var PREFIX_SEPARATOR = ": ";
var UNION_SEPARATOR = ", or ";
// lib/v3/MessageBuilder.ts
function createMessageBuilder(props = {}) {
const {
issueSeparator = ISSUE_SEPARATOR,
unionSeparator = UNION_SEPARATOR,
prefixSeparator = PREFIX_SEPARATOR,
prefix = PREFIX,
includePath = true,
maxIssuesInMessage = MAX_ISSUES_IN_MESSAGE
} = props;
return (issues) => {
const message = issues.slice(0, maxIssuesInMessage).map(
(issue) => getMessageFromZodIssue({
issue,
issueSeparator,
unionSeparator,
includePath
})
).join(issueSeparator);
return prefixMessage(message, prefix, prefixSeparator);
};
}
function getMessageFromZodIssue(props) {
const { issue, issueSeparator, unionSeparator, includePath } = props;
if (issue.code === zod.ZodIssueCode.invalid_union) {
return issue.unionErrors.reduce((acc, zodError) => {
const newIssues = zodError.issues.map(
(issue2) => getMessageFromZodIssue({
issue: issue2,
issueSeparator,
unionSeparator,
includePath
})
).join(issueSeparator);
if (!acc.includes(newIssues)) {
acc.push(newIssues);
}
return acc;
}, []).join(unionSeparator);
}
if (issue.code === zod.ZodIssueCode.invalid_arguments) {
return [
issue.message,
...issue.argumentsError.issues.map(
(issue2) => getMessageFromZodIssue({
issue: issue2,
issueSeparator,
unionSeparator,
includePath
})
)
].join(issueSeparator);
}
if (issue.code === zod.ZodIssueCode.invalid_return_type) {
return [
issue.message,
...issue.returnTypeError.issues.map(
(issue2) => getMessageFromZodIssue({
issue: issue2,
issueSeparator,
unionSeparator,
includePath
})
)
].join(issueSeparator);
}
if (includePath && isNonEmptyArray(issue.path)) {
if (issue.path.length === 1) {
const identifier = issue.path[0];
if (typeof identifier === "number") {
return `${issue.message} at index ${identifier}`;
}
}
return `${issue.message} at "${joinPath(issue.path)}"`;
}
return issue.message;
}
function prefixMessage(message, prefix, prefixSeparator) {
if (prefix !== null) {
if (message.length > 0) {
return [prefix, message].join(prefixSeparator);
}
return prefix;
}
if (message.length > 0) {
return message;
}
return PREFIX;
}
// lib/v3/fromZodIssue.ts
function fromZodIssue(issue, options = {}) {
const messageBuilder = createMessageBuilderFromOptions(options);
const message = messageBuilder([issue]);
return new ValidationError(message, { cause: new zod2.ZodError([issue]) });
}
function createMessageBuilderFromOptions(options) {
if ("messageBuilder" in options) {
return options.messageBuilder;
}
return createMessageBuilder(options);
}
// lib/v3/errorMap.ts
var errorMap = (issue, ctx) => {
const error = fromZodIssue({
...issue,
// fallback to the default error message
// when issue does not have a message
message: issue.message ?? ctx.defaultError
});
return {
message: error.message
};
};
// lib/v3/fromZodError.ts
function fromZodError(zodError, options = {}) {
if (!isZodErrorLike(zodError)) {
throw new TypeError(
`Invalid zodError param; expected instance of ZodError. Did you mean to use the "${fromError.name}" method instead?`
);
}
return fromZodErrorWithoutRuntimeCheck(zodError, options);
}
function fromZodErrorWithoutRuntimeCheck(zodError, options = {}) {
const zodIssues = zodError.errors;
let message;
if (isNonEmptyArray(zodIssues)) {
const messageBuilder = createMessageBuilderFromOptions2(options);
message = messageBuilder(zodIssues);
} else {
message = zodError.message;
}
return new ValidationError(message, { cause: zodError });
}
function createMessageBuilderFromOptions2(options) {
if ("messageBuilder" in options) {
return options.messageBuilder;
}
return createMessageBuilder(options);
}
// lib/v3/toValidationError.ts
var toValidationError = (options = {}) => (err) => {
if (isZodErrorLike(err)) {
return fromZodErrorWithoutRuntimeCheck(err, options);
}
if (err instanceof Error) {
return new ValidationError(err.message, { cause: err });
}
return new ValidationError("Unknown error");
};
// lib/v3/fromError.ts
function fromError(err, options = {}) {
return toValidationError(options)(err);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
ValidationError,
createMessageBuilder,
errorMap,
fromError,
fromZodError,
fromZodIssue,
isValidationError,
isValidationErrorLike,
isZodErrorLike,
toValidationError
});
//# sourceMappingURL=index.js.map
@@ -0,0 +1,41 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getParserServices = getParserServices;
const parserSeemsToBeTSESLint_1 = require("./parserSeemsToBeTSESLint");
const ERROR_MESSAGE_REQUIRES_PARSER_SERVICES = "You have used a rule which requires type information, but don't have parserOptions set to generate type information for this file. See https://tseslint.com/typed-linting for enabling linting with type information.";
const ERROR_MESSAGE_UNKNOWN_PARSER = 'Note: detected a parser other than @typescript-eslint/parser. Make sure the parser is configured to forward "parserOptions.project" to @typescript-eslint/parser.';
function getParserServices(context, allowWithoutFullTypeInformation = false) {
const parser =
// eslint-disable-next-line @typescript-eslint/no-deprecated -- For compatibility with ESLint 8
context.parserPath || context.languageOptions.parser?.meta?.name;
// This check is unnecessary if the user is using the latest version of our parser.
//
// However the world isn't perfect:
// - Users often use old parser versions.
// Old versions of the parser would not return any parserServices unless parserOptions.project was set.
// - Users sometimes use parsers that aren't @typescript-eslint/parser
// Other parsers won't return the parser services we expect (if they return any at all).
//
// This check allows us to handle bad user setups whilst providing a nice user-facing
// error message explaining the problem.
if (context.sourceCode.parserServices?.esTreeNodeToTSNodeMap == null ||
context.sourceCode.parserServices.tsNodeToESTreeNodeMap == null) {
throwError(parser);
}
// if a rule requires full type information, then hard fail if it doesn't exist
// this forces the user to supply parserOptions.project
if (context.sourceCode.parserServices.program == null &&
!allowWithoutFullTypeInformation) {
throwError(parser);
}
return context.sourceCode.parserServices;
}
/* eslint-enable @typescript-eslint/unified-signatures */
function throwError(parser) {
const messages = [
ERROR_MESSAGE_REQUIRES_PARSER_SERVICES,
`Parser: ${parser || '(unknown)'}`,
!(0, parserSeemsToBeTSESLint_1.parserSeemsToBeTSESLint)(parser) && ERROR_MESSAGE_UNKNOWN_PARSER,
].filter(Boolean);
throw new Error(messages.join('\n'));
}
@@ -0,0 +1 @@
{"version":3,"file":"spring-value.mjs","sources":["../../../src/value/spring-value.ts"],"sourcesContent":["import { MotionValue } from \".\"\nimport { AnyResolvedKeyframe, SpringOptions } from \"../animation/types\"\nimport { attachFollow, followValue } from \"./follow-value\"\n\n/**\n * Create a `MotionValue` that animates to its latest value using a spring.\n * Can either be a value or track another `MotionValue`.\n *\n * ```jsx\n * const x = motionValue(0)\n * const y = springValue(x, { stiffness: 300 })\n * ```\n *\n * @param source - Initial value or MotionValue to track\n * @param options - Spring configuration options\n * @returns `MotionValue`\n *\n * @public\n */\nexport function springValue<T extends AnyResolvedKeyframe>(\n source: T | MotionValue<T>,\n options?: SpringOptions\n) {\n return followValue(source, { type: \"spring\", ...options })\n}\n\n/**\n * Attach a spring animation to a MotionValue that will animate whenever the value changes.\n *\n * @param value - The MotionValue to animate\n * @param source - Initial value or MotionValue to track\n * @param options - Spring configuration options\n * @returns Cleanup function\n *\n * @public\n */\nexport function attachSpring<T extends AnyResolvedKeyframe>(\n value: MotionValue<T>,\n source: T | MotionValue<T>,\n options?: SpringOptions\n): VoidFunction {\n return attachFollow(value, source, { type: \"spring\", ...options })\n}\n"],"names":[],"mappings":";;AAIA;;;;;;;;;;;;;;AAcG;AACG,SAAU,WAAW,CACvB,MAA0B,EAC1B,OAAuB,EAAA;AAEvB,IAAA,OAAO,WAAW,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,CAAC;AAC9D;AAEA;;;;;;;;;AASG;SACa,YAAY,CACxB,KAAqB,EACrB,MAA0B,EAC1B,OAAuB,EAAA;AAEvB,IAAA,OAAO,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,CAAC;AACtE;;;;"}
@@ -0,0 +1,73 @@
# Tools
## clang-format
The clang-format checking tools is designed to check changed lines of code compared to given git-refs.
## Migration Script
The migration tool is designed to reduce repetitive work in the migration process. However, the script is not aiming to convert every thing for you. There are usually some small fixes and major reconstruction required.
### How To Use
To run the conversion script, first make sure you have the latest `node-addon-api` in your `node_modules` directory.
```
npm install node-addon-api
```
Then run the script passing your project directory
```
node ./node_modules/node-addon-api/tools/conversion.js ./
```
After finish, recompile and debug things that are missed by the script.
### Quick Fixes
Here is the list of things that can be fixed easily.
1. Change your methods' return value to void if it doesn't return value to JavaScript.
2. Use `.` to access attribute or to invoke member function in Napi::Object instead of `->`.
3. `Napi::New(env, value);` to `Napi::[Type]::New(env, value);
### Major Reconstructions
The implementation of `Napi::ObjectWrap` is significantly different from NAN's. `Napi::ObjectWrap` takes a pointer to the wrapped object and creates a reference to the wrapped object inside ObjectWrap constructor. `Napi::ObjectWrap` also associates wrapped object's instance methods to Javascript module instead of static methods like NAN.
So if you use Nan::ObjectWrap in your module, you will need to execute the following steps.
1. Convert your [ClassName]::New function to a constructor function that takes a `Napi::CallbackInfo`. Declare it as
```
[ClassName](const Napi::CallbackInfo& info);
```
and define it as
```
[ClassName]::[ClassName](const Napi::CallbackInfo& info) : Napi::ObjectWrap<[ClassName]>(info){
...
}
```
This way, the `Napi::ObjectWrap` constructor will be invoked after the object has been instantiated and `Napi::ObjectWrap` can use the `this` pointer to create a reference to the wrapped object.
2. Move your original constructor code into the new constructor. Delete your original constructor.
3. In your class initialization function, associate native methods in the following way.
```
Napi::FunctionReference constructor;
void [ClassName]::Init(Napi::Env env, Napi::Object exports, Napi::Object module) {
Napi::HandleScope scope(env);
Napi::Function ctor = DefineClass(env, "Canvas", {
InstanceMethod<&[ClassName]::Func1>("Func1"),
InstanceMethod<&[ClassName]::Func2>("Func2"),
InstanceAccessor<&[ClassName]::ValueGetter>("Value"),
StaticMethod<&[ClassName]::StaticMethod>("MethodName"),
InstanceValue("Value", Napi::[Type]::New(env, value)),
});
constructor = Napi::Persistent(ctor);
constructor .SuppressDestruct();
exports.Set("[ClassName]", ctor);
}
```
4. In function where you need to Unwrap the ObjectWrap in NAN like `[ClassName]* native = Nan::ObjectWrap::Unwrap<[ClassName]>(info.This());`, use `this` pointer directly as the unwrapped object as each ObjectWrap instance is associated with a unique object instance.
If you still find issues after following this guide, please leave us an issue describing your problem and we will try to resolve it.
@@ -0,0 +1,57 @@
# fastest-levenshtein :rocket:
> Fastest JS/TS implemenation of [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance).<br>
> Measure the difference between two strings.
[![Build Status](https://travis-ci.org/ka-weihe/fastest-levenshtein.svg?branch=master)](https://travis-ci.org/ka-weihe/fastest-levenshtein)
[![Coverage Status](https://coveralls.io/repos/github/ka-weihe/node-levenshtein/badge.svg?branch=master)](https://coveralls.io/github/ka-weihe/node-levenshtein?branch=master)
[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/ka-weihe/fastest-levenshtein.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/ka-weihe/fastest-levenshtein/context:javascript)
![npm](https://img.shields.io/npm/dm/fastest-levenshtein)
```bash
$ npm i fastest-levenshtein
```
## Usage
### Node
```javascript
const {distance, closest} = require('fastest-levenshtein')
// Print levenshtein-distance between 'fast' and 'faster'
console.log(distance('fast', 'faster'))
//=> 2
// Print string from array with lowest edit-distance to 'fast'
console.log(closest('fast', ['slow', 'faster', 'fastest']))
//=> 'faster'
```
### Deno
```javascript
import {distance, closest} from 'https://deno.land/x/fastest_levenshtein/mod.ts'
// Print levenshtein-distance between 'fast' and 'faster'
console.log(distance('fast', 'faster'))
//=> 2
// Print string from array with lowest edit-distance to 'fast'
console.log(closest('fast', ['slow', 'faster', 'fastest']))
//=> 'faster'
```
## Benchmark
I generated 500 pairs of strings with length N. I measured the ops/sec each library achieves to process all the given pairs. Higher is better.
| Test Target | N=4 | N=8 | N=16 | N=32 | N=64 | N=128 | N=256 | N=512 | N=1024 |
|---------------------------|-------|-------|-------|------|-------|-------|-------|-------|--------|
| fastest-levenshtein | 44423 | 23702 | 10764 | 4595 | 1049 | 291.5 | 86.64 | 22.24 | 5.473 |
| js-levenshtein | 21261 | 10030 | 2939 | 824 | 223 | 57.62 | 14.77 | 3.717 | 0.934 |
| leven | 19688 | 6884 | 1606 | 436 | 117 | 30.34 | 7.604 | 1.929 | 0.478 |
| fast-levenshtein | 18577 | 6112 | 1265 | 345 | 89.41 | 22.70 | 5.676 | 1.428 | 0.348 |
| levenshtein-edit-distance | 22968 | 7445 | 1493 | 409 | 109 | 28.07 | 7.095 | 1.789 | 0.445 |
### Relative Performance
This image shows the relative performance between `fastest-levenshtein` and `js-levenshtein` (the 2nd fastest). `fastest-levenshtein` is always a lot faster. y-axis shows "times faster".
![Benchmark](/images/relaperf.png)
## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_z","33":"B"},B:{"1":"_J"},C:{"1":"_tN _lB","2":"_q _fF _L"},D:{"1":"_oQ _HC","2":"_1I"},E:{"1":"_jB","2":"_4C"},F:{"1":"_a","2":"_T"},G:{"1":"_2","2":"_r"},H:{"2":"1D"},I:{"1":"_X","2":"_W"},J:{"1":"A","2":"D"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"A","33":"B"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:2,C:"crypto.getRandomValues()",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"rewind.js","sources":["../../../src/icons/rewind.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Rewind\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cG9seWdvbiBwb2ludHM9IjExIDE5IDIgMTIgMTEgNSAxMSAxOSIgLz4KICA8cG9seWdvbiBwb2ludHM9IjIyIDE5IDEzIDEyIDIyIDUgMjIgMTkiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/rewind\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 Rewind = createLucideIcon('Rewind', [\n ['polygon', { points: '11 19 2 12 11 5 11 19', key: '14yba5' }],\n ['polygon', { points: '22 19 13 12 22 5 22 19', key: '1pi1cj' }],\n]);\n\nexport default Rewind;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAyB,CAAA,CAAA,CAAA,CAAA,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,CAC9D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,CAAA,CAAA,CAAA,CAAE,QAAQ,CAA0B,CAAA,CAAA,CAAA,CAAA,CAAA,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;AACjE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,3 @@
declare const MAX_ARRAY_LENGTH: 4294967295;
export = MAX_ARRAY_LENGTH;
@@ -0,0 +1 @@
{"version":3,"file":"use-dom-event.mjs","sources":["../../../src/events/use-dom-event.ts"],"sourcesContent":["\"use client\"\n\nimport { RefObject, useEffect } from \"react\"\nimport { addDomEvent } from \"motion-dom\"\n\n/**\n * Attaches an event listener directly to the provided DOM element.\n *\n * Bypassing React's event system can be desirable, for instance when attaching non-passive\n * event handlers.\n *\n * ```jsx\n * const ref = useRef(null)\n *\n * useDomEvent(ref, 'wheel', onWheel, { passive: false })\n *\n * return <div ref={ref} />\n * ```\n *\n * @param ref - React.RefObject that's been provided to the element you want to bind the listener to.\n * @param eventName - Name of the event you want listen for.\n * @param handler - Function to fire when receiving the event.\n * @param options - Options to pass to `Event.addEventListener`.\n *\n * @public\n */\nexport function useDomEvent(\n ref: RefObject<EventTarget | null>,\n eventName: string,\n handler?: EventListener | undefined,\n options?: AddEventListenerOptions\n) {\n useEffect(() => {\n const element = ref.current\n\n if (handler && element) {\n return addDomEvent(element, eventName, handler, options)\n }\n }, [ref, eventName, handler, options])\n}\n"],"names":[],"mappings":";;;;AAKA;;;;;;;;;;;;;;;;;;;;AAoBG;AACG;;AAOE;AAEA;;;;AAIR;;"}
@@ -0,0 +1,89 @@
"use client";
import { supportsViewTimeline, supportsScrollTimeline, motionValue } from 'motion-dom';
import { invariant } from 'motion-utils';
import { useRef, useCallback, useEffect } from 'react';
import { scroll } from '../render/dom/scroll/index.mjs';
import { offsetToViewTimelineRange } from '../render/dom/scroll/utils/offset-to-range.mjs';
import { useConstant } from '../utils/use-constant.mjs';
import { useIsomorphicLayoutEffect } from '../utils/use-isomorphic-effect.mjs';
const createScrollMotionValues = () => ({
scrollX: motionValue(0),
scrollY: motionValue(0),
scrollXProgress: motionValue(0),
scrollYProgress: motionValue(0),
});
const isRefPending = (ref) => {
if (!ref)
return false;
return !ref.current;
};
function makeAccelerateConfig(axis, options, container, target) {
return {
factory: (animation) => scroll(animation, {
...options,
axis,
container: container?.current || undefined,
target: target?.current || undefined,
}),
times: [0, 1],
keyframes: [0, 1],
ease: (v) => v,
duration: 1,
};
}
function canAccelerateScroll(target, offset) {
if (typeof window === "undefined")
return false;
return target
? supportsViewTimeline() && !!offsetToViewTimelineRange(offset)
: supportsScrollTimeline();
}
function useScroll({ container, target, ...options } = {}) {
const values = useConstant(createScrollMotionValues);
if (canAccelerateScroll(target, options.offset)) {
values.scrollXProgress.accelerate = makeAccelerateConfig("x", options, container, target);
values.scrollYProgress.accelerate = makeAccelerateConfig("y", options, container, target);
}
const scrollAnimation = useRef(null);
const needsStart = useRef(false);
const start = useCallback(() => {
scrollAnimation.current = scroll((_progress, { x, y, }) => {
values.scrollX.set(x.current);
values.scrollXProgress.set(x.progress);
values.scrollY.set(y.current);
values.scrollYProgress.set(y.progress);
}, {
...options,
container: container?.current || undefined,
target: target?.current || undefined,
});
return () => {
scrollAnimation.current?.();
};
}, [container, target, JSON.stringify(options.offset)]);
useIsomorphicLayoutEffect(() => {
needsStart.current = false;
if (isRefPending(container) || isRefPending(target)) {
needsStart.current = true;
return;
}
else {
return start();
}
}, [start]);
useEffect(() => {
if (needsStart.current) {
invariant(!isRefPending(container), "Container ref is defined but not hydrated", "use-scroll-ref");
invariant(!isRefPending(target), "Target ref is defined but not hydrated", "use-scroll-ref");
return start();
}
else {
return;
}
}, [start]);
return values;
}
export { useScroll };
//# sourceMappingURL=use-scroll.mjs.map
@@ -0,0 +1,68 @@
//#region src/get-log-filter.ts
/**
* A helper function to generate log filters using the same syntax as the CLI.
*
* @example
* ```ts
* import { defineConfig } from 'rolldown';
* import { getLogFilter } from 'rolldown/getLogFilter';
*
* const logFilter = getLogFilter(['code:FOO', 'code:BAR']);
*
* export default defineConfig({
* input: 'main.js',
* onLog(level, log, handler) {
* if (logFilter(log)) {
* handler(level, log);
* }
* }
* });
* ```
*
* @category Config
*/
const getLogFilter = (filters) => {
if (filters.length === 0) return () => true;
const normalizedFilters = filters.map((filter) => filter.split("&").map((subFilter) => {
const inverted = subFilter.startsWith("!");
if (inverted) subFilter = subFilter.slice(1);
const [key, ...value] = subFilter.split(":");
return {
inverted,
key: key.split("."),
parts: value.join(":").split("*")
};
}));
return (log) => {
nextIntersectedFilter: for (const intersectedFilters of normalizedFilters) {
for (const { inverted, key, parts } of intersectedFilters) {
const isFilterSatisfied = testFilter(log, key, parts);
if (inverted ? isFilterSatisfied : !isFilterSatisfied) continue nextIntersectedFilter;
}
return true;
}
return false;
};
};
const testFilter = (log, key, parts) => {
let rawValue = log;
for (let index = 0; index < key.length; index++) {
if (!rawValue) return false;
const part = key[index];
if (!(part in rawValue)) return false;
rawValue = rawValue[part];
}
let value = typeof rawValue === "object" ? JSON.stringify(rawValue) : String(rawValue);
if (parts.length === 1) return value === parts[0];
if (!value.startsWith(parts[0])) return false;
const lastPartIndex = parts.length - 1;
for (let index = 1; index < lastPartIndex; index++) {
const part = parts[index];
const position = value.indexOf(part);
if (position === -1) return false;
value = value.slice(position + part.length);
}
return value.endsWith(parts[lastPartIndex]);
};
//#endregion
export { getLogFilter as default };
@@ -0,0 +1,164 @@
import { encodeBase64 } from "../../utils/encode.js";
//#region src/middleware/secure-headers/secure-headers.ts
const HEADERS_MAP = {
crossOriginEmbedderPolicy: ["Cross-Origin-Embedder-Policy", "require-corp"],
crossOriginResourcePolicy: ["Cross-Origin-Resource-Policy", "same-origin"],
crossOriginOpenerPolicy: ["Cross-Origin-Opener-Policy", "same-origin"],
originAgentCluster: ["Origin-Agent-Cluster", "?1"],
referrerPolicy: ["Referrer-Policy", "no-referrer"],
strictTransportSecurity: ["Strict-Transport-Security", "max-age=15552000; includeSubDomains"],
xContentTypeOptions: ["X-Content-Type-Options", "nosniff"],
xDnsPrefetchControl: ["X-DNS-Prefetch-Control", "off"],
xDownloadOptions: ["X-Download-Options", "noopen"],
xFrameOptions: ["X-Frame-Options", "SAMEORIGIN"],
xPermittedCrossDomainPolicies: ["X-Permitted-Cross-Domain-Policies", "none"],
xXssProtection: ["X-XSS-Protection", "0"]
};
const DEFAULT_OPTIONS = {
crossOriginEmbedderPolicy: false,
crossOriginResourcePolicy: true,
crossOriginOpenerPolicy: true,
originAgentCluster: true,
referrerPolicy: true,
strictTransportSecurity: true,
xContentTypeOptions: true,
xDnsPrefetchControl: true,
xDownloadOptions: true,
xFrameOptions: true,
xPermittedCrossDomainPolicies: true,
xXssProtection: true,
removePoweredBy: true,
permissionsPolicy: {}
};
const generateNonce = () => {
const arrayBuffer = /* @__PURE__ */ new Uint8Array(16);
crypto.getRandomValues(arrayBuffer);
return encodeBase64(arrayBuffer.buffer);
};
const NONCE = (ctx) => {
const key = "secureHeadersNonce";
const init = ctx.get(key);
const nonce = init || generateNonce();
if (init == null) ctx.set(key, nonce);
return `'nonce-${nonce}'`;
};
/**
* Secure Headers Middleware for Hono.
*
* @see {@link https://hono.dev/docs/middleware/builtin/secure-headers}
*
* @param {Partial<SecureHeadersOptions>} [customOptions] - The options for the secure headers middleware.
* @param {ContentSecurityPolicyOptions} [customOptions.contentSecurityPolicy] - Settings for the Content-Security-Policy header.
* @param {ContentSecurityPolicyOptions} [customOptions.contentSecurityPolicyReportOnly] - Settings for the Content-Security-Policy-Report-Only header.
* @param {overridableHeader} [customOptions.crossOriginEmbedderPolicy=false] - Settings for the Cross-Origin-Embedder-Policy header.
* @param {overridableHeader} [customOptions.crossOriginResourcePolicy=true] - Settings for the Cross-Origin-Resource-Policy header.
* @param {overridableHeader} [customOptions.crossOriginOpenerPolicy=true] - Settings for the Cross-Origin-Opener-Policy header.
* @param {overridableHeader} [customOptions.originAgentCluster=true] - Settings for the Origin-Agent-Cluster header.
* @param {overridableHeader} [customOptions.referrerPolicy=true] - Settings for the Referrer-Policy header.
* @param {ReportingEndpointOptions[]} [customOptions.reportingEndpoints] - Settings for the Reporting-Endpoints header.
* @param {ReportToOptions[]} [customOptions.reportTo] - Settings for the Report-To header.
* @param {overridableHeader} [customOptions.strictTransportSecurity=true] - Settings for the Strict-Transport-Security header.
* @param {overridableHeader} [customOptions.xContentTypeOptions=true] - Settings for the X-Content-Type-Options header.
* @param {overridableHeader} [customOptions.xDnsPrefetchControl=true] - Settings for the X-DNS-Prefetch-Control header.
* @param {overridableHeader} [customOptions.xDownloadOptions=true] - Settings for the X-Download-Options header.
* @param {overridableHeader} [customOptions.xFrameOptions=true] - Settings for the X-Frame-Options header.
* @param {overridableHeader} [customOptions.xPermittedCrossDomainPolicies=true] - Settings for the X-Permitted-Cross-Domain-Policies header.
* @param {overridableHeader} [customOptions.xXssProtection=true] - Settings for the X-XSS-Protection header.
* @param {boolean} [customOptions.removePoweredBy=true] - Settings for remove X-Powered-By header.
* @param {PermissionsPolicyOptions} [customOptions.permissionsPolicy] - Settings for the Permissions-Policy header.
* @returns {MiddlewareHandler} The middleware handler function.
*
* @example
* ```ts
* const app = new Hono()
* app.use(secureHeaders())
* ```
*/
const secureHeaders = (customOptions) => {
const options = {
...DEFAULT_OPTIONS,
...customOptions
};
const headersToSet = getFilteredHeaders(options);
const callbacks = [];
if (options.contentSecurityPolicy) {
const [callback, value] = getCSPDirectives(options.contentSecurityPolicy, "Content-Security-Policy");
if (callback) callbacks.push(callback);
headersToSet.push(["Content-Security-Policy", value]);
}
if (options.contentSecurityPolicyReportOnly) {
const [callback, value] = getCSPDirectives(options.contentSecurityPolicyReportOnly, "Content-Security-Policy-Report-Only");
if (callback) callbacks.push(callback);
headersToSet.push(["Content-Security-Policy-Report-Only", value]);
}
if (options.permissionsPolicy && Object.keys(options.permissionsPolicy).length > 0) headersToSet.push(["Permissions-Policy", getPermissionsPolicyDirectives(options.permissionsPolicy)]);
if (options.reportingEndpoints) headersToSet.push(["Reporting-Endpoints", getReportingEndpoints(options.reportingEndpoints)]);
if (options.reportTo) headersToSet.push(["Report-To", getReportToOptions(options.reportTo)]);
return async function secureHeaders(ctx, next) {
const headersToSetForReq = callbacks.length === 0 ? headersToSet : callbacks.reduce((acc, cb) => cb(ctx, acc), headersToSet);
await next();
setHeaders(ctx, headersToSetForReq);
if (options?.removePoweredBy) ctx.res.headers.delete("X-Powered-By");
};
};
function getFilteredHeaders(options) {
return Object.entries(HEADERS_MAP).filter(([key]) => options[key]).map(([key, defaultValue]) => {
const overrideValue = options[key];
return typeof overrideValue === "string" ? [defaultValue[0], overrideValue] : defaultValue;
});
}
function getCSPDirectives(contentSecurityPolicy, headerName) {
const callbacks = [];
const resultValues = [];
for (const [directive, value] of Object.entries(contentSecurityPolicy)) {
const valueArray = Array.isArray(value) ? value : [value];
valueArray.forEach((value, i) => {
if (typeof value === "function") {
const index = i * 2 + 2 + resultValues.length;
callbacks.push((ctx, values) => {
values[index] = value(ctx, directive);
});
}
});
resultValues.push(directive.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (match, offset) => offset ? "-" + match.toLowerCase() : match.toLowerCase()), ...valueArray.flatMap((value) => [" ", value]), "; ");
}
resultValues.pop();
return callbacks.length === 0 ? [void 0, resultValues.join("")] : [(ctx, headersToSet) => headersToSet.map((values) => {
if (values[0] === headerName) {
const clone = values[1].slice();
callbacks.forEach((cb) => {
cb(ctx, clone);
});
return [values[0], clone.join("")];
} else return values;
}), resultValues];
}
function getPermissionsPolicyDirectives(policy) {
return Object.entries(policy).map(([directive, value]) => {
const kebabDirective = camelToKebab(directive);
if (typeof value === "boolean") return `${kebabDirective}=${value ? "*" : "()"}`;
if (Array.isArray(value)) {
if (value.length === 0) return `${kebabDirective}=()`;
if (value.length === 1 && value[0] === "*") return `${kebabDirective}=*`;
if (value.length === 1 && value[0] === "none") return `${kebabDirective}=()`;
return `${kebabDirective}=(${value.map((item) => ["self", "src"].includes(item) ? item : `"${item}"`).join(" ")})`;
}
return "";
}).filter(Boolean).join(", ");
}
function camelToKebab(str) {
return str.replace(/([a-z\d])([A-Z])/g, "$1-$2").toLowerCase();
}
function getReportingEndpoints(reportingEndpoints = []) {
return reportingEndpoints.map((endpoint) => `${endpoint.name}="${endpoint.url}"`).join(", ");
}
function getReportToOptions(reportTo = []) {
return reportTo.map((option) => JSON.stringify(option)).join(", ");
}
function setHeaders(ctx, headersToSet) {
headersToSet.forEach(([header, value]) => {
ctx.res.headers.set(header, value);
});
}
//#endregion
export { NONCE, secureHeaders };
@@ -0,0 +1 @@
{"version":3,"file":"sse.d.ts","sourceRoot":"","sources":["../../../src/server/sse.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAwB,gBAAgB,EAAe,MAAM,aAAa,CAAC;AAGlG,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAK3C;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACtC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IAExB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B;;;;;OAKG;IACH,4BAA4B,CAAC,EAAE,OAAO,CAAC;CAC1C;AAED;;;;;GAKG;AACH,qBAAa,kBAAmB,YAAW,SAAS;IAY5C,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,GAAG;IAZf,OAAO,CAAC,YAAY,CAAC,CAAiB;IACtC,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,QAAQ,CAA4B;IAC5C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,CAAC,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAExE;;OAEG;gBAES,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,cAAc,EAC3B,OAAO,CAAC,EAAE,yBAAyB;IAMvC;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAyB9B;;;;OAIG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IA8B5B;;;;OAIG;IACG,iBAAiB,CAAC,GAAG,EAAE,eAAe,GAAG;QAAE,IAAI,CAAC,EAAE,QAAQ,CAAA;KAAE,EAAE,GAAG,EAAE,cAAc,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAuD7H;;OAEG;IACG,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAYxE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAMtB,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAQlD;;;;OAIG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;CACJ"}
@@ -0,0 +1 @@
{"version":3,"file":"shopping-bag.js","sources":["../../../src/icons/shopping-bag.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ShoppingBag\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNiAyIDMgNnYxNGEyIDIgMCAwIDAgMiAyaDE0YTIgMiAwIDAgMCAyLTJWNmwtMy00WiIgLz4KICA8cGF0aCBkPSJNMyA2aDE4IiAvPgogIDxwYXRoIGQ9Ik0xNiAxMGE0IDQgMCAwIDEtOCAwIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/shopping-bag\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 ShoppingBag = createLucideIcon('ShoppingBag', [\n ['path', { d: 'M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z', key: 'hou9p0' }],\n ['path', { d: 'M3 6h18', key: 'd0wm0j' }],\n ['path', { d: 'M16 10a4 4 0 0 1-8 0', key: '1ltviw' }],\n]);\n\nexport default ShoppingBag;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACnF,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,CAAwB,CAAA,CAAA,CAAA,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;AACvD,CAAC,CAAA,CAAA;;"}