docs: 仓库链接指向本镜像仓库
Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Skipped

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,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.effectCar = void 0;
var use_sidecar_1 = require("use-sidecar");
exports.effectCar = (0, use_sidecar_1.createSidecarMedium)();
@@ -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 './wallet-minimal.js';
//# sourceMappingURL=wallet-2.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_3H","2":"_I","194":"_wH"},C:{"1":"_0H _p","2":"_bB _II l _L","322":"_RQ _EH"},D:{"1":"_2H","2":"_9H","194":"_SF _tD"},E:{"1":"_QE","2":"_cD"},F:{"1":"_aJ","2":"_1F","194":"_TG"},G:{"1":"_AD","2":"_YC"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_rF","2":"_lF"},Q:{"2":"JE"},R:{"1":"KE"},S:{"2":"_C"}},B:7,C:"Import maps",D:true};
@@ -0,0 +1,39 @@
'use strict';
var uppercase = require('./variants/scoring/uppercase.cjs');
var l33t = require('./variants/scoring/l33t.cjs');
var dictionaryMatcher = ({
rank,
reversed,
l33t: l33t$1,
subs,
token,
dictionaryName
}) => {
const baseGuesses = rank; // keep these as properties for display purposes
const uppercaseVariations = uppercase(token);
const l33tVariations = l33t({
l33t: l33t$1,
subs,
token
});
const reversedVariations = reversed && 2 || 1;
let calculation;
if (dictionaryName === 'diceware') {
// diceware dictionaries are special, so we get a simple scoring of 1/2 of 6^5 (6 digits on 5 dice)
// to get fix entropy of ~12.9 bits for every entry https://en.wikipedia.org/wiki/Diceware#:~:text=The%20level%20of,bits
calculation = 6 ** 5 / 2;
} else {
calculation = baseGuesses * uppercaseVariations * l33tVariations * reversedVariations;
}
return {
baseGuesses,
uppercaseVariations,
l33tVariations,
calculation
};
};
module.exports = dictionaryMatcher;
//# sourceMappingURL=scoring.cjs.map
@@ -0,0 +1,935 @@
flf2a$ 9 8 14 0 16 0 16255 0
Author : Ralph Bluecoat
Date : 2005/8/2
Version: 1.0
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
---
Font modified June 17, 2007 by patorjk
This was to widen the space character and fix letter spacing.
$ $$#
$ $$#
$ $$#
$ $$#
$ $$#
$ $$#
$ $$#
$ $$#
$ $$##
!$#
$#
$#
$#
$#
$#
$#
$#
$##
"$#
$#
$#
$#
$#
$#
$#
$#
$##
$##
$#
$#
$#
$#
$#
$#
$#
$##
$$#
$#
$#
$#
$#
$#
$#
$#
$##
%$#
$#
$#
$#
$#
$#
$#
$#
$##
&$#
$#
$#
$#
$#
$#
$#
$#
$##
'$#
$#
$#
$#
$#
$#
$#
$#
$##
($#
$#
$#
$#
$#
$#
$#
$#
$##
)$#
$#
$#
$#
$#
$#
$#
$#
$##
*$#
$#
$#
$#
$#
$#
$#
$#
$##
+$#
$#
$#
$#
$#
$#
$#
$#
$##
,$#
$#
$#
$#
$#
$#
$#
$#
$##
-$#
$#
$#
$#
$#
$#
$#
$#
$##
.$#
$#
$#
$#
$#
$#
$#
$#
$##
/$#
$#
$#
$#
$#
$#
$#
$#
$##
0$#
$#
$#
$#
$#
$#
$#
$#
$##
1$#
$#
$#
$#
$#
$#
$#
$#
$##
2$#
$#
$#
$#
$#
$#
$#
$#
$##
3$#
$#
$#
$#
$#
$#
$#
$#
$##
4$#
$#
$#
$#
$#
$#
$#
$#
$##
5$#
$#
$#
$#
$#
$#
$#
$#
$##
6$#
$#
$#
$#
$#
$#
$#
$#
$##
7$#
$#
$#
$#
$#
$#
$#
$#
$##
8$#
$#
$#
$#
$#
$#
$#
$#
$##
9$#
$#
$#
$#
$#
$#
$#
$#
$##
:$#
$#
$#
$#
$#
$#
$#
$#
$##
;$#
$#
$#
$#
$#
$#
$#
$#
$##
<$#
$#
$#
$#
$#
$#
$#
$#
$##
=$#
$#
$#
$#
$#
$#
$#
$#
$##
>$#
$#
$#
$#
$#
$#
$#
$#
$##
?$#
$#
$#
$#
$#
$#
$#
$#
$##
@$#
$#
$#
$#
$#
$#
$#
$#
$##
------ $#
******** $#
---------- $#
**** ****$#
------------$#
************$#
---- ----$#
**** ****$#
$##
----------- $#
*********** $#
---- -$#
*********** $#
----------- $#
**** *$#
----------- $#
*********** $#
$##
------------$#
************$#
--- $#
*** $#
--- $#
*** $#
------------$#
************$#
$##
---------- $#
************$#
-- --$#
** **$#
-- --$#
** **$#
------------$#
********** $#
$##
------------$#
************$#
---- $#
************$#
------------$#
**** $#
------------$#
************$#
$##
------------$#
************$#
---- $#
************$#
------------$#
**** $#
---- $#
**** $#
$##
------------$#
************$#
---- $#
**** ******$#
---- ------$#
**** ****$#
------------$#
************$#
$##
---- ----$#
**** ****$#
---- ----$#
************$#
------------$#
**** ****$#
---- ----$#
**** ****$#
$##
-------- $#
******** $#
---- $#
**** $#
---- $#
**** $#
-------- $#
******** $#
$##
-------- $#
******** $#
--- $#
*** $#
--- $#
*** ** $#
-------- $#
******** $#
$##
---- ----$#
**** **** $#
---- ---- $#
********* $#
--------- $#
**** **** $#
---- ---- $#
**** ****$#
$##
---- $#
**** $#
---- $#
**** $#
---- $#
************$#
------------$#
************$#
$##
******** $#
---------- $#
************$#
--- -- ---$#
*** ** ***$#
--- -- ---$#
*** ** ***$#
--- ---$#
$##
---- ----$#
***** ****$#
------ ----$#
************$#
------------$#
**** ******$#
---- -----$#
**** ****$#
$##
-------- $#
********** $#
---- ----$#
*** ***$#
--- ---$#
**** ****$#
---------- $#
******** $#
$##
----------- $#
************$#
--- ---$#
************$#
----------- $#
**** $#
---- $#
**** $#
$##
-------- $#
********** $#
---- ----$#
*** ***$#
--- -- --$#
**** ** **$#
------ -- -$#
******* **$#
$##
----------- $#
*********** $#
---- --- $#
********* $#
--------- $#
**** **** $#
---- ---- $#
**** ****$#
$##
------------$#
************$#
---- $#
************$#
------------$#
*****$#
------------$#
************$#
$##
------------$#
************$#
------------$#
**** $#
---- $#
**** $#
---- $#
**** $#
$##
---- ----$#
**** ****$#
---- ----$#
**** ****$#
---- ----$#
************$#
------------$#
************$#
$##
--- --- $#
*** *** $#
--- --- $#
*** *** $#
--- --- $#
******** $#
------ $#
**** $#
$##
--- ---$#
*** ** ***$#
--- -- ---$#
*** ** ***$#
--- -- ---$#
************$#
---------- $#
******** $#
$##
--- ---$#
*** *** $#
--- --- $#
****** $#
------ $#
*** *** $#
--- --- $#
*** ***$#
$##
--- ---$#
*** *** $#
--- --- $#
****** $#
---- $#
**** $#
---- $#
**** $#
$##
------------$#
************$#
----$#
************$#
------------$#
**** $#
------------$#
************$#
$##
[$#
$#
$#
$#
$#
$#
$#
$#
$##
\$#
$#
$#
$#
$#
$#
$#
$#
$##
]$#
$#
$#
$#
$#
$#
$#
$#
$##
^$#
$#
$#
$#
$#
$#
$#
$#
$##
_$#
$#
$#
$#
$#
$#
$#
$#
$##
`$#
$#
$#
$#
$#
$#
$#
$#
$##
------ $#
******** $#
---------- $#
**** ****$#
------------$#
************$#
---- ----$#
**** ****$#
$##
----------- $#
*********** $#
---- -$#
*********** $#
----------- $#
**** *$#
----------- $#
*********** $#
$##
------------$#
************$#
--- $#
*** $#
--- $#
*** $#
------------$#
************$#
$##
---------- $#
************$#
-- --$#
** **$#
-- --$#
** **$#
------------$#
********** $#
$##
------------$#
************$#
---- $#
************$#
------------$#
**** $#
------------$#
************$#
$##
------------$#
************$#
---- $#
************$#
------------$#
**** $#
---- $#
**** $#
$##
------------$#
************$#
---- $#
**** ******$#
---- ------$#
**** ****$#
------------$#
************$#
$##
---- ----$#
**** ****$#
---- ----$#
************$#
------------$#
**** ****$#
---- ----$#
**** ****$#
$##
-------- $#
******** $#
---- $#
**** $#
---- $#
**** $#
-------- $#
******** $#
$##
-------- $#
******** $#
--- $#
*** $#
--- $#
*** ** $#
-------- $#
******** $#
$##
---- ----$#
**** **** $#
---- ---- $#
********* $#
--------- $#
**** **** $#
---- ---- $#
**** ****$#
$##
---- $#
**** $#
---- $#
**** $#
---- $#
************$#
------------$#
************$#
$##
******** $#
---------- $#
************$#
--- -- ---$#
*** ** ***$#
--- -- ---$#
*** ** ***$#
--- ---$#
$##
---- ----$#
***** ****$#
------ ----$#
************$#
------------$#
**** ******$#
---- -----$#
**** ****$#
$##
-------- $#
********** $#
---- ----$#
*** ***$#
--- ---$#
**** ****$#
---------- $#
******** $#
$##
----------- $#
************$#
--- ---$#
************$#
----------- $#
**** $#
---- $#
**** $#
$##
-------- $#
********** $#
---- ----$#
*** ***$#
--- -- --$#
**** ** **$#
------ -- -$#
******* **$#
$##
----------- $#
*********** $#
---- --- $#
********* $#
--------- $#
**** **** $#
---- ---- $#
**** ****$#
$##
------------$#
************$#
---- $#
************$#
------------$#
*****$#
------------$#
************$#
$##
------------$#
************$#
------------$#
**** $#
---- $#
**** $#
---- $#
**** $#
$##
---- ----$#
**** ****$#
---- ----$#
**** ****$#
---- ----$#
************$#
------------$#
************$#
$##
--- --- $#
*** *** $#
--- --- $#
*** *** $#
--- --- $#
******** $#
------ $#
**** $#
$##
--- ---$#
*** ** ***$#
--- -- ---$#
*** ** ***$#
--- -- ---$#
************$#
---------- $#
******** $#
$##
--- ---$#
*** *** $#
--- --- $#
****** $#
------ $#
*** *** $#
--- --- $#
*** ***$#
$##
--- ---$#
*** *** $#
--- --- $#
****** $#
---- $#
**** $#
---- $#
**** $#
$##
------------$#
************$#
----$#
************$#
------------$#
**** $#
------------$#
************$#
$##
{$#
$#
$#
$#
$#
$#
$#
$#
$##
|$#
$#
$#
$#
$#
$#
$#
$#
$##
}$#
$#
$#
$#
$#
$#
$#
$#
$##
~$#
$#
$#
$#
$#
$#
$#
$#
$##
------ $#
******** $#
---------- $#
**** ****$#
------------$#
************$#
---- ----$#
**** ****$#
$##
-------- $#
********** $#
---- ----$#
*** ***$#
--- ---$#
**** ****$#
---------- $#
******** $#
$##
---- ----$#
**** ****$#
---- ----$#
**** ****$#
---- ----$#
************$#
------------$#
************$#
$##
------ $#
******** $#
---------- $#
**** ****$#
------------$#
************$#
---- ----$#
**** ****$#
$##
-------- $#
********** $#
---- ----$#
*** ***$#
--- ---$#
**** ****$#
---------- $#
******** $#
$##
---- ----$#
**** ****$#
---- ----$#
**** ****$#
---- ----$#
************$#
------------$#
************$#
$##
ß$#
$#
$#
$#
$#
$#
$#
$#
$##
@@ -0,0 +1 @@
{"version":3,"file":"alien.js","sources":["../../src/alien.ts"],"sourcesContent":["/* eslint-disable */\n// Adapted from Alien Signals\n// https://github.com/stackblitz/alien-signals/\n\nexport interface ReactiveNode {\n deps?: Link\n depsTail?: Link\n subs?: Link\n subsTail?: Link\n flags: ReactiveFlags\n}\n\nexport interface Link {\n version: number\n dep: ReactiveNode\n sub: ReactiveNode\n prevSub: Link | undefined\n nextSub: Link | undefined\n prevDep: Link | undefined\n nextDep: Link | undefined\n}\n\ninterface Stack<T> {\n value: T\n prev: Stack<T> | undefined\n}\n\nexport const enum ReactiveFlags {\n None = 0,\n Mutable = 1,\n Watching = 2,\n RecursedCheck = 4,\n Recursed = 8,\n Dirty = 16,\n Pending = 32,\n}\n/*@__NO_SIDE_EFFECTS__*/\nexport function createReactiveSystem({\n update,\n notify,\n unwatched,\n}: {\n update(sub: ReactiveNode): boolean\n notify(sub: ReactiveNode): void\n unwatched(sub: ReactiveNode): void\n}) {\n return {\n link,\n unlink,\n propagate,\n checkDirty,\n shallowPropagate,\n }\n\n function link(dep: ReactiveNode, sub: ReactiveNode, version: number): void {\n const prevDep = sub.depsTail\n if (prevDep !== undefined && prevDep.dep === dep) {\n return\n }\n const nextDep = prevDep !== undefined ? prevDep.nextDep : sub.deps\n if (nextDep !== undefined && nextDep.dep === dep) {\n nextDep.version = version\n sub.depsTail = nextDep\n return\n }\n const prevSub = dep.subsTail\n if (\n prevSub !== undefined &&\n prevSub.version === version &&\n prevSub.sub === sub\n ) {\n return\n }\n const newLink =\n (sub.depsTail =\n dep.subsTail =\n {\n version,\n dep,\n sub,\n prevDep,\n nextDep,\n prevSub,\n nextSub: undefined,\n })\n if (nextDep !== undefined) {\n nextDep.prevDep = newLink\n }\n if (prevDep !== undefined) {\n prevDep.nextDep = newLink\n } else {\n sub.deps = newLink\n }\n if (prevSub !== undefined) {\n prevSub.nextSub = newLink\n } else {\n dep.subs = newLink\n }\n }\n\n function unlink(link: Link, sub = link.sub): Link | undefined {\n const dep = link.dep\n const prevDep = link.prevDep\n const nextDep = link.nextDep\n const nextSub = link.nextSub\n const prevSub = link.prevSub\n if (nextDep !== undefined) {\n nextDep.prevDep = prevDep\n } else {\n sub.depsTail = prevDep\n }\n if (prevDep !== undefined) {\n prevDep.nextDep = nextDep\n } else {\n sub.deps = nextDep\n }\n if (nextSub !== undefined) {\n nextSub.prevSub = prevSub\n } else {\n dep.subsTail = prevSub\n }\n if (prevSub !== undefined) {\n prevSub.nextSub = nextSub\n } else if ((dep.subs = nextSub) === undefined) {\n unwatched(dep)\n }\n return nextDep\n }\n\n function propagate(link: Link): void {\n let next = link.nextSub\n let stack: Stack<Link | undefined> | undefined\n\n top: do {\n const sub = link.sub\n let flags = sub.flags\n\n if (\n !(\n flags &\n (ReactiveFlags.RecursedCheck |\n ReactiveFlags.Recursed |\n ReactiveFlags.Dirty |\n ReactiveFlags.Pending)\n )\n ) {\n sub.flags = flags | ReactiveFlags.Pending\n } else if (\n !(flags & (ReactiveFlags.RecursedCheck | ReactiveFlags.Recursed))\n ) {\n flags = ReactiveFlags.None\n } else if (!(flags & ReactiveFlags.RecursedCheck)) {\n sub.flags = (flags & ~ReactiveFlags.Recursed) | ReactiveFlags.Pending\n } else if (\n !(flags & (ReactiveFlags.Dirty | ReactiveFlags.Pending)) &&\n isValidLink(link, sub)\n ) {\n sub.flags = flags | (ReactiveFlags.Recursed | ReactiveFlags.Pending)\n flags &= ReactiveFlags.Mutable\n } else {\n flags = ReactiveFlags.None\n }\n\n if (flags & ReactiveFlags.Watching) {\n notify(sub)\n }\n\n if (flags & ReactiveFlags.Mutable) {\n const subSubs = sub.subs\n if (subSubs !== undefined) {\n const nextSub = (link = subSubs).nextSub\n if (nextSub !== undefined) {\n stack = { value: next, prev: stack }\n next = nextSub\n }\n continue\n }\n }\n\n if ((link = next!) !== undefined) {\n next = link.nextSub\n continue\n }\n\n while (stack !== undefined) {\n link = stack.value!\n stack = stack.prev\n if (link !== undefined) {\n next = link.nextSub\n continue top\n }\n }\n\n break\n } while (true)\n }\n\n function checkDirty(link: Link, sub: ReactiveNode): boolean {\n let stack: Stack<Link> | undefined\n let checkDepth = 0\n let dirty = false\n\n top: do {\n const dep = link.dep\n const flags = dep.flags\n\n Line truncated
@@ -0,0 +1,27 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const codegen_1 = require("../../compile/codegen");
const util_1 = require("../../compile/util");
const ucs2length_1 = require("../../runtime/ucs2length");
const error = {
message({ keyword, schemaCode }) {
const comp = keyword === "maxLength" ? "more" : "fewer";
return (0, codegen_1.str) `must NOT have ${comp} than ${schemaCode} characters`;
},
params: ({ schemaCode }) => (0, codegen_1._) `{limit: ${schemaCode}}`,
};
const def = {
keyword: ["maxLength", "minLength"],
type: "string",
schemaType: "number",
$data: true,
error,
code(cxt) {
const { keyword, data, schemaCode, it } = cxt;
const op = keyword === "maxLength" ? codegen_1.operators.GT : codegen_1.operators.LT;
const len = it.opts.unicode === false ? (0, codegen_1._) `${data}.length` : (0, codegen_1._) `${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`;
cxt.fail$data((0, codegen_1._) `${len} ${op} ${schemaCode}`);
},
};
exports.default = def;
//# sourceMappingURL=limitLength.js.map
@@ -0,0 +1,519 @@
/**
* Utilities for hex, bytes, CSPRNG.
* @module
*/
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
/**
* Bytes API type helpers for old + new TypeScript.
*
* TS 5.6 has `Uint8Array`, while TS 5.9+ made it generic `Uint8Array<ArrayBuffer>`.
* We can't use specific return type, because TS 5.6 will error.
* We can't use generic return type, because most TS 5.9 software will expect specific type.
*
* Maps typed-array input leaves to broad forms.
* These are compatibility adapters, not ownership guarantees.
*
* - `TArg` keeps byte inputs broad.
* - `TRet` marks byte outputs for TS 5.6 and TS 5.9+ compatibility.
*/
export type TypedArg<T> = T extends BigInt64Array ? BigInt64Array : T extends BigUint64Array ? BigUint64Array : T extends Float32Array ? Float32Array : T extends Float64Array ? Float64Array : T extends Int16Array ? Int16Array : T extends Int32Array ? Int32Array : T extends Int8Array ? Int8Array : T extends Uint16Array ? Uint16Array : T extends Uint32Array ? Uint32Array : T extends Uint8ClampedArray ? Uint8ClampedArray : T extends Uint8Array ? Uint8Array : never;
/** Maps typed-array output leaves to narrow TS-compatible forms. */
export type TypedRet<T> = T extends BigInt64Array ? ReturnType<typeof BigInt64Array.of> : T extends BigUint64Array ? ReturnType<typeof BigUint64Array.of> : T extends Float32Array ? ReturnType<typeof Float32Array.of> : T extends Float64Array ? ReturnType<typeof Float64Array.of> : T extends Int16Array ? ReturnType<typeof Int16Array.of> : T extends Int32Array ? ReturnType<typeof Int32Array.of> : T extends Int8Array ? ReturnType<typeof Int8Array.of> : T extends Uint16Array ? ReturnType<typeof Uint16Array.of> : T extends Uint32Array ? ReturnType<typeof Uint32Array.of> : T extends Uint8ClampedArray ? ReturnType<typeof Uint8ClampedArray.of> : T extends Uint8Array ? ReturnType<typeof Uint8Array.of> : never;
/** Recursively adapts byte-carrying API input types. See {@link TypedArg}. */
export type TArg<T> = T | ([TypedArg<T>] extends [never] ? T extends (...args: infer A) => infer R ? ((...args: {
[K in keyof A]: TRet<A[K]>;
}) => TArg<R>) & {
[K in keyof T]: T[K] extends (...args: any) => any ? T[K] : TArg<T[K]>;
} : T extends [infer A, ...infer R] ? [TArg<A>, ...{
[K in keyof R]: TArg<R[K]>;
}] : T extends readonly [infer A, ...infer R] ? readonly [TArg<A>, ...{
[K in keyof R]: TArg<R[K]>;
}] : T extends (infer A)[] ? TArg<A>[] : T extends readonly (infer A)[] ? readonly TArg<A>[] : T extends Promise<infer A> ? Promise<TArg<A>> : T extends object ? {
[K in keyof T]: TArg<T[K]>;
} : T : TypedArg<T>);
/** Recursively adapts byte-carrying API output types. See {@link TypedArg}. */
export type TRet<T> = T extends unknown ? T & ([TypedRet<T>] extends [never] ? T extends (...args: infer A) => infer R ? ((...args: {
[K in keyof A]: TArg<A[K]>;
}) => TRet<R>) & {
[K in keyof T]: T[K] extends (...args: any) => any ? T[K] : TRet<T[K]>;
} : T extends [infer A, ...infer R] ? [TRet<A>, ...{
[K in keyof R]: TRet<R[K]>;
}] : T extends readonly [infer A, ...infer R] ? readonly [TRet<A>, ...{
[K in keyof R]: TRet<R[K]>;
}] : T extends (infer A)[] ? TRet<A>[] : T extends readonly (infer A)[] ? readonly TRet<A>[] : T extends Promise<infer A> ? Promise<TRet<A>> : T extends object ? {
[K in keyof T]: TRet<T[K]>;
} : T : TypedRet<T>) : never;
/**
* Checks if something is Uint8Array. Be careful: nodejs Buffer will return true.
* @param a - value to test
* @returns `true` when the value is a Uint8Array-compatible view.
* @example
* Check whether a value is a Uint8Array-compatible view.
* ```ts
* isBytes(new Uint8Array([1, 2, 3]));
* ```
*/
export declare function isBytes(a: unknown): a is Uint8Array;
/**
* Asserts something is a non-negative integer.
* @param n - number to validate
* @param title - label included in thrown errors
* @throws On wrong argument types. {@link TypeError}
* @throws On wrong argument ranges or values. {@link RangeError}
* @example
* Validate a non-negative integer option.
* ```ts
* anumber(32, 'length');
* ```
*/
export declare function anumber(n: number, title?: string): void;
/**
* Asserts something is Uint8Array.
* @param value - value to validate
* @param length - optional exact length constraint
* @param title - label included in thrown errors
* @returns The validated byte array.
* @throws On wrong argument types. {@link TypeError}
* @throws On wrong argument ranges or values. {@link RangeError}
* @example
* Validate that a value is a byte array.
* ```ts
* abytes(new Uint8Array([1, 2, 3]));
* ```
*/
export declare function abytes(value: TArg<Uint8Array>, length?: number, title?: string): TRet<Uint8Array>;
/**
* Copies bytes into a fresh Uint8Array.
* Buffer-style slices can alias the same backing store, so callers that need ownership should copy.
* @param bytes - source bytes to clone
* @returns Freshly allocated copy of `bytes`.
* @throws On wrong argument types. {@link TypeError}
* @example
* Clone a byte array before mutating it.
* ```ts
* const copy = copyBytes(new Uint8Array([1, 2, 3]));
* ```
*/
export declare function copyBytes(bytes: TArg<Uint8Array>): TRet<Uint8Array>;
/**
* Asserts something is a wrapped hash constructor.
* @param h - hash constructor to validate
* @throws On wrong argument types or invalid hash wrapper shape. {@link TypeError}
* @throws On invalid hash metadata ranges or values. {@link RangeError}
* @throws If the hash metadata allows empty outputs or block sizes. {@link Error}
* @example
* Validate a callable hash wrapper.
* ```ts
* import { ahash } from '@noble/hashes/utils.js';
* import { sha256 } from '@noble/hashes/sha2.js';
* ahash(sha256);
* ```
*/
export declare function ahash(h: TArg<CHash>): void;
/**
* Asserts a hash instance has not been destroyed or finished.
* @param instance - hash instance to validate
* @param checkFinished - whether to reject finalized instances
* @throws If the hash instance has already been destroyed or finalized. {@link Error}
* @example
* Validate that a hash instance is still usable.
* ```ts
* import { aexists } from '@noble/hashes/utils.js';
* import { sha256 } from '@noble/hashes/sha2.js';
* const hash = sha256.create();
* aexists(hash);
* ```
*/
export declare function aexists(instance: any, checkFinished?: boolean): void;
/**
* Asserts output is a sufficiently-sized byte array.
* @param out - destination buffer
* @param instance - hash instance providing output length
* Oversized buffers are allowed; downstream code only promises to fill the first `outputLen` bytes.
* @throws On wrong argument types. {@link TypeError}
* @throws On wrong argument ranges or values. {@link RangeError}
* @example
* Validate a caller-provided digest buffer.
* ```ts
* import { aoutput } from '@noble/hashes/utils.js';
* import { sha256 } from '@noble/hashes/sha2.js';
* const hash = sha256.create();
* aoutput(new Uint8Array(hash.outputLen), hash);
* ```
*/
export declare function aoutput(out: any, instance: any): void;
/** Generic type encompassing 8/16/32-byte array views, but not 64-bit variants. */
export type TypedArray = Int8Array | Uint8ClampedArray | Uint8Array | Uint16Array | Int16Array | Uint32Array | Int32Array;
/**
* Casts a typed array view to Uint8Array.
* @param arr - source typed array
* @returns Uint8Array view over the same buffer.
* @example
* Reinterpret a typed array as bytes.
* ```ts
* u8(new Uint32Array([1, 2]));
* ```
*/
export declare function u8(arr: TArg<TypedArray>): TRet<Uint8Array>;
/**
* Casts a typed array view to Uint32Array.
* `arr.byteOffset` must already be 4-byte aligned or the platform
* Uint32Array constructor will throw.
* @param arr - source typed array
* @returns Uint32Array view over the same buffer.
* @example
* Reinterpret a byte array as 32-bit words.
* ```ts
* u32(new Uint8Array(8));
* ```
*/
export declare function u32(arr: TArg<TypedArray>): TRet<Uint32Array>;
/**
* Zeroizes typed arrays in place. Warning: JS provides no guarantees.
* @param arrays - arrays to overwrite with zeros
* @example
* Zeroize sensitive buffers in place.
* ```ts
* clean(new Uint8Array([1, 2, 3]));
* ```
*/
export declare function clean(...arrays: TArg<TypedArray[]>): void;
/**
* Creates a DataView for byte-level manipulation.
* @param arr - source typed array
* @returns DataView over the same buffer region.
* @example
* Create a DataView over an existing buffer.
* ```ts
* createView(new Uint8Array(4));
* ```
*/
export declare function createView(arr: TArg<TypedArray>): DataView;
/**
* Rotate-right operation for uint32 values.
* @param word - source word
* @param shift - shift amount in bits
* @returns Rotated word.
* @example
* Rotate a 32-bit word to the right.
* ```ts
* rotr(0x12345678, 8);
* ```
*/
export declare function rotr(word: number, shift: number): number;
/**
* Rotate-left operation for uint32 values.
* @param word - source word
* @param shift - shift amount in bits
* @returns Rotated word.
* @example
* Rotate a 32-bit word to the left.
* ```ts
* rotl(0x12345678, 8);
* ```
*/
export declare function rotl(word: number, shift: number): number;
/** Whether the current platform is little-endian. */
export declare const isLE: boolean;
/**
* Byte-swap operation for uint32 values.
* @param word - source word
* @returns Word with reversed byte order.
* @example
* Reverse the byte order of a 32-bit word.
* ```ts
* byteSwap(0x11223344);
* ```
*/
export declare function byteSwap(word: number): number;
/**
* Conditionally byte-swaps one 32-bit word on big-endian platforms.
* @param n - source word
* @returns Original or byte-swapped word depending on platform endianness.
* @example
* Normalize a 32-bit word for host endianness.
* ```ts
* swap8IfBE(0x11223344);
* ```
*/
export declare const swap8IfBE: (n: number) => number;
/**
* Byte-swaps every word of a Uint32Array in place.
* @param arr - array to mutate
* @returns The same array after mutation; callers pass live state arrays here.
* @example
* Reverse the byte order of every word in place.
* ```ts
* byteSwap32(new Uint32Array([0x11223344]));
* ```
*/
export declare function byteSwap32(arr: TArg<Uint32Array>): TRet<Uint32Array>;
/**
* Conditionally byte-swaps a Uint32Array on big-endian platforms.
* @param u - array to normalize for host endianness
* @returns Original or byte-swapped array depending on platform endianness.
* On big-endian runtimes this mutates `u` in place via `byteSwap32(...)`.
* @example
* Normalize a word array for host endianness.
* ```ts
* swap32IfBE(new Uint32Array([0x11223344]));
* ```
*/
export declare const swap32IfBE: (u: TArg<Uint32Array>) => TRet<Uint32Array>;
/**
* Convert byte array to hex string.
* Uses the built-in function when available and assumes it matches the tested
* fallback semantics.
* @param bytes - bytes to encode
* @returns Lowercase hexadecimal string.
* @throws On wrong argument types. {@link TypeError}
* @example
* Convert bytes to lowercase hexadecimal.
* ```ts
* bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])); // 'cafe0123'
* ```
*/
export declare function bytesToHex(bytes: TArg<Uint8Array>): string;
/**
* Convert hex string to byte array. Uses built-in function, when available.
* @param hex - hexadecimal string to decode
* @returns Decoded bytes.
* @throws On wrong argument types. {@link TypeError}
* @throws On wrong argument ranges or values. {@link RangeError}
* @example
* Decode lowercase hexadecimal into bytes.
* ```ts
* hexToBytes('cafe0123'); // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])
* ```
*/
export declare function hexToBytes(hex: string): TRet<Uint8Array>;
/**
* There is no setImmediate in browser and setTimeout is slow.
* This yields to the Promise/microtask scheduler queue, not to timers or the
* full macrotask event loop.
* @example
* Yield to the next scheduler tick.
* ```ts
* await nextTick();
* ```
*/
export declare const nextTick: () => Promise<void>;
/**
* Returns control to the Promise/microtask scheduler every `tick`
* milliseconds to avoid blocking long loops.
* @param iters - number of loop iterations to run
* @param tick - maximum time slice in milliseconds
* @param cb - callback executed on each iteration
* @example
* Run a loop that periodically yields back to the event loop.
* ```ts
* await asyncLoop(2, 0, () => {});
* ```
*/
export declare function asyncLoop(iters: number, tick: number, cb: (i: number) => void): Promise<void>;
/**
* Converts string to bytes using UTF8 encoding.
* Built-in doesn't validate input to be string: we do the check.
* Non-ASCII details are delegated to the platform `TextEncoder`.
* @param str - string to encode
* @returns UTF-8 encoded bytes.
* @throws On wrong argument types. {@link TypeError}
* @example
* Encode a string as UTF-8 bytes.
* ```ts
* utf8ToBytes('abc'); // Uint8Array.from([97, 98, 99])
* ```
*/
export declare function utf8ToBytes(str: string): TRet<Uint8Array>;
/** KDFs can accept string or Uint8Array for user convenience. */
export type KDFInput = string | Uint8Array;
/**
* Helper for KDFs: consumes Uint8Array or string.
* String inputs are UTF-8 encoded; byte-array inputs stay aliased to the caller buffer.
* @param data - user-provided KDF input
* @param errorTitle - label included in thrown errors
* @returns Byte representation of the input.
* @throws On wrong argument types. {@link TypeError}
* @example
* Normalize KDF input to bytes.
* ```ts
* kdfInputToBytes('password');
* ```
*/
export declare function kdfInputToBytes(data: TArg<KDFInput>, errorTitle?: string): TRet<Uint8Array>;
/**
* Copies several Uint8Arrays into one.
* @param arrays - arrays to concatenate
* @returns Concatenated byte array.
* @throws On wrong argument types. {@link TypeError}
* @example
* Concatenate multiple byte arrays.
* ```ts
* concatBytes(new Uint8Array([1]), new Uint8Array([2]));
* ```
*/
export declare function concatBytes(...arrays: TArg<Uint8Array[]>): TRet<Uint8Array>;
type EmptyObj = {};
/**
* Merges default options and passed options.
* @param defaults - base option object
* @param opts - user overrides
* @returns Merged option object. The merge mutates `defaults` in place.
* @throws On wrong argument types. {@link TypeError}
* @example
* Merge user overrides onto default options.
* ```ts
* checkOpts({ dkLen: 32 }, { asyncTick: 10 });
* ```
*/
export declare function checkOpts<T1 extends EmptyObj, T2 extends EmptyObj>(defaults: T1, opts?: T2): T1 & T2;
/** Common interface for all hash instances. */
export interface Hash<T> {
/** Bytes processed per compression block. */
blockLen: number;
/** Bytes produced by `digest()`. */
outputLen: number;
/** Whether the instance supports XOF-style variable-length output via `xof()` / `xofInto()`. */
canXOF: boolean;
/**
* Absorbs more message bytes into the running hash state.
* @param buf - message chunk to absorb
* @returns The same hash instance for chaining.
*/
update(buf: TArg<Uint8Array>): this;
/**
* Finalizes the hash into a caller-provided buffer.
* @param buf - destination buffer
* @returns Nothing. Implementations write into `buf` in place.
*/
digestInto(buf: TArg<Uint8Array>): void;
/**
* Finalizes the hash and returns a freshly allocated digest.
* @returns Digest bytes.
*/
digest(): TRet<Uint8Array>;
/** Wipes internal state and makes the instance unusable. */
destroy(): void;
/**
* Copies the current hash state into an existing or new instance.
* @param to - Optional destination instance to reuse.
* @returns Cloned hash state.
*/
_cloneInto(to?: T): T;
/**
* Creates an independent copy of the current hash state.
* @returns Cloned hash instance.
*/
clone(): T;
}
/** Pseudorandom generator interface. */
export interface PRG {
/**
* Mixes more entropy into the generator state.
* @param seed - fresh entropy bytes
* @returns Nothing. Implementations update internal state in place.
*/
addEntropy(seed: TArg<Uint8Array>): void;
/**
* Generates pseudorandom output bytes.
* @param length - number of bytes to generate
* @returns Generated pseudorandom bytes.
*/
randomBytes(length: number): TRet<Uint8Array>;
/** Wipes generator state and makes the instance unusable. */
clean(): void;
}
/**
* XOF: streaming API to read digest in chunks.
* Same as 'squeeze' in keccak/k12 and 'seek' in blake3, but more generic name.
* When hash used in XOF mode it is up to user to call '.destroy' afterwards, since we cannot
* destroy state, next call can require more bytes.
*/
export type HashXOF<T extends Hash<T>> = Hash<T> & {
/**
* Reads more bytes from the XOF stream.
* @param bytes - number of bytes to read
* @returns Requested digest bytes.
*/
xof(bytes: number): TRet<Uint8Array>;
/**
* Reads more bytes from the XOF stream into a caller-provided buffer.
* @param buf - destination buffer
* @returns Filled output buffer.
*/
xofInto(buf: TArg<Uint8Array>): TRet<Uint8Array>;
};
/** Hash constructor or factory type. */
export type HasherCons<T, Opts = undefined> = Opts extends undefined ? () => T : (opts?: Opts) => T;
/** Optional hash metadata. */
export type HashInfo = {
/** DER-encoded object identifier bytes for the hash algorithm. */
oid?: TRet<Uint8Array>;
};
/** Callable hash function type. */
export type CHash<T extends Hash<T> = Hash<any>, Opts = undefined> = {
/** Digest size in bytes. */
outputLen: number;
/** Input block size in bytes. */
blockLen: number;
/** Whether `.create()` returns a hash instance that can be used as an XOF stream. */
canXOF: boolean;
} & HashInfo & (Opts extends undefined ? {
(msg: TArg<Uint8Array>): TRet<Uint8Array>;
create(): T;
} : {
(msg: TArg<Uint8Array>, opts?: TArg<Opts>): TRet<Uint8Array>;
create(opts?: Opts): T;
});
/** Callable extendable-output hash function type. */
export type CHashXOF<T extends HashXOF<T> = HashXOF<any>, Opts = undefined> = CHash<T, Opts>;
/**
* Creates a callable hash function from a stateful class constructor.
* @param hashCons - hash constructor or factory
* @param info - optional metadata such as DER OID
* @returns Frozen callable hash wrapper with `.create()`.
* Wrapper construction eagerly calls `hashCons(undefined)` once to read
* `outputLen` / `blockLen`, so constructor side effects happen at module
* init time.
* @example
* Wrap a stateful hash constructor into a callable helper.
* ```ts
* import { createHasher } from '@noble/hashes/utils.js';
* import { sha256 } from '@noble/hashes/sha2.js';
* const wrapped = createHasher(sha256.create, { oid: sha256.oid });
* wrapped(new Uint8Array([1]));
* ```
*/
export declare function createHasher<T extends Hash<T>, Opts = undefined>(hashCons: HasherCons<T, Opts>, info?: TArg<HashInfo>): TRet<CHash<T, Opts>>;
/**
* Cryptographically secure PRNG backed by `crypto.getRandomValues`.
* @param bytesLength - number of random bytes to generate
* @returns Random bytes.
* The platform `getRandomValues()` implementation still defines any
* single-call length cap, and this helper rejects oversize requests
* with a stable library `RangeError` instead of host-specific errors.
* @throws On wrong argument types. {@link TypeError}
* @throws On wrong argument ranges or values. {@link RangeError}
* @throws If the current runtime does not provide `crypto.getRandomValues`. {@link Error}
* @example
* Generate a fresh random key or nonce.
* ```ts
* const key = randomBytes(16);
* ```
*/
export declare function randomBytes(bytesLength?: number): TRet<Uint8Array>;
/**
* Creates OID metadata for NIST hashes with prefix `06 09 60 86 48 01 65 03 04 02`.
* @param suffix - final OID byte for the selected hash.
* The helper accepts any byte even though only the documented NIST hash
* suffixes are meaningful downstream.
* @returns Object containing the DER-encoded OID.
* @example
* Build OID metadata for a NIST hash.
* ```ts
* oidNist(0x01);
* ```
*/
export declare const oidNist: (suffix: number) => TRet<Required<HashInfo>>;
export {};
//# sourceMappingURL=utils.d.ts.map
@@ -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 { forwardRef, createElement } from 'react';
import { mergeClasses, toKebabCase } from './shared/src/utils.js';
import Icon from './Icon.js';
const createLucideIcon = (iconName, iconNode) => {
const Component = forwardRef(
({ className, ...props }, ref) => createElement(Icon, {
ref,
iconNode,
className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className),
...props
})
);
Component.displayName = `${iconName}`;
return Component;
};
export { createLucideIcon as default };
//# sourceMappingURL=createLucideIcon.js.map
@@ -0,0 +1,15 @@
"use strict";
module.exports = function (it) {
const { directoryPath } = it;
return `
ESLint couldn't find a configuration file. To set up a configuration file for this project, please run:
npm init @eslint/config@latest
ESLint looked for configuration files in ${directoryPath} and its ancestors. If it found none, it then looked in your home directory.
If you think you already have a configuration file or if you need more help, please stop by the ESLint Discord server: https://eslint.org/chat
`.trimStart();
};
@@ -0,0 +1,557 @@
'use strict'
const SPACE_CHARACTERS = /\s+/g
// hoisted class for cyclic dependency
class Range {
constructor (range, options) {
options = parseOptions(options)
if (range instanceof Range) {
if (
range.loose === !!options.loose &&
range.includePrerelease === !!options.includePrerelease
) {
return range
} else {
return new Range(range.raw, options)
}
}
if (range instanceof Comparator) {
// just put it in the set and return
this.raw = range.value
this.set = [[range]]
this.formatted = undefined
return this
}
this.options = options
this.loose = !!options.loose
this.includePrerelease = !!options.includePrerelease
// First reduce all whitespace as much as possible so we do not have to rely
// on potentially slow regexes like \s*. This is then stored and used for
// future error messages as well.
this.raw = range.trim().replace(SPACE_CHARACTERS, ' ')
// First, split on ||
this.set = this.raw
.split('||')
// map the range to a 2d array of comparators
.map(r => this.parseRange(r.trim()))
// throw out any comparator lists that are empty
// this generally means that it was not a valid range, which is allowed
// in loose mode, but will still throw if the WHOLE range is invalid.
.filter(c => c.length)
if (!this.set.length) {
throw new TypeError(`Invalid SemVer Range: ${this.raw}`)
}
// if we have any that are not the null set, throw out null sets.
if (this.set.length > 1) {
// keep the first one, in case they're all null sets
const first = this.set[0]
this.set = this.set.filter(c => !isNullSet(c[0]))
if (this.set.length === 0) {
this.set = [first]
} else if (this.set.length > 1) {
// if we have any that are *, then the range is just *
for (const c of this.set) {
if (c.length === 1 && isAny(c[0])) {
this.set = [c]
break
}
}
}
}
this.formatted = undefined
}
get range () {
if (this.formatted === undefined) {
this.formatted = ''
for (let i = 0; i < this.set.length; i++) {
if (i > 0) {
this.formatted += '||'
}
const comps = this.set[i]
for (let k = 0; k < comps.length; k++) {
if (k > 0) {
this.formatted += ' '
}
this.formatted += comps[k].toString().trim()
}
}
}
return this.formatted
}
format () {
return this.range
}
toString () {
return this.range
}
parseRange (range) {
// memoize range parsing for performance.
// this is a very hot path, and fully deterministic.
const memoOpts =
(this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |
(this.options.loose && FLAG_LOOSE)
const memoKey = memoOpts + ':' + range
const cached = cache.get(memoKey)
if (cached) {
return cached
}
const loose = this.options.loose
// `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]
range = range.replace(hr, hyphenReplace(this.options.includePrerelease))
debug('hyphen replace', range)
// `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)
debug('comparator trim', range)
// `~ 1.2.3` => `~1.2.3`
range = range.replace(re[t.TILDETRIM], tildeTrimReplace)
debug('tilde trim', range)
// `^ 1.2.3` => `^1.2.3`
range = range.replace(re[t.CARETTRIM], caretTrimReplace)
debug('caret trim', range)
// At this point, the range is completely trimmed and
// ready to be split into comparators.
let rangeList = range
.split(' ')
.map(comp => parseComparator(comp, this.options))
.join(' ')
.split(/\s+/)
// >=0.0.0 is equivalent to *
.map(comp => replaceGTE0(comp, this.options))
if (loose) {
// in loose mode, throw out any that are not valid comparators
rangeList = rangeList.filter(comp => {
debug('loose invalid filter', comp, this.options)
return !!comp.match(re[t.COMPARATORLOOSE])
})
}
debug('range list', rangeList)
// if any comparators are the null set, then replace with JUST null set
// if more than one comparator, remove any * comparators
// also, don't include the same comparator more than once
const rangeMap = new Map()
const comparators = rangeList.map(comp => new Comparator(comp, this.options))
for (const comp of comparators) {
if (isNullSet(comp)) {
return [comp]
}
rangeMap.set(comp.value, comp)
}
if (rangeMap.size > 1 && rangeMap.has('')) {
rangeMap.delete('')
}
const result = [...rangeMap.values()]
cache.set(memoKey, result)
return result
}
intersects (range, options) {
if (!(range instanceof Range)) {
throw new TypeError('a Range is required')
}
return this.set.some((thisComparators) => {
return (
isSatisfiable(thisComparators, options) &&
range.set.some((rangeComparators) => {
return (
isSatisfiable(rangeComparators, options) &&
thisComparators.every((thisComparator) => {
return rangeComparators.every((rangeComparator) => {
return thisComparator.intersects(rangeComparator, options)
})
})
)
})
)
})
}
// if ANY of the sets match ALL of its comparators, then pass
test (version) {
if (!version) {
return false
}
if (typeof version === 'string') {
try {
version = new SemVer(version, this.options)
} catch (er) {
return false
}
}
for (let i = 0; i < this.set.length; i++) {
if (testSet(this.set[i], version, this.options)) {
return true
}
}
return false
}
}
module.exports = Range
const LRU = require('../internal/lrucache')
const cache = new LRU()
const parseOptions = require('../internal/parse-options')
const Comparator = require('./comparator')
const debug = require('../internal/debug')
const SemVer = require('./semver')
const {
safeRe: re,
t,
comparatorTrimReplace,
tildeTrimReplace,
caretTrimReplace,
} = require('../internal/re')
const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')
const isNullSet = c => c.value === '<0.0.0-0'
const isAny = c => c.value === ''
// take a set of comparators and determine whether there
// exists a version which can satisfy it
const isSatisfiable = (comparators, options) => {
let result = true
const remainingComparators = comparators.slice()
let testComparator = remainingComparators.pop()
while (result && remainingComparators.length) {
result = remainingComparators.every((otherComparator) => {
return testComparator.intersects(otherComparator, options)
})
testComparator = remainingComparators.pop()
}
return result
}
// comprised of xranges, tildes, stars, and gtlt's at this point.
// already replaced the hyphen ranges
// turn into a set of JUST comparators.
const parseComparator = (comp, options) => {
comp = comp.replace(re[t.BUILD], '')
debug('comp', comp, options)
comp = replaceCarets(comp, options)
debug('caret', comp)
comp = replaceTildes(comp, options)
debug('tildes', comp)
comp = replaceXRanges(comp, options)
debug('xrange', comp)
comp = replaceStars(comp, options)
debug('stars', comp)
return comp
}
const isX = id => !id || id.toLowerCase() === 'x' || id === '*'
// ~, ~> --> * (any, kinda silly)
// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0
// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0
// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0
// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0
// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0
// ~0.0.1 --> >=0.0.1 <0.1.0-0
const replaceTildes = (comp, options) => {
return comp
.trim()
.split(/\s+/)
.map((c) => replaceTilde(c, options))
.join(' ')
}
const replaceTilde = (comp, options) => {
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]
return comp.replace(r, (_, M, m, p, pr) => {
debug('tilde', comp, _, M, m, p, pr)
let ret
if (isX(M)) {
ret = ''
} else if (isX(m)) {
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`
} else if (isX(p)) {
// ~1.2 == >=1.2.0 <1.3.0-0
ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`
} else if (pr) {
debug('replaceTilde pr', pr)
ret = `>=${M}.${m}.${p}-${pr
} <${M}.${+m + 1}.0-0`
} else {
// ~1.2.3 == >=1.2.3 <1.3.0-0
ret = `>=${M}.${m}.${p
} <${M}.${+m + 1}.0-0`
}
debug('tilde return', ret)
return ret
})
}
// ^ --> * (any, kinda silly)
// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0
// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0
// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0
// ^1.2.3 --> >=1.2.3 <2.0.0-0
// ^1.2.0 --> >=1.2.0 <2.0.0-0
// ^0.0.1 --> >=0.0.1 <0.0.2-0
// ^0.1.0 --> >=0.1.0 <0.2.0-0
const replaceCarets = (comp, options) => {
return comp
.trim()
.split(/\s+/)
.map((c) => replaceCaret(c, options))
.join(' ')
}
const replaceCaret = (comp, options) => {
debug('caret', comp, options)
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]
const z = options.includePrerelease ? '-0' : ''
return comp.replace(r, (_, M, m, p, pr) => {
debug('caret', comp, _, M, m, p, pr)
let ret
if (isX(M)) {
ret = ''
} else if (isX(m)) {
ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`
} else if (isX(p)) {
if (M === '0') {
ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`
} else {
ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`
}
} else if (pr) {
debug('replaceCaret pr', pr)
if (M === '0') {
if (m === '0') {
ret = `>=${M}.${m}.${p}-${pr
} <${M}.${m}.${+p + 1}-0`
} else {
ret = `>=${M}.${m}.${p}-${pr
} <${M}.${+m + 1}.0-0`
}
} else {
ret = `>=${M}.${m}.${p}-${pr
} <${+M + 1}.0.0-0`
}
} else {
debug('no pr')
if (M === '0') {
if (m === '0') {
ret = `>=${M}.${m}.${p
}${z} <${M}.${m}.${+p + 1}-0`
} else {
ret = `>=${M}.${m}.${p
}${z} <${M}.${+m + 1}.0-0`
}
} else {
ret = `>=${M}.${m}.${p
} <${+M + 1}.0.0-0`
}
}
debug('caret return', ret)
return ret
})
}
const replaceXRanges = (comp, options) => {
debug('replaceXRanges', comp, options)
return comp
.split(/\s+/)
.map((c) => replaceXRange(c, options))
.join(' ')
}
const replaceXRange = (comp, options) => {
comp = comp.trim()
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
debug('xRange', comp, ret, gtlt, M, m, p, pr)
const xM = isX(M)
const xm = xM || isX(m)
const xp = xm || isX(p)
const anyX = xp
if (gtlt === '=' && anyX) {
gtlt = ''
}
// if we're including prereleases in the match, then we need
// to fix this to -0, the lowest possible prerelease value
pr = options.includePrerelease ? '-0' : ''
if (xM) {
if (gtlt === '>' || gtlt === '<') {
// nothing is allowed
ret = '<0.0.0-0'
} else {
// nothing is forbidden
ret = '*'
}
} else if (gtlt && anyX) {
// we know patch is an x, because we have any x at all.
// replace X with 0
if (xm) {
m = 0
}
p = 0
if (gtlt === '>') {
// >1 => >=2.0.0
// >1.2 => >=1.3.0
gtlt = '>='
if (xm) {
M = +M + 1
m = 0
p = 0
} else {
m = +m + 1
p = 0
}
} else if (gtlt === '<=') {
// <=0.7.x is actually <0.8.0, since any 0.7.x should
// pass. Similarly, <=7.x is actually <8.0.0, etc.
gtlt = '<'
if (xm) {
M = +M + 1
} else {
m = +m + 1
}
}
if (gtlt === '<') {
pr = '-0'
}
ret = `${gtlt + M}.${m}.${p}${pr}`
} else if (xm) {
ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`
} else if (xp) {
ret = `>=${M}.${m}.0${pr
} <${M}.${+m + 1}.0-0`
}
debug('xRange return', ret)
return ret
})
}
// Because * is AND-ed with everything else in the comparator,
// and '' means "any version", just remove the *s entirely.
const replaceStars = (comp, options) => {
debug('replaceStars', comp, options)
// Looseness is ignored here. star is always as loose as it gets!
return comp
.trim()
.replace(re[t.STAR], '')
}
const replaceGTE0 = (comp, options) => {
debug('replaceGTE0', comp, options)
return comp
.trim()
.replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')
}
// This function is passed to string.replace(re[t.HYPHENRANGE])
// M, m, patch, prerelease, build
// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do
// 1.2 - 3.4 => >=1.2.0 <3.5.0-0
// TODO build?
const hyphenReplace = incPr => ($0,
from, fM, fm, fp, fpr, fb,
to, tM, tm, tp, tpr) => {
if (isX(fM)) {
from = ''
} else if (isX(fm)) {
from = `>=${fM}.0.0${incPr ? '-0' : ''}`
} else if (isX(fp)) {
from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`
} else if (fpr) {
from = `>=${from}`
} else {
from = `>=${from}${incPr ? '-0' : ''}`
}
if (isX(tM)) {
to = ''
} else if (isX(tm)) {
to = `<${+tM + 1}.0.0-0`
} else if (isX(tp)) {
to = `<${tM}.${+tm + 1}.0-0`
} else if (tpr) {
to = `<=${tM}.${tm}.${tp}-${tpr}`
} else if (incPr) {
to = `<${tM}.${tm}.${+tp + 1}-0`
} else {
to = `<=${to}`
}
return `${from} ${to}`.trim()
}
const testSet = (set, version, options) => {
for (let i = 0; i < set.length; i++) {
if (!set[i].test(version)) {
return false
}
}
if (version.prerelease.length && !options.includePrerelease) {
// Find the set of versions that are allowed to have prereleases
// For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
// That should allow `1.2.3-pr.2` to pass.
// However, `1.2.4-alpha.notready` should NOT be allowed,
// even though it's within the range set by the comparators.
for (let i = 0; i < set.length; i++) {
debug(set[i].semver)
if (set[i].semver === Comparator.ANY) {
continue
}
if (set[i].semver.prerelease.length > 0) {
const allowed = set[i].semver
if (allowed.major === version.major &&
allowed.minor === version.minor &&
allowed.patch === version.patch) {
return true
}
}
}
// Version has a -pre, but it's not one of the ones we like.
return false
}
return true
}
@@ -0,0 +1,22 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABILITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
interface ErrorConstructor {
/**
* Indicates whether the argument provided is a built-in Error instance or not.
*/
isError(error: unknown): error is Error;
}
@@ -0,0 +1,63 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'require-array-sort-compare',
meta: {
type: 'problem',
docs: {
description: 'Require `Array#sort` and `Array#toSorted` calls to always provide a `compareFunction`',
requiresTypeChecking: true,
},
messages: {
requireCompare: "Require 'compare' argument.",
},
schema: [
{
type: 'object',
additionalProperties: false,
properties: {
ignoreStringArrays: {
type: 'boolean',
description: 'Whether to ignore arrays in which all elements are strings.',
},
},
},
],
},
defaultOptions: [
{
ignoreStringArrays: true,
},
],
create(context, [options]) {
const services = (0, util_1.getParserServices)(context);
const checker = services.program.getTypeChecker();
/**
* Check if a given node is an array which all elements are string.
*/
function isStringArrayNode(node) {
const type = services.getTypeAtLocation(node);
if (checker.isArrayType(type) || checker.isTupleType(type)) {
const typeArgs = checker.getTypeArguments(type);
return typeArgs.every(arg => (0, util_1.getTypeName)(checker, arg) === 'string');
}
return false;
}
function checkSortArgument(callee) {
if (!(0, util_1.isStaticMemberAccessOfValue)(callee, context, 'sort', 'toSorted')) {
return;
}
const calleeObjType = (0, util_1.getConstrainedTypeAtLocation)(services, callee.object);
if (options.ignoreStringArrays && isStringArrayNode(callee.object)) {
return;
}
if ((0, util_1.isTypeArrayTypeOrUnionOfArrayTypes)(calleeObjType, checker)) {
context.report({ node: callee.parent, messageId: 'requireCompare' });
}
}
return {
'CallExpression[arguments.length=0] > MemberExpression': checkSortArgument,
};
},
});
@@ -0,0 +1,311 @@
import { b as KEYWORDS, f as createRule, g as import_ast_utils, m as AST_NODE_TYPES, z as isKeywordToken } from "../utils.js";
const PREV_TOKEN = /^[)\]}>]$/u;
const NEXT_TOKEN = /^(?:[([{<~!]|\+\+?|--?)$/u;
const PREV_TOKEN_M = /^[)\]}>*]$/u;
const NEXT_TOKEN_M = /^[{*]$/u;
const TEMPLATE_OPEN_PAREN = /\$\{$/u;
const TEMPLATE_CLOSE_PAREN = /^\}/u;
const CHECK_TYPE = /^(?:JSXElement|RegularExpression|String|Template|PrivateIdentifier)$/u;
var keyword_spacing_default = createRule({
name: "keyword-spacing",
meta: {
type: "layout",
docs: { description: "Enforce consistent spacing before and after keywords" },
fixable: "whitespace",
schema: [{
type: "object",
properties: {
before: { type: "boolean" },
after: { type: "boolean" },
overrides: {
type: "object",
properties: KEYWORDS.reduce((retv, key) => {
retv[key] = {
type: "object",
properties: {
before: { type: "boolean" },
after: { type: "boolean" }
},
additionalProperties: false
};
return retv;
}, {}),
additionalProperties: false
}
},
additionalProperties: false
}],
defaultOptions: [{
before: true,
after: true,
overrides: {}
}],
messages: {
expectedBefore: "Expected space(s) before \"{{value}}\".",
expectedAfter: "Expected space(s) after \"{{value}}\".",
unexpectedBefore: "Unexpected space(s) before \"{{value}}\".",
unexpectedAfter: "Unexpected space(s) after \"{{value}}\"."
}
},
create(context, [options]) {
const sourceCode = context.sourceCode;
const tokensToIgnore = /* @__PURE__ */ new WeakSet();
function isOpenParenOfTemplate(token) {
return token.type === "Template" && TEMPLATE_OPEN_PAREN.test(token.value);
}
function isCloseParenOfTemplate(token) {
return token.type === "Template" && TEMPLATE_CLOSE_PAREN.test(token.value);
}
function expectSpaceBefore(token, pattern) {
const prevToken = sourceCode.getTokenBefore(token);
if (prevToken && (CHECK_TYPE.test(prevToken.type) || pattern.test(prevToken.value)) && !isOpenParenOfTemplate(prevToken) && !tokensToIgnore.has(prevToken) && (0, import_ast_utils.isTokenOnSameLine)(prevToken, token) && !sourceCode.isSpaceBetween(prevToken, token)) context.report({
loc: token.loc,
messageId: "expectedBefore",
data: token,
fix(fixer) {
return fixer.insertTextBefore(token, " ");
}
});
}
function unexpectSpaceBefore(token, pattern) {
const prevToken = sourceCode.getTokenBefore(token);
if (prevToken && (CHECK_TYPE.test(prevToken.type) || pattern.test(prevToken.value)) && !isOpenParenOfTemplate(prevToken) && !tokensToIgnore.has(prevToken) && (0, import_ast_utils.isTokenOnSameLine)(prevToken, token) && sourceCode.isSpaceBetween(prevToken, token)) context.report({
loc: {
start: prevToken.loc.end,
end: token.loc.start
},
messageId: "unexpectedBefore",
data: token,
fix(fixer) {
return fixer.removeRange([prevToken.range[1], token.range[0]]);
}
});
}
function expectSpaceAfter(token, pattern) {
const nextToken = sourceCode.getTokenAfter(token);
if (nextToken && (CHECK_TYPE.test(nextToken.type) || pattern.test(nextToken.value)) && !isCloseParenOfTemplate(nextToken) && !tokensToIgnore.has(nextToken) && (0, import_ast_utils.isTokenOnSameLine)(token, nextToken) && !sourceCode.isSpaceBetween(token, nextToken)) context.report({
loc: token.loc,
messageId: "expectedAfter",
data: token,
fix(fixer) {
return fixer.insertTextAfter(token, " ");
}
});
}
function unexpectSpaceAfter(token, pattern) {
const nextToken = sourceCode.getTokenAfter(token);
if (nextToken && (CHECK_TYPE.test(nextToken.type) || pattern.test(nextToken.value)) && !isCloseParenOfTemplate(nextToken) && !tokensToIgnore.has(nextToken) && (0, import_ast_utils.isTokenOnSameLine)(token, nextToken) && sourceCode.isSpaceBetween(token, nextToken)) context.report({
loc: {
start: token.loc.end,
end: nextToken.loc.start
},
messageId: "unexpectedAfter",
data: token,
fix(fixer) {
return fixer.removeRange([token.range[1], nextToken.range[0]]);
}
});
}
function parseOptions(options) {
const { before, after, overrides } = options;
const defaultValue = {
before: before ? expectSpaceBefore : unexpectSpaceBefore,
after: after ? expectSpaceAfter : unexpectSpaceAfter
};
const retv = Object.create(null);
for (let i = 0; i < KEYWORDS.length; ++i) {
const key = KEYWORDS[i];
const override = overrides[key];
if (override) {
const thisBefore = "before" in override ? override.before : before;
const thisAfter = "after" in override ? override.after : after;
retv[key] = {
before: thisBefore ? expectSpaceBefore : unexpectSpaceBefore,
after: thisAfter ? expectSpaceAfter : unexpectSpaceAfter
};
} else retv[key] = defaultValue;
}
return retv;
}
const checkMethodMap = parseOptions(options);
function checkSpacingBefore(token, pattern) {
checkMethodMap[token.value].before(token, pattern || PREV_TOKEN);
}
function checkSpacingAfter(token, pattern) {
checkMethodMap[token.value].after(token, pattern || NEXT_TOKEN);
}
function checkSpacingAround(token) {
checkSpacingBefore(token);
checkSpacingAfter(token);
}
function checkSpacingAroundFirstToken(node) {
const firstToken = node && sourceCode.getFirstToken(node);
if (!firstToken) return;
if (!isKeywordToken(firstToken)) if (node.type === "VariableDeclaration") {
if (node.kind !== "using" && node.kind !== "await using" || firstToken.type !== "Identifier") return;
} else return;
checkSpacingAround(firstToken);
}
function checkSpacingBeforeFirstToken(node) {
const firstToken = node && sourceCode.getFirstToken(node);
if (isKeywordToken(firstToken)) checkSpacingBefore(firstToken);
}
function checkSpacingAroundTokenBefore(node) {
if (node) {
const token = sourceCode.getTokenBefore(node, isKeywordToken);
if (token) checkSpacingAround(token);
}
}
function checkSpacingForFunction(node) {
const firstToken = node && sourceCode.getFirstToken(node);
if (firstToken && (isKeywordToken(firstToken) && firstToken.value === "function" || firstToken.value === "async")) checkSpacingBefore(firstToken);
}
function checkSpacingForClass(node) {
checkSpacingAroundFirstToken(node);
checkSpacingAroundTokenBefore(node.superClass);
}
function checkSpacingForModuleDeclaration(node) {
const firstToken = sourceCode.getFirstToken(node);
checkSpacingBefore(firstToken, PREV_TOKEN_M);
checkSpacingAfter(firstToken, NEXT_TOKEN_M);
if (node.type === "ExportDefaultDeclaration") checkSpacingAround(sourceCode.getTokenAfter(firstToken));
if (node.type === "ExportAllDeclaration" && node.exported) {
const asToken = sourceCode.getTokenBefore(node.exported);
checkSpacingBefore(asToken, PREV_TOKEN_M);
checkSpacingAfter(asToken, NEXT_TOKEN_M);
}
if ("source" in node && node.source) {
const fromToken = sourceCode.getTokenBefore(node.source);
checkSpacingBefore(fromToken, PREV_TOKEN_M);
checkSpacingAfter(fromToken, NEXT_TOKEN_M);
if (node.attributes) {
const withToken = sourceCode.getTokenAfter(node.source);
if (isKeywordToken(withToken)) checkSpacingAround(withToken);
}
}
if (node.type !== "ExportDefaultDeclaration") checkSpacingForTypeKeywordInImportExport(node);
}
function checkSpacingForTypeKeywordInImportExport(node) {
let kind;
switch (node.type) {
case AST_NODE_TYPES.ImportDeclaration:
kind = node.importKind;
break;
case AST_NODE_TYPES.ExportAllDeclaration:
case AST_NODE_TYPES.ExportNamedDeclaration:
kind = node.exportKind;
break;
}
if (kind !== "type") return;
const typeToken = sourceCode.getFirstToken(node, { skip: 1 });
if (!(0, import_ast_utils.isTypeKeyword)(typeToken)) return;
checkSpacingBefore(typeToken, PREV_TOKEN_M);
checkSpacingAfter(typeToken, NEXT_TOKEN_M);
}
function checkSpacingForProperty(node) {
if ("static" in node && node.static) checkSpacingAroundFirstToken(node);
if (node.kind === "get" || node.kind === "set" || ("method" in node && node.method || node.type === "MethodDefinition") && "async" in node.value && node.value.async || node.type === AST_NODE_TYPES.AccessorProperty) {
const token = sourceCode.getTokenBefore(node.key, (tok) => {
switch (tok.value) {
case "get":
case "set":
case "async":
case "accessor": return true;
default: return false;
}
});
if (!token) throw new Error("Failed to find token get, set, or async beside method name");
checkSpacingAround(token);
}
}
return {
DebuggerStatement: checkSpacingAroundFirstToken,
WithStatement: checkSpacingAroundFirstToken,
BreakStatement: checkSpacingAroundFirstToken,
ContinueStatement: checkSpacingAroundFirstToken,
ReturnStatement: checkSpacingAroundFirstToken,
ThrowStatement: checkSpacingAroundFirstToken,
TryStatement(node) {
checkSpacingAroundFirstToken(node);
if (node.handler) if (node.handler.param) checkSpacingBeforeFirstToken(node.handler);
else checkSpacingAroundFirstToken(node.handler);
checkSpacingAroundTokenBefore(node.finalizer);
},
IfStatement(node) {
checkSpacingAroundFirstToken(node);
checkSpacingAroundTokenBefore(node.alternate);
},
SwitchStatement: checkSpacingAroundFirstToken,
SwitchCase: checkSpacingAroundFirstToken,
DoWhileStatement(node) {
checkSpacingAroundFirstToken(node);
checkSpacingAroundTokenBefore(node.test);
},
ForInStatement(node) {
checkSpacingAroundFirstToken(node);
const inToken = sourceCode.getTokenBefore(node.right, import_ast_utils.isNotOpeningParenToken);
if (sourceCode.getTokenBefore(inToken).type !== "PrivateIdentifier") checkSpacingBefore(inToken);
checkSpacingAfter(inToken);
},
ForOfStatement(node) {
if (node.await) {
checkSpacingBefore(sourceCode.getFirstToken(node, 0));
checkSpacingAfter(sourceCode.getFirstToken(node, 1));
} else checkSpacingAroundFirstToken(node);
const ofToken = sourceCode.getTokenBefore(node.right, import_ast_utils.isNotOpeningParenToken);
if (sourceCode.getTokenBefore(ofToken).type !== "PrivateIdentifier") checkSpacingBefore(ofToken);
checkSpacingAfter(ofToken);
},
ForStatement: checkSpacingAroundFirstToken,
WhileStatement: checkSpacingAroundFirstToken,
ClassDeclaration: checkSpacingForClass,
ExportNamedDeclaration: checkSpacingForModuleDeclaration,
ExportDefaultDeclaration: checkSpacingForModuleDeclaration,
ExportAllDeclaration: checkSpacingForModuleDeclaration,
FunctionDeclaration: checkSpacingForFunction,
ImportDeclaration: checkSpacingForModuleDeclaration,
VariableDeclaration: checkSpacingAroundFirstToken,
ArrowFunctionExpression: checkSpacingForFunction,
AwaitExpression(node) {
checkSpacingBefore(sourceCode.getFirstToken(node));
},
ClassExpression: checkSpacingForClass,
FunctionExpression: checkSpacingForFunction,
NewExpression: checkSpacingBeforeFirstToken,
Super: checkSpacingBeforeFirstToken,
ThisExpression: checkSpacingBeforeFirstToken,
UnaryExpression: checkSpacingBeforeFirstToken,
YieldExpression: checkSpacingBeforeFirstToken,
ImportSpecifier(node) {
if (node.imported.range[0] !== node.local.range[0]) checkSpacingBefore(sourceCode.getTokenBefore(node.local), PREV_TOKEN_M);
},
ExportSpecifier(node) {
if (node.local.range[0] !== node.exported.range[0]) {
const asToken = sourceCode.getTokenBefore(node.exported);
checkSpacingBefore(asToken, PREV_TOKEN_M);
checkSpacingAfter(asToken, NEXT_TOKEN_M);
}
},
ImportNamespaceSpecifier(node) {
checkSpacingBefore(sourceCode.getFirstToken(node, 1), PREV_TOKEN_M);
},
MethodDefinition: checkSpacingForProperty,
PropertyDefinition: checkSpacingForProperty,
AccessorProperty: checkSpacingForProperty,
StaticBlock: checkSpacingAroundFirstToken,
Property: checkSpacingForProperty,
BinaryExpression(node) {
if (node.operator !== ">") return;
const operatorToken = sourceCode.getTokenBefore(node.right, import_ast_utils.isNotOpeningParenToken);
tokensToIgnore.add(operatorToken);
},
TSAsExpression(node) {
checkSpacingAround(sourceCode.getTokenAfter(node.expression, (token) => token.value === "as"));
},
TSSatisfiesExpression(node) {
checkSpacingAround(sourceCode.getTokenAfter(node.expression, (token) => token.value === "satisfies"));
}
};
}
});
export { keyword_spacing_default as t };
@@ -0,0 +1,72 @@
"use client";
import { useContext, useId, useEffect, useCallback } from 'react';
import { PresenceContext } from '../../context/PresenceContext.mjs';
/**
* When a component is the child of `AnimatePresence`, it can use `usePresence`
* to access information about whether it's still present in the React tree.
*
* ```jsx
* import { usePresence } from "framer-motion"
*
* export const Component = () => {
* const [isPresent, safeToRemove] = usePresence()
*
* useEffect(() => {
* !isPresent && setTimeout(safeToRemove, 1000)
* }, [isPresent])
*
* return <div />
* }
* ```
*
* If `isPresent` is `false`, it means that a component has been removed from the tree,
* but `AnimatePresence` won't really remove it until `safeToRemove` has been called.
*
* @public
*/
function usePresence(subscribe = true) {
const context = useContext(PresenceContext);
if (context === null)
return [true, null];
const { isPresent, onExitComplete, register } = context;
// It's safe to call the following hooks conditionally (after an early return) because the context will always
// either be null or non-null for the lifespan of the component.
const id = useId();
useEffect(() => {
if (subscribe) {
return register(id);
}
}, [subscribe]);
const safeToRemove = useCallback(() => subscribe && onExitComplete && onExitComplete(id), [id, onExitComplete, subscribe]);
return !isPresent && onExitComplete ? [false, safeToRemove] : [true];
}
/**
* Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present.
* There is no `safeToRemove` function.
*
* ```jsx
* import { useIsPresent } from "framer-motion"
*
* export const Component = () => {
* const isPresent = useIsPresent()
*
* useEffect(() => {
* !isPresent && console.log("I've been removed!")
* }, [isPresent])
*
* return <div />
* }
* ```
*
* @public
*/
function useIsPresent() {
return isPresent(useContext(PresenceContext));
}
function isPresent(context) {
return context === null ? true : context.isPresent;
}
export { isPresent, useIsPresent, usePresence };
//# sourceMappingURL=use-presence.mjs.map
@@ -0,0 +1,159 @@
declare const _default: {
extends: string[];
rules: {
'@typescript-eslint/adjacent-overload-signatures': "error";
'@typescript-eslint/array-type': "error";
'@typescript-eslint/await-thenable': "error";
'@typescript-eslint/ban-ts-comment': "error";
'@typescript-eslint/ban-tslint-comment': "error";
'@typescript-eslint/class-literal-property-style': "error";
'class-methods-use-this': "off";
'@typescript-eslint/class-methods-use-this': "error";
'@typescript-eslint/consistent-generic-constructors': "error";
'@typescript-eslint/consistent-indexed-object-style': "error";
'consistent-return': "off";
'@typescript-eslint/consistent-return': "error";
'@typescript-eslint/consistent-type-assertions': "error";
'@typescript-eslint/consistent-type-definitions': "error";
'@typescript-eslint/consistent-type-exports': "error";
'@typescript-eslint/consistent-type-imports': "error";
'default-param-last': "off";
'@typescript-eslint/default-param-last': "error";
'dot-notation': "off";
'@typescript-eslint/dot-notation': "error";
'@typescript-eslint/explicit-function-return-type': "error";
'@typescript-eslint/explicit-member-accessibility': "error";
'@typescript-eslint/explicit-module-boundary-types': "error";
'init-declarations': "off";
'@typescript-eslint/init-declarations': "error";
'max-params': "off";
'@typescript-eslint/max-params': "error";
'@typescript-eslint/member-ordering': "error";
'@typescript-eslint/method-signature-style': "error";
'@typescript-eslint/naming-convention': "error";
'no-array-constructor': "off";
'@typescript-eslint/no-array-constructor': "error";
'@typescript-eslint/no-array-delete': "error";
'@typescript-eslint/no-base-to-string': "error";
'@typescript-eslint/no-confusing-non-null-assertion': "error";
'@typescript-eslint/no-confusing-void-expression': "error";
'@typescript-eslint/no-deprecated': "error";
'no-dupe-class-members': "off";
'@typescript-eslint/no-dupe-class-members': "error";
'@typescript-eslint/no-duplicate-enum-values': "error";
'@typescript-eslint/no-duplicate-type-constituents': "error";
'@typescript-eslint/no-dynamic-delete': "error";
'no-empty-function': "off";
'@typescript-eslint/no-empty-function': "error";
'@typescript-eslint/no-empty-object-type': "error";
'@typescript-eslint/no-explicit-any': "error";
'@typescript-eslint/no-extra-non-null-assertion': "error";
'@typescript-eslint/no-extraneous-class': "error";
'@typescript-eslint/no-floating-promises': "error";
'@typescript-eslint/no-for-in-array': "error";
'no-implied-eval': "off";
'@typescript-eslint/no-implied-eval': "error";
'@typescript-eslint/no-import-type-side-effects': "error";
'@typescript-eslint/no-inferrable-types': "error";
'no-invalid-this': "off";
'@typescript-eslint/no-invalid-this': "error";
'@typescript-eslint/no-invalid-void-type': "error";
'no-loop-func': "off";
'@typescript-eslint/no-loop-func': "error";
'no-magic-numbers': "off";
'@typescript-eslint/no-magic-numbers': "error";
'@typescript-eslint/no-meaningless-void-operator': "error";
'@typescript-eslint/no-misused-new': "error";
'@typescript-eslint/no-misused-promises': "error";
'@typescript-eslint/no-misused-spread': "error";
'@typescript-eslint/no-mixed-enums': "error";
'@typescript-eslint/no-namespace': "error";
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': "error";
'@typescript-eslint/no-non-null-asserted-optional-chain': "error";
'@typescript-eslint/no-non-null-assertion': "error";
'no-redeclare': "off";
'@typescript-eslint/no-redeclare': "error";
'@typescript-eslint/no-redundant-type-constituents': "error";
'@typescript-eslint/no-require-imports': "error";
'no-restricted-imports': "off";
'@typescript-eslint/no-restricted-imports': "error";
'@typescript-eslint/no-restricted-types': "error";
'no-shadow': "off";
'@typescript-eslint/no-shadow': "error";
'@typescript-eslint/no-this-alias': "error";
'@typescript-eslint/no-unnecessary-boolean-literal-compare': "error";
'@typescript-eslint/no-unnecessary-condition': "error";
'@typescript-eslint/no-unnecessary-parameter-property-assignment': "error";
'@typescript-eslint/no-unnecessary-qualifier': "error";
'@typescript-eslint/no-unnecessary-template-expression': "error";
'@typescript-eslint/no-unnecessary-type-arguments': "error";
'@typescript-eslint/no-unnecessary-type-assertion': "error";
'@typescript-eslint/no-unnecessary-type-constraint': "error";
'@typescript-eslint/no-unnecessary-type-conversion': "error";
'@typescript-eslint/no-unnecessary-type-parameters': "error";
'@typescript-eslint/no-unsafe-argument': "error";
'@typescript-eslint/no-unsafe-assignment': "error";
'@typescript-eslint/no-unsafe-call': "error";
'@typescript-eslint/no-unsafe-declaration-merging': "error";
'@typescript-eslint/no-unsafe-enum-comparison': "error";
'@typescript-eslint/no-unsafe-function-type': "error";
'@typescript-eslint/no-unsafe-member-access': "error";
'@typescript-eslint/no-unsafe-return': "error";
'@typescript-eslint/no-unsafe-type-assertion': "error";
'@typescript-eslint/no-unsafe-unary-minus': "error";
'no-unused-expressions': "off";
'@typescript-eslint/no-unused-expressions': "error";
'no-unused-private-class-members': "off";
'@typescript-eslint/no-unused-private-class-members': "error";
'no-unused-vars': "off";
'@typescript-eslint/no-unused-vars': "error";
'no-use-before-define': "off";
'@typescript-eslint/no-use-before-define': "error";
'no-useless-constructor': "off";
'@typescript-eslint/no-useless-constructor': "error";
'@typescript-eslint/no-useless-default-assignment': "error";
'@typescript-eslint/no-useless-empty-export': "error";
'@typescript-eslint/no-wrapper-object-types': "error";
'@typescript-eslint/non-nullable-type-assertion-style': "error";
'no-throw-literal': "off";
'@typescript-eslint/only-throw-error': "error";
'@typescript-eslint/parameter-properties': "error";
'@typescript-eslint/prefer-as-const': "error";
'prefer-destructuring': "off";
'@typescript-eslint/prefer-destructuring': "error";
'@typescript-eslint/prefer-enum-initializers': "error";
'@typescript-eslint/prefer-find': "error";
'@typescript-eslint/prefer-for-of': "error";
'@typescript-eslint/prefer-function-type': "error";
'@typescript-eslint/prefer-includes': "error";
'@typescript-eslint/prefer-literal-enum-member': "error";
'@typescript-eslint/prefer-namespace-keyword': "error";
'@typescript-eslint/prefer-nullish-coalescing': "error";
'@typescript-eslint/prefer-optional-chain': "error";
'prefer-promise-reject-errors': "off";
'@typescript-eslint/prefer-promise-reject-errors': "error";
'@typescript-eslint/prefer-readonly': "error";
'@typescript-eslint/prefer-readonly-parameter-types': "error";
'@typescript-eslint/prefer-reduce-type-parameter': "error";
'@typescript-eslint/prefer-regexp-exec': "error";
'@typescript-eslint/prefer-return-this-type': "error";
'@typescript-eslint/prefer-string-starts-ends-with': "error";
'@typescript-eslint/promise-function-async': "error";
'@typescript-eslint/related-getter-setter-pairs': "error";
'@typescript-eslint/require-array-sort-compare': "error";
'require-await': "off";
'@typescript-eslint/require-await': "error";
'@typescript-eslint/restrict-plus-operands': "error";
'@typescript-eslint/restrict-template-expressions': "error";
'no-return-await': "off";
'@typescript-eslint/return-await': "error";
'@typescript-eslint/strict-boolean-expressions': "error";
'@typescript-eslint/strict-void-return': "error";
'@typescript-eslint/switch-exhaustiveness-check': "error";
'@typescript-eslint/triple-slash-reference': "error";
'@typescript-eslint/unbound-method': "error";
'@typescript-eslint/unified-signatures': "error";
'@typescript-eslint/use-unknown-in-catch-callback-variable': "error";
};
};
export = _default;
@@ -0,0 +1,8 @@
// This file is a shim which defers loading the real module until the compile cache is enabled.
try {
const { enableCompileCache } = require("node:module");
if (enableCompileCache) {
enableCompileCache();
}
} catch {}
module.exports = require("./_typingsInstaller.js");
@@ -0,0 +1 @@
{"version":3,"file":"bandage.js","sources":["../../../src/icons/bandage.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Bandage\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTAgMTAuMDFoLjAxIiAvPgogIDxwYXRoIGQ9Ik0xMCAxNC4wMWguMDEiIC8+CiAgPHBhdGggZD0iTTE0IDEwLjAxaC4wMSIgLz4KICA8cGF0aCBkPSJNMTQgMTQuMDFoLjAxIiAvPgogIDxwYXRoIGQ9Ik0xOCA2djExLjUiIC8+CiAgPHBhdGggZD0iTTYgNnYxMiIgLz4KICA8cmVjdCB4PSIyIiB5PSI2IiB3aWR0aD0iMjAiIGhlaWdodD0iMTIiIHJ4PSIyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/bandage\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 Bandage = createLucideIcon('Bandage', [\n ['path', { d: 'M10 10.01h.01', key: '1e9xi7' }],\n ['path', { d: 'M10 14.01h.01', key: 'ac23bv' }],\n ['path', { d: 'M14 10.01h.01', key: '2wfrvf' }],\n ['path', { d: 'M14 14.01h.01', key: '8tw8yn' }],\n ['path', { d: 'M18 6v11.5', key: 'dkbidh' }],\n ['path', { d: 'M6 6v12', key: 'vkc79e' }],\n ['rect', { x: '2', y: '6', width: '20', height: '12', rx: '2', key: '1wpnh2' }],\n]);\n\nexport default Bandage;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,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,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA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ESLint v7.0.0
*/
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Node.js rules were moved out of ESLint core.",
url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
deprecatedSince: "7.0.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"eslint-plugin-n now maintains deprecated Node.js-related rules.",
plugin: {
name: "eslint-plugin-n",
url: "https://github.com/eslint-community/eslint-plugin-n",
},
rule: {
name: "no-sync",
url: "https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-sync.md",
},
},
],
},
type: "suggestion",
docs: {
description: "Disallow synchronous methods",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-sync",
},
schema: [
{
type: "object",
properties: {
allowAtRootLevel: {
type: "boolean",
default: false,
},
},
additionalProperties: false,
},
],
messages: {
noSync: "Unexpected sync method: '{{propertyName}}'.",
},
},
create(context) {
const selector =
context.options[0] && context.options[0].allowAtRootLevel
? ":function MemberExpression[property.name=/.*Sync$/]"
: "MemberExpression[property.name=/.*Sync$/]";
return {
[selector](node) {
context.report({
node,
messageId: "noSync",
data: {
propertyName: node.property.name,
},
});
},
};
},
};
@@ -0,0 +1,34 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_utils_html = require("../../utils/html.js");
//#region src/helper/html/index.ts
/**
* @module
* html Helper for Hono.
*/
const html = (strings, ...values) => {
const buffer = [""];
for (let i = 0, len = strings.length - 1; i < len; i++) {
buffer[0] += strings[i];
const children = Array.isArray(values[i]) ? values[i].flat(Infinity) : [values[i]];
for (let i = 0, len = children.length; i < len; i++) {
const child = children[i];
if (typeof child === "string") require_utils_html.escapeToBuffer(child, buffer);
else if (typeof child === "number") buffer[0] += child;
else if (typeof child === "boolean" || child === null || child === void 0) continue;
else if (typeof child === "object" && child.isEscaped) {
if (child.callbacks) buffer.unshift("", child);
else {
const tmp = child.toString();
if (tmp instanceof Promise) buffer.unshift("", tmp);
else buffer[0] += tmp;
}
} else if (child instanceof Promise) buffer.unshift("", child);
else require_utils_html.escapeToBuffer(child.toString(), buffer);
}
}
buffer[0] += strings.at(-1);
return buffer.length === 1 ? "callbacks" in buffer ? require_utils_html.raw(require_utils_html.resolveCallbackSync(require_utils_html.raw(buffer[0], buffer.callbacks))) : require_utils_html.raw(buffer[0]) : require_utils_html.stringBufferToString(buffer, buffer.callbacks);
};
//#endregion
exports.html = html;
exports.raw = require_utils_html.raw;
@@ -0,0 +1 @@
{"version":3,"file":"sequence.mjs","sources":["../../../../src/animation/animate/sequence.ts"],"sourcesContent":["import {\n AnimationPlaybackControlsWithThen,\n AnimationScope,\n motionValue,\n spring,\n} from \"motion-dom\"\nimport { createAnimationsFromSequence } from \"../sequence/create\"\nimport { AnimationSequence, SequenceOptions } from \"../sequence/types\"\nimport { animateSubject } from \"./subject\"\n\nexport function animateSequence(\n sequence: AnimationSequence,\n options?: SequenceOptions,\n scope?: AnimationScope\n) {\n const animations: AnimationPlaybackControlsWithThen[] = []\n\n /**\n * Pre-process: replace function segments with MotionValue segments,\n * subscribe callbacks immediately\n */\n const processedSequence = sequence.map((segment) => {\n if (Array.isArray(segment) && typeof segment[0] === \"function\") {\n const callback = segment[0] as (value: any) => void\n const mv = motionValue(0)\n mv.on(\"change\", callback)\n\n if (segment.length === 1) {\n return [mv, [0, 1]] as any\n } else if (segment.length === 2) {\n return [mv, [0, 1], segment[1]] as any\n } else {\n return [mv, segment[1], segment[2]] as any\n }\n }\n return segment\n }) as AnimationSequence\n\n const animationDefinitions = createAnimationsFromSequence(\n processedSequence,\n options,\n scope,\n { spring }\n )\n\n animationDefinitions.forEach(({ keyframes, transition }, subject) => {\n animations.push(...animateSubject(subject, keyframes, transition))\n })\n\n return animations\n}\n"],"names":[],"mappings":";;;;SAUgB,eAAe,CAC3B,QAA2B,EAC3B,OAAyB,EACzB,KAAsB,EAAA;IAEtB,MAAM,UAAU,GAAwC,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LMotionValuesFromProps } from 'motion-dom';
import { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';
import { createHtmlRenderState } from './utils/create-render-state.mjs';
const useHTMLVisualState = /*@__PURE__*/ makeUseVisualState({
scrapeMotionValuesFromProps: scrapeHTMLMotionValuesFromProps,
createRenderState: createHtmlRenderState,
});
export { useHTMLVisualState };
//# sourceMappingURL=use-html-visual-state.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"feedback.mjs","sources":["../../../src/matcher/wordSequence/feedback.ts"],"sourcesContent":[null],"names":["options","match","pattern","warning","suggestions","wordCount","translations","warnings","sequences","ascending","push","anotherWord","useWords"],"mappings":"AAGA,0BAAe,CAACA,OAAgB,EAAEC,KAAqB,KAAI;AACzD,EAAA,IAAIA,KAAK,CAACC,OAAO,KAAK,cAAc,EAAE;AACpC,IAAA,OAAO,IAAI;AACb,EAAA;EAEA,IAAIC,OAAO,GAAG,IAAI;EAClB,MAAMC,WAAW,GAAa,EAAE;AAEhC;AACA,EAAA,IAAIH,KAAK,CAACI,SAAS,IAAI,CAAC,EAAE;AACxBF,IAAAA,OAAO,GAAGH,OAAO,CAACM,YAAY,CAACC,QAAQ,CAACC,SAAS;AACnD,EAAA;AAEA;EACA,IAAIP,KAAK,CAACQ,SAAS,EAAE;IACnBL,WAAW,CAACM,IAAI,CAACV,OAAO,CAACM,YAAY,CAACF,WAAW,CAACI,SAAS,CAAC;AAC9D,EAAA,CAAC,MAAM;IACLJ,WAAW,CAACM,IAAI,CAACV,OAAO,CAACM,YAAY,CAACF,WAAW,CAACO,WAAW,CAAC;AAChE,EAAA;AAEA,EAAA,IAAIV,KAAK,CAACI,SAAS,GAAG,CAAC,EAAE;IACvBD,WAAW,CAACM,IAAI,CAACV,OAAO,CAACM,YAAY,CAACF,WAAW,CAACQ,QAAQ,CAAC;AAC7D,EAAA;EAEA,OAAO;IACLT,OAAO;AACPC,IAAAA;GACD;AACH,CAAC;;;;"}
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const SquareLibrary = createLucideIcon("SquareLibrary", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M7 7v10", key: "d5nglc" }],
["path", { d: "M11 7v10", key: "pptsnr" }],
["path", { d: "m15 7 2 10", key: "1m7qm5" }]
]);
export { SquareLibrary as default };
//# sourceMappingURL=square-library.js.map
@@ -0,0 +1,824 @@
flf2a$ 8 7 20 -1 7
DIAMOND by Ron Fritz 8/94
Figlet Release 2.0
---
Font modified June 17, 2007 by patorjk
This was to widen the space character.
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
/\\@
/\\@
/\\@
/\ @
/\ @
@
/\\@
@@
/\ /\@
/\ /\@
@
@
@
@
@
@@
@
/\\ /\\ @
/\\\\\\ /\\\\@
/\\ /\\ @
/\\ /\\ @
/\\\\\\ /\\\\@
/\\ /\\ @
@@
/\\ @
/\ /\\ @
/\\ @
/\\ @
/\\@
/\\ /\\ @
/\\ @
@@
@
/\\ /\\ @
/\\ @
/\\ @
/\\ @
/\\ @
/\\ /\\ @
@@
/\ @
/\\ /\\@
/\\ @
/\\\ @
/\\ @
/\\ /\\@
/\ @
@@
/\\@
/\@
@
@
@
@
@
@@
/\\@
/\\ @
/\\ @
/\\ @
/\\ @
/\\ @
/\\@
@@
/\\ @
/\\ @
/\\@
/\\@
/\\@
/\\ @
/\\ @
@@
/\\ @
/\\ /\\ /\\@
/\ /\ /\\ @
/\\\\ /\\\\\\\@
/\ /\ /\\ @
/\\ /\\ /\\@
/\\ @
@@
@
/\\ @
/\\ @
/\\\ /\\\\\@
/\\ @
/\\ @
@
@@
@
@
@
@
@
@
/\\@
/\@@
@
@
@
/\\\\\@
@
@
@
@@
@
@
@
@
@
@
/\\@
@@
/\\@
/\\ @
/\\ @
/\\ @
/\\ @
/\\ @
/\\ @
@@
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
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@@ -0,0 +1,37 @@
var dateSplits = {
4: [
// for length-4 strings, eg 1191 or 9111, two ways to split:
[1, 2],
// 1 1 91 (2nd split starts at index 1, 3rd at index 2)
[2, 3] // 91 1 1
],
5: [[1, 3],
// 1 11 91
[2, 3],
// 11 1 91
// [2, 3], // 91 1 11 <- duplicate previous one
[2, 4] // 91 11 1 <- New and must be added as bug fix
],
6: [[1, 2],
// 1 1 1991
[2, 4],
// 11 11 91
[4, 5] // 1991 1 1
],
// 1111991
7: [[1, 3],
// 1 11 1991
[2, 3],
// 11 1 1991
[4, 5],
// 1991 1 11
[4, 6] // 1991 11 1
],
8: [[2, 4],
// 11 11 1991
[4, 6] // 1991 11 11
]
};
export { dateSplits as default };
//# sourceMappingURL=dateSplits.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"requestBody.js","sourceRoot":"","sources":["../../../src/server/requestBody.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AAE7D,kFAAkF;AAClF,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC;AAElC,wEAAwE;AACxE,MAAM,UAAU,0BAA0B,CAAC,QAAgB;IACvD,OAAO,mDAAmD,QAAQ,QAAQ,CAAC;AAC/E,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CAAC,KAAyB;IAC/D,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACtB,OAAO,6BAA6B,CAAC;IACzC,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;QACrE,MAAM,IAAI,UAAU,CAAC,8DAA8D,MA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,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,153 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var react = require('react');
var motionDom = require('motion-dom');
var motionUtils = require('motion-utils');
/**
* Creates a constant value over the lifecycle of a component.
*
* Even if `useMemo` is provided an empty array as its final argument, it doesn't offer
* a guarantee that it won't re-run for performance reasons later on. By using `useConstant`
* you can ensure that initialisers don't execute twice or more.
*/
function useConstant(init) {
const ref = react.useRef(null);
if (ref.current === null) {
ref.current = init();
}
return ref.current;
}
function useUnmountEffect(callback) {
return react.useEffect(() => () => callback(), []);
}
function animateElements(elementOrSelector, keyframes, options, scope) {
// Gracefully handle null/undefined elements (e.g., from querySelector returning null)
if (elementOrSelector == null) {
return [];
}
const elements = motionDom.resolveElements(elementOrSelector, scope);
const numElements = elements.length;
motionUtils.invariant(Boolean(numElements), "No valid elements provided.", "no-valid-elements");
/**
* WAAPI doesn't support interrupting animations.
*
* Therefore, starting animations requires a three-step process:
* 1. Stop existing animations (write styles to DOM)
* 2. Resolve keyframes (read styles from DOM)
* 3. Create new animations (write styles to DOM)
*
* The hybrid `animate()` function uses AsyncAnimation to resolve
* keyframes before creating new animations, which removes style
* thrashing. Here, we have much stricter filesize constraints.
* Therefore we do this in a synchronous way that ensures that
* at least within `animate()` calls there is no style thrashing.
*
* In the motion-native-animate-mini-interrupt benchmark this
* was 80% faster than a single loop.
*/
const animationDefinitions = [];
/**
* Step 1: Build options and stop existing animations (write)
*/
for (let i = 0; i < numElements; i++) {
const element = elements[i];
const elementTransition = { ...options };
/**
* Resolve stagger function if provided.
*/
if (typeof elementTransition.delay === "function") {
elementTransition.delay = elementTransition.delay(i, numElements);
}
for (const valueName in keyframes) {
let valueKeyframes = keyframes[valueName];
if (!Array.isArray(valueKeyframes)) {
valueKeyframes = [valueKeyframes];
}
const valueOptions = {
...motionDom.getValueTransition(elementTransition, valueName),
};
valueOptions.duration && (valueOptions.duration = motionUtils.secondsToMilliseconds(valueOptions.duration));
valueOptions.delay && (valueOptions.delay = motionUtils.secondsToMilliseconds(valueOptions.delay));
/**
* If there's an existing animation playing on this element then stop it
* before creating a new one.
*/
const map = motionDom.getAnimationMap(element);
const key = motionDom.animationMapKey(valueName, valueOptions.pseudoElement || "");
const currentAnimation = map.get(key);
currentAnimation && currentAnimation.stop();
animationDefinitions.push({
map,
key,
unresolvedKeyframes: valueKeyframes,
options: {
...valueOptions,
element,
name: valueName,
allowFlatten: !elementTransition.type && !elementTransition.ease,
},
});
}
}
/**
* Step 2: Resolve keyframes (read)
*/
for (let i = 0; i < animationDefinitions.length; i++) {
const { unresolvedKeyframes, options: animationOptions } = animationDefinitions[i];
const { element, name, pseudoElement } = animationOptions;
if (!pseudoElement && unresolvedKeyframes[0] === null) {
unresolvedKeyframes[0] = motionDom.getComputedStyle(element, name);
}
motionDom.fillWildcards(unresolvedKeyframes);
motionDom.applyPxDefaults(unresolvedKeyframes, name);
/**
* If we only have one keyframe, explicitly read the initial keyframe
* from the computed style. This is to ensure consistency with WAAPI behaviour
* for restarting animations, for instance .play() after finish, when it
* has one vs two keyframes.
*/
if (!pseudoElement && unresolvedKeyframes.length < 2) {
unresolvedKeyframes.unshift(motionDom.getComputedStyle(element, name));
}
animationOptions.keyframes = unresolvedKeyframes;
}
/**
* Step 3: Create new animations (write)
*/
const animations = [];
for (let i = 0; i < animationDefinitions.length; i++) {
const { map, key, options: animationOptions } = animationDefinitions[i];
const animation = new motionDom.NativeAnimation(animationOptions);
map.set(key, animation);
animation.finished.finally(() => map.delete(key));
animations.push(animation);
}
return animations;
}
const createScopedWaapiAnimate = (scope) => {
function scopedAnimate(elementOrSelector, keyframes, options) {
return new motionDom.GroupAnimationWithThen(animateElements(elementOrSelector, keyframes, options, scope));
}
return scopedAnimate;
};
function useAnimateMini() {
const scope = useConstant(() => ({
current: null, // Will be hydrated by React
animations: [],
}));
const animate = useConstant(() => createScopedWaapiAnimate(scope));
useUnmountEffect(() => {
scope.animations.forEach((animation) => animation.stop());
});
return [scope, animate];
}
exports.useAnimate = useAnimateMini;
//# sourceMappingURL=mini.js.map
@@ -0,0 +1,123 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "karaktrojn", verb: "havi" },
file: { unit: "bajtojn", verb: "havi" },
array: { unit: "elementojn", verb: "havi" },
set: { unit: "elementojn", verb: "havi" },
map: { unit: "elementojn", verb: "havi" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const FormatDictionary: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "enigo",
email: "retadreso",
url: "URL",
emoji: "emoĝio",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO-datotempo",
date: "ISO-dato",
time: "ISO-tempo",
duration: "ISO-daŭro",
ipv4: "IPv4-adreso",
ipv6: "IPv6-adreso",
mac: "MAC-adreso",
cidrv4: "IPv4-rango",
cidrv6: "IPv6-rango",
base64: "64-ume kodita karaktraro",
base64url: "URL-64-ume kodita karaktraro",
json_string: "JSON-karaktraro",
e164: "E.164-nombro",
credit_card: "kreditkarta numero",
currency_code: "valuta kodo",
iban: "IBAN",
jwt: "JWT",
template_literal: "enigo",
};
const TypeDictionary: {
[k in errors.$ZodInvalidTypeExpected | (string & {})]?: string;
} = {
nan: "NaN",
number: "nombro",
array: "tabelo",
null: "senvalora",
};
return (issue) => {
switch (issue.code) {
case "invalid_type": {
const expected = TypeDictionary[issue.expected] ?? issue.expected;
const receivedType = util.parsedType(issue.input);
const received = TypeDictionary[receivedType] ?? receivedType;
if (/^[A-Z]/.test(issue.expected)) {
return `Nevalida enigo: atendiĝis instanceof ${issue.expected}, riceviĝis ${received}`;
}
return `Nevalida enigo: atendiĝis ${expected}, riceviĝis ${received}`;
}
case "invalid_value":
if (issue.values.length === 1) return `Nevalida enigo: atendiĝis ${util.stringifyPrimitive(issue.values[0])}`;
return `Nevalida opcio: atendiĝis unu el ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Tro granda: atendiĝis ke ${issue.origin ?? "valoro"} havu ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elementojn"}`;
return `Tro granda: atendiĝis ke ${issue.origin ?? "valoro"} havu ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Tro malgranda: atendiĝis ke ${issue.origin} havu ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Tro malgranda: atendiĝis ke ${issue.origin} estu ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") return `Nevalida karaktraro: devas komenciĝi per "${_issue.prefix}"`;
if (_issue.format === "ends_with") return `Nevalida karaktraro: devas finiĝi per "${_issue.suffix}"`;
if (_issue.format === "includes") return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`;
if (_issue.format === "regex") return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;
return `Nevalida ${FormatDictionary[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Nevalida nombro: devas esti oblo de ${issue.divisor}`;
case "unrecognized_keys":
return `Nekonata${issue.keys.length > 1 ? "j" : ""} ŝlosilo${issue.keys.length > 1 ? "j" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Nevalida ŝlosilo en ${issue.origin}`;
case "invalid_union":
return "Nevalida enigo";
case "invalid_element":
return `Nevalida valoro en ${issue.origin}`;
default:
return `Nevalida enigo`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1 @@
{"version":3,"file":"stdio.mjs","names":["_stdin: Readable","_stdout: Writable","_wire: Transport","_onInstanceClose: () => void","_outboundIntercept?: (message: JSONRPCMessage) => 'handled' | undefined","state: EntryState","discarding: StdioConnectionChannel | undefined","channel: StdioConnectionChannel","queue: JSONRPCMessage[]"],"sources":["../src/server/stdio.ts","../src/server/serveStdio.ts"],"sourcesContent":["import type { Readable, Writable } from 'node:stream';\n\nimport type { JSONRPCMessage, Transport } from '@modelcontextprotocol/core-internal';\nimport { ReadBuffer, serializeMessage } from '@modelcontextprotocol/core-internal';\nimport { process } from '@modelcontextprotocol/server/_shims';\n\n/**\n * Marks a stdout `'error'` listener that a closed transport left attached purely to\n * swallow late write failures (see {@link StdioServerTransport.close}). A fresh\n * transport taking over the same stream removes listeners carrying this tag in\n * `start()`, so repeated create→close cycles on the process-global `process.stdout`\n * don't accumulate listeners.\n */\nconst swallowsErrorsAfterClose = Symbol('swallowsErrorsAfterClose');\n\n/**\n * Server transport for stdio: this communicates with an MCP client by reading from the current process' `stdin` and writing to `stdout`.\n *\n * This transport is only available in Node.js environments.\n *\n * When the client closes its end of the pipe (stdin reaches end-of-file), the transport\n * closes itself and fires `onclose`, per the MCP stdio binding's guidance that servers\n * should exit promptly when their standard input is closed. A server that holds no other\n * keep-alive handles will then exit naturally. Requests still in flight when stdin ends are\n * aborted and not answered; a client that expects responses keeps stdin open until it has\n * read them.\n *\n * @example\n * ```ts source=\"./stdio.examples.ts#StdioServerTransport_basicUsage\"\n * const server = new McpServer({ name: 'my-server', version: '1.0.0' });\n * const transport = new StdioServerTransport();\n * await server.connect(transport);\n * ```\n */\nexport class StdioServerTransport implements Transport {\n private _readBuffer: ReadBuffer;\n private _started = false;\n private _closed = false;\n\n constructor(\n private _stdin: Readable = process.stdin,\n private _stdout: Writable = process.stdout,\n options?: {\n /**\n * Maximum size of the read buffer in bytes. If a single message exceeds\n * this size the transport will emit an error and close.\n *\n * Defaults to 10 MB.\n */\n maxBufferSize?: number;\n }\n ) {\n this._readBuffer = new ReadBuffer({ maxBufferSize: options?.maxBufferSize });\n }\n\n onclose?: () => void;\n onerror?: (error: Error) => void;\n onmessage?: (message: JSONRPCMessage) => void;\n\n // Arrow functions to bind `this` properly, while maintaining function identity.\n _ondata = (chunk: Buffer) => {\n try {\n this._readBuffer.append(chunk);\n this.processReadBuffer();\n } catch (error) {\n this.onerror?.(error as Error);\n this.close().catch(() => {});\n }\n };\n _onerror = (error: Error) => {\n this.onerror?.(error);\n };\n _onstdouterror = (error: Error) => {\n if (this._closed) {\n // Swallow stdout errors that surface after close. A write accepted before\n // close (`write()` returned true) can still fail asynchronously at the OS\n // level — e.g. EPIPE when the client that hung up also stops reading our\n // stdout. The transport is already closed, so there is nothing to do; but\n // with no listener attached, that late 'error' event would crash the\n // process with an uncaught exception — which is why close() leaves this\n // listener attached.\n return;\n }\n this.onerror?.(error);\n this.close().catch(() => {\n // Ignore errors during close — we're already in an error path\n });\n };\n _onstdinclose = () => {\n // stdin reaching EOF (or being destroyed) means the client has hung up and no\n // further input can ever arrive. The MCP stdio binding says servers should exit\n // promptly when their standard input closes — this is the primary graceful\n // shutdown signal, and on some platforms (e.g. Windows) the only reliable one.\n // Close the transport so `onclose` fires and the process can exit naturally.\n this.close().catch(() => {\n // Ignore errors during close — nothing more can be read anyway\n });\n };\n\n /**\n * Starts listening for messages on `stdin`.\n */\n async start(): Promise<void> {\n if (this._started) {\n throw new Error(\n 'StdioServerTranspLine truncated
@@ -0,0 +1,21 @@
'use strict'
const SemVer = require('../classes/semver')
const inc = (version, release, options, identifier, identifierBase) => {
if (typeof (options) === 'string') {
identifierBase = identifier
identifier = options
options = undefined
}
try {
return new SemVer(
version instanceof SemVer ? version.version : version,
options
).inc(release, identifier, identifierBase).version
} catch (er) {
return null
}
}
module.exports = inc
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/roving-focus-group.tsx"],
"sourcesContent": ["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createCollection } from '@radix-ui/react-collection';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useId } from '@radix-ui/react-id';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useDirection } from '@radix-ui/react-direction';\n\nimport type { Scope } from '@radix-ui/react-context';\n\nconst ENTRY_FOCUS = 'rovingFocusGroup.onEntryFocus';\nconst EVENT_OPTIONS = { bubbles: false, cancelable: true };\n\n/* -------------------------------------------------------------------------------------------------\n * RovingFocusGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'RovingFocusGroup';\n\ntype ItemData = { id: string; focusable: boolean; active: boolean };\nconst [Collection, useCollection, createCollectionScope] = createCollection<\n HTMLSpanElement,\n ItemData\n>(GROUP_NAME);\n\ntype ScopedProps<P> = P & { __scopeRovingFocusGroup?: Scope };\nconst [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\n\ntype Orientation = React.AriaAttributes['aria-orientation'];\ntype Direction = 'ltr' | 'rtl';\n\ninterface RovingFocusGroupOptions {\n /**\n * The orientation of the group.\n * Mainly so arrow navigation is done accordingly (left & right vs. up & down)\n */\n orientation?: Orientation;\n /**\n * The direction of navigation between items.\n */\n dir?: Direction;\n /**\n * Whether keyboard navigation should loop around\n * @defaultValue false\n */\n loop?: boolean;\n}\n\ntype RovingContextValue = RovingFocusGroupOptions & {\n currentTabStopId: string | null;\n onItemFocus(tabStopId: string): void;\n onItemShiftTab(): void;\n onFocusableItemAdd(): void;\n onFocusableItemRemove(): void;\n};\n\nconst [RovingFocusProvider, useRovingFocusContext] =\n createRovingFocusGroupContext<RovingContextValue>(GROUP_NAME);\n\ntype RovingFocusGroupElement = RovingFocusGroupImplElement;\ninterface RovingFocusGroupProps extends RovingFocusGroupImplProps {}\n\nconst RovingFocusGroup = React.forwardRef<RovingFocusGroupElement, RovingFocusGroupProps>(\n (props: ScopedProps<RovingFocusGroupProps>, forwardedRef) => {\n return (\n <Collection.Provider scope={props.__scopeRovingFocusGroup}>\n <Collection.Slot scope={props.__scopeRovingFocusGroup}>\n <RovingFocusGroupImpl {...props} ref={forwardedRef} />\n </Collection.Slot>\n </Collection.Provider>\n );\n }\n);\n\nRovingFocusGroup.displayName = GROUP_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype RovingFocusGroupImplElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface RovingFocusGroupImplProps\n extends Omit<PrimitiveDivProps, 'dir'>,\n RovingFocusGroupOptions {\n currentTabStopId?: string | null;\n defaultCurrentTabStopId?: string;\n onCurrentTabStopIdChange?: (tabStopId: string | null) => void;\n onEntryFocus?: (event: Event) => void;\n preventScrollOnEntryFocus?: boolean;\n}\n\nconst RovingFocusGroupImpl = React.forwardRef<\n RovingFocusGroupImplElement,\n RovingFocusGroupImplProps\n>((props: ScopedProps<RovingFocusGroupImplProps>, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef<RovingFocusGroupImplElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME,\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n\n return (\n <RovingFocusProvider\Line truncated
"mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,4BAA4B;AACrC,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAChC,SAAS,0BAA0B;AACnC,SAAS,aAAa;AACtB,SAAS,iBAAiB;AAC1B,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AACrC,SAAS,oBAAoB;AAgEnB;AA5DV,IAAM,cAAc;AACpB,IAAM,gBAAgB,EAAE,SAAS,OAAO,YAAY,KAAK;AAMzD,IAAM,aAAa;AAGnB,IAAM,CAAC,YAAY,eAAe,qBAAqB,IAAI,iBAGzD,UAAU;AAGZ,IAAM,CAAC,+BAA+B,2BAA2B,IAAI;AAAA,EACnE;AAAA,EACA,CAAC,qBAAqB;AACxB;AA8BA,IAAM,CAAC,qBAAqB,qBAAqB,IAC/C,8BAAkD,UAAU;AAK9D,IAAM,mBAAyB;AAAA,EAC7B,CAAC,OAA2C,iBAAiB;AAC3D,WACE,oBAAC,WAAW,UAAX,EAAoB,OAAO,MAAM,yBAChC,8BAAC,WAAW,MAAX,EAAgB,OAAO,MAAM,yBAC5B,8BAAC,wBAAsB,GAAG,OAAO,KAAK,cAAc,GACtD,GACF;AAAA,EAEJ;AACF;AAEA,iBAAiB,cAAc;AAgB/B,IAAM,uBAA6B,iBAGjC,CAAC,OAA+C,iBAAiB;AACjE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA,kBAAkB;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA,4BAA4B;AAAA,IAC5B,GAAG;AAAA,EACL,IAAI;AACJ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const stepsOrder = [
"setup", // Compute
"read", // Read
"resolveKeyframes", // Write/Read/Write/Read
"preUpdate", // Compute
"update", // Compute
"preRender", // Compute
"render", // Write
"postRender", // Compute
];
export { stepsOrder };
//# sourceMappingURL=order.mjs.map
@@ -0,0 +1,176 @@
"use strict";
/*!
* content-type
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.format = format;
exports.parse = parse;
const TEXT_REGEXP = /^[\u0009\u0020-\u007e\u0080-\u00ff]*$/;
const TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
/**
* RegExp to match chars that must be quoted-pair in RFC 9110 sec 5.6.4
*/
const QUOTE_REGEXP = /[\\"]/g;
/**
* RegExp to match type in RFC 9110 sec 8.3.1
*
* media-type = type "/" subtype
* type = token
* subtype = token
*/
const TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
/**
* Null object perf optimization. Faster than `Object.create(null)` and `{ __proto__: null }`.
*/
const NullObject = /* @__PURE__ */ (() => {
const C = function () { };
C.prototype = Object.create(null);
return C;
})();
/**
* Format an object into a `Content-Type` header.
*/
function format(obj) {
const { type, parameters } = obj;
if (!type || !TYPE_REGEXP.test(type)) {
throw new TypeError(`Invalid type: ${type}`);
}
let result = type;
if (parameters) {
for (const param of Object.keys(parameters)) {
if (!TOKEN_REGEXP.test(param)) {
throw new TypeError(`Invalid parameter name: ${param}`);
}
result += `; ${param}=${qstring(parameters[param])}`;
}
}
return result;
}
/**
* Parse a `Content-Type` header.
*/
function parse(header, options) {
const stopChar = options?.comma === true ? COMMA : 65536; // Sentinel for "no stop char".
const len = header.length;
let index = skipOWS(header, options?.start ?? 0, len);
const valueStart = index;
index = skipValue(header, index, len, stopChar);
const valueEnd = trailingOWS(header, valueStart, index);
const type = header.slice(valueStart, valueEnd).toLowerCase();
if (options?.parameters === false) {
return { type, index, parameters: new NullObject() };
}
return parseParameters(header, type, index, len, stopChar);
}
const SP = 32; // " "
const HTAB = 9; // "\t"
const SEMI = 59; // ";"
const EQ = 61; // "="
const DQUOTE = 34; // '"'
const BSLASH = 92; // "\\"
const COMMA = 44; // ","
/**
* Parses the parameters of a `Content-Type` header starting at the given index.
*/
function parseParameters(header, type, index, len, stopChar) {
const parameters = new NullObject();
parameter: while (index < len) {
if (header.charCodeAt(index) === stopChar)
break;
index = skipOWS(header, index + 1 /* Skip over ; */, len);
const keyStart = index;
while (index < len) {
const code = header.charCodeAt(index);
if (code === stopChar)
break parameter;
if (code === SEMI)
continue parameter;
if (code === EQ) {
const keyEnd = trailingOWS(header, keyStart, index);
const key = header.slice(keyStart, keyEnd).toLowerCase();
index = skipOWS(header, index + 1, len);
if (index < len && header.charCodeAt(index) === DQUOTE) {
index++;
let value = "";
while (index < len) {
const code = header.charCodeAt(index++);
if (code === DQUOTE) {
index = skipValue(header, index, len, stopChar);
if (parameters[key] === undefined)
parameters[key] = value;
break;
}
if (code === BSLASH && index < len) {
value += header[index++];
continue;
}
value += String.fromCharCode(code);
}
continue parameter;
}
const valueStart = index;
index = skipValue(header, index, len, stopChar);
if (parameters[key] === undefined) {
const valueEnd = trailingOWS(header, valueStart, index);
parameters[key] = header.slice(valueStart, valueEnd);
}
continue parameter;
}
index++;
}
}
return { type, index, parameters };
}
/**
* Skip over characters until a semicolon or other exit character.
*/
function skipValue(str, index, len, stopChar) {
while (index < len) {
const code = str.charCodeAt(index);
if (code === SEMI || code === stopChar)
break;
index++;
}
return index;
}
/**
* Skip optional whitespace (OWS) in an HTTP header value.
*
* OWS is defined in RFC 9110 sec 5.6.3 as SP (" ") or HTAB ("\t").
*/
function skipOWS(header, index, len) {
while (index < len) {
const char = header.charCodeAt(index);
if (char !== SP && char !== HTAB)
break;
index++;
}
return index;
}
/**
* Trim optional whitespace (OWS) from the end of a substring.
*
* OWS is defined in RFC 9110 sec 5.6.3 as SP (" ") or HTAB ("\t").
*/
function trailingOWS(header, start, end) {
while (end > start) {
const char = header.charCodeAt(end - 1);
if (char !== SP && char !== HTAB)
break;
end--;
}
return end;
}
/**
* Serialize a parameter value.
*/
function qstring(str) {
if (TOKEN_REGEXP.test(str))
return str;
if (TEXT_REGEXP.test(str))
return `"${str.replace(QUOTE_REGEXP, "\\$&")}"`;
throw new TypeError(`Invalid parameter value: ${str}`);
}
//# sourceMappingURL=index.js.map
@@ -0,0 +1,11 @@
//#region src/ssr/json.ts
/**
* @deprecated Use [`Response.json`](https://developer.mozilla.org/en-US/docs/Web/API/Response/json_static) from the standard Web API directly.
*/
function json(payload, init) {
return Response.json(payload, init);
}
//#endregion
exports.json = json;
//# sourceMappingURL=json.cjs.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_zR","2":"_OO"},C:{"2":"_bB _1E _L","194":"_oH _p"},D:{"1":"_0R","2":"_PR"},E:{"2":"_R"},F:{"1":"_OS","2":"_8 _dH _O"},G:{"2":"_M"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"2":"_N"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_EC","2":"_MK"},Q:{"16":"JE"},R:{"16":"KE"},S:{"2":"LE","16":"ME"}},B:5,C:"WebAssembly Relaxed SIMD",D:false};
@@ -0,0 +1 @@
{"version":3,"file":"hospital.js","sources":["../../../src/icons/hospital.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Hospital\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgNnY0IiAvPgogIDxwYXRoIGQ9Ik0xNCAxNGgtNCIgLz4KICA8cGF0aCBkPSJNMTQgMThoLTQiIC8+CiAgPHBhdGggZD0iTTE0IDhoLTQiIC8+CiAgPHBhdGggZD0iTTE4IDEyaDJhMiAyIDAgMCAxIDIgMnY2YTIgMiAwIDAgMS0yIDJINGEyIDIgMCAwIDEtMi0ydi05YTIgMiAwIDAgMSAyLTJoMiIgLz4KICA8cGF0aCBkPSJNMTggMjJWNGEyIDIgMCAwIDAtMi0ySDhhMiAyIDAgMCAwLTIgMnYxOCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/hospital\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 Hospital = createLucideIcon('Hospital', [\n ['path', { d: 'M12 6v4', key: '16clxf' }],\n ['path', { d: 'M14 14h-4', key: 'esezmu' }],\n ['path', { d: 'M14 18h-4', key: '16mqa2' }],\n ['path', { d: 'M14 8h-4', key: 'z8ypaz' }],\n [\n 'path',\n {\n d: 'M18 12h2a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-9a2 2 0 0 1 2-2h2',\n key: 'b1k337',\n },\n ],\n ['path', { d: 'M18 22V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v18', key: '16g51d' }],\n]);\n\nexport default Hospital;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,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;AAC5E,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,697 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0;
const code_1 = require("./code");
const scope_1 = require("./scope");
var code_2 = require("./code");
Object.defineProperty(exports, "_", { enumerable: true, get: function () { return code_2._; } });
Object.defineProperty(exports, "str", { enumerable: true, get: function () { return code_2.str; } });
Object.defineProperty(exports, "strConcat", { enumerable: true, get: function () { return code_2.strConcat; } });
Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return code_2.nil; } });
Object.defineProperty(exports, "getProperty", { enumerable: true, get: function () { return code_2.getProperty; } });
Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return code_2.stringify; } });
Object.defineProperty(exports, "regexpCode", { enumerable: true, get: function () { return code_2.regexpCode; } });
Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return code_2.Name; } });
var scope_2 = require("./scope");
Object.defineProperty(exports, "Scope", { enumerable: true, get: function () { return scope_2.Scope; } });
Object.defineProperty(exports, "ValueScope", { enumerable: true, get: function () { return scope_2.ValueScope; } });
Object.defineProperty(exports, "ValueScopeName", { enumerable: true, get: function () { return scope_2.ValueScopeName; } });
Object.defineProperty(exports, "varKinds", { enumerable: true, get: function () { return scope_2.varKinds; } });
exports.operators = {
GT: new code_1._Code(">"),
GTE: new code_1._Code(">="),
LT: new code_1._Code("<"),
LTE: new code_1._Code("<="),
EQ: new code_1._Code("==="),
NEQ: new code_1._Code("!=="),
NOT: new code_1._Code("!"),
OR: new code_1._Code("||"),
AND: new code_1._Code("&&"),
ADD: new code_1._Code("+"),
};
class Node {
optimizeNodes() {
return this;
}
optimizeNames(_names, _constants) {
return this;
}
}
class Def extends Node {
constructor(varKind, name, rhs) {
super();
this.varKind = varKind;
this.name = name;
this.rhs = rhs;
}
render({ es5, _n }) {
const varKind = es5 ? scope_1.varKinds.var : this.varKind;
const rhs = this.rhs === undefined ? "" : ` = ${this.rhs}`;
return `${varKind} ${this.name}${rhs};` + _n;
}
optimizeNames(names, constants) {
if (!names[this.name.str])
return;
if (this.rhs)
this.rhs = optimizeExpr(this.rhs, names, constants);
return this;
}
get names() {
return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {};
}
}
class Assign extends Node {
constructor(lhs, rhs, sideEffects) {
super();
this.lhs = lhs;
this.rhs = rhs;
this.sideEffects = sideEffects;
}
render({ _n }) {
return `${this.lhs} = ${this.rhs};` + _n;
}
optimizeNames(names, constants) {
if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects)
return;
this.rhs = optimizeExpr(this.rhs, names, constants);
return this;
}
get names() {
const names = this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names };
return addExprNames(names, this.rhs);
}
}
class AssignOp extends Assign {
constructor(lhs, op, rhs, sideEffects) {
super(lhs, rhs, sideEffects);
this.op = op;
}
render({ _n }) {
return `${this.lhs} ${this.op}= ${this.rhs};` + _n;
}
}
class Label extends Node {
constructor(label) {
super();
this.label = label;
this.names = {};
}
render({ _n }) {
return `${this.label}:` + _n;
}
}
class Break extends Node {
constructor(label) {
super();
this.label = label;
this.names = {};
}
render({ _n }) {
const label = this.label ? ` ${this.label}` : "";
return `break${label};` + _n;
}
}
class Throw extends Node {
constructor(error) {
super();
this.error = error;
}
render({ _n }) {
return `throw ${this.error};` + _n;
}
get names() {
return this.error.names;
}
}
class AnyCode extends Node {
constructor(code) {
super();
this.code = code;
}
render({ _n }) {
return `${this.code};` + _n;
}
optimizeNodes() {
return `${this.code}` ? this : undefined;
}
optimizeNames(names, constants) {
this.code = optimizeExpr(this.code, names, constants);
return this;
}
get names() {
return this.code instanceof code_1._CodeOrName ? this.code.names : {};
}
}
class ParentNode extends Node {
constructor(nodes = []) {
super();
this.nodes = nodes;
}
render(opts) {
return this.nodes.reduce((code, n) => code + n.render(opts), "");
}
optimizeNodes() {
const { nodes } = this;
let i = nodes.length;
while (i--) {
const n = nodes[i].optimizeNodes();
if (Array.isArray(n))
nodes.splice(i, 1, ...n);
else if (n)
nodes[i] = n;
else
nodes.splice(i, 1);
}
return nodes.length > 0 ? this : undefined;
}
optimizeNames(names, constants) {
const { nodes } = this;
let i = nodes.length;
while (i--) {
// iterating backwards improves 1-pass optimization
const n = nodes[i];
if (n.optimizeNames(names, constants))
continue;
subtractNames(names, n.names);
nodes.splice(i, 1);
}
return nodes.length > 0 ? this : undefined;
}
get names() {
return this.nodes.reduce((names, n) => addNames(names, n.names), {});
}
}
class BlockNode extends ParentNode {
render(opts) {
return "{" + opts._n + super.render(opts) + "}" + opts._n;
}
}
class Root extends ParentNode {
}
class Else extends BlockNode {
}
Else.kind = "else";
class If extends BlockNode {
constructor(condition, nodes) {
super(nodes);
this.condition = condition;
}
render(opts) {
let code = `if(${this.condition})` + super.render(opts);
if (this.else)
code += "else " + this.else.render(opts);
return code;
}
optimizeNodes() {
super.optimizeNodes();
const cond = this.condition;
if (cond === true)
return this.nodes; // else is ignored here
let e = this.else;
if (e) {
const ns = e.optimizeNodes();
e = this.else = Array.isArray(ns) ? new Else(ns) : ns;
}
if (e) {
if (cond === false)
return e instanceof If ? e : e.nodes;
if (this.nodes.length)
return this;
return new If(not(cond), e instanceof If ? [e] : e.nodes);
}
if (cond === false || !this.nodes.length)
return undefined;
return this;
}
optimizeNames(names, constants) {
var _a;
this.else = (_a = this.else) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);
if (!(super.optimizeNames(names, constants) || this.else))
return;
this.condition = optimizeExpr(this.condition, names, constants);
return this;
}
get names() {
const names = super.names;
addExprNames(names, this.condition);
if (this.else)
addNames(names, this.else.names);
return names;
}
}
If.kind = "if";
class For extends BlockNode {
}
For.kind = "for";
class ForLoop extends For {
constructor(iteration) {
super();
this.iteration = iteration;
}
render(opts) {
return `for(${this.iteration})` + super.render(opts);
}
optimizeNames(names, constants) {
if (!super.optimizeNames(names, constants))
return;
this.iteration = optimizeExpr(this.iteration, names, constants);
return this;
}
get names() {
return addNames(super.names, this.iteration.names);
}
}
class ForRange extends For {
constructor(varKind, name, from, to) {
super();
this.varKind = varKind;
this.name = name;
this.from = from;
this.to = to;
}
render(opts) {
const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind;
const { name, from, to } = this;
return `for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)` + super.render(opts);
}
get names() {
const names = addExprNames(super.names, this.from);
return addExprNames(names, this.to);
}
}
class ForIter extends For {
constructor(loop, varKind, name, iterable) {
super();
this.loop = loop;
this.varKind = varKind;
this.name = name;
this.iterable = iterable;
}
render(opts) {
return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts);
}
optimizeNames(names, constants) {
if (!super.optimizeNames(names, constants))
return;
this.iterable = optimizeExpr(this.iterable, names, constants);
return this;
}
get names() {
return addNames(super.names, this.iterable.names);
}
}
class Func extends BlockNode {
constructor(name, args, async) {
super();
this.name = name;
this.args = args;
this.async = async;
}
render(opts) {
const _async = this.async ? "async " : "";
return `${_async}function ${this.name}(${this.args})` + super.render(opts);
}
}
Func.kind = "func";
class Return extends ParentNode {
render(opts) {
return "return " + super.render(opts);
}
}
Return.kind = "return";
class Try extends BlockNode {
render(opts) {
let code = "try" + super.render(opts);
if (this.catch)
code += this.catch.render(opts);
if (this.finally)
code += this.finally.render(opts);
return code;
}
optimizeNodes() {
var _a, _b;
super.optimizeNodes();
(_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNodes();
(_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes();
return this;
}
optimizeNames(names, constants) {
var _a, _b;
super.optimizeNames(names, constants);
(_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);
(_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants);
return this;
}
get names() {
const names = super.names;
if (this.catch)
addNames(names, this.catch.names);
if (this.finally)
addNames(names, this.finally.names);
return names;
}
}
class Catch extends BlockNode {
constructor(error) {
super();
this.error = error;
}
render(opts) {
return `catch(${this.error})` + super.render(opts);
}
}
Catch.kind = "catch";
class Finally extends BlockNode {
render(opts) {
return "finally" + super.render(opts);
}
}
Finally.kind = "finally";
class CodeGen {
constructor(extScope, opts = {}) {
this._values = {};
this._blockStarts = [];
this._constants = {};
this.opts = { ...opts, _n: opts.lines ? "\n" : "" };
this._extScope = extScope;
this._scope = new scope_1.Scope({ parent: extScope });
this._nodes = [new Root()];
}
toString() {
return this._root.render(this.opts);
}
// returns unique name in the internal scope
name(prefix) {
return this._scope.name(prefix);
}
// reserves unique name in the external scope
scopeName(prefix) {
return this._extScope.name(prefix);
}
// reserves unique name in the external scope and assigns value to it
scopeValue(prefixOrName, value) {
const name = this._extScope.value(prefixOrName, value);
const vs = this._values[name.prefix] || (this._values[name.prefix] = new Set());
vs.add(name);
return name;
}
getScopeValue(prefix, keyOrRef) {
return this._extScope.getValue(prefix, keyOrRef);
}
// return code that assigns values in the external scope to the names that are used internally
// (same names that were returned by gen.scopeName or gen.scopeValue)
scopeRefs(scopeName) {
return this._extScope.scopeRefs(scopeName, this._values);
}
scopeCode() {
return this._extScope.scopeCode(this._values);
}
_def(varKind, nameOrPrefix, rhs, constant) {
const name = this._scope.toName(nameOrPrefix);
if (rhs !== undefined && constant)
this._constants[name.str] = rhs;
this._leafNode(new Def(varKind, name, rhs));
return name;
}
// `const` declaration (`var` in es5 mode)
const(nameOrPrefix, rhs, _constant) {
return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant);
}
// `let` declaration with optional assignment (`var` in es5 mode)
let(nameOrPrefix, rhs, _constant) {
return this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant);
}
// `var` declaration with optional assignment
var(nameOrPrefix, rhs, _constant) {
return this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant);
}
// assignment code
assign(lhs, rhs, sideEffects) {
return this._leafNode(new Assign(lhs, rhs, sideEffects));
}
// `+=` code
add(lhs, rhs) {
return this._leafNode(new AssignOp(lhs, exports.operators.ADD, rhs));
}
// appends passed SafeExpr to code or executes Block
code(c) {
if (typeof c == "function")
c();
else if (c !== code_1.nil)
this._leafNode(new AnyCode(c));
return this;
}
// returns code for object literal for the passed argument list of key-value pairs
object(...keyValues) {
const code = ["{"];
for (const [key, value] of keyValues) {
if (code.length > 1)
code.push(",");
code.push(key);
if (key !== value || this.opts.es5) {
code.push(":");
(0, code_1.addCodeArg)(code, value);
}
}
code.push("}");
return new code_1._Code(code);
}
// `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)
if(condition, thenBody, elseBody) {
this._blockNode(new If(condition));
if (thenBody && elseBody) {
this.code(thenBody).else().code(elseBody).endIf();
}
else if (thenBody) {
this.code(thenBody).endIf();
}
else if (elseBody) {
throw new Error('CodeGen: "else" body without "then" body');
}
return this;
}
// `else if` clause - invalid without `if` or after `else` clauses
elseIf(condition) {
return this._elseNode(new If(condition));
}
// `else` clause - only valid after `if` or `else if` clauses
else() {
return this._elseNode(new Else());
}
// end `if` statement (needed if gen.if was used only with condition)
endIf() {
return this._endBlockNode(If, Else);
}
_for(node, forBody) {
this._blockNode(node);
if (forBody)
this.code(forBody).endFor();
return this;
}
// a generic `for` clause (or statement if `forBody` is passed)
for(iteration, forBody) {
return this._for(new ForLoop(iteration), forBody);
}
// `for` statement for a range of values
forRange(nameOrPrefix, from, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) {
const name = this._scope.toName(nameOrPrefix);
return this._for(new ForRange(varKind, name, from, to), () => forBody(name));
}
// `for-of` statement (in es5 mode replace with a normal for loop)
forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) {
const name = this._scope.toName(nameOrPrefix);
if (this.opts.es5) {
const arr = iterable instanceof code_1.Name ? iterable : this.var("_arr", iterable);
return this.forRange("_i", 0, (0, code_1._) `${arr}.length`, (i) => {
this.var(name, (0, code_1._) `${arr}[${i}]`);
forBody(name);
});
}
return this._for(new ForIter("of", varKind, name, iterable), () => forBody(name));
}
// `for-in` statement.
// With option `ownProperties` replaced with a `for-of` loop for object keys
forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) {
if (this.opts.ownProperties) {
return this.forOf(nameOrPrefix, (0, code_1._) `Object.keys(${obj})`, forBody);
}
const name = this._scope.toName(nameOrPrefix);
return this._for(new ForIter("in", varKind, name, obj), () => forBody(name));
}
// end `for` loop
endFor() {
return this._endBlockNode(For);
}
// `label` statement
label(label) {
return this._leafNode(new Label(label));
}
// `break` statement
break(label) {
return this._leafNode(new Break(label));
}
// `return` statement
return(value) {
const node = new Return();
this._blockNode(node);
this.code(value);
if (node.nodes.length !== 1)
throw new Error('CodeGen: "return" should have one node');
return this._endBlockNode(Return);
}
// `try` statement
try(tryBody, catchCode, finallyCode) {
if (!catchCode && !finallyCode)
throw new Error('CodeGen: "try" without "catch" and "finally"');
const node = new Try();
this._blockNode(node);
this.code(tryBody);
if (catchCode) {
const error = this.name("e");
this._currNode = node.catch = new Catch(error);
catchCode(error);
}
if (finallyCode) {
this._currNode = node.finally = new Finally();
this.code(finallyCode);
}
return this._endBlockNode(Catch, Finally);
}
// `throw` statement
throw(error) {
return this._leafNode(new Throw(error));
}
// start self-balancing block
block(body, nodeCount) {
this._blockStarts.push(this._nodes.length);
if (body)
this.code(body).endBlock(nodeCount);
return this;
}
// end the current self-balancing block
endBlock(nodeCount) {
const len = this._blockStarts.pop();
if (len === undefined)
throw new Error("CodeGen: not in self-balancing block");
const toClose = this._nodes.length - len;
if (toClose < 0 || (nodeCount !== undefined && toClose !== nodeCount)) {
throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`);
}
this._nodes.length = len;
return this;
}
// `function` heading (or definition if funcBody is passed)
func(name, args = code_1.nil, async, funcBody) {
this._blockNode(new Func(name, args, async));
if (funcBody)
this.code(funcBody).endFunc();
return this;
}
// end function definition
endFunc() {
return this._endBlockNode(Func);
}
optimize(n = 1) {
while (n-- > 0) {
this._root.optimizeNodes();
this._root.optimizeNames(this._root.names, this._constants);
}
}
_leafNode(node) {
this._currNode.nodes.push(node);
return this;
}
_blockNode(node) {
this._currNode.nodes.push(node);
this._nodes.push(node);
}
_endBlockNode(N1, N2) {
const n = this._currNode;
if (n instanceof N1 || (N2 && n instanceof N2)) {
this._nodes.pop();
return this;
}
throw new Error(`CodeGen: not in block "${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}"`);
}
_elseNode(node) {
const n = this._currNode;
if (!(n instanceof If)) {
throw new Error('CodeGen: "else" without "if"');
}
this._currNode = n.else = node;
return this;
}
get _root() {
return this._nodes[0];
}
get _currNode() {
const ns = this._nodes;
return ns[ns.length - 1];
}
set _currNode(node) {
const ns = this._nodes;
ns[ns.length - 1] = node;
}
}
exports.CodeGen = CodeGen;
function addNames(names, from) {
for (const n in from)
names[n] = (names[n] || 0) + (from[n] || 0);
return names;
}
function addExprNames(names, from) {
return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names;
}
function optimizeExpr(expr, names, constants) {
if (expr instanceof code_1.Name)
return replaceName(expr);
if (!canOptimize(expr))
return expr;
return new code_1._Code(expr._items.reduce((items, c) => {
if (c instanceof code_1.Name)
c = replaceName(c);
if (c instanceof code_1._Code)
items.push(...c._items);
else
items.push(c);
return items;
}, []));
function replaceName(n) {
const c = constants[n.str];
if (c === undefined || names[n.str] !== 1)
return n;
delete names[n.str];
return c;
}
function canOptimize(e) {
return (e instanceof code_1._Code &&
e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== undefined));
}
}
function subtractNames(names, from) {
for (const n in from)
names[n] = (names[n] || 0) - (from[n] || 0);
}
function not(x) {
return typeof x == "boolean" || typeof x == "number" || x === null ? !x : (0, code_1._) `!${par(x)}`;
}
exports.not = not;
const andCode = mappend(exports.operators.AND);
// boolean AND (&&) expression with the passed arguments
function and(...args) {
return args.reduce(andCode);
}
exports.and = and;
const orCode = mappend(exports.operators.OR);
// boolean OR (||) expression with the passed arguments
function or(...args) {
return args.reduce(orCode);
}
exports.or = or;
function mappend(op) {
return (x, y) => (x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._) `${par(x)} ${op} ${par(y)}`);
}
function par(x) {
return x instanceof code_1.Name ? x : (0, code_1._) `(${x})`;
}
//# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/index.ts", "../src/slot.tsx"],
"sourcesContent": ["export {\n Slot,\n Slottable,\n //\n Root,\n createSlot,\n createSlottable,\n} from './slot';\nexport type { SlotProps } from './slot';\n", "import * as React from 'react';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\n\ndeclare module 'react' {\n interface ReactElement {\n $$typeof?: symbol | string;\n }\n}\n\nconst REACT_LAZY_TYPE = Symbol.for('react.lazy');\n\ninterface LazyReactElement extends React.ReactElement {\n $$typeof: typeof REACT_LAZY_TYPE;\n _payload: PromiseLike<Exclude<React.ReactNode, PromiseLike<any>>>;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/\n\nexport type Usable<T> = PromiseLike<T> | React.Context<T>;\nconst use: typeof React.use | undefined = (React as any)[' use '.trim().toString()];\n\ninterface SlotProps extends React.HTMLAttributes<HTMLElement> {\n children?: React.ReactNode;\n}\n\nfunction isPromiseLike(value: unknown): value is PromiseLike<unknown> {\n return typeof value === 'object' && value !== null && 'then' in value;\n}\n\nfunction isLazyComponent(element: React.ReactNode): element is LazyReactElement {\n return (\n element != null &&\n typeof element === 'object' &&\n '$$typeof' in element &&\n element.$$typeof === REACT_LAZY_TYPE &&\n '_payload' in element &&\n isPromiseLike(element._payload)\n );\n}\n\n/* @__NO_SIDE_EFFECTS__ */ export function createSlot(ownerName: string) {\n const SlotClone = createSlotClone(ownerName);\n const Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n if (isLazyComponent(children) && typeof use === 'function') {\n children = use(children._payload);\n }\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n\n if (slottable) {\n // the new element to render is the one passed as a child of `Slottable`\n const newElement = slottable.props.children;\n\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n // because the new element will be the one rendered, we are only interested\n // in grabbing its children (`newElement.props.children`)\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement)\n ? (newElement.props as { children: React.ReactNode }).children\n : null;\n } else {\n return child;\n }\n });\n\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {React.isValidElement(newElement)\n ? React.cloneElement(newElement, undefined, newChildren)\n : null}\n </SlotClone>\n );\n }\n\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {children}\n </SlotClone>\n );\n });\n\n Slot.displayName = `${ownerName}.Slot`;\n return Slot;\n}\n\nconst Slot = createSlot('Slot');\n\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotCloneProps {\n children: React.ReactNode;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ function createSlotClone(ownerName: string) {\n const SlotClone = React.forwardRef<any, SlotCloneProps>((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n if (isLazyComponent(children) && typeof use === 'function') {\n children = use(children._payload);\n }\n\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props = mergeProps(slotProps, children.props as AnyProps);\n // do not pass ref to React.Fragment for React 19 compatibility\n if (children.type !== React.Fragment) {\n props.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props);\n }\n\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/\n\nconst SLOTTABLE_IDENTIFIER = Symbol('radix.slottable');\n\ninterface SlottableProps {\n children: React.ReactNode;\n}\n\ninterface SlottableComponent extends React.FC<SlottableProps> {\n __radixId: symbol;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ export function createSlottable(ownerName: string) {\n const Slottable: SlottableComponent = ({ children }) => {\n return <>{children}</Line truncated
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,gCAA4B;AAqEpB;AA7DR,IAAM,kBAAkB,OAAO,IAAI,YAAY;AAY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IAAI,SAAoB;AAChD,gBAAM,SAAS,eAAe,GAAG,IAAI;AACrC,wBAAc,GAAG,IAAI;AACrB,iBAAO;AAAA,QACT;AAAA,MACF,WAES,eAAe;AACtB,sBAAc,QAAQ,IAAI;AAAA,MAC5B;AAAA,IACF,WAES,aAAa,SAAS;AAC7B,oBAAc,QAAQ,IAAI,EAAE,GAAG,eAAe,GAAG,eAAe;AAAA,IAClE,WAAW,aAAa,aAAa;AACnC,oBAAc,QAAQ,IAAI,CAAC,eAAe,cAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,IACpF;AAAA,EACF;AAEA,SAAO,EAAE,GAAG,WAAW,GAAG,cAAc;AAC1C;AAOA,SAAS,cAAc,SAA6B;AAElD,MAAI,SAAS,OAAO,yBAAyB,QAAQ,OAAO,KAAK,GAAG;AACpE,MAAI,UAAU,UAAU,oBAAoB,UAAU,OAAO;AAC7D,MAAI,SAAS;AACX,WAAQ,QAAgB;AAAA,EAC1B;AAGA,WAAS,OAAO,yBAAyB,SAAS,KAAK,GAAG;AAC1D,YAAU,UAAU,oBAAoB,UAAU,OAAO;AACzD,MAAI,SAAS;AACX,WAAQ,QAAQ,MAAuC;AAAA,EACzD;AAGA,SAAQ,QAAQ,MAAuC,OAAQ,QAAgB;AACjF;",
"names": ["Slot", "props", "Slottable"]
}
@@ -0,0 +1,842 @@
flf2a$ 8 7 18 4 25
crawford2.flf (FIGlet font)
Font created from original Crawford, update by PAT or JK, Jan 2008
Figlet conversion by Kent Nassen, knassen@umich.edu, 1/2/95
From: s1171180@giaeb.cc.monash.edu.au (Rowan Crawford)
Newsgroups: alt.ascii-art
Subject: Font - Style No 2....
Date: 14 Jan 1994 14:37:30 GMT
Organization: Monash University
Lines: 41
Message-ID: <2h6ana$db6@harbinger.cc.monash.edu.au>
NNTP-Posting-Host: giaeb.cc.monash.edu.au
X-Newsreader: NN version 6.5.0 #4 (NOV)
Status: RO
Had some spare time today, so I have done another font. Different
form to the last one though:
[...]
And there you are. "S" looks slightly odd and so does "J", but
otherwise fairly neat I guess.
Row.
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
__ @
| |@
| |@
|__|@
__ @
| |@
|__|@
@@
$__ __ @
| || |@
|_ ||_ |@
$ \| \|@
$ @
$ @
$ @
$ @@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
__ @
| |@
|_ |@
\|@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
__ @
| |@
|_ |@
\|@@
@
@
_____ @
| |@
|_____|@
@
@
@@
@
@
@
@
__ @
| |@
|__|@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
__ @
| |@
|__|@
__ @
| |@
|__|@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
_____ @
/ |@
| Y |@
|__| |@
|__|@
__ @
|__|@
@@
____ @
/ \@
| _ |@
| / |@
| \__|@
| |@
\__,_|@
@@
____ @
/ |@
| o |@
| |@
| _ |@
| | |@
|__|__|@
@@
____ @
| \ @
| o )@
| |@
| O |@
| |@
|_____|@
@@
__ @
/ ]@
/ / @
/ / @
/ \_ @
\ |@
\____|@
@@
___ @
| \ @
| \ @
| D |@
| |@
| |@
|_____|@
@@
___ @
/ _]@
/ [_ @
| _]@
| [_ @
| |@
|_____|@
@@
_____ @
| |@
| __|@
| |_ @
| _] @
| | @
|__| @
@@
____ @
/ |@
| __|@
| | |@
| |_ |@
| |@
|___,_|@
@@
__ __ @
| | |@
| | |@
| _ |@
| | |@
| | |@
|__|__|@
@@
____ @
| |@
| | @
| | @
| | @
| | @
|____|@
@@
____ @
| |@
|__ |@
__| |@
/ | |@
\ ` |@
\____j@
@@
__ _ @
| |/ ]@
| ' / @
| \ @
| |@
| . |@
|__|\_|@
@@
_ @
| | @
| | @
| |___ @
| |@
| |@
|_____|@
@@
___ ___ @
| | |@
| _ _ |@
| \_/ |@
| | |@
| | |@
|___|___|@
@@
____ @
| \ @
| _ |@
| | |@
| | |@
| | |@
|__|__|@
@@
___ @
/ \ @
| |@
| O |@
| |@
| |@
\___/ @
@@
____ @
| \ @
| o )@
| _/ @
| | @
| | @
|__| @
@@
___ @
/ \ @
| |@
| Q |@
| |@
| |@
\__,_|@
@@
____ @
| \ @
| D )@
| / @
| \ @
| . \@
|__|\_|@
@@
_____@
/ ___/@
( \_ @
\__ |@
/ \ |@
\ |@
\___|@
@@
______ @
| |@
| |@
|_| |_|@
| | @
| | @
|__| @
@@
__ __ @
| | |@
| | |@
| | |@
| : |@
| |@
\__,_|@
@@
__ __ @
| | |@
| | |@
| | |@
| : |@
\ / @
\_/ @
@@
__ __ @
| |__| |@
| | | |@
| | | |@
| ` ' |@
\ / @
\_/\_/ @
@@
__ __ @
| | |@
| | |@
|_ _|@
| |@
| | |@
|__|__|@
@@
__ __ @
| | |@
| | |@
| ~ |@
|___, |@
| |@
|____/ @
@@
_____ @
| |@
|__/ |@
| __|@
| / |@
| |@
|_____|@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
__ @
| |@
| _|@
|/ @
@
@
@
@@
____ @
/ |@
| o |@
| |@
| _ |@
| | |@
|__|__|@
@@
____ @
| \ @
| o )@
| |@
| O |@
| |@
|_____|@
@@
__ @
/ ]@
/ / @
/ / @
/ \_ @
\ |@
\____|@
@@
___ @
| \ @
| \ @
| D |@
| |@
| |@
|_____|@
@@
___ @
/ _]@
/ [_ @
| _]@
| [_ @
| |@
|_____|@
@@
_____ @
| |@
| __|@
| |_ @
| _] @
| | @
|__| @
@@
____ @
/ |@
| __|@
| | |@
| |_ |@
| |@
|___,_|@
@@
__ __ @
| | |@
| | |@
| _ |@
| | |@
| | |@
|__|__|@
@@
____ @
| |@
| | @
| | @
| | @
| | @
|____|@
@@
____ @
| |@
|__ |@
__| |@
/ | |@
\ ` |@
\____|@
@@
__ _ @
| |/ ]@
| ' / @
| \ @
| \@
| . |@
|__|\_|@
@@
_ @
| | @
| | @
| |___ @
| |@
| |@
|_____|@
@@
___ ___ @
| | |@
| _ _ |@
| \_/ |@
| | |@
| | |@
|___|___|@
@@
____ @
| \ @
| _ |@
| | |@
| | |@
| | |@
|__|__|@
@@
___ @
/ \ @
| |@
| O |@
| |@
| |@
\___/ @
@@
____ @
| \ @
| o )@
| _/ @
| | @
| | @
|__| @
@@
___ @
/ \ @
| |@
| Q |@
| |@
| |@
\__,_|@
@@
____ @
| \ @
| D )@
| / @
| \ @
| . \@
|__|\_|@
@@
_____@
/ ___/@
( \_ @
\__ |@
/ \ |@
\ |@
\___|@
@@
______ @
| |@
| |@
|_| |_|@
| | @
| | @
|__| @
@@
__ __ @
| | |@
| | |@
| | |@
| : |@
| |@
\__,_|@
@@
__ __ @
| | |@
| | |@
| | |@
| : |@
\ / @
\_/ @
@@
__ __ @
| |__| |@
| | | |@
| | | |@
| ` ' |@
\ / @
\_/\_/ @
@@
__ __ @
| | |@
| | |@
|_ _|@
| |@
| | |@
|__|__|@
@@
__ __ @
| | |@
| | |@
| ~ |@
|___, |@
| |@
|____/ @
@@
_____ @
| |@
|__/ |@
| __|@
| / |@
| |@
|_____|@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@@ -0,0 +1 @@
{"version":3,"file":"syringe.js","sources":["../../../src/icons/syringe.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Syringe\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTggMiA0IDQiIC8+CiAgPHBhdGggZD0ibTE3IDcgMy0zIiAvPgogIDxwYXRoIGQ9Ik0xOSA5IDguNyAxOS4zYy0xIDEtMi41IDEtMy40IDBsLS42LS42Yy0xLTEtMS0yLjUgMC0zLjRMMTUgNSIgLz4KICA8cGF0aCBkPSJtOSAxMSA0IDQiIC8+CiAgPHBhdGggZD0ibTUgMTktMyAzIiAvPgogIDxwYXRoIGQ9Im0xNCA0IDYgNiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/syringe\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 Syringe = createLucideIcon('Syringe', [\n ['path', { d: 'm18 2 4 4', key: '22kx64' }],\n ['path', { d: 'm17 7 3-3', key: '1w1zoj' }],\n ['path', { d: 'M19 9 8.7 19.3c-1 1-2.5 1-3.4 0l-.6-.6c-1-1-1-2.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AA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC7F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,28 @@
import { createProjectionNode } from './create-projection-node.mjs';
import { DocumentProjectionNode } from './DocumentProjectionNode.mjs';
const rootProjectionNode = {
current: undefined,
};
const HTMLProjectionNode = createProjectionNode({
measureScroll: (instance) => ({
x: instance.scrollLeft,
y: instance.scrollTop,
}),
defaultParent: () => {
if (!rootProjectionNode.current) {
const documentNode = new DocumentProjectionNode({});
documentNode.mount(window);
documentNode.setOptions({ layoutScroll: true });
rootProjectionNode.current = documentNode;
}
return rootProjectionNode.current;
},
resetTransform: (instance, value) => {
instance.style.transform = value !== undefined ? value : "none";
},
checkIsScrollRoot: (instance) => Boolean(window.getComputedStyle(instance).position === "fixed"),
});
export { HTMLProjectionNode, rootProjectionNode };
//# sourceMappingURL=HTMLProjectionNode.mjs.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_K","2":"_I"},C:{"1":"_OL","2":"_o _L"},D:{"1":"_sN","2":"_9H"},E:{"1":"_wF","2":"_iF"},F:{"1":"_OM","2":"_1F"},G:{"1":"_JE","2":"_XF"},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":"_9F","2":"_nF"},Q:{"16":"JE"},R:{"16":"KE"},S:{"2":"LE","16":"ME"}},B:5,C:"WebAssembly Sign Extension Operators",D:true};
@@ -0,0 +1,26 @@
/**
* dd-droppable.ts 12.6.0
* Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license
*/
import { DDBaseImplement, HTMLElementExtendOpt } from './dd-base-impl';
import { DDUIData } from './types';
export interface DDDroppableOpt {
accept?: string | ((el: HTMLElement) => boolean);
drop?: (event: DragEvent, ui: DDUIData) => void;
over?: (event: DragEvent, ui: DDUIData) => void;
out?: (event: DragEvent, ui: DDUIData) => void;
}
export declare class DDDroppable extends DDBaseImplement implements HTMLElementExtendOpt<DDDroppableOpt> {
el: HTMLElement;
option: DDDroppableOpt;
accept: (el: HTMLElement) => boolean;
constructor(el: HTMLElement, option?: DDDroppableOpt);
on(event: 'drop' | 'dropover' | 'dropout', callback: (event: DragEvent) => void): void;
off(event: 'drop' | 'dropover' | 'dropout'): void;
enable(): void;
disable(forDestroy?: boolean): void;
destroy(): void;
updateOption(opts: DDDroppableOpt): DDDroppable;
/** item is being dropped on us - called by the drag mouseup handler - this calls the client drop event */
drop(e: MouseEvent): void;
}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_Z","129":"_A"},B:{"1":"_K","129":"_I"},C:{"1":"_tC","2":"_g"},D:{"1":"_Q"},E:{"1":"_DB","260":"_e"},F:{"1":"_oB","2":"F"},G:{"1":"_M"},H:{"4":"1D"},I:{"1":"_P"},J:{"1":"A","4":"D"},K:{"1":"_N"},L:{"1":"I"},M:{"1":"YC"},N:{"129":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:4,C:"CSS3 Text-shadow",D:true};
@@ -0,0 +1,126 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
const builtInArrays = new Set([
'Float32Array',
'Float64Array',
'Int16Array',
'Int32Array',
'Int8Array',
'Uint16Array',
'Uint32Array',
'Uint8Array',
'Uint8ClampedArray',
]);
exports.default = (0, util_1.createRule)({
name: 'consistent-generic-constructors',
meta: {
type: 'suggestion',
docs: {
description: 'Enforce specifying generic type arguments on type annotation or constructor name of a constructor call',
recommended: 'stylistic',
},
fixable: 'code',
messages: {
preferConstructor: 'The generic type arguments should be specified as part of the constructor type arguments.',
preferTypeAnnotation: 'The generic type arguments should be specified as part of the type annotation.',
},
schema: [
{
type: 'string',
description: 'Which constructor call syntax to prefer.',
enum: ['type-annotation', 'constructor'],
},
],
},
defaultOptions: ['constructor'],
create(context, [mode]) {
return {
'VariableDeclarator,PropertyDefinition,AccessorProperty,:matches(FunctionDeclaration,FunctionExpression) > AssignmentPattern'(node) {
function getLHSRHS() {
switch (node.type) {
case utils_1.AST_NODE_TYPES.VariableDeclarator:
return [node.id, node.init];
case utils_1.AST_NODE_TYPES.PropertyDefinition:
case utils_1.AST_NODE_TYPES.AccessorProperty:
return [node, node.value];
case utils_1.AST_NODE_TYPES.AssignmentPattern:
return [node.left, node.right];
default:
throw new Error(`Unhandled node type: ${node.type}`);
}
}
function isBuiltInArray(typeName) {
return (builtInArrays.has(typeName.name) &&
(0, util_1.isReferenceToGlobalFunction)(typeName.name, typeName, context.sourceCode));
}
const [lhsName, rhs] = getLHSRHS();
const lhs = lhsName.typeAnnotation?.typeAnnotation;
if (rhs?.type !== utils_1.AST_NODE_TYPES.NewExpression ||
rhs.callee.type !== utils_1.AST_NODE_TYPES.Identifier) {
return;
}
if (lhs &&
(lhs.type !== utils_1.AST_NODE_TYPES.TSTypeReference ||
lhs.typeName.type !== utils_1.AST_NODE_TYPES.Identifier ||
lhs.typeName.name !== rhs.callee.name ||
isBuiltInArray(lhs.typeName))) {
return;
}
if (mode === 'type-annotation') {
if (!lhs && rhs.typeArguments) {
const { callee, typeArguments } = rhs;
const typeAnnotation = context.sourceCode.getText(callee) +
context.sourceCode.getText(typeArguments);
context.report({
node,
messageId: 'preferTypeAnnotation',
fix(fixer) {
function getIDToAttachAnnotation() {
if (node.type !== utils_1.AST_NODE_TYPES.PropertyDefinition &&
node.type !== utils_1.AST_NODE_TYPES.AccessorProperty) {
return lhsName;
}
if (!node.computed) {
return node.key;
}
// If the property's computed, we have to attach the
// annotation after the square bracket, not the enclosed expression
return (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(node.key), util_1.NullThrowsReasons.MissingToken(']', 'key'));
}
return [
fixer.remove(typeArguments),
fixer.insertTextAfter(getIDToAttachAnnotation(), `: ${typeAnnotation}`),
];
},
});
}
return;
}
const isolatedDeclarations = context.languageOptions.parserOptions.isolatedDeclarations;
if (!isolatedDeclarations && lhs?.typeArguments && !rhs.typeArguments) {
const hasParens = context.sourceCode.getTokenAfter(rhs.callee)?.value === '(';
const extraComments = new Set(context.sourceCode.getCommentsInside(lhs.parent));
context.sourceCode
.getCommentsInside(lhs.typeArguments)
.forEach(c => extraComments.delete(c));
context.report({
node,
messageId: 'preferConstructor',
*fix(fixer) {
yield fixer.remove(lhs.parent);
for (const comment of extraComments) {
yield fixer.insertTextAfter(rhs.callee, context.sourceCode.getText(comment));
}
yield fixer.insertTextAfter(rhs.callee, context.sourceCode.getText(lhs.typeArguments));
if (!hasParens) {
yield fixer.insertTextAfter(rhs.callee, '()');
}
},
});
}
},
};
},
});
@@ -0,0 +1 @@
{"version":3,"file":"bluetooth.js","sources":["../../../src/icons/bluetooth.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Bluetooth\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtNyA3IDEwIDEwLTUgNVYybDUgNUw3IDE3IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/bluetooth\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 Bluetooth = createLucideIcon('Bluetooth', [\n ['path', { d: 'm7 7 10 10-5 5V2l5 5L7 17', key: '1q5490' }],\n]);\n\nexport default Bluetooth;\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,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AAC5D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,53 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABILITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
"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 __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
));
// src/watchGuard/watchGuard.ts
var fs = __toESM(require("fs"));
if (process.argv.length < 3) {
process.exit(1);
}
var directoryName = process.argv[2];
try {
const watcher = fs.watch(directoryName, { recursive: true }, () => ({}));
watcher.close();
} catch {
}
process.exit(0);
//# sourceMappingURL=watchGuard.js.map
@@ -0,0 +1,81 @@
import { expect, expectTypeOf, test } from "vitest";
import * as z from "zod/v4";
const promSchema = z.promise(
z.object({
name: z.string(),
age: z.number(),
})
);
test("promise inference", () => {
type promSchemaType = z.infer<typeof promSchema>;
expectTypeOf<promSchemaType>().toEqualTypeOf<Promise<{ name: string; age: number }>>();
});
test("promise parsing success", async () => {
// expect(() => promSchema.parse(Promise.resolve({ name: "Bobby", age: 10 }))).toThrow();
const pr = promSchema.parseAsync(Promise.resolve({ name: "Bobby", age: 10 }));
expect(pr).toBeInstanceOf(Promise);
const result = await pr;
expect(result).toMatchInlineSnapshot(`
{
"age": 10,
"name": "Bobby",
}
`);
});
test("promise parsing fail", async () => {
const bad = await promSchema.safeParseAsync(Promise.resolve({ name: "Bobby", age: "10" }));
expect(bad.success).toBe(false);
expect(bad.error).toBeInstanceOf(z.ZodError);
});
test("promise parsing fail 2", async () => {
const result = await promSchema.safeParseAsync(Promise.resolve({ name: "Bobby", age: "10" }));
expect(result.success).toBe(false);
expect(result.error).toBeInstanceOf(z.ZodError);
});
test("promise parsing fail", () => {
const bad = () => promSchema.parse({ then: () => {}, catch: {} });
expect(bad).toThrow();
});
test("sync promise parsing", () => {
expect(() => z.promise(z.string()).parse(Promise.resolve("asfd"))).toThrow();
});
const asyncFunction = z.function({
input: z.tuple([]),
output: promSchema,
});
test("async function pass", async () => {
const validatedFunction = asyncFunction.implementAsync(async () => {
return { name: "jimmy", age: 14 };
});
await expect(validatedFunction()).resolves.toEqual({
name: "jimmy",
age: 14,
});
});
test("async function fail", async () => {
const validatedFunction = asyncFunction.implementAsync(() => {
return Promise.resolve("asdf" as any);
});
await expect(validatedFunction()).rejects.toBeInstanceOf(z.core.$ZodError);
});
test("async promise parsing", () => {
const res = z.promise(z.number()).parseAsync(Promise.resolve(12));
expect(res).toBeInstanceOf(Promise);
});
test("resolves", () => {
const foo = z.literal("foo");
const res = z.promise(foo);
expect(res.unwrap()).toEqual(foo);
});
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const FilePlus2 = createLucideIcon("FilePlus2", [
["path", { d: "M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4", key: "1pf5j1" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
["path", { d: "M3 15h6", key: "4e2qda" }],
["path", { d: "M6 12v6", key: "1u72j0" }]
]);
export { FilePlus2 as default };
//# sourceMappingURL=file-plus-2.js.map
@@ -0,0 +1 @@
{"version":3,"file":"values.js","sourceRoot":"","sources":["../../../lib/vocabularies/jtd/values.ts"],"names":[],"mappings":";;AAEA,6CAA0D;AAC1D,mDAAmD;AACnD,yCAAwC;AACxC,yCAA8C;AAC9C,mCAAgD;AAIhD,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,QAAQ;IACjB,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAE,IAAA,iBAAS,EAAC,QAAQ,CAAC;IAC1B,IAAI,CAAC,GAAe;QAClB,IAAA,wBAAa,EAAC,GAAG,CAAC,CAAA;QAClB,MAAM,EAAC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QACnC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,IAAA,8BAAmB,EAAC,GAAG,EAAE,IAAI,CAAC,CAAA;QACpD,IAAI,IAAA,wBAAiB,EAAC,EAAE,EAAE,MAAM,CAAC,EAAE,CAAC;YAClC,GAAG,CAAC,EAAE,CAAC,IAAA,aAAG,EAAC,IAAA,YAAE,EAAC,IAAI,EAAE,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAA;QACjD,CAAC;aAAM,CAAC;YACN,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;YACZ,GAAG,CAAC,MAAM,CAAC,KAAK,EA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s/dom.js",
"module": "../dist/es/dom.mjs"
}
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const LayoutGrid = createLucideIcon("LayoutGrid", [
["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1", key: "6d4xhi" }],
["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1", key: "nxv5o0" }],
["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }]
]);
export { LayoutGrid as default };
//# sourceMappingURL=layout-grid.js.map
@@ -0,0 +1,179 @@
/**
* negotiator
* Copyright(c) 2012 Isaac Z. Schlueter
* Copyright(c) 2014 Federico Romero
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict';
/**
* Module exports.
* @public
*/
module.exports = preferredLanguages;
module.exports.preferredLanguages = preferredLanguages;
/**
* Module variables.
* @private
*/
var simpleLanguageRegExp = /^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/;
/**
* Parse the Accept-Language header.
* @private
*/
function parseAcceptLanguage(accept) {
var accepts = accept.split(',');
for (var i = 0, j = 0; i < accepts.length; i++) {
var language = parseLanguage(accepts[i].trim(), i);
if (language) {
accepts[j++] = language;
}
}
// trim accepts
accepts.length = j;
return accepts;
}
/**
* Parse a language from the Accept-Language header.
* @private
*/
function parseLanguage(str, i) {
var match = simpleLanguageRegExp.exec(str);
if (!match) return null;
var prefix = match[1]
var suffix = match[2]
var full = prefix
if (suffix) full += "-" + suffix;
var q = 1;
if (match[3]) {
var params = match[3].split(';')
for (var j = 0; j < params.length; j++) {
var p = params[j].split('=');
if (p[0] === 'q') q = parseFloat(p[1]);
}
}
return {
prefix: prefix,
suffix: suffix,
q: q,
i: i,
full: full
};
}
/**
* Get the priority of a language.
* @private
*/
function getLanguagePriority(language, accepted, index) {
var priority = {o: -1, q: 0, s: 0};
for (var i = 0; i < accepted.length; i++) {
var spec = specify(language, accepted[i], index);
if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
priority = spec;
}
}
return priority;
}
/**
* Get the specificity of the language.
* @private
*/
function specify(language, spec, index) {
var p = parseLanguage(language)
if (!p) return null;
var s = 0;
if(spec.full.toLowerCase() === p.full.toLowerCase()){
s |= 4;
} else if (spec.prefix.toLowerCase() === p.full.toLowerCase()) {
s |= 2;
} else if (spec.full.toLowerCase() === p.prefix.toLowerCase()) {
s |= 1;
} else if (spec.full !== '*' ) {
return null
}
return {
i: index,
o: spec.i,
q: spec.q,
s: s
}
};
/**
* Get the preferred languages from an Accept-Language header.
* @public
*/
function preferredLanguages(accept, provided) {
// RFC 2616 sec 14.4: no header = *
var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');
if (!provided) {
// sorted list of all languages
return accepts
.filter(isQuality)
.sort(compareSpecs)
.map(getFullLanguage);
}
var priorities = provided.map(function getPriority(type, index) {
return getLanguagePriority(type, accepts, index);
});
// sorted list of accepted languages
return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {
return provided[priorities.indexOf(priority)];
});
}
/**
* Compare two specs.
* @private
*/
function compareSpecs(a, b) {
return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
}
/**
* Get full language string.
* @private
*/
function getFullLanguage(spec) {
return spec.full;
}
/**
* Check if a spec has any quality.
* @private
*/
function isQuality(spec) {
return spec.q > 0;
}
@@ -0,0 +1 @@
{"version":3,"file":"pbkdf2.d.ts","sourceRoot":"","sources":["src/pbkdf2.ts"],"names":[],"mappings":"AAMA,OAAO,EAGL,KAAK,KAAK,EAEV,KAAK,QAAQ,EACb,KAAK,IAAI,EACT,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAEpB;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,wDAAwD;IACxD,CAAC,EAAE,MAAM,CAAC;IACV,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AA+CF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,EACxB,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,EACpB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,GACpB,IAAI,CAAC,UAAU,CAAC,CAwBlB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,EACxB,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,EACpB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,GACpB,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAwB3B"}
@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseEnumDef = void 0;
function parseEnumDef(def) {
return {
type: "string",
enum: Array.from(def.values),
};
}
exports.parseEnumDef = parseEnumDef;
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_K","2":"_I"},C:{"1":"_0H _p","2":"_bB _VG _L"},D:{"1":"_kQ","2":"_LE"},E:{"2":"_R"},F:{"1":"_nR","2":"_QM"},G:{"2":"_M"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"2":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"2":"_C"}},B:5,C:"Web MIDI API",D:true};
@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.withoutProjectParserOptions = withoutProjectParserOptions;
/**
* Removes options that prompt the parser to parse the project with type
* information. In other words, you can use this if you are invoking the parser
* directly, to ensure that one file will be parsed in isolation, which is much,
* much faster.
*
* @see https://github.com/typescript-eslint/typescript-eslint/issues/8428
*/
function withoutProjectParserOptions(opts) {
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- The variables are meant to be omitted
const { EXPERIMENTAL_useProjectService, project, projectService, ...rest } = opts;
return rest;
}
@@ -0,0 +1 @@
{"version":3,"names":["nonASCIIidentifierStartChars","nonASCIIidentifierChars","nonASCIIidentifierStart","RegExp","nonASCIIidentifier","astralIdentifierStartCodes","astralIdentifierCodes","isInAstralSet","code","set","pos","i","length","isIdentifierStart","test","String","fromCharCode","isIdentifierChar","isIdentifierName","name","isFirst","cp","charCodeAt","trail"],"sources":["../src/identifier.ts"],"sourcesContent":["// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\n// ## Character categories\n\n// Big ugly regular expressions that match characters in the\n// whitespace, identifier, and identifier-start categories. These\n// are only applied when a character is found to actually have a\n// code point between 0x80 and 0xffff.\n// Generated by `scripts/generate-identifier-regex.cjs`.\n\n/* prettier-ignore */\nlet nonASCIIidentifierStartChars = \"\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u037f\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u052f\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05d0-\\u05ea\\u05ef-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086a\\u0870-\\u0887\\u0889-\\u088f\\u08a0-\\u08c9\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u09fc\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0af9\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c39\\u0c3d\\u0c58-\\u0c5a\\u0c5c\\u0c5d\\u0c60\\u0c61\\u0c80\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cdc-\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d04-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d54-\\u0d56\\u0d5f-\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e86-\\u0e8a\\u0e8c-\\u0ea3\\u0ea5\\u0ea7-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f5\\u13f8-\\u13fd\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f8\\u1700-\\u1711\\u171f-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1878\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191e\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19b0-\\u19c9\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4c\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1c80-\\u1c8a\\u1c90-\\u1cba\\u1cbd-\\u1cbf\\u1ce9-\\u1cec\\u1cee-\\u1cf3\\u1cf5\\u1cf6\\u1cfa\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2118-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309b-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u31a0-\\u31bf\\u31f0-\\u31ff\\u3400-\\u4dbf\\u4e00-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7dc\\ua7f1-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882Line truncated
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright © 2021 EGOIST (https://github.com/sponsors/egoist)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
@@ -0,0 +1,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 BookmarkPlus = createLucideIcon("BookmarkPlus", [
["path", { d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z", key: "1fy3hk" }],
["line", { x1: "12", x2: "12", y1: "7", y2: "13", key: "1cppfj" }],
["line", { x1: "15", x2: "9", y1: "10", y2: "10", key: "1gty7f" }]
]);
export { BookmarkPlus as default };
//# sourceMappingURL=bookmark-plus.js.map
@@ -0,0 +1 @@
{"version":3,"file":"completable.d.ts","sourceRoot":"","sources":["../../../src/server/completable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MA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,WAAW,cAAc,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS;IAC3D,IAAI,EAAE,CAAC,CAAC;IACR,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAC9B,QAAQ,EAAE,cAAc,CAAC,WAAW,CAAC;CACxC"}
@@ -0,0 +1,21 @@
import { Env, MiddlewareHandler } from "../../types.js";
import { ServeStaticOptions as ServeStaticOptions$1 } from "../../middleware/serve-static/index.js";
//#region src/adapter/cloudflare-workers/serve-static.d.ts
/**
* @deprecated `hono/cloudflare-workers` will be removed in v5. Install `@hono/cloudflare-workers` and import from there instead.
*/
export type ServeStaticOptions<E extends Env = Env> = ServeStaticOptions$1<E> & {
namespace?: unknown;
manifest?: object | string;
};
/**
* @deprecated
* `serveStatic` in the Cloudflare Workers adapter is deprecated.
* You can serve static files directly using Cloudflare Static Assets.
* @see https://developers.cloudflare.com/workers/static-assets/
* Cloudflare Static Assets is currently in open beta. If this doesn't work for you,
* please consider using Cloudflare Pages. You can start to create the Cloudflare Pages
* application with the `npm create hono@latest` command.
*/
export declare const serveStatic: <E extends Env = Env>(options?: ServeStaticOptions<E>) => MiddlewareHandler;
//#endregion
@@ -0,0 +1,27 @@
// src/use-effect-event.tsx
import { useLayoutEffect } from "@radix-ui/react-use-layout-effect";
import * as React from "react";
var useReactEffectEvent = React[" useEffectEvent ".trim().toString()];
var useReactInsertionEffect = React[" useInsertionEffect ".trim().toString()];
function useEffectEvent(callback) {
if (typeof useReactEffectEvent === "function") {
return useReactEffectEvent(callback);
}
const ref = React.useRef(() => {
throw new Error("Cannot call an event handler while rendering.");
});
if (typeof useReactInsertionEffect === "function") {
useReactInsertionEffect(() => {
ref.current = callback;
});
} else {
useLayoutEffect(() => {
ref.current = callback;
});
}
return React.useMemo(() => (...args) => ref.current?.(...args), []);
}
export {
useEffectEvent
};
//# sourceMappingURL=index.mjs.map
@@ -0,0 +1,6 @@
{
"type": "module",
"main": "index.cjs",
"module": "index.js",
"react-native": "index.js"
}
@@ -0,0 +1,20 @@
/**
* @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 Cookie = createLucideIcon("Cookie", [
["path", { d: "M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5", key: "laymnq" }],
["path", { d: "M8.5 8.5v.01", key: "ue8clq" }],
["path", { d: "M16 15.5v.01", key: "14dtrp" }],
["path", { d: "M12 12v.01", key: "u5ubse" }],
["path", { d: "M11 17v.01", key: "1hyl5a" }],
["path", { d: "M7 14v.01", key: "uct60s" }]
]);
export { Cookie as default };
//# sourceMappingURL=cookie.js.map
@@ -0,0 +1,421 @@
export default `flf2a$ 4 3 8 -1 11 0 7936 0
Author : Katerina L.
Date : 2008/5/3 13:55:36
Version: 1.0
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
$ #
$ #
$ #
$ ##
#
| #
| #
> ##
#
>> #
#
##
##
#
#
##
$#
#
#
##
%#
#
#
##
&#
#
#
##
'#
#
#
##
(#
#
#
##
)#
#
#
##
*#
#
#
##
#
| #
-<- #
| ##
,#
#
#
##
#
#
-<- #
##
.#
#
#
##
/#
#
#
##
0#
#
#
##
1#
#
#
##
2#
#
#
##
3#
#
#
##
4#
#
#
##
5#
#
#
##
6#
#
#
##
7#
#
#
##
8#
#
#
##
9#
#
#
##
#
< #
< #
##
#
< #
/ #
##
<#
#
#
##
#
>-- #
>-- #
##
>#
#
#
##
?#
#
#
##
@#
#
#
##
__ #
| | #
|><| #
| | ##
__ #
| | #
|<>' #
|__' ##
__ #
|<< #
| #
|__ ##
#
__| #
|<<| #
|__| ##
__ #
| #
|<< #
|__ ##
__ #
| #
|<< #
| ##
__ #
| #
| >> #
'__| ##
#
| | #
|><| #
| | ##
#
> #
| #
| ##
__ #
| #
<< | #
|__' ##
#
| / #
|<< #
| \\ ##
#
| #
| #
|<< ##
#
|\\ /| #
| < | #
| | ##
#
| | #
|\\| #
| | ##
#
>> #
| | #
<< ##
#
|<<' #
|>>| #
| ##
#
>> #
| | #
<<\\ ##
#
|<< #
|>>| #
| \\ ##
#
|<< #
-- #
>>| ##
#
>>|<< #
| #
| ##
#
| | #
| | #
'<<' ##
#
| | #
| | #
\\/ ##
#
| | #
| < | #
|/ \\| ##
#
\\ / #
< #
/ \\ ##
#
| | #
\\</ #
| ##
#
>>> #
/ #
/<< ##
[#
#
#
##
\\#
#
#
##
]#
#
#
##
^#
#
#
##
_#
#
#
##
\`#
#
#
##
__ #
| | #
|><| #
| | ##
__ #
| | #
|<>' #
|__' ##
__ #
|<< #
| #
|__ ##
#
__| #
|<<| #
|__| ##
__ #
| #
|<< #
|__ ##
__ #
| #
|<< #
| ##
__ #
| #
| >> #
'__| ##
#
| | #
|><| #
| | ##
#
> #
| #
| ##
__ #
| #
<< | #
|__' ##
#
| / #
|<< #
| \\ ##
#
| #
| #
|<< ##
#
|\\ /| #
| < | #
| | ##
#
| | #
|\\| #
| | ##
#
>> #
| | #
<< ##
#
|<<' #
|>>| #
| ##
#
>> #
| | #
<<\\ ##
#
|<< #
|>>| #
| \\ ##
#
|<< #
-- #
>>| ##
#
>>|<< #
| #
| ##
#
| | #
| | #
'<<' ##
#
| | #
| | #
\\/ ##
#
| | #
| < | #
|/ \\| ##
#
\\ / #
< #
/ \\ ##
#
| | #
\\</ #
| ##
#
>>> #
/ #
/<< ##
{#
#
#
##
|#
#
#
##
}#
#
#
##
~#
#
#
##
__ #
| | #
|><| #
| | ##
#
>> #
| | #
<< ##
#
| | #
| | #
'<<' ##
__ #
| | #
|><| #
| | ##
#
>> #
| | #
<< ##
#
| | #
| | #
'<<' ##
�#
#
#
##
`
@@ -0,0 +1,8 @@
import type * as core from "../core/index.cjs";
import * as schemas from "./schemas.cjs";
export type input<T> = core.input<T>;
export type output<T> = core.output<T>;
/** See `classic/in-out.ts`. */
export declare function input<T extends core.$ZodType>(schema: T): schemas.ZodMiniType<core.input<T>, core.input<T>>;
/** See `classic/in-out.ts`. */
export declare function output<T extends core.$ZodType>(schema: T): schemas.ZodMiniType<core.output<T>, core.output<T>>;
@@ -0,0 +1,63 @@
/**
* Internal helpers for u64.
* BigUint64Array is too slow as per 2026, so we implement it using
* Uint32Array.
* @privateRemarks TODO: re-check {@link https://issues.chromium.org/issues/42212588}
* @module
*/
import type { TRet } from './utils.ts';
declare function fromBig(n: bigint, le?: boolean): {
h: number;
l: number;
};
declare function split(lst: bigint[], le?: boolean): TRet<Uint32Array[]>;
declare const toBig: (h: number, l: number) => bigint;
declare const shrSH: (h: number, _l: number, s: number) => number;
declare const shrSL: (h: number, l: number, s: number) => number;
declare const rotrSH: (h: number, l: number, s: number) => number;
declare const rotrSL: (h: number, l: number, s: number) => number;
declare const rotrBH: (h: number, l: number, s: number) => number;
declare const rotrBL: (h: number, l: number, s: number) => number;
declare const rotr32H: (_h: number, l: number) => number;
declare const rotr32L: (h: number, _l: number) => number;
declare const rotlSH: (h: number, l: number, s: number) => number;
declare const rotlSL: (h: number, l: number, s: number) => number;
declare const rotlBH: (h: number, l: number, s: number) => number;
declare const rotlBL: (h: number, l: number, s: number) => number;
declare function add(Ah: number, Al: number, Bh: number, Bl: number): {
h: number;
l: number;
};
declare const add3L: (Al: number, Bl: number, Cl: number) => number;
declare const add3H: (low: number, Ah: number, Bh: number, Ch: number) => number;
declare const add4L: (Al: number, Bl: number, Cl: number, Dl: number) => number;
declare const add4H: (low: number, Ah: number, Bh: number, Ch: number, Dh: number) => number;
declare const add5L: (Al: number, Bl: number, Cl: number, Dl: number, El: number) => number;
declare const add5H: (low: number, Ah: number, Bh: number, Ch: number, Dh: number, Eh: number) => number;
export { add, add3H, add3L, add4H, add4L, add5H, add5L, fromBig, rotlBH, rotlBL, rotlSH, rotlSL, rotr32H, rotr32L, rotrBH, rotrBL, rotrSH, rotrSL, shrSH, shrSL, split, toBig };
declare const u64: {
fromBig: typeof fromBig;
split: typeof split;
toBig: (h: number, l: number) => bigint;
shrSH: (h: number, _l: number, s: number) => number;
shrSL: (h: number, l: number, s: number) => number;
rotrSH: (h: number, l: number, s: number) => number;
rotrSL: (h: number, l: number, s: number) => number;
rotrBH: (h: number, l: number, s: number) => number;
rotrBL: (h: number, l: number, s: number) => number;
rotr32H: (_h: number, l: number) => number;
rotr32L: (h: number, _l: number) => number;
rotlSH: (h: number, l: number, s: number) => number;
rotlSL: (h: number, l: number, s: number) => number;
rotlBH: (h: number, l: number, s: number) => number;
rotlBL: (h: number, l: number, s: number) => number;
add: typeof add;
add3L: (Al: number, Bl: number, Cl: number) => number;
add3H: (low: number, Ah: number, Bh: number, Ch: number) => number;
add4L: (Al: number, Bl: number, Cl: number, Dl: number) => number;
add4H: (low: number, Ah: number, Bh: number, Ch: number, Dh: number) => number;
add5H: (low: number, Ah: number, Bh: number, Ch: number, Dh: number, Eh: number) => number;
add5L: (Al: number, Bl: number, Cl: number, Dl: number, El: number) => number;
};
export default u64;
//# sourceMappingURL=_u64.d.ts.map
@@ -0,0 +1,420 @@
export default `flf2a$ 4 4 13 -1 11 0 0 0
Author : myflix
Date : 2006/7/9 19:14:23
Version: 1.0
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
$ #
$ #
$ #
$ ##
_ _______ #
(_)_______)#
#
##
__ #
(__) #
(__) #
##
##
#
#
##
$#
#
#
##
%#
#
#
##
&#
#
#
##
__ #
(__) #
#
##
_________ #
( _____ )#
(_) (_)#
##
_ _ #
( )_____( )#
(_________)#
##
*#
#
#
##
+#
#
#
##
,#
#
#
##
_ #
( ) #
| | #
(_) ##
_ #
(_) #
#
##
/#
#
#
##
_________ #
( _____ )#
| |_____| |#
(_________)##
_ #
______( \\ #
(_________)#
##
_____ _ #
( _ ) ( )#
| | | |_| |#
(_) (_____)##
_ _ _ #
( ) ( ) ( )#
| |_| |_| |#
(_________)##
_____ #
( ___)#
___| |___ #
(_________)##
_ _____ #
( ) ( _ )#
| |_| | | |#
(_____) (_)##
_________ #
( _ _ )#
| |_| | | |#
(_____) (_)##
_ #
( )#
_______| |#
(_________)##
____ ____ #
( _ ' _ )#
| |_| |_| |#
(____.____)##
_ _____ #
( ) ( _ )#
| |_| |_| |#
(_________)##
_ _ #
(_) (_) #
#
##
__ _ #
(__) (_) #
#
##
<#
#
#
##
=#
#
#
##
> >#
#
#
##
_ __ _ #
(_)( ) ( )#
| |_| |#
(_____)##
@#
#
#
##
_________ #
(____ _ )#
___| |_| |#
(_________)##
_________ #
( _ _ )#
| |_| |_| |#
(____/\\___)##
_________ #
( _____ )#
| | | |#
(_) (_)##
_________ #
( _____ )#
\\ \\___/ / #
(_____) ##
_________ #
( _ _ )#
| | | | | |#
(_) (_) (_)##
_________ #
(___ _ )#
| | | |#
(_) (_)##
_________ #
( _____ )#
| |_ | |#
(___) (_)##
_________ #
(___ ___)#
___| |___ #
(_________)##
_______ _ #
(_______(_)#
#
##
___ #
( _) #
| |_______ #
(_________)##
_________ #
(___ __)#
__/ __ \\_ #
(___/ \\__)##
_________ #
( _______)#
| | #
(_) ##
_________ #
(______ )#
_____( )#
(_________)##
_________ #
(______ _)#
_____/ /_ #
(_________)##
_________ #
( _____ )#
| |_____| |#
(_________)##
_________ #
(___ _ )#
| |_| |#
(_____)##
_________ #
( _____ )#
| |_____| |#
(_)_______)##
_________ #
(___ _ )#
_/ |_| |#
(__/(_____)##
_ _____ #
( ) ( _ )#
| |_| | | |#
(_____) (_)##
_ #
_______| |#
(_______ |#
|_|##
_________ #
( _______)#
| |_______ #
(_________)##
________ #
/ _______)#
| (_______ #
\\________)##
_________ #
( _______)#
( __)____ #
(_________)##
____ ___ #
(__ \\/ _)#
__) (_ #
(____/\\___)##
_____ #
___/ ___)#
(___ (___ #
\\_____)##
_____ _ #
( _ ) ( )#
| | | |_| |#
(_) (_____)##
[#
#
#
##
\\#
#
#
##
]#
#
#
##
__ #
(__) #
_(_)#
(__) ##
_#
#
#
##
_ #
_(_) #
(__) #
##
_________ #
(____ _ )#
___| |_| |#
(_________)##
_________ #
( _ _ )#
| |_| |_| |#
(____/\\___)##
_________ #
( _____ )#
| | | |#
(_) (_)##
_________ #
( _____ )#
\\ \\___/ / #
(_____) ##
_________ #
( _ _ )#
| | | | | |#
(_) (_) (_)##
_________ #
(___ _ )#
| | | |#
(_) (_)##
_________ #
( _____ )#
| |_ | |#
(___) (_)##
_________ #
(___ ___)#
___| |___ #
(_________)##
_______ _ #
(_______(_)#
#
##
___ #
( _) #
| |_______ #
(_________)##
_________ #
(___ __)#
__/ __ \\_ #
(___/ \\__)##
_________ #
( _______)#
| | #
(_) ##
_________ #
(______ )#
_____( )#
(_________)##
_________ #
(______ _)#
_____/ /_ #
(_________)##
_________ #
( _____ )#
| |_____| |#
(_________)##
_________ #
(___ _ )#
| |_| |#
(_____)##
_________ #
( _____ )#
| |_____| |#
(_)_______)##
_________ #
(___ _ )#
_/ |_| |#
(__/(_____)##
_ _____ #
( ) ( _ )#
| |_| | | |#
(_____) (_)##
_ #
_______| |#
(_______ |#
|_|##
_________ #
( _______)#
| |_______ #
(_________)##
________ #
/ _______)#
| (_______ #
\\________)##
_________ #
( _______)#
( __)____ #
(_________)##
____ ___ #
(__ \\/ _)#
__) (_ #
(____/\\___)##
_____ #
___/ ___)#
(___ (___ #
\\_____)##
_____ _ #
( _ ) ( )#
| | | |_| |#
(_) (_____)##
{#
#
#
##
|#
#
#
##
}#
#
#
##
~#
#
#
##
_________ #
(____ _ )#
___| |_| |#
(_________)##
_________ #
( _____ )#
| |_____| |#
(_________)##
_________ #
( _______)#
| |_______ #
(_________)##
_________ #
(____ _ )#
___| |_| |#
(_________)##
_________ #
( _____ )#
| |_____| |#
(_________)##
_________ #
( _______)#
| |_______ #
(_________)##
�#
#
#
##`