docs: 仓库链接指向本镜像仓库
Build NapCat Artifacts / Type Check & Test (push) Waiting to run

This commit is contained in:
TanTan committed 2026-11-13 09:25:58 +08:00
1 parent f954252a34
commit e311ca3275
35554 files changed
+6229626 -4

No files matched your search

@@ -0,0 +1,4 @@
import type { ScalarTag } from '../types';
export declare const intOct: ScalarTag;
export declare const int: ScalarTag;
export declare const intHex: ScalarTag;
@@ -0,0 +1,44 @@
export const CallableInstance =
/**
* @type {new <Parameters extends Array<unknown>, Result>(property: string | symbol) => (...parameters: Parameters) => Result}
*/
(
/** @type {unknown} */
(
/**
* @this {Function}
* @param {string | symbol} property
* @returns {(...parameters: Array<unknown>) => unknown}
*/
function (property) {
const self = this
const constr = self.constructor
const proto = /** @type {Record<string | symbol, Function>} */ (
// Prototypes do exist.
// type-coverage:ignore-next-line
constr.prototype
)
const value = proto[property]
/** @type {(...parameters: Array<unknown>) => unknown} */
const apply = function () {
return value.apply(apply, arguments)
}
Object.setPrototypeOf(apply, proto)
// Not needed for us in `unified`: we only call this on the `copy`
// function,
// and we don't need to add its fields (`length`, `name`)
// over.
// See also: GH-246.
// const names = Object.getOwnPropertyNames(value)
//
// for (const p of names) {
// const descriptor = Object.getOwnPropertyDescriptor(value, p)
// if (descriptor) Object.defineProperty(apply, p, descriptor)
// }
return apply
}
)
)
@@ -0,0 +1 @@
{"name":"@react-types/slider","version":"3.8.2","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532105972,"integrity":"sha512-cil7stSp3ik41Hdv2Dj+GMcbvUfs1q+MZ2Yte0804py9i6oJJN/diCiIr/brcQOZ5ZqwAI6dgaHA7l8FZheQBw==","mode":420,"size":11335},"package.json":{"checkedAt":1794532109239,"integrity":"sha512-XIEYZtjoVkQ7EkJILHX5APyYiYkqKgSdJ/4Oy10QjQft7Uh2F1ZTSbkRy3ubkX8xQTYLD20h0eGIQVR01eJt6w==","mode":420,"size":524},"README.md":{"checkedAt":1794532109239,"integrity":"sha512-qMht8VPssXlaLfU3ogIYLuCLq9nHWq/UwosktRK0Agt3VATVngOQkP/siUVWnU5SlKPd2pBHz0hwMxMUFbOIQg==","mode":420,"size":137},"src/index.d.ts":{"checkedAt":1794532109240,"integrity":"sha512-i6Wkj+SNcODnjHjnUGJHrBw0MD+uYu0CqgB6SaEmEiWRO+icdpWjUgqX17XDrQ3VDCpFcs83eg6UvnhtOiubzw==","mode":420,"size":4085}}}
@@ -0,0 +1,88 @@
import type { SourceMapInput } from '@jridgewell/trace-mapping';
import type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types';
export type { DecodedSourceMap, EncodedSourceMap, Mapping };
export type Options = {
file?: string | null;
sourceRoot?: string | null;
};
/**
* Provides the state to generate a sourcemap.
*/
export declare class GenMapping {
private _names;
private _sources;
private _sourcesContent;
private _mappings;
private _ignoreList;
file: string | null | undefined;
sourceRoot: string | null | undefined;
constructor({ file, sourceRoot }?: Options);
}
/**
* A low-level API to associate a generated position with an original source position. Line and
* column here are 0-based, unlike `addMapping`.
*/
export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source?: null, sourceLine?: null, sourceColumn?: null, name?: null, content?: null): void;
export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name?: null, content?: string | null): void;
export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name: string, content?: string | null): void;
/**
* A high-level API to associate a generated position with an original source position. Line is
* 1-based, but column is 0-based, due to legacy behavior in `source-map` library.
*/
export declare function addMapping(map: GenMapping, mapping: {
generated: Pos;
source?: null;
original?: null;
name?: null;
content?: null;
}): void;
export declare function addMapping(map: GenMapping, mapping: {
generated: Pos;
source: string;
original: Pos;
name?: null;
content?: string | null;
}): void;
export declare function addMapping(map: GenMapping, mapping: {
generated: Pos;
source: string;
original: Pos;
name: string;
content?: string | null;
}): void;
/**
* Same as `addSegment`, but will only add the segment if it generates useful information in the
* resulting map. This only works correctly if segments are added **in order**, meaning you should
* not add a segment with a lower generated line/column than one that came before.
*/
export declare const maybeAddSegment: typeof addSegment;
/**
* Same as `addMapping`, but will only add the mapping if it generates useful information in the
* resulting map. This only works correctly if mappings are added **in order**, meaning you should
* not add a mapping with a lower generated line/column than one that came before.
*/
export declare const maybeAddMapping: typeof addMapping;
/**
* Adds/removes the content of the source file to the source map.
*/
export declare function setSourceContent(map: GenMapping, source: string, content: string | null): void;
export declare function setIgnore(map: GenMapping, source: string, ignore?: boolean): void;
/**
* Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
* a sourcemap, or to JSON.stringify.
*/
export declare function toDecodedMap(map: GenMapping): DecodedSourceMap;
/**
* Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
* a sourcemap, or to JSON.stringify.
*/
export declare function toEncodedMap(map: GenMapping): EncodedSourceMap;
/**
* Constructs a new GenMapping, using the already present mappings of the input.
*/
export declare function fromMap(input: SourceMapInput): GenMapping;
/**
* Returns an array of high-level mapping objects for every recorded segment, which could then be
* passed to the `source-map` library.
*/
export declare function allMappings(map: GenMapping): Mapping[];
@@ -0,0 +1 @@
{"version":3,"names":["_async","require","_path","data","_url","_semver","_debug","_rewriteStackTrace","_configError","_transformFile","asyncGeneratorStep","n","t","e","r","o","a","c","i","u","value","done","Promise","resolve","then","_asyncToGenerator","arguments","apply","_next","_throw","debug","buildDebug","import_","_unused","supportsESM","exports","semver","satisfies","process","versions","node","LOADING_CJS_FILES","Set","loadCjsDefault","filepath","has","module","add","endHiddenCallStack","delete","__esModule","Symbol","toStringTag","default","undefined","loadMjsFromPath","_loadMjsFromPath","url","pathToFileURL","toString","ConfigError","_x","tsNotSupportedError","ext","SUPPORTED_EXTENSIONS","asyncModules","loadCodeDefault","loader","esmError","tlaError","async","path","extname","isTS","type","hasOwnProperty","call","pattern","ensureTsSupport","code","isAsync","promise","waitFor","Error","callback","features","typescript","extensions","opts","babelrc","configFile","sourceType","sourceMaps","sourceFileName","basename","presets","getTSPreset","Object","assign","onlyRemoveTypeImports","optimizeConstEnums","allowDeclareFields","handler","m","filename","endsWith","_compile","transformFileSync","error","packageJson","lt","version","console","message","pnp"],"sources":["../../../src/config/files/module-types.ts"],"sourcesContent":["import { isAsync, waitFor } from \"../../gensync-utils/async.ts\";\nimport type { Handler } from \"gensync\";\nimport path from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport { createRequire } from \"node:module\";\nimport semver from \"semver\";\nimport buildDebug from \"debug\";\n\nimport { endHiddenCallStack } from \"../../errors/rewrite-stack-trace.ts\";\nimport ConfigError from \"../../errors/config-error.ts\";\n\nimport type { InputOptions } from \"../index.ts\";\nimport { transformFileSync } from \"../../transform-file.ts\";\n\nconst debug = buildDebug(\"babel:config:loading:files:module-types\");\n\nconst require = createRequire(import.meta.url);\n\nif (!process.env.BABEL_8_BREAKING) {\n try {\n // Old Node.js versions don't support import() syntax.\n // eslint-disable-next-line no-var\n var import_:\n | ((specifier: string | URL) => any)\n | undefined = require(\"./import.cjs\");\n } catch {}\n}\n\nexport const supportsESM = semver.satisfies(\n process.versions.node,\n // older versions, starting from 10, support the dynamic\n // import syntax but always return a rejected promise.\n \"^12.17 || >=13.2\",\n);\n\nconst LOADING_CJS_FILES = new Set();\n\nfunction loadCjsDefault(filepath: string) {\n // The `require()` call below can make this code reentrant if a require hook\n // like @babel/register has been loaded into the system. That would cause\n // Babel to attempt to compile the `.babelrc.js` file as it loads below. To\n // cover this case, we auto-ignore re-entrant config processing. ESM loaders\n // do not have this problem, because loaders do not apply to themselves.\n if (LOADING_CJS_FILES.has(filepath)) {\n debug(\"Auto-ignoring usage of config %o.\", filepath);\n return {};\n }\n\n let module;\n try {\n LOADING_CJS_FILES.add(filepath);\n module = endHiddenCallStack(require)(filepath);\n } finally {\n LOADING_CJS_FILES.delete(filepath);\n }\n\n if (process.env.BABEL_8_BREAKING) {\n return module != null &&\n (module.__esModule || module[Symbol.toStringTag] === \"Module\")\n ? module.default\n : module;\n } else {\n return module != null &&\n (module.__esModule || module[Symbol.toStringTag] === \"Module\")\n ? module.default ||\n /* fallbackToTranspiledModule */ (arguments[1] ? module : undefined)\n : module;\n }\n}\n\nconst loadMjsFromPath = endHiddenCallStack(async function loadMjsFromPath(\n filepath: string,\n) {\n // Add ?import as a workaround for https://github.com/nodejs/node/issues/55500\n const url = pathToFileURL(filepath).toString() + \"?import\";\n\n if (process.env.BABEL_8_BREAKING) {\n return await import(url);\n } else {\n if (!import_) {\n throw new ConfigError(\n \"Internal error: Native ECMAScript modules aren't supported by this platform.\\n\",\n filepath,\n );\n }\n\n return await import_(url);\n }\n});\n\nconst tsNotSupportedError = (ext: string) => `\\\nYou are using a ${ext} config file, but Babel only supports transpiling .cts configs. Either:\n- Use a .cts config file\n- Update to Node.js 23.6.0, which has native TypeScript support\n- Install tsx to transpile ${ext} files on the fly\\\n`;\n\nconst SUPPORTED_EXTENSIONS = {\n \".js\": \"unknown\",\n \".mjs\": \"esm\",\n \".cjs\": \"cjs\",\n \".ts\": \"unknown\",\n \".mts\": \"esm\",\n \".cts\": \"cjs\",\n} as const;\n\nconst asyncModules = new Set();\n\nexport default function* loadCodeDefault(\n filepath: string,\n loader: \"require\" | \"auto\",\n esmError: string,\n tlaError: string,\n): Handler<unknown> {\n let asynLine truncated
@@ -0,0 +1,35 @@
/**
* Map of invalid numeric character references to their replacements, according to HTML.
*
* @type {Record<number, string>}
*/
export const characterReferenceInvalid = {
0: '�',
128: '€',
130: '‚',
131: 'ƒ',
132: '„',
133: '…',
134: '†',
135: '‡',
136: 'ˆ',
137: '‰',
138: 'Š',
139: '‹',
140: 'Œ',
142: 'Ž',
145: '‘',
146: '’',
147: '“',
148: '”',
149: '•',
150: '–',
151: '—',
152: '˜',
153: '™',
154: 'š',
155: '›',
156: 'œ',
158: 'ž',
159: 'Ÿ'
}
@@ -0,0 +1,8 @@
import { Block } from '../primitives.js';
export type Transform = (Block: Block) => Block;
export function flow(...transforms: Transform[]): Transform {
return (block: Block): Block =>
transforms.reduce((block, t) => t(block), block);
}
@@ -0,0 +1,34 @@
{
"name": "camelcase-css",
"description": "Convert a kebab-cased CSS property into a camelCased DOM property.",
"version": "2.0.1",
"license": "MIT",
"author": "Steven Vachon <contact@svachon.com> (https://www.svachon.com/)",
"repository": "stevenvachon/camelcase-css",
"browser": "index-es5.js",
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-plugin-optimize-starts-with": "^1.0.1",
"babel-preset-env": "^1.7.0",
"chai": "^4.1.2",
"mocha": "^5.2.0"
},
"engines": {
"node": ">= 6"
},
"scripts": {
"pretest": "babel index.js --out-file=index-es5.js --presets=env --plugins=optimize-starts-with",
"test": "mocha test.js --check-leaks --bail"
},
"files": [
"index.js",
"index-es5.js"
],
"keywords": [
"camelcase",
"case",
"css",
"dom"
]
}
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('unzipWith', require('../unzipWith'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,21 @@
(The MIT License)
Copyright (C) 2011-2015 by Vitaly Puzrin
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,587 @@
// parse a single path portion
import { parseClass } from './brace-expressions.js';
import { unescape } from './unescape.js';
const types = new Set(['!', '?', '+', '*', '@']);
const isExtglobType = (c) => types.has(c);
// Patterns that get prepended to bind to the start of either the
// entire string, or just a single path portion, to prevent dots
// and/or traversal patterns, when needed.
// Exts don't need the ^ or / bit, because the root binds that already.
const startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))';
const startNoDot = '(?!\\.)';
// characters that indicate a start of pattern needs the "no dots" bit,
// because a dot *might* be matched. ( is not in the list, because in
// the case of a child extglob, it will handle the prevention itself.
const addPatternStart = new Set(['[', '.']);
// cases where traversal is A-OK, no dot prevention needed
const justDots = new Set(['..', '.']);
const reSpecials = new Set('().*{}+?[]^$\\!');
const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
// any single thing other than /
const qmark = '[^/]';
// * => any number of characters
const star = qmark + '*?';
// use + when we need to ensure that *something* matches, because the * is
// the only thing in the path portion.
const starNoEmpty = qmark + '+?';
// remove the \ chars that we added if we end up doing a nonmagic compare
// const deslash = (s: string) => s.replace(/\\(.)/g, '$1')
export class AST {
type;
#root;
#hasMagic;
#uflag = false;
#parts = [];
#parent;
#parentIndex;
#negs;
#filledNegs = false;
#options;
#toString;
// set to true if it's an extglob with no children
// (which really means one child of '')
#emptyExt = false;
constructor(type, parent, options = {}) {
this.type = type;
// extglobs are inherently magical
if (type)
this.#hasMagic = true;
this.#parent = parent;
this.#root = this.#parent ? this.#parent.#root : this;
this.#options = this.#root === this ? options : this.#root.#options;
this.#negs = this.#root === this ? [] : this.#root.#negs;
if (type === '!' && !this.#root.#filledNegs)
this.#negs.push(this);
this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0;
}
get hasMagic() {
/* c8 ignore start */
if (this.#hasMagic !== undefined)
return this.#hasMagic;
/* c8 ignore stop */
for (const p of this.#parts) {
if (typeof p === 'string')
continue;
if (p.type || p.hasMagic)
return (this.#hasMagic = true);
}
// note: will be undefined until we generate the regexp src and find out
return this.#hasMagic;
}
// reconstructs the pattern
toString() {
if (this.#toString !== undefined)
return this.#toString;
if (!this.type) {
return (this.#toString = this.#parts.map(p => String(p)).join(''));
}
else {
return (this.#toString =
this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')');
}
}
#fillNegs() {
/* c8 ignore start */
if (this !== this.#root)
throw new Error('should only call on root');
if (this.#filledNegs)
return this;
/* c8 ignore stop */
// call toString() once to fill this out
this.toString();
this.#filledNegs = true;
let n;
while ((n = this.#negs.pop())) {
if (n.type !== '!')
continue;
// walk up the tree, appending everthing that comes AFTER parentIndex
let p = n;
let pp = p.#parent;
while (pp) {
for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) {
for (const part of n.#parts) {
/* c8 ignore start */
if (typeof part === 'string') {
throw new Error('string part in extglob AST??');
}
/* c8 ignore stop */
part.copyIn(pp.#parts[i]);
}
}
p = pp;
pp = p.#parent;
}
}
return this;
}
push(...parts) {
for (const p of parts) {
if (p === '')
continue;
/* c8 ignore start */
if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) {
throw new Error('invalid part: ' + p);
}
/* c8 ignore stop */
this.#parts.push(p);
}
}
toJSON() {
const ret = this.type === null
? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))
: [this.type, ...this.#parts.map(p => p.toJSON())];
if (this.isStart() && !this.type)
ret.unshift([]);
if (this.isEnd() &&
(this === this.#root ||
(this.#root.#filledNegs && this.#parent?.type === '!'))) {
ret.push({});
}
return ret;
}
isStart() {
if (this.#root === this)
return true;
// if (this.type) return !!this.#parent?.isStart()
if (!this.#parent?.isStart())
return false;
if (this.#parentIndex === 0)
return true;
// if everything AHEAD of this is a negation, then it's still the "start"
const p = this.#parent;
for (let i = 0; i < this.#parentIndex; i++) {
const pp = p.#parts[i];
if (!(pp instanceof AST && pp.type === '!')) {
return false;
}
}
return true;
}
isEnd() {
if (this.#root === this)
return true;
if (this.#parent?.type === '!')
return true;
if (!this.#parent?.isEnd())
return false;
if (!this.type)
return this.#parent?.isEnd();
// if not root, it'll always have a parent
/* c8 ignore start */
const pl = this.#parent ? this.#parent.#parts.length : 0;
/* c8 ignore stop */
return this.#parentIndex === pl - 1;
}
copyIn(part) {
if (typeof part === 'string')
this.push(part);
else
this.push(part.clone(this));
}
clone(parent) {
const c = new AST(this.type, parent);
for (const p of this.#parts) {
c.copyIn(p);
}
return c;
}
static #parseAST(str, ast, pos, opt) {
let escaping = false;
let inBrace = false;
let braceStart = -1;
let braceNeg = false;
if (ast.type === null) {
// outside of a extglob, append until we find a start
let i = pos;
let acc = '';
while (i < str.length) {
const c = str.charAt(i++);
// still accumulate escapes at this point, but we do ignore
// starts that are escaped
if (escaping || c === '\\') {
escaping = !escaping;
acc += c;
continue;
}
if (inBrace) {
if (i === braceStart + 1) {
if (c === '^' || c === '!') {
braceNeg = true;
}
}
else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
inBrace = false;
}
acc += c;
continue;
}
else if (c === '[') {
inBrace = true;
braceStart = i;
braceNeg = false;
acc += c;
continue;
}
if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {
ast.push(acc);
acc = '';
const ext = new AST(c, ast);
i = AST.#parseAST(str, ext, i, opt);
ast.push(ext);
continue;
}
acc += c;
}
ast.push(acc);
return i;
}
// some kind of extglob, pos is at the (
// find the next | or )
let i = pos + 1;
let part = new AST(null, ast);
const parts = [];
let acc = '';
while (i < str.length) {
const c = str.charAt(i++);
// still accumulate escapes at this point, but we do ignore
// starts that are escaped
if (escaping || c === '\\') {
escaping = !escaping;
acc += c;
continue;
}
if (inBrace) {
if (i === braceStart + 1) {
if (c === '^' || c === '!') {
braceNeg = true;
}
}
else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
inBrace = false;
}
acc += c;
continue;
}
else if (c === '[') {
inBrace = true;
braceStart = i;
braceNeg = false;
acc += c;
continue;
}
if (isExtglobType(c) && str.charAt(i) === '(') {
part.push(acc);
acc = '';
const ext = new AST(c, part);
part.push(ext);
i = AST.#parseAST(str, ext, i, opt);
continue;
}
if (c === '|') {
part.push(acc);
acc = '';
parts.push(part);
part = new AST(null, ast);
continue;
}
if (c === ')') {
if (acc === '' && ast.#parts.length === 0) {
ast.#emptyExt = true;
}
part.push(acc);
acc = '';
ast.push(...parts, part);
return i;
}
acc += c;
}
// unfinished extglob
// if we got here, it was a malformed extglob! not an extglob, but
// maybe something else in there.
ast.type = null;
ast.#hasMagic = undefined;
ast.#parts = [str.substring(pos - 1)];
return i;
}
static fromGlob(pattern, options = {}) {
const ast = new AST(null, undefined, options);
AST.#parseAST(pattern, ast, 0, options);
return ast;
}
// returns the regular expression if there's magic, or the unescaped
// string if not.
toMMPattern() {
// should only be called on root
/* c8 ignore start */
if (this !== this.#root)
return this.#root.toMMPattern();
/* c8 ignore stop */
const glob = this.toString();
const [re, body, hasMagic, uflag] = this.toRegExpSource();
// if we're in nocase mode, and not nocaseMagicOnly, then we do
// still need a regular expression if we have to case-insensitively
// match capital/lowercase characters.
const anyMagic = hasMagic ||
this.#hasMagic ||
(this.#options.nocase &&
!this.#options.nocaseMagicOnly &&
glob.toUpperCase() !== glob.toLowerCase());
if (!anyMagic) {
return body;
}
const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '');
return Object.assign(new RegExp(`^${re}$`, flags), {
_src: re,
_glob: glob,
});
}
get options() {
return this.#options;
}
// returns the string match, the regexp source, whether there's magic
// in the regexp (so a regular expression is required) and whether or
// not the uflag is needed for the regular expression (for posix classes)
// TODO: instead of injecting the start/end at this point, just return
// the BODY of the regexp, along with the start/end portions suitable
// for binding the start/end in either a joined full-path makeRe context
// (where we bind to (^|/), or a standalone matchPart context (where
// we bind to ^, and not /). Otherwise slashes get duped!
//
// In part-matching mode, the start is:
// - if not isStart: nothing
// - if traversal possible, but not allowed: ^(?!\.\.?$)
// - if dots allowed or not possible: ^
// - if dots possible and not allowed: ^(?!\.)
// end is:
// - if not isEnd(): nothing
// - else: $
//
// In full-path matching mode, we put the slash at the START of the
// pattern, so start is:
// - if first pattern: same as part-matching mode
// - if not isStart(): nothing
// - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
// - if dots allowed or not possible: /
// - if dots possible and not allowed: /(?!\.)
// end is:
// - if last pattern, same as part-matching mode
// - else nothing
//
// Always put the (?:$|/) on negated tails, though, because that has to be
// there to bind the end of the negated pattern portion, and it's easier to
// just stick it in now rather than try to inject it later in the middle of
// the pattern.
//
// We can just always return the same end, and leave it up to the caller
// to know whether it's going to be used joined or in parts.
// And, if the start is adjusted slightly, can do the same there:
// - if not isStart: nothing
// - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
// - if dots allowed or not possible: (?:/|^)
// - if dots possible and not allowed: (?:/|^)(?!\.)
//
// But it's better to have a simpler binding without a conditional, for
// performance, so probably better to return both start options.
//
// Then the caller just ignores the end if it's not the first pattern,
// and the start always gets applied.
//
// But that's always going to be $ if it's the ending pattern, or nothing,
// so the caller can just attach $ at the end of the pattern when building.
//
// So the todo is:
// - better detect what kind of start is needed
// - return both flavors of starting pattern
// - attach $ at the end of the pattern when creating the actual RegExp
//
// Ah, but wait, no, that all only applies to the root when the first pattern
// is not an extglob. If the first pattern IS an extglob, then we need all
// that dot prevention biz to live in the extglob portions, because eg
// +(*|.x*) can match .xy but not .yx.
//
// So, return the two flavors if it's #root and the first child is not an
// AST, otherwise leave it to the child AST to handle it, and there,
// use the (?:^|/) style of start binding.
//
// Even simplified further:
// - Since the start for a join is eg /(?!\.) and the start for a part
// is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
// or start or whatever) and prepend ^ or / at the Regexp construction.
toRegExpSource(allowDot) {
const dot = allowDot ?? !!this.#options.dot;
if (this.#root === this)
this.#fillNegs();
if (!this.type) {
const noEmpty = this.isStart() &&
this.isEnd() &&
!this.#parts.some(s => typeof s !== 'string');
const src = this.#parts
.map(p => {
const [re, _, hasMagic, uflag] = typeof p === 'string'
? AST.#parseGlob(p, this.#hasMagic, noEmpty)
: p.toRegExpSource(allowDot);
this.#hasMagic = this.#hasMagic || hasMagic;
this.#uflag = this.#uflag || uflag;
return re;
})
.join('');
let start = '';
if (this.isStart()) {
if (typeof this.#parts[0] === 'string') {
// this is the string that will match the start of the pattern,
// so we need to protect against dots and such.
// '.' and '..' cannot match unless the pattern is that exactly,
// even if it starts with . or dot:true is set.
const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]);
if (!dotTravAllowed) {
const aps = addPatternStart;
// check if we have a possibility of matching . or ..,
// and prevent that.
const needNoTrav =
// dots are allowed, and the pattern starts with [ or .
(dot && aps.has(src.charAt(0))) ||
// the pattern starts with \., and then [ or .
(src.startsWith('\\.') && aps.has(src.charAt(2))) ||
// the pattern starts with \.\., and then [ or .
(src.startsWith('\\.\\.') && aps.has(src.charAt(4)));
// no need to prevent dots if it can't match a dot, or if a
// sub-pattern will be preventing it anyway.
const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : '';
}
}
}
// append the "end of path portion" pattern to negation tails
let end = '';
if (this.isEnd() &&
this.#root.#filledNegs &&
this.#parent?.type === '!') {
end = '(?:$|\\/)';
}
const final = start + src + end;
return [
final,
unescape(src),
(this.#hasMagic = !!this.#hasMagic),
this.#uflag,
];
}
// We need to calculate the body *twice* if it's a repeat pattern
// at the start, once in nodot mode, then again in dot mode, so a
// pattern like *(?) can match 'x.y'
const repeated = this.type === '*' || this.type === '+';
// some kind of extglob
const start = this.type === '!' ? '(?:(?!(?:' : '(?:';
let body = this.#partsToRegExp(dot);
if (this.isStart() && this.isEnd() && !body && this.type !== '!') {
// invalid extglob, has to at least be *something* present, if it's
// the entire path portion.
const s = this.toString();
this.#parts = [s];
this.type = null;
this.#hasMagic = undefined;
return [s, unescape(this.toString()), false, false];
}
// XXX abstract out this map method
let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot
? ''
: this.#partsToRegExp(true);
if (bodyDotAllowed === body) {
bodyDotAllowed = '';
}
if (bodyDotAllowed) {
body = `(?:${body})(?:${bodyDotAllowed})*?`;
}
// an empty !() is exactly equivalent to a starNoEmpty
let final = '';
if (this.type === '!' && this.#emptyExt) {
final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty;
}
else {
const close = this.type === '!'
? // !() must match something,but !(x) can match ''
'))' +
(this.isStart() && !dot && !allowDot ? startNoDot : '') +
star +
')'
: this.type === '@'
? ')'
: this.type === '?'
? ')?'
: this.type === '+' && bodyDotAllowed
? ')'
: this.type === '*' && bodyDotAllowed
? `)?`
: `)${this.type}`;
final = start + body + close;
}
return [
final,
unescape(body),
(this.#hasMagic = !!this.#hasMagic),
this.#uflag,
];
}
#partsToRegExp(dot) {
return this.#parts
.map(p => {
// extglob ASTs should only contain parent ASTs
/* c8 ignore start */
if (typeof p === 'string') {
throw new Error('string type in extglob ast??');
}
/* c8 ignore stop */
// can ignore hasMagic, because extglobs are already always magic
const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot);
this.#uflag = this.#uflag || uflag;
return re;
})
.filter(p => !(this.isStart() && this.isEnd()) || !!p)
.join('|');
}
static #parseGlob(glob, hasMagic, noEmpty = false) {
let escaping = false;
let re = '';
let uflag = false;
for (let i = 0; i < glob.length; i++) {
const c = glob.charAt(i);
if (escaping) {
escaping = false;
re += (reSpecials.has(c) ? '\\' : '') + c;
continue;
}
if (c === '\\') {
if (i === glob.length - 1) {
re += '\\\\';
}
else {
escaping = true;
}
continue;
}
if (c === '[') {
const [src, needUflag, consumed, magic] = parseClass(glob, i);
if (consumed) {
re += src;
uflag = uflag || needUflag;
i += consumed - 1;
hasMagic = hasMagic || magic;
continue;
}
}
if (c === '*') {
re += noEmpty && glob === '*' ? starNoEmpty : star;
hasMagic = true;
continue;
}
if (c === '?') {
re += qmark;
hasMagic = true;
continue;
}
re += regExpEscape(c);
}
return [re, unescape(glob), !!hasMagic, uflag];
}
}
//# sourceMappingURL=ast.js.map
@@ -0,0 +1,225 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
// Portions of the code in this file are based on code from ICU.
// Original licensing can be found in the NOTICE file in the root directory of this source tree.
import {AnyCalendarDate, Calendar, CalendarIdentifier} from '../types';
import {CalendarDate} from '../CalendarDate';
const CIVIL_EPOC = 1948440; // CE 622 July 16 Friday (Julian calendar) / CE 622 July 19 (Gregorian calendar)
const ASTRONOMICAL_EPOC = 1948439; // CE 622 July 15 Thursday (Julian calendar)
const UMALQURA_YEAR_START = 1300;
const UMALQURA_YEAR_END = 1600;
const UMALQURA_START_DAYS = 460322;
function islamicToJulianDay(epoch: number, year: number, month: number, day: number): number {
return day +
Math.ceil(29.5 * (month - 1)) +
(year - 1) * 354 +
Math.floor((3 + 11 * year) / 30) +
epoch - 1;
}
function julianDayToIslamic(calendar: Calendar, epoch: number, jd: number) {
let year = Math.floor((30 * (jd - epoch) + 10646) / 10631);
let month = Math.min(12, Math.ceil((jd - (29 + islamicToJulianDay(epoch, year, 1, 1))) / 29.5) + 1);
let day = jd - islamicToJulianDay(epoch, year, month, 1) + 1;
return new CalendarDate(calendar, year, month, day);
}
function isLeapYear(year: number): boolean {
return (14 + 11 * year) % 30 < 11;
}
/**
* The Islamic calendar, also known as the "Hijri" calendar, is used throughout much of the Arab world.
* The civil variant uses simple arithmetic rules rather than astronomical calculations to approximate
* the traditional calendar, which is based on sighting of the crescent moon. It uses Friday, July 16 622 CE (Julian) as the epoch.
* Each year has 12 months, with either 354 or 355 days depending on whether it is a leap year.
* Learn more about the available Islamic calendars [here](https://cldr.unicode.org/development/development-process/design-proposals/islamic-calendar-types).
*/
export class IslamicCivilCalendar implements Calendar {
identifier: CalendarIdentifier = 'islamic-civil';
fromJulianDay(jd: number): CalendarDate {
return julianDayToIslamic(this, CIVIL_EPOC, jd);
}
toJulianDay(date: AnyCalendarDate): number {
return islamicToJulianDay(CIVIL_EPOC, date.year, date.month, date.day);
}
getDaysInMonth(date: AnyCalendarDate): number {
let length = 29 + date.month % 2;
if (date.month === 12 && isLeapYear(date.year)) {
length++;
}
return length;
}
getMonthsInYear(): number {
return 12;
}
getDaysInYear(date: AnyCalendarDate): number {
return isLeapYear(date.year) ? 355 : 354;
}
getYearsInEra(): number {
// 9999 gregorian
return 9665;
}
getEras(): string[] {
return ['AH'];
}
}
/**
* The Islamic calendar, also known as the "Hijri" calendar, is used throughout much of the Arab world.
* The tabular variant uses simple arithmetic rules rather than astronomical calculations to approximate
* the traditional calendar, which is based on sighting of the crescent moon. It uses Thursday, July 15 622 CE (Julian) as the epoch.
* Each year has 12 months, with either 354 or 355 days depending on whether it is a leap year.
* Learn more about the available Islamic calendars [here](https://cldr.unicode.org/development/development-process/design-proposals/islamic-calendar-types).
*/
export class IslamicTabularCalendar extends IslamicCivilCalendar {
identifier: CalendarIdentifier = 'islamic-tbla';
fromJulianDay(jd: number): CalendarDate {
return julianDayToIslamic(this, ASTRONOMICAL_EPOC, jd);
}
toJulianDay(date: AnyCalendarDate): number {
return islamicToJulianDay(ASTRONOMICAL_EPOC, date.year, date.month, date.day);
}
}
// Generated by scripts/generate-umalqura.js
const UMALQURA_DATA = 'qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=';
let UMALQURA_MONTHLENGTH: Uint16Array;
let UMALQURA_YEAR_START_TABLE: Uint32Array;
function umalquraYearStart(year: number): number {
return UMALQURA_START_DAYS + UMALQURA_YEAR_START_TABLE[year - UMALQURA_YEAR_START];
}
function umalquraMonthLength(year: number, month: number): number {
let idx = (year - UMALQURA_YEAR_START);
let mask = (0x01 << (11 - (month - 1)));
if ((UMALQURA_MONTHLENGTH[idx] & mask) === 0) {
return 29;
} else {
return 30;
}
}
function umalquraMonthStart(year: number, month: number): number {
let day = umalquraYearStart(year);
for (let i = 1; i < month; i++) {
day += umalquraMonthLength(year, i);
}
return day;
}
function umalquraYearLength(year: number): number {
return UMALQURA_YEAR_START_TABLE[year + 1 - UMALQURA_YEAR_START] - UMALQURA_YEAR_START_TABLE[year - UMALQURA_YEAR_START];
}
/**
* The Islamic calendar, also known as the "Hijri" calendar, is used throughout much of the Arab world.
* The Umalqura variant is primarily used in Saudi Arabia. It is a lunar calendar, based on astronomical
* calculations that predict the sighting of a crescent moon. Month and year lengths vary between years
* depending on these calculations.
* Learn more about the available Islamic calendars [here](https://cldr.unicode.org/development/development-process/design-proposals/islamic-calendar-types).
*/
export class IslamicUmalquraCalendar extends IslamicCivilCalendar {
identifier: CalendarIdentifier = 'islamic-umalqura';
constructor() {
super();
if (!UMALQURA_MONTHLENGTH) {
UMALQURA_MONTHLENGTH = new Uint16Array(Uint8Array.from(atob(UMALQURA_DATA), c => c.charCodeAt(0)).buffer);
}
if (!UMALQURA_YEAR_START_TABLE) {
UMALQURA_YEAR_START_TABLE = new Uint32Array(UMALQURA_YEAR_END - UMALQURA_YEAR_START + 1);
let yearStart = 0;
for (let year = UMALQURA_YEAR_START; year <= UMALQURA_YEAR_END; year++) {
UMALQURA_YEAR_START_TABLE[year - UMALQURA_YEAR_START] = yearStart;
for (let i = 1; i <= 12; i++) {
yearStart += umalquraMonthLength(year, i);
}
}
}
}
fromJulianDay(jd: number): CalendarDate {
let days = jd - CIVIL_EPOC;
let startDays = umalquraYearStart(UMALQURA_YEAR_START);
let endDays = umalquraYearStart(UMALQURA_YEAR_END);
if (days < startDays || days > endDays) {
return super.fromJulianDay(jd);
} else {
let y = UMALQURA_YEAR_START - 1;
let m = 1;
let d = 1;
while (d > 0) {
y++;
d = days - umalquraYearStart(y) + 1;
let yearLength = umalquraYearLength(y);
if (d === yearLength) {
m = 12;
break;
} else if (d < yearLength) {
let monthLength = umalquraMonthLength(y, m);
m = 1;
while (d > monthLength) {
d -= monthLength;
m++;
monthLength = umalquraMonthLength(y, m);
}
break;
}
}
return new CalendarDate(this, y, m, (days - umalquraMonthStart(y, m) + 1));
}
}
toJulianDay(date: AnyCalendarDate): number {
if (date.year < UMALQURA_YEAR_START || date.year > UMALQURA_YEAR_END) {
return super.toJulianDay(date);
}
return CIVIL_EPOC + umalquraMonthStart(date.year, date.month) + (date.day - 1);
}
getDaysInMonth(date: AnyCalendarDate): number {
if (date.year < UMALQURA_YEAR_START || date.year > UMALQURA_YEAR_END) {
return super.getDaysInMonth(date);
}
return umalquraMonthLength(date.year, date.month);
}
getDaysInYear(date: AnyCalendarDate): number {
if (date.year < UMALQURA_YEAR_START || date.year > UMALQURA_YEAR_END) {
return super.getDaysInYear(date);
}
return umalquraYearLength(date.year);
}
}
@@ -0,0 +1,37 @@
// src/bold/calendar-bold.tsx
import { jsx, jsxs } from "react/jsx-runtime";
var CalendarBoldIcon = (props) => /* @__PURE__ */ jsxs(
"svg",
{
"aria-hidden": "true",
fill: "none",
focusable: "false",
height: "1em",
role: "presentation",
viewBox: "0 0 24 24",
width: "1em",
...props,
children: [
/* @__PURE__ */ jsx(
"path",
{
d: "M7.75 2.5a.75.75 0 0 0-1.5 0v1.58c-1.44.115-2.384.397-3.078 1.092c-.695.694-.977 1.639-1.093 3.078h19.842c-.116-1.44-.398-2.384-1.093-3.078c-.694-.695-1.639-.977-3.078-1.093V2.5a.75.75 0 0 0-1.5 0v1.513C15.585 4 14.839 4 14 4h-4c-.839 0-1.585 0-2.25.013z",
fill: "currentColor"
}
),
/* @__PURE__ */ jsx(
"path",
{
clipRule: "evenodd",
d: "M2 12c0-.839 0-1.585.013-2.25h19.974C22 10.415 22 11.161 22 12v2c0 3.771 0 5.657-1.172 6.828C19.657 22 17.771 22 14 22h-4c-3.771 0-5.657 0-6.828-1.172C2 19.657 2 17.771 2 14zm15 2a1 1 0 1 0 0-2a1 1 0 0 0 0 2m0 4a1 1 0 1 0 0-2a1 1 0 0 0 0 2m-4-5a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0 4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-6-3a1 1 0 1 0 0-2a1 1 0 0 0 0 2m0 4a1 1 0 1 0 0-2a1 1 0 0 0 0 2",
fill: "currentColor",
fillRule: "evenodd"
}
)
]
}
);
export {
CalendarBoldIcon
};
@@ -0,0 +1,5 @@
import * as ts from 'typescript';
import type { ParseSettings } from '../parseSettings';
import type { ASTAndNoProgram } from './shared';
export declare function createSourceFile(parseSettings: ParseSettings): ts.SourceFile;
export declare function createNoProgram(parseSettings: ParseSettings): ASTAndNoProgram;
@@ -0,0 +1,16 @@
export { default as Navbar, NavbarProps } from './navbar.js';
export { default as NavbarBrand, NavbarBrandProps } from './navbar-brand.js';
export { default as NavbarContent, NavbarContentProps } from './navbar-content.js';
export { default as NavbarItem, NavbarItemProps } from './navbar-item.js';
export { default as NavbarMenuToggle, NavbarMenuToggleProps } from './navbar-menu-toggle.js';
export { default as NavbarMenu, NavbarMenuProps } from './navbar-menu.js';
export { default as NavbarMenuItem, NavbarMenuItemProps } from './navbar-menu-item.js';
export { useNavbar } from './use-navbar.js';
export { NavbarProvider, useNavbarContext } from './navbar-context.js';
import '@heroui/system';
import '@react-aria/button';
import 'react';
import 'framer-motion';
import 'tailwind-variants';
import '@heroui/theme';
import '@heroui/react-utils';
@@ -0,0 +1,322 @@
var conventions = require("./conventions");
var dom = require('./dom')
var entities = require('./entities');
var sax = require('./sax');
var DOMImplementation = dom.DOMImplementation;
var NAMESPACE = conventions.NAMESPACE;
var ParseError = sax.ParseError;
var XMLReader = sax.XMLReader;
/**
* Normalizes line ending according to https://www.w3.org/TR/xml11/#sec-line-ends:
*
* > XML parsed entities are often stored in computer files which,
* > for editing convenience, are organized into lines.
* > These lines are typically separated by some combination
* > of the characters CARRIAGE RETURN (#xD) and LINE FEED (#xA).
* >
* > To simplify the tasks of applications, the XML processor must behave
* > as if it normalized all line breaks in external parsed entities (including the document entity)
* > on input, before parsing, by translating all of the following to a single #xA character:
* >
* > 1. the two-character sequence #xD #xA
* > 2. the two-character sequence #xD #x85
* > 3. the single character #x85
* > 4. the single character #x2028
* > 5. any #xD character that is not immediately followed by #xA or #x85.
*
* @param {string} input
* @returns {string}
*/
function normalizeLineEndings(input) {
return input
.replace(/\r[\n\u0085]/g, '\n')
.replace(/[\r\u0085\u2028]/g, '\n')
}
/**
* @typedef Locator
* @property {number} [columnNumber]
* @property {number} [lineNumber]
*/
/**
* @typedef DOMParserOptions
* @property {DOMHandler} [domBuilder]
* @property {Function} [errorHandler]
* @property {(string) => string} [normalizeLineEndings] used to replace line endings before parsing
* defaults to `normalizeLineEndings`
* @property {Locator} [locator]
* @property {Record<string, string>} [xmlns]
*
* @see normalizeLineEndings
*/
/**
* The DOMParser interface provides the ability to parse XML or HTML source code
* from a string into a DOM `Document`.
*
* _xmldom is different from the spec in that it allows an `options` parameter,
* to override the default behavior._
*
* @param {DOMParserOptions} [options]
* @constructor
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser
* @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-parsing-and-serialization
*/
function DOMParser(options){
this.options = options ||{locator:{}};
}
DOMParser.prototype.parseFromString = function(source,mimeType){
var options = this.options;
var sax = new XMLReader();
var domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler
var errorHandler = options.errorHandler;
var locator = options.locator;
var defaultNSMap = options.xmlns||{};
var isHTML = /\/x?html?$/.test(mimeType);//mimeType.toLowerCase().indexOf('html') > -1;
var entityMap = isHTML ? entities.HTML_ENTITIES : entities.XML_ENTITIES;
if(locator){
domBuilder.setDocumentLocator(locator)
}
sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator);
sax.domBuilder = options.domBuilder || domBuilder;
if(isHTML){
defaultNSMap[''] = NAMESPACE.HTML;
}
defaultNSMap.xml = defaultNSMap.xml || NAMESPACE.XML;
var normalize = options.normalizeLineEndings || normalizeLineEndings;
if (source && typeof source === 'string') {
sax.parse(
normalize(source),
defaultNSMap,
entityMap
)
} else {
sax.errorHandler.error('invalid doc source')
}
return domBuilder.doc;
}
function buildErrorHandler(errorImpl,domBuilder,locator){
if(!errorImpl){
if(domBuilder instanceof DOMHandler){
return domBuilder;
}
errorImpl = domBuilder ;
}
var errorHandler = {}
var isCallback = errorImpl instanceof Function;
locator = locator||{}
function build(key){
var fn = errorImpl[key];
if(!fn && isCallback){
fn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl;
}
errorHandler[key] = fn && function(msg){
fn('[xmldom '+key+']\t'+msg+_locator(locator));
}||function(){};
}
build('warning');
build('error');
build('fatalError');
return errorHandler;
}
//console.log('#\n\n\n\n\n\n\n####')
/**
* +ContentHandler+ErrorHandler
* +LexicalHandler+EntityResolver2
* -DeclHandler-DTDHandler
*
* DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler
* DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2
* @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html
*/
function DOMHandler() {
this.cdata = false;
}
function position(locator,node){
node.lineNumber = locator.lineNumber;
node.columnNumber = locator.columnNumber;
}
/**
* @see org.xml.sax.ContentHandler#startDocument
* @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html
*/
DOMHandler.prototype = {
startDocument : function() {
this.doc = new DOMImplementation().createDocument(null, null, null);
if (this.locator) {
this.doc.documentURI = this.locator.systemId;
}
},
startElement:function(namespaceURI, localName, qName, attrs) {
var doc = this.doc;
var el = doc.createElementNS(namespaceURI, qName||localName);
var len = attrs.length;
appendElement(this, el);
this.currentElement = el;
this.locator && position(this.locator,el)
for (var i = 0 ; i < len; i++) {
var namespaceURI = attrs.getURI(i);
var value = attrs.getValue(i);
var qName = attrs.getQName(i);
var attr = doc.createAttributeNS(namespaceURI, qName);
this.locator &&position(attrs.getLocator(i),attr);
attr.value = attr.nodeValue = value;
el.setAttributeNode(attr)
}
},
endElement:function(namespaceURI, localName, qName) {
var current = this.currentElement
var tagName = current.tagName;
this.currentElement = current.parentNode;
},
startPrefixMapping:function(prefix, uri) {
},
endPrefixMapping:function(prefix) {
},
processingInstruction:function(target, data) {
var ins = this.doc.createProcessingInstruction(target, data);
this.locator && position(this.locator,ins)
appendElement(this, ins);
},
ignorableWhitespace:function(ch, start, length) {
},
characters:function(chars, start, length) {
chars = _toString.apply(this,arguments)
//console.log(chars)
if(chars){
if (this.cdata) {
var charNode = this.doc.createCDATASection(chars);
} else {
var charNode = this.doc.createTextNode(chars);
}
if(this.currentElement){
this.currentElement.appendChild(charNode);
}else if(/^\s*$/.test(chars)){
this.doc.appendChild(charNode);
//process xml
}
this.locator && position(this.locator,charNode)
}
},
skippedEntity:function(name) {
},
endDocument:function() {
this.doc.normalize();
},
setDocumentLocator:function (locator) {
if(this.locator = locator){// && !('lineNumber' in locator)){
locator.lineNumber = 0;
}
},
//LexicalHandler
comment:function(chars, start, length) {
chars = _toString.apply(this,arguments)
var comm = this.doc.createComment(chars);
this.locator && position(this.locator,comm)
appendElement(this, comm);
},
startCDATA:function() {
//used in characters() methods
this.cdata = true;
},
endCDATA:function() {
this.cdata = false;
},
startDTD:function(name, publicId, systemId) {
var impl = this.doc.implementation;
if (impl && impl.createDocumentType) {
var dt = impl.createDocumentType(name, publicId, systemId);
this.locator && position(this.locator,dt)
appendElement(this, dt);
this.doc.doctype = dt;
}
},
/**
* @see org.xml.sax.ErrorHandler
* @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html
*/
warning:function(error) {
console.warn('[xmldom warning]\t'+error,_locator(this.locator));
},
error:function(error) {
console.error('[xmldom error]\t'+error,_locator(this.locator));
},
fatalError:function(error) {
throw new ParseError(error, this.locator);
}
}
function _locator(l){
if(l){
return '\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']'
}
}
function _toString(chars,start,length){
if(typeof chars == 'string'){
return chars.substr(start,length)
}else{//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)")
if(chars.length >= start+length || start){
return new java.lang.String(chars,start,length)+'';
}
return chars;
}
}
/*
* @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html
* used method of org.xml.sax.ext.LexicalHandler:
* #comment(chars, start, length)
* #startCDATA()
* #endCDATA()
* #startDTD(name, publicId, systemId)
*
*
* IGNORED method of org.xml.sax.ext.LexicalHandler:
* #endDTD()
* #startEntity(name)
* #endEntity(name)
*
*
* @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html
* IGNORED method of org.xml.sax.ext.DeclHandler
* #attributeDecl(eName, aName, type, mode, value)
* #elementDecl(name, model)
* #externalEntityDecl(name, publicId, systemId)
* #internalEntityDecl(name, value)
* @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html
* IGNORED method of org.xml.sax.EntityResolver2
* #resolveEntity(String name,String publicId,String baseURI,String systemId)
* #resolveEntity(publicId, systemId)
* #getExternalSubset(name, baseURI)
* @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html
* IGNORED method of org.xml.sax.DTDHandler
* #notationDecl(name, publicId, systemId) {};
* #unparsedEntityDecl(name, publicId, systemId, notationName) {};
*/
"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){
DOMHandler.prototype[key] = function(){return null}
})
/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */
function appendElement (hander,node) {
if (!hander.currentElement) {
hander.doc.appendChild(node);
} else {
hander.currentElement.appendChild(node);
}
}//appendChild and setAttributeNS are preformance key
exports.__DOMHandler = DOMHandler;
exports.normalizeLineEndings = normalizeLineEndings;
exports.DOMParser = DOMParser;
@@ -0,0 +1,32 @@
import { TemplateLiteralGenerate } from '../template-literal/index.mjs';
// ------------------------------------------------------------------
// TypeGuard
// ------------------------------------------------------------------
import { IsTemplateLiteral, IsUnion, IsLiteral, IsNumber, IsInteger } from '../guard/kind.mjs';
// prettier-ignore
function FromTemplateLiteral(templateLiteral) {
const keys = TemplateLiteralGenerate(templateLiteral);
return keys.map(key => key.toString());
}
// prettier-ignore
function FromUnion(types) {
const result = [];
for (const type of types)
result.push(...IndexPropertyKeys(type));
return result;
}
// prettier-ignore
function FromLiteral(literalValue) {
return ([literalValue.toString()] // TS 5.4 observes TLiteralValue as not having a toString()
);
}
/** Returns a tuple of PropertyKeys derived from the given TSchema */
// prettier-ignore
export function IndexPropertyKeys(type) {
return [...new Set((IsTemplateLiteral(type) ? FromTemplateLiteral(type) :
IsUnion(type) ? FromUnion(type.anyOf) :
IsLiteral(type) ? FromLiteral(type.const) :
IsNumber(type) ? ['[number]'] :
IsInteger(type) ? ['[number]'] :
[]))];
}
@@ -0,0 +1,174 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Google_Hardware_Attestation_Root_4 = exports.Google_Hardware_Attestation_Root_3 = exports.Google_Hardware_Attestation_Root_2 = exports.Google_Hardware_Attestation_Root_1 = void 0;
/**
* Google Hardware Attestation Root 1
*
* Downloaded from https://developer.android.com/training/articles/security-key-attestation#root_certificate
* (first entry)
*
* Valid until 2026-05-24 @ 09:28 PST
*
* SHA256 Fingerprint
* C1:98:4A:3E:F4:5C:1E:2A:91:85:51:DE:10:60:3C:86:F7:05:1B:22:49:C4:89:1C:AE:32:30:EA:BD:0C:97:D5
*/
exports.Google_Hardware_Attestation_Root_1 = `-----BEGIN CERTIFICATE-----
MIIFYDCCA0igAwIBAgIJAOj6GWMU0voYMA0GCSqGSIb3DQEBCwUAMBsxGTAXBgNV
BAUTEGY5MjAwOWU4NTNiNmIwNDUwHhcNMTYwNTI2MTYyODUyWhcNMjYwNTI0MTYy
ODUyWjAbMRkwFwYDVQQFExBmOTIwMDllODUzYjZiMDQ1MIICIjANBgkqhkiG9w0B
AQEFAAOCAg8AMIICCgKCAgEAr7bHgiuxpwHsK7Qui8xUFmOr75gvMsd/dTEDDJdS
Sxtf6An7xyqpRR90PL2abxM1dEqlXnf2tqw1Ne4Xwl5jlRfdnJLmN0pTy/4lj4/7
tv0Sk3iiKkypnEUtR6WfMgH0QZfKHM1+di+y9TFRtv6y//0rb+T+W8a9nsNL/ggj
nar86461qO0rOs2cXjp3kOG1FEJ5MVmFmBGtnrKpa73XpXyTqRxB/M0n1n/W9nGq
C4FSYa04T6N5RIZGBN2z2MT5IKGbFlbC8UrW0DxW7AYImQQcHtGl/m00QLVWutHQ
oVJYnFPlXTcHYvASLu+RhhsbDmxMgJJ0mcDpvsC4PjvB+TxywElgS70vE0XmLD+O
JtvsBslHZvPBKCOdT0MS+tgSOIfga+z1Z1g7+DVagf7quvmag8jfPioyKvxnK/Eg
sTUVi2ghzq8wm27ud/mIM7AY2qEORR8Go3TVB4HzWQgpZrt3i5MIlCaY504LzSRi
igHCzAPlHws+W0rB5N+er5/2pJKnfBSDiCiFAVtCLOZ7gLiMm0jhO2B6tUXHI/+M
RPjy02i59lINMRRev56GKtcd9qO/0kUJWdZTdA2XoS82ixPvZtXQpUpuL12ab+9E
aDK8Z4RHJYYfCT3Q5vNAXaiWQ+8PTWm2QgBR/bkwSWc+NpUFgNPN9PvQi8WEg5Um
AGMCAwEAAaOBpjCBozAdBgNVHQ4EFgQUNmHhAHyIBQlRi0RsR/8aTMnqTxIwHwYD
VR0jBBgwFoAUNmHhAHyIBQlRi0RsR/8aTMnqTxIwDwYDVR0TAQH/BAUwAwEB/zAO
BgNVHQ8BAf8EBAMCAYYwQAYDVR0fBDkwNzA1oDOgMYYvaHR0cHM6Ly9hbmRyb2lk
Lmdvb2dsZWFwaXMuY29tL2F0dGVzdGF0aW9uL2NybC8wDQYJKoZIhvcNAQELBQAD
ggIBACDIw41L3KlXG0aMiS//cqrG+EShHUGo8HNsw30W1kJtjn6UBwRM6jnmiwfB
Pb8VA91chb2vssAtX2zbTvqBJ9+LBPGCdw/E53Rbf86qhxKaiAHOjpvAy5Y3m00m
qC0w/Zwvju1twb4vhLaJ5NkUJYsUS7rmJKHHBnETLi8GFqiEsqTWpG/6ibYCv7rY
DBJDcR9W62BW9jfIoBQcxUCUJouMPH25lLNcDc1ssqvC2v7iUgI9LeoM1sNovqPm
QUiG9rHli1vXxzCyaMTjwftkJLkf6724DFhuKug2jITV0QkXvaJWF4nUaHOTNA4u
JU9WDvZLI1j83A+/xnAJUucIv/zGJ1AMH2boHqF8CY16LpsYgBt6tKxxWH00XcyD
CdW2KlBCeqbQPcsFmWyWugxdcekhYsAWyoSf818NUsZdBWBaR/OukXrNLfkQ79Iy
ZohZbvabO/X+MVT3rriAoKc8oE2Uws6DF+60PV7/WIPjNvXySdqspImSN78mflxD
qwLqRBYkA3I75qppLGG9rp7UCdRjxMl8ZDBld+7yvHVgt1cVzJx9xnyGCC23Uaic
MDSXYrB4I4WHXPGjxhZuCuPBLTdOLU8YRvMYdEvYebWHMpvwGCF6bAx3JBpIeOQ1
wDB5y0USicV3YgYGmi+NZfhA4URSh77Yd6uuJOJENRaNVTzk
-----END CERTIFICATE-----
`;
/**
* Google Hardware Attestation Root 2
*
* Downloaded from https://developer.android.com/training/articles/security-key-attestation#root_certificate
* (second entry)
*
* Valid until 2034-11-18 @ 12:37 PST
*
* SHA256 Fingerprint
* 1E:F1:A0:4B:8B:A5:8A:B9:45:89:AC:49:8C:89:82:A7:83:F2:4E:A7:30:7E:01:59:A0:C3:A7:3B:37:7D:87:CC
*/
exports.Google_Hardware_Attestation_Root_2 = `-----BEGIN CERTIFICATE-----
MIIFHDCCAwSgAwIBAgIJANUP8luj8tazMA0GCSqGSIb3DQEBCwUAMBsxGTAXBgNV
BAUTEGY5MjAwOWU4NTNiNmIwNDUwHhcNMTkxMTIyMjAzNzU4WhcNMzQxMTE4MjAz
NzU4WjAbMRkwFwYDVQQFExBmOTIwMDllODUzYjZiMDQ1MIICIjANBgkqhkiG9w0B
AQEFAAOCAg8AMIICCgKCAgEAr7bHgiuxpwHsK7Qui8xUFmOr75gvMsd/dTEDDJdS
Sxtf6An7xyqpRR90PL2abxM1dEqlXnf2tqw1Ne4Xwl5jlRfdnJLmN0pTy/4lj4/7
tv0Sk3iiKkypnEUtR6WfMgH0QZfKHM1+di+y9TFRtv6y//0rb+T+W8a9nsNL/ggj
nar86461qO0rOs2cXjp3kOG1FEJ5MVmFmBGtnrKpa73XpXyTqRxB/M0n1n/W9nGq
C4FSYa04T6N5RIZGBN2z2MT5IKGbFlbC8UrW0DxW7AYImQQcHtGl/m00QLVWutHQ
oVJYnFPlXTcHYvASLu+RhhsbDmxMgJJ0mcDpvsC4PjvB+TxywElgS70vE0XmLD+O
JtvsBslHZvPBKCOdT0MS+tgSOIfga+z1Z1g7+DVagf7quvmag8jfPioyKvxnK/Eg
sTUVi2ghzq8wm27ud/mIM7AY2qEORR8Go3TVB4HzWQgpZrt3i5MIlCaY504LzSRi
igHCzAPlHws+W0rB5N+er5/2pJKnfBSDiCiFAVtCLOZ7gLiMm0jhO2B6tUXHI/+M
RPjy02i59lINMRRev56GKtcd9qO/0kUJWdZTdA2XoS82ixPvZtXQpUpuL12ab+9E
aDK8Z4RHJYYfCT3Q5vNAXaiWQ+8PTWm2QgBR/bkwSWc+NpUFgNPN9PvQi8WEg5Um
AGMCAwEAAaNjMGEwHQYDVR0OBBYEFDZh4QB8iAUJUYtEbEf/GkzJ6k8SMB8GA1Ud
IwQYMBaAFDZh4QB8iAUJUYtEbEf/GkzJ6k8SMA8GA1UdEwEB/wQFMAMBAf8wDgYD
VR0PAQH/BAQDAgIEMA0GCSqGSIb3DQEBCwUAA4ICAQBOMaBc8oumXb2voc7XCWnu
XKhBBK3e2KMGz39t7lA3XXRe2ZLLAkLM5y3J7tURkf5a1SutfdOyXAmeE6SRo83U
h6WszodmMkxK5GM4JGrnt4pBisu5igXEydaW7qq2CdC6DOGjG+mEkN8/TA6p3cno
L/sPyz6evdjLlSeJ8rFBH6xWyIZCbrcpYEJzXaUOEaxxXxgYz5/cTiVKN2M1G2ok
QBUIYSY6bjEL4aUN5cfo7ogP3UvliEo3Eo0YgwuzR2v0KR6C1cZqZJSTnghIC/vA
D32KdNQ+c3N+vl2OTsUVMC1GiWkngNx1OO1+kXW+YTnnTUOtOIswUP/Vqd5SYgAI
mMAfY8U9/iIgkQj6T2W6FsScy94IN9fFhE1UtzmLoBIuUFsVXJMTz+Jucth+IqoW
Fua9v1R93/k98p41pjtFX+H8DslVgfP097vju4KDlqN64xV1grw3ZLl4CiOe/A91
oeLm2UHOq6wn3esB4r2EIQKb6jTVGu5sYCcdWpXr0AUVqcABPdgL+H7qJguBw09o
jm6xNIrw2OocrDKsudk/okr/AwqEyPKw9WnMlQgLIKw1rODG2NvU9oR3GVGdMkUB
ZutL8VuFkERQGt6vQ2OCw0sV47VMkuYbacK/xyZFiRcrPJPb41zgbQj9XAEyLKCH
ex0SdDrx+tWUDqG8At2JHA==
-----END CERTIFICATE-----
`;
/**
* Google Hardware Attestation Root 3
*
* Downloaded from https://developer.android.com/training/articles/security-key-attestation#root_certificate
* (third entry)
*
* Valid until 2036-11-13 @ 15:10 PST
*
* SHA256 Fingerprint
* AB:66:41:17:8A:36:E1:79:AA:0C:1C:DD:DF:9A:16:EB:45:FA:20:94:3E:2B:8C:D7:C7:C0:5C:26:CF:8B:48:7A
*/
exports.Google_Hardware_Attestation_Root_3 = `
-----BEGIN CERTIFICATE-----
MIIFHDCCAwSgAwIBAgIJAMNrfES5rhgxMA0GCSqGSIb3DQEBCwUAMBsxGTAXBgNV
BAUTEGY5MjAwOWU4NTNiNmIwNDUwHhcNMjExMTE3MjMxMDQyWhcNMzYxMTEzMjMx
MDQyWjAbMRkwFwYDVQQFExBmOTIwMDllODUzYjZiMDQ1MIICIjANBgkqhkiG9w0B
AQEFAAOCAg8AMIICCgKCAgEAr7bHgiuxpwHsK7Qui8xUFmOr75gvMsd/dTEDDJdS
Sxtf6An7xyqpRR90PL2abxM1dEqlXnf2tqw1Ne4Xwl5jlRfdnJLmN0pTy/4lj4/7
tv0Sk3iiKkypnEUtR6WfMgH0QZfKHM1+di+y9TFRtv6y//0rb+T+W8a9nsNL/ggj
nar86461qO0rOs2cXjp3kOG1FEJ5MVmFmBGtnrKpa73XpXyTqRxB/M0n1n/W9nGq
C4FSYa04T6N5RIZGBN2z2MT5IKGbFlbC8UrW0DxW7AYImQQcHtGl/m00QLVWutHQ
oVJYnFPlXTcHYvASLu+RhhsbDmxMgJJ0mcDpvsC4PjvB+TxywElgS70vE0XmLD+O
JtvsBslHZvPBKCOdT0MS+tgSOIfga+z1Z1g7+DVagf7quvmag8jfPioyKvxnK/Eg
sTUVi2ghzq8wm27ud/mIM7AY2qEORR8Go3TVB4HzWQgpZrt3i5MIlCaY504LzSRi
igHCzAPlHws+W0rB5N+er5/2pJKnfBSDiCiFAVtCLOZ7gLiMm0jhO2B6tUXHI/+M
RPjy02i59lINMRRev56GKtcd9qO/0kUJWdZTdA2XoS82ixPvZtXQpUpuL12ab+9E
aDK8Z4RHJYYfCT3Q5vNAXaiWQ+8PTWm2QgBR/bkwSWc+NpUFgNPN9PvQi8WEg5Um
AGMCAwEAAaNjMGEwHQYDVR0OBBYEFDZh4QB8iAUJUYtEbEf/GkzJ6k8SMB8GA1Ud
IwQYMBaAFDZh4QB8iAUJUYtEbEf/GkzJ6k8SMA8GA1UdEwEB/wQFMAMBAf8wDgYD
VR0PAQH/BAQDAgIEMA0GCSqGSIb3DQEBCwUAA4ICAQBTNNZe5cuf8oiq+jV0itTG
zWVhSTjOBEk2FQvh11J3o3lna0o7rd8RFHnN00q4hi6TapFhh4qaw/iG6Xg+xOan
63niLWIC5GOPFgPeYXM9+nBb3zZzC8ABypYuCusWCmt6Tn3+Pjbz3MTVhRGXuT/T
QH4KGFY4PhvzAyXwdjTOCXID+aHud4RLcSySr0Fq/L+R8TWalvM1wJJPhyRjqRCJ
erGtfBagiALzvhnmY7U1qFcS0NCnKjoO7oFedKdWlZz0YAfu3aGCJd4KHT0MsGiL
Zez9WP81xYSrKMNEsDK+zK5fVzw6jA7cxmpXcARTnmAuGUeI7VVDhDzKeVOctf3a
0qQLwC+d0+xrETZ4r2fRGNw2YEs2W8Qj6oDcfPvq9JySe7pJ6wcHnl5EZ0lwc4xH
7Y4Dx9RA1JlfooLMw3tOdJZH0enxPXaydfAD3YifeZpFaUzicHeLzVJLt9dvGB0b
HQLE4+EqKFgOZv2EoP686DQqbVS1u+9k0p2xbMA105TBIk7npraa8VM0fnrRKi7w
lZKwdH+aNAyhbXRW9xsnODJ+g8eF452zvbiKKngEKirK5LGieoXBX7tZ9D1GNBH2
Ob3bKOwwIWdEFle/YF/h6zWgdeoaNGDqVBrLr2+0DtWoiB1aDEjLWl9FmyIUyUm7
mD/vFDkzF+wm7cyWpQpCVQ==
-----END CERTIFICATE-----
`;
/**
* Google Hardware Attestation Root 4
*
* Downloaded from https://developer.android.com/training/articles/security-key-attestation#root_certificate
* (fourth entry)
*
* Valid until 2042-03-15 @ 11:07 PDT
*
* SHA256 Fingerprint
* CE:DB:1C:B6:DC:89:6A:E5:EC:79:73:48:BC:E9:28:67:53:C2:B3:8E:E7:1C:E0:FB:E3:4A:9A:12:48:80:0D:FC
*/
exports.Google_Hardware_Attestation_Root_4 = `
-----BEGIN CERTIFICATE-----
MIIFHDCCAwSgAwIBAgIJAPHBcqaZ6vUdMA0GCSqGSIb3DQEBCwUAMBsxGTAXBgNV
BAUTEGY5MjAwOWU4NTNiNmIwNDUwHhcNMjIwMzIwMTgwNzQ4WhcNNDIwMzE1MTgw
NzQ4WjAbMRkwFwYDVQQFExBmOTIwMDllODUzYjZiMDQ1MIICIjANBgkqhkiG9w0B
AQEFAAOCAg8AMIICCgKCAgEAr7bHgiuxpwHsK7Qui8xUFmOr75gvMsd/dTEDDJdS
Sxtf6An7xyqpRR90PL2abxM1dEqlXnf2tqw1Ne4Xwl5jlRfdnJLmN0pTy/4lj4/7
tv0Sk3iiKkypnEUtR6WfMgH0QZfKHM1+di+y9TFRtv6y//0rb+T+W8a9nsNL/ggj
nar86461qO0rOs2cXjp3kOG1FEJ5MVmFmBGtnrKpa73XpXyTqRxB/M0n1n/W9nGq
C4FSYa04T6N5RIZGBN2z2MT5IKGbFlbC8UrW0DxW7AYImQQcHtGl/m00QLVWutHQ
oVJYnFPlXTcHYvASLu+RhhsbDmxMgJJ0mcDpvsC4PjvB+TxywElgS70vE0XmLD+O
JtvsBslHZvPBKCOdT0MS+tgSOIfga+z1Z1g7+DVagf7quvmag8jfPioyKvxnK/Eg
sTUVi2ghzq8wm27ud/mIM7AY2qEORR8Go3TVB4HzWQgpZrt3i5MIlCaY504LzSRi
igHCzAPlHws+W0rB5N+er5/2pJKnfBSDiCiFAVtCLOZ7gLiMm0jhO2B6tUXHI/+M
RPjy02i59lINMRRev56GKtcd9qO/0kUJWdZTdA2XoS82ixPvZtXQpUpuL12ab+9E
aDK8Z4RHJYYfCT3Q5vNAXaiWQ+8PTWm2QgBR/bkwSWc+NpUFgNPN9PvQi8WEg5Um
AGMCAwEAAaNjMGEwHQYDVR0OBBYEFDZh4QB8iAUJUYtEbEf/GkzJ6k8SMB8GA1Ud
IwQYMBaAFDZh4QB8iAUJUYtEbEf/GkzJ6k8SMA8GA1UdEwEB/wQFMAMBAf8wDgYD
VR0PAQH/BAQDAgIEMA0GCSqGSIb3DQEBCwUAA4ICAQB8cMqTllHc8U+qCrOlg3H7
174lmaCsbo/bJ0C17JEgMLb4kvrqsXZs01U3mB/qABg/1t5Pd5AORHARs1hhqGIC
W/nKMav574f9rZN4PC2ZlufGXb7sIdJpGiO9ctRhiLuYuly10JccUZGEHpHSYM2G
tkgYbZba6lsCPYAAP83cyDV+1aOkTf1RCp/lM0PKvmxYN10RYsK631jrleGdcdkx
oSK//mSQbgcWnmAEZrzHoF1/0gso1HZgIn0YLzVhLSA/iXCX4QT2h3J5z3znluKG
1nv8NQdxei2DIIhASWfu804CA96cQKTTlaae2fweqXjdN1/v2nqOhngNyz1361mF
mr4XmaKH/ItTwOe72NI9ZcwS1lVaCvsIkTDCEXdm9rCNPAY10iTunIHFXRh+7KPz
lHGewCq/8TOohBRn0/NNfh7uRslOSZ/xKbN9tMBtw37Z8d2vvnXq/YWdsm1+JLVw
n6yYD/yacNJBlwpddla8eaVMjsF6nBnIgQOf9zKSe06nSTqvgwUHosgOECZJZ1Eu
zbH4yswbt02tKtKEFhx+v+OTge/06V+jGsqTWLsfrOCNLuA8H++z+pUENmpqnnHo
vaI47gC+TNpkgYGkkBT6B/m/U01BuOBBTzhIlMEZq9qkDWuM2cA5kW5V3FJUcfHn
w1IdYIg2Wxg7yHcQZemFQg==
-----END CERTIFICATE-----
`;
@@ -0,0 +1,837 @@
export default `flf2a� 3 3 7 -1 16
Pyramid by Claude Martins 02/95
Includes characters 128-255
figlet release 2.1 -- 12 Aug 1994
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
Explanation of first line:
flf2 - "magic number" for file identification
a - should always be \`a', for now
$ - the "hardblank" -- prints as a blank, but can't be smushed
3 - height of a character
3 - height of a character, not including descenders
7 - max line length (excluding comment lines) + a fudge factor
-1 - default smushmode for this font
16 - number of comment lines
���@
���@
���@@
^ @
/!\\ @
<___>@@
^ @
/"\\ @
<___>@@
^ @
/#\\ @
<___>@@
^ @
/$\\ @
<___>@@
^ @
/%\\ @
<___>@@
^ @
/&\\ @
<___>@@
^ @
/'\\ @
<___>@@
^ @
/(\\ @
<___>@@
^ @
/)\\ @
<___>@@
^ @
/*\\ @
<___>@@
^ @
/+\\ @
<___>@@
^ @
/,\\ @
<___>@@
^ @
/-\\ @
<___>@@
^ @
/.\\ @
<___>@@
^ @
//\\ @
<___>@@
^ @
/0\\ @
<___>@@
^ @
/1\\ @
<___>@@
^ @
/2\\ @
<___>@@
^ @
/3\\ @
<___>@@
^ @
/4\\ @
<___>@@
^ @
/5\\ @
<___>@@
^ @
/6\\ @
<___>@@
^ @
/7\\ @
<___>@@
^ @
/8\\ @
<___>@@
^ @
/9\\ @
<___>@@
^ @
/:\\ @
<___>@@
^ @
/;\\ @
<___>@@
^ @
/<\\ @
<___>@@
^ @
/=\\ @
<___>@@
^ @
/>\\ @
<___>@@
^ @
/?\\ @
<___>@@
^ @
/@\\ @
<___>@@
^ @
/A\\ @
<___>@@
^ @
/B\\ @
<___>@@
^ @
/C\\ @
<___>@@
^ @
/D\\ @
<___>@@
^ @
/E\\ @
<___>@@
^ @
/F\\ @
<___>@@
^ @
/G\\ @
<___>@@
^ @
/H\\ @
<___>@@
^ @
/I\\ @
<___>@@
^ @
/J\\ @
<___>@@
^ @
/K\\ @
<___>@@
^ @
/L\\ @
<___>@@
^ @
/M\\ @
<___>@@
^ @
/N\\ @
<___>@@
^ @
/O\\ @
<___>@@
^ @
/P\\ @
<___>@@
^ @
/Q\\ @
<___>@@
^ @
/R\\ @
<___>@@
^ @
/S\\ @
<___>@@
^ @
/T\\ @
<___>@@
^ @
/U\\ @
<___>@@
^ @
/V\\ @
<___>@@
^ @
/W\\ @
<___>@@
^ @
/X\\ @
<___>@@
^ @
/Y\\ @
<___>@@
^ @
/Z\\ @
<___>@@
^ @
/[\\ @
<___>@@
^ @
/\\\\ @
<___>@@
^ @
/]\\ @
<___>@@
^ @
/^\\ @
<___>@@
^ @
/_\\ @
<___>@@
^ @
/\`\\ @
<___>@@
^ @
/a\\ @
<___>@@
^ @
/b\\ @
<___>@@
^ @
/c\\ @
<___>@@
^ @
/d\\ @
<___>@@
^ @
/e\\ @
<___>@@
^ @
/f\\ @
<___>@@
^ @
/g\\ @
<___>@@
^ @
/h\\ @
<___>@@
^ @
/i\\ @
<___>@@
^ @
/j\\ @
<___>@@
^ @
/k\\ @
<___>@@
^ @
/l\\ @
<___>@@
^ @
/m\\ @
<___>@@
^ @
/n\\ @
<___>@@
^ @
/o\\ @
<___>@@
^ @
/p\\ @
<___>@@
^ @
/q\\ @
<___>@@
^ @
/r\\ @
<___>@@
^ @
/s\\ @
<___>@@
^ @
/t\\ @
<___>@@
^ @
/u\\ @
<___>@@
^ @
/v\\ @
<___>@@
^ @
/w\\ @
<___>@@
^ @
/x\\ @
<___>@@
^ @
/y\\ @
<___>@@
^ @
/z\\ @
<___>@@
^ @
/{\\ @
<___>@@
^ @
/|\\ @
<___>@@
^ @
/}\\ @
<___>@@
^ @
/~\\ @
<___>@@
^ @
/�\\ @
<___>@@
^ @
/�\\ @
<___>@@
^ @
/�\\ @
<___>@@
^ @
/�\\ @
<___>@@
^ @
/�\\ @
<___>@@
^ @
/�\\ @
<___>@@
^ @
/�\\ @
<___>@@
128
^ @
/�\\ @
<___>@@
129
^ @
/�\\ @
<___>@@
130
^ @
/�\\ @
<___>@@
131
^ @
/�\\ @
<___>@@
132
^ @
/�\\ @
<___>@@
133
^ @
/�\\ @
<___>@@
134
^ @
/�\\ @
<___>@@
135
^ @
/�\\ @
<___>@@
136
^ @
/�\\ @
<___>@@
137
^ @
/�\\ @
<___>@@
138
^ @
/�\\ @
<___>@@
139
^ @
/�\\ @
<___>@@
140
^ @
/�\\ @
<___>@@
141
^ @
/�\\ @
<___>@@
142
^ @
/�\\ @
<___>@@
143
^ @
/�\\ @
<___>@@
144
^ @
/�\\ @
<___>@@
145
^ @
/�\\ @
<___>@@
146
^ @
/�\\ @
<___>@@
147
^ @
/�\\ @
<___>@@
148
^ @
/�\\ @
<___>@@
149
^ @
/�\\ @
<___>@@
150
^ @
/�\\ @
<___>@@
151
^ @
/�\\ @
<___>@@
152
^ @
/�\\ @
<___>@@
153
^ @
/�\\ @
<___>@@
154
^ @
/�\\ @
<___>@@
155
^ @
/�\\ @
<___>@@
156
^ @
/�\\ @
<___>@@
157
^ @
/�\\ @
<___>@@
158
^ @
/�\\ @
<___>@@
159
^ @
/�\\ @
<___>@@
160
^ @
/�\\ @
<___>@@
161
^ @
/�\\ @
<___>@@
162
^ @
/�\\ @
<___>@@
163
^ @
/�\\ @
<___>@@
164
^ @
/�\\ @
<___>@@
165
^ @
/�\\ @
<___>@@
166
^ @
/�\\ @
<___>@@
167
^ @
/�\\ @
<___>@@
168
^ @
/�\\ @
<___>@@
169
^ @
/�\\ @
<___>@@
170
^ @
/�\\ @
<___>@@
171
^ @
/�\\ @
<___>@@
172
^ @
/�\\ @
<___>@@
173
^ @
/�\\ @
<___>@@
174
^ @
/�\\ @
<___>@@
175
^ @
/�\\ @
<___>@@
176
^ @
/�\\ @
<___>@@
177
^ @
/�\\ @
<___>@@
178
^ @
/�\\ @
<___>@@
179
^ @
/�\\ @
<___>@@
180
^ @
/�\\ @
<___>@@
181
^ @
/�\\ @
<___>@@
182
^ @
/�\\ @
<___>@@
183
^ @
/�\\ @
<___>@@
184
^ @
/�\\ @
<___>@@
185
^ @
/�\\ @
<___>@@
186
^ @
/�\\ @
<___>@@
187
^ @
/�\\ @
<___>@@
188
^ @
/�\\ @
<___>@@
189
^ @
/�\\ @
<___>@@
190
^ @
/�\\ @
<___>@@
191
^ @
/�\\ @
<___>@@
192
^ @
/�\\ @
<___>@@
193
^ @
/�\\ @
<___>@@
194
^ @
/�\\ @
<___>@@
195
^ @
/�\\ @
<___>@@
196
^ @
/�\\ @
<___>@@
197
^ @
/�\\ @
<___>@@
198
^ @
/�\\ @
<___>@@
199
^ @
/�\\ @
<___>@@
200
^ @
/�\\ @
<___>@@
201
^ @
/�\\ @
<___>@@
202
^ @
/�\\ @
<___>@@
203
^ @
/�\\ @
<___>@@
204
^ @
/�\\ @
<___>@@
205
^ @
/�\\ @
<___>@@
206
^ @
/�\\ @
<___>@@
207
^ @
/�\\ @
<___>@@
208
^ @
/�\\ @
<___>@@
209
^ @
/�\\ @
<___>@@
210
^ @
/�\\ @
<___>@@
211
^ @
/�\\ @
<___>@@
212
^ @
/�\\ @
<___>@@
213
^ @
/�\\ @
<___>@@
214
^ @
/�\\ @
<___>@@
215
^ @
/�\\ @
<___>@@
216
^ @
/�\\ @
<___>@@
217
^ @
/�\\ @
<___>@@
218
^ @
/�\\ @
<___>@@
219
^ @
/�\\ @
<___>@@
220
^ @
/�\\ @
<___>@@
221
^ @
/�\\ @
<___>@@
222
^ @
/�\\ @
<___>@@
223
^ @
/�\\ @
<___>@@
224
^ @
/�\\ @
<___>@@
225
^ @
/�\\ @
<___>@@
226
^ @
/�\\ @
<___>@@
227
^ @
/�\\ @
<___>@@
228
^ @
/�\\ @
<___>@@
229
^ @
/�\\ @
<___>@@
230
^ @
/�\\ @
<___>@@
231
^ @
/�\\ @
<___>@@
232
^ @
/�\\ @
<___>@@
233
^ @
/�\\ @
<___>@@
234
^ @
/�\\ @
<___>@@
235
^ @
/�\\ @
<___>@@
236
^ @
/�\\ @
<___>@@
237
^ @
/�\\ @
<___>@@
238
^ @
/�\\ @
<___>@@
239
^ @
/�\\ @
<___>@@
240
^ @
/\\ @
<___>@@
241
^ @
/�\\ @
<___>@@
242
^ @
/�\\ @
<___>@@
243
^ @
/\\ @
<___>@@
244
^ @
/�\\ @
<___>@@
245
^ @
/\\ @
<___>@@
246
^ @
/�\\ @
<___>@@
247
^ @
/�\\ @
<___>@@
248
^ @
/�\\ @
<___>@@
249
^ @
/�\\ @
<___>@@
250
^ @
/�\\ @
<___>@@
251
^ @
/�\\ @
<___>@@
252
^ @
/�\\ @
<___>@@
253
^ @
/�\\ @
<___>@@
254
^ @
/�\\ @
<___>@@
255
^ @
/�\\ @
<___>@@
`
@@ -0,0 +1 @@
{"name":"unist-util-visit","version":"5.0.0","requiresBuild":false,"files":{"license":{"checkedAt":1794532113892,"integrity":"sha512-00mBaAegOXNJDyksTMrytYh98gH+v/fruetGXfLv5IVYnw8WD5PgOTOdM0A7q244DNs0Ynq8gFk4JA6SWxIdbA==","mode":420,"size":1099},"index.js":{"checkedAt":1794532113892,"integrity":"sha512-5bZnWySQUdhjJdm7IF1THZ4KellTWupNWI2rURpyGORKijz6QxIwicajbSR0QVcVvfJ2kfRQiSfa2dAJ9kIglg==","mode":420,"size":101},"lib/index.js":{"checkedAt":1794532113893,"integrity":"sha512-C93ZzbLGCyARsPc1QMFpV3fOJ0UtqOK7Pc8oa/jtpU8FiGCZB8+8oDd93CbkKKYmbNf1Ru8Bm1IrmOUlg1W1IA==","mode":420,"size":9624},"package.json":{"checkedAt":1794532113893,"integrity":"sha512-nLp+XCVa5iJNrHA3nWI27oMw2yePVYZTMZ8q+MjtfHQWd74efgjsQE0fxS/CUC1kPw6dekARrvXs2e0N/2MoJA==","mode":420,"size":2620},"readme.md":{"checkedAt":1794532113893,"integrity":"sha512-2WfsUqqQBj0CWSdA0C0nEnEiwuQ1TgggJGvd49BsEq3JxI5jYlxGWrBSVqPGUQi8wcqubJlZOmfbAwpQxpYhqA==","mode":420,"size":8904},"index.d.ts":{"checkedAt":1794532113893,"integrity":"sha512-Tn4S5xcOwI3wj4fO79OE9DJLbO1WW4LgQQsPfxoTcL4UPm5RgFz+ma/gmlI7wWQoW6FLYE7DNOOP/1/e/VuTKA==","mode":420,"size":255},"lib/index.d.ts":{"checkedAt":1794532113893,"integrity":"sha512-AMMLw4VAJXuVvwjiLp2+L6QW67Mweoo5zLV+VxIwRL5fr3Qsv3LRmJJCLt4/2KhLGTYTqdAD7eFXYjoPHJVhDA==","mode":420,"size":5877}}}
@@ -0,0 +1,55 @@
'use strict';
import utils from './../utils.js';
// RawAxiosHeaders whose duplicates are ignored by node
// c.f. https://nodejs.org/api/http.html#http_message_headers
const ignoreDuplicateOf = utils.toObjectSet([
'age', 'authorization', 'content-length', 'content-type', 'etag',
'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
'last-modified', 'location', 'max-forwards', 'proxy-authorization',
'referer', 'retry-after', 'user-agent'
]);
/**
* Parse headers into an object
*
* ```
* Date: Wed, 27 Aug 2014 08:58:49 GMT
* Content-Type: application/json
* Connection: keep-alive
* Transfer-Encoding: chunked
* ```
*
* @param {String} rawHeaders Headers needing to be parsed
*
* @returns {Object} Headers parsed into an object
*/
export default rawHeaders => {
const parsed = {};
let key;
let val;
let i;
rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
i = line.indexOf(':');
key = line.substring(0, i).trim().toLowerCase();
val = line.substring(i + 1).trim();
if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
return;
}
if (key === 'set-cookie') {
if (parsed[key]) {
parsed[key].push(val);
} else {
parsed[key] = [val];
}
} else {
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
}
});
return parsed;
};
@@ -0,0 +1,31 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
var _base = require('./traverser/base');
var _index = require('./traverser/index');
class File {
constructor(tokens, scopes) {
this.tokens = tokens;
this.scopes = scopes;
}
} exports.File = File;
function parse(
input,
isJSXEnabled,
isTypeScriptEnabled,
isFlowEnabled,
) {
if (isFlowEnabled && isTypeScriptEnabled) {
throw new Error("Cannot combine flow and typescript plugins.");
}
_base.initParser.call(void 0, input, isJSXEnabled, isTypeScriptEnabled, isFlowEnabled);
const result = _index.parseFile.call(void 0, );
if (_base.state.error) {
throw _base.augmentError.call(void 0, _base.state.error);
}
return result;
} exports.parse = parse;
@@ -0,0 +1,340 @@
'use strict';
// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
// claim that you wrote the original software. If you use this software
// in a product, an acknowledgment in the product documentation would be
// appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
// misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.
const MAXBITS = 15;
const ENOUGH_LENS = 852;
const ENOUGH_DISTS = 592;
//const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);
const CODES = 0;
const LENS = 1;
const DISTS = 2;
const lbase = new Uint16Array([ /* Length codes 257..285 base */
3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0
]);
const lext = new Uint8Array([ /* Length codes 257..285 extra */
16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78
]);
const dbase = new Uint16Array([ /* Distance codes 0..29 base */
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
8193, 12289, 16385, 24577, 0, 0
]);
const dext = new Uint8Array([ /* Distance codes 0..29 extra */
16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,
23, 23, 24, 24, 25, 25, 26, 26, 27, 27,
28, 28, 29, 29, 64, 64
]);
const inflate_table = (type, lens, lens_index, codes, table, table_index, work, opts) =>
{
const bits = opts.bits;
//here = opts.here; /* table entry for duplication */
let len = 0; /* a code's length in bits */
let sym = 0; /* index of code symbols */
let min = 0, max = 0; /* minimum and maximum code lengths */
let root = 0; /* number of index bits for root table */
let curr = 0; /* number of index bits for current table */
let drop = 0; /* code bits to drop for sub-table */
let left = 0; /* number of prefix codes available */
let used = 0; /* code entries in table used */
let huff = 0; /* Huffman code */
let incr; /* for incrementing code, index */
let fill; /* index for replicating entries */
let low; /* low bits for current root entry */
let mask; /* mask for low root bits */
let next; /* next available space in table */
let base = null; /* base value table to use */
// let shoextra; /* extra bits table to use */
let match; /* use base and extra for symbol >= match */
const count = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */
const offs = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */
let extra = null;
let here_bits, here_op, here_val;
/*
Process a set of code lengths to create a canonical Huffman code. The
code lengths are lens[0..codes-1]. Each length corresponds to the
symbols 0..codes-1. The Huffman code is generated by first sorting the
symbols by length from short to long, and retaining the symbol order
for codes with equal lengths. Then the code starts with all zero bits
for the first code of the shortest length, and the codes are integer
increments for the same length, and zeros are appended as the length
increases. For the deflate format, these bits are stored backwards
from their more natural integer increment ordering, and so when the
decoding tables are built in the large loop below, the integer codes
are incremented backwards.
This routine assumes, but does not check, that all of the entries in
lens[] are in the range 0..MAXBITS. The caller must assure this.
1..MAXBITS is interpreted as that code length. zero means that that
symbol does not occur in this code.
The codes are sorted by computing a count of codes for each length,
creating from that a table of starting indices for each length in the
sorted table, and then entering the symbols in order in the sorted
table. The sorted table is work[], with that space being provided by
the caller.
The length counts are used for other purposes as well, i.e. finding
the minimum and maximum length codes, determining if there are any
codes at all, checking for a valid set of lengths, and looking ahead
at length counts to determine sub-table sizes when building the
decoding tables.
*/
/* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
for (len = 0; len <= MAXBITS; len++) {
count[len] = 0;
}
for (sym = 0; sym < codes; sym++) {
count[lens[lens_index + sym]]++;
}
/* bound code lengths, force root to be within code lengths */
root = bits;
for (max = MAXBITS; max >= 1; max--) {
if (count[max] !== 0) { break; }
}
if (root > max) {
root = max;
}
if (max === 0) { /* no symbols to code at all */
//table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */
//table.bits[opts.table_index] = 1; //here.bits = (var char)1;
//table.val[opts.table_index++] = 0; //here.val = (var short)0;
table[table_index++] = (1 << 24) | (64 << 16) | 0;
//table.op[opts.table_index] = 64;
//table.bits[opts.table_index] = 1;
//table.val[opts.table_index++] = 0;
table[table_index++] = (1 << 24) | (64 << 16) | 0;
opts.bits = 1;
return 0; /* no symbols, but wait for decoding to report error */
}
for (min = 1; min < max; min++) {
if (count[min] !== 0) { break; }
}
if (root < min) {
root = min;
}
/* check for an over-subscribed or incomplete set of lengths */
left = 1;
for (len = 1; len <= MAXBITS; len++) {
left <<= 1;
left -= count[len];
if (left < 0) {
return -1;
} /* over-subscribed */
}
if (left > 0 && (type === CODES || max !== 1)) {
return -1; /* incomplete set */
}
/* generate offsets into symbol table for each length for sorting */
offs[1] = 0;
for (len = 1; len < MAXBITS; len++) {
offs[len + 1] = offs[len] + count[len];
}
/* sort symbols by length, by symbol order within each length */
for (sym = 0; sym < codes; sym++) {
if (lens[lens_index + sym] !== 0) {
work[offs[lens[lens_index + sym]]++] = sym;
}
}
/*
Create and fill in decoding tables. In this loop, the table being
filled is at next and has curr index bits. The code being used is huff
with length len. That code is converted to an index by dropping drop
bits off of the bottom. For codes where len is less than drop + curr,
those top drop + curr - len bits are incremented through all values to
fill the table with replicated entries.
root is the number of index bits for the root table. When len exceeds
root, sub-tables are created pointed to by the root entry with an index
of the low root bits of huff. This is saved in low to check for when a
new sub-table should be started. drop is zero when the root table is
being filled, and drop is root when sub-tables are being filled.
When a new sub-table is needed, it is necessary to look ahead in the
code lengths to determine what size sub-table is needed. The length
counts are used for this, and so count[] is decremented as codes are
entered in the tables.
used keeps track of how many table entries have been allocated from the
provided *table space. It is checked for LENS and DIST tables against
the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in
the initial root table size constants. See the comments in inftrees.h
for more information.
sym increments through all symbols, and the loop terminates when
all codes of length max, i.e. all codes, have been processed. This
routine permits incomplete codes, so another loop after this one fills
in the rest of the decoding tables with invalid code markers.
*/
/* set up for code type */
// poor man optimization - use if-else instead of switch,
// to avoid deopts in old v8
if (type === CODES) {
base = extra = work; /* dummy value--not used */
match = 20;
} else if (type === LENS) {
base = lbase;
extra = lext;
match = 257;
} else { /* DISTS */
base = dbase;
extra = dext;
match = 0;
}
/* initialize opts for loop */
huff = 0; /* starting code */
sym = 0; /* starting code symbol */
len = min; /* starting code length */
next = table_index; /* current table to fill in */
curr = root; /* current table index bits */
drop = 0; /* current bits to drop from code for index */
low = -1; /* trigger new sub-table when len > root */
used = 1 << root; /* use root table entries */
mask = used - 1; /* mask for comparing low */
/* check available table space */
if ((type === LENS && used > ENOUGH_LENS) ||
(type === DISTS && used > ENOUGH_DISTS)) {
return 1;
}
/* process all codes and make table entries */
for (;;) {
/* create table entry */
here_bits = len - drop;
if (work[sym] + 1 < match) {
here_op = 0;
here_val = work[sym];
}
else if (work[sym] >= match) {
here_op = extra[work[sym] - match];
here_val = base[work[sym] - match];
}
else {
here_op = 32 + 64; /* end of block */
here_val = 0;
}
/* replicate for those indices with low len bits equal to huff */
incr = 1 << (len - drop);
fill = 1 << curr;
min = fill; /* save offset to next table */
do {
fill -= incr;
table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;
} while (fill !== 0);
/* backwards increment the len-bit code huff */
incr = 1 << (len - 1);
while (huff & incr) {
incr >>= 1;
}
if (incr !== 0) {
huff &= incr - 1;
huff += incr;
} else {
huff = 0;
}
/* go to next symbol, update count, len */
sym++;
if (--count[len] === 0) {
if (len === max) { break; }
len = lens[lens_index + work[sym]];
}
/* create new sub-table if needed */
if (len > root && (huff & mask) !== low) {
/* if first time, transition to sub-tables */
if (drop === 0) {
drop = root;
}
/* increment past last table */
next += min; /* here min is 1 << curr */
/* determine length of next table */
curr = len - drop;
left = 1 << curr;
while (curr + drop < max) {
left -= count[curr + drop];
if (left <= 0) { break; }
curr++;
left <<= 1;
}
/* check for enough space */
used += 1 << curr;
if ((type === LENS && used > ENOUGH_LENS) ||
(type === DISTS && used > ENOUGH_DISTS)) {
return 1;
}
/* point entry in root table to sub-table */
low = huff & mask;
/*table.op[low] = curr;
table.bits[low] = root;
table.val[low] = next - opts.table_index;*/
table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;
}
}
/* fill in remaining table entry if code is incomplete (guaranteed to have
at most one remaining entry, since if the code is incomplete, the
maximum code length that was allowed to get this far is one bit) */
if (huff !== 0) {
//table.op[next + huff] = 64; /* invalid code marker */
//table.bits[next + huff] = len - drop;
//table.val[next + huff] = 0;
table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;
}
/* set return parameters */
//opts.table_index += used;
opts.bits = root;
return 0;
};
module.exports = inflate_table;
@@ -0,0 +1,3 @@
const singleColorRegex = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;
export { singleColorRegex };
@@ -0,0 +1,44 @@
// Swedish [sv]
import dayjs from '../index';
var locale = {
name: 'sv',
weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),
months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'),
monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
weekStart: 1,
yearStart: 4,
ordinal: function ordinal(n) {
var b = n % 10;
var o = b === 1 || b === 2 ? 'a' : 'e';
return "[" + n + o + "]";
},
formats: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'YYYY-MM-DD',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY [kl.] HH:mm',
LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',
lll: 'D MMM YYYY HH:mm',
llll: 'ddd D MMM YYYY HH:mm'
},
relativeTime: {
future: 'om %s',
past: 'för %s sedan',
s: 'några sekunder',
m: 'en minut',
mm: '%d minuter',
h: 'en timme',
hh: '%d timmar',
d: 'en dag',
dd: '%d dagar',
M: 'en månad',
MM: '%d månader',
y: 'ett år',
yy: '%d år'
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1,6 @@
export { default as ClassProvider, isClassProvider } from "./class-provider";
export { default as FactoryProvider, isFactoryProvider } from "./factory-provider";
export { default as InjectionToken, isNormalToken } from "./injection-token";
export { default as Provider } from "./provider";
export { default as TokenProvider, isTokenProvider } from "./token-provider";
export { default as ValueProvider, isValueProvider } from "./value-provider";
@@ -0,0 +1,50 @@
import {getRowLabelledBy as $2140fb2337097f2d$export$85069b70317f543} from "./utils.mjs";
import $iIuaM$intlStringsmodulejs from "./intlStrings.mjs";
import {useGridSelectionCheckbox as $iIuaM$useGridSelectionCheckbox} from "@react-aria/grid";
import {useLocalizedStringFormatter as $iIuaM$useLocalizedStringFormatter} from "@react-aria/i18n";
function $parcel$interopDefault(a) {
return a && a.__esModule ? a.default : a;
}
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $2a795c53a101c542$export$16ea7f650bd7c1bb(props, state) {
let { key: key } = props;
const { checkboxProps: checkboxProps } = (0, $iIuaM$useGridSelectionCheckbox)(props, state);
return {
checkboxProps: {
...checkboxProps,
'aria-labelledby': `${checkboxProps.id} ${(0, $2140fb2337097f2d$export$85069b70317f543)(state, key)}`
}
};
}
function $2a795c53a101c542$export$1003db6a7e384b99(state) {
let { isEmpty: isEmpty, isSelectAll: isSelectAll, selectionMode: selectionMode } = state.selectionManager;
const stringFormatter = (0, $iIuaM$useLocalizedStringFormatter)((0, ($parcel$interopDefault($iIuaM$intlStringsmodulejs))), '@react-aria/table');
return {
checkboxProps: {
'aria-label': stringFormatter.format(selectionMode === 'single' ? 'select' : 'selectAll'),
isSelected: isSelectAll,
isDisabled: selectionMode !== 'multiple' || state.collection.size === 0 || state.collection.rows.length === 1 && state.collection.rows[0].type === 'loader',
isIndeterminate: !isEmpty && !isSelectAll,
onChange: ()=>state.selectionManager.toggleSelectAll()
}
};
}
export {$2a795c53a101c542$export$16ea7f650bd7c1bb as useTableSelectionCheckbox, $2a795c53a101c542$export$1003db6a7e384b99 as useTableSelectAllCheckbox};
//# sourceMappingURL=useTableSelectionCheckbox.module.js.map
@@ -0,0 +1 @@
{"name":"emoji-regex","version":"8.0.0","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532105409,"integrity":"sha512-WjHjPvie6MNirTWgl8U5AkVw4sI4b1BrxsiLoJWRErJEUP12nI6pFARmfBgTI/BH9Y1LuA83qr9r7S5XEp4zPQ==","mode":420,"size":1278},"index.d.ts":{"checkedAt":1794532105409,"integrity":"sha512-R11+P8ltxYGtLSlyoCu1oJ0EFSmP0c8ZWBeKKMua3VemaBwTbJC0Nz2pUWxrheAIW6p0Q9fYJyObKUzpPSiHVA==","mode":420,"size":427},"index.js":{"checkedAt":1794532105409,"integrity":"sha512-dZJMJJaOKYsUlhcKZmJLl6dqd/tM5ZaOfAl60idAElZ1LZ0oyKH4TTE85LBvncmyDj912BOYyJUbRTdcywE+Pg==","mode":420,"size":10286},"LICENSE-MIT.txt":{"checkedAt":1794532093083,"integrity":"sha512-fWtEu2WGJSgbSBlOWj06B0Ur6h8lZQbdFveiGUHvPw0lnhvNDMYgJkK/H9EpvBh+ajkh04LVaNMSvYPzAjl5oA==","mode":420,"size":1077},"README.md":{"checkedAt":1794532105410,"integrity":"sha512-fEz6adJXSFE9VbIpQG6J6BaokyLEnKmxD390kiypc4dxY+eEzurF64uDe7qocvcTZCCNbN2VKx3lD7sWiRx8pg==","mode":420,"size":2691},"text.js":{"checkedAt":1794532105410,"integrity":"sha512-nIOo/xcMBCDYfZ6MojOq94XyN0Tz/BdKkjJQApzi3ex2tygrdLKwuHrdS7UJ0c/3/87Fbgy9L6EzbHUyR6/j1g==","mode":420,"size":10287},"es2015/index.js":{"checkedAt":1794532105410,"integrity":"sha512-tw5o3vbosVzcnvi/oTJmEcS/g62KxGFRHGrx7irNqhgq6TNuH3+MFxyZMdNtXZNHVC02RgXXFMgakAMq/t9S5Q==","mode":420,"size":11104},"es2015/text.js":{"checkedAt":1794532105410,"integrity":"sha512-Dyfo2a1izW1d+j1IyRdg/4pX9ISFGXe8RviR9c32VsffGvrdceh2bBGYT5FEnOy5vNZaq+EoJFBnpzkqxqsS5g==","mode":420,"size":11105}}}
@@ -0,0 +1 @@
{"version":3,"file":"pendingClassMetadataCountReflectKey.d.ts","sourceRoot":"","sources":["../../../../src/reflectMetadata/data/pendingClassMetadataCountReflectKey.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mCAAmC,EAAE,MACO,CAAC"}
@@ -0,0 +1,911 @@
[
"AbortController",
"AbortSignal",
"AbsoluteOrientationSensor",
"AbstractRange",
"Accelerometer",
"AI",
"AICreateMonitor",
"AITextSession",
"AnalyserNode",
"Animation",
"AnimationEffect",
"AnimationEvent",
"AnimationPlaybackEvent",
"AnimationTimeline",
"AsyncDisposableStack",
"Attr",
"Audio",
"AudioBuffer",
"AudioBufferSourceNode",
"AudioContext",
"AudioData",
"AudioDecoder",
"AudioDestinationNode",
"AudioEncoder",
"AudioListener",
"AudioNode",
"AudioParam",
"AudioParamMap",
"AudioProcessingEvent",
"AudioScheduledSourceNode",
"AudioSinkInfo",
"AudioWorklet",
"AudioWorkletGlobalScope",
"AudioWorkletNode",
"AudioWorkletProcessor",
"AuthenticatorAssertionResponse",
"AuthenticatorAttestationResponse",
"AuthenticatorResponse",
"BackgroundFetchManager",
"BackgroundFetchRecord",
"BackgroundFetchRegistration",
"BarcodeDetector",
"BarProp",
"BaseAudioContext",
"BatteryManager",
"BeforeUnloadEvent",
"BiquadFilterNode",
"Blob",
"BlobEvent",
"Bluetooth",
"BluetoothCharacteristicProperties",
"BluetoothDevice",
"BluetoothRemoteGATTCharacteristic",
"BluetoothRemoteGATTDescriptor",
"BluetoothRemoteGATTServer",
"BluetoothRemoteGATTService",
"BluetoothUUID",
"BroadcastChannel",
"BrowserCaptureMediaStreamTrack",
"ByteLengthQueuingStrategy",
"Cache",
"CacheStorage",
"CanvasCaptureMediaStream",
"CanvasCaptureMediaStreamTrack",
"CanvasGradient",
"CanvasPattern",
"CanvasRenderingContext2D",
"CaptureController",
"CaretPosition",
"CDATASection",
"ChannelMergerNode",
"ChannelSplitterNode",
"ChapterInformation",
"CharacterBoundsUpdateEvent",
"CharacterData",
"Clipboard",
"ClipboardEvent",
"ClipboardItem",
"CloseEvent",
"CloseWatcher",
"CommandEvent",
"Comment",
"CompositionEvent",
"CompressionStream",
"ConstantSourceNode",
"ContentVisibilityAutoStateChangeEvent",
"ConvolverNode",
"CookieChangeEvent",
"CookieDeprecationLabel",
"CookieStore",
"CookieStoreManager",
"CountQueuingStrategy",
"Credential",
"CredentialsContainer",
"CropTarget",
"Crypto",
"CryptoKey",
"CSPViolationReportBody",
"CSS",
"CSSAnimation",
"CSSConditionRule",
"CSSContainerRule",
"CSSCounterStyleRule",
"CSSFontFaceRule",
"CSSFontFeatureValuesRule",
"CSSFontPaletteValuesRule",
"CSSGroupingRule",
"CSSImageValue",
"CSSImportRule",
"CSSKeyframeRule",
"CSSKeyframesRule",
"CSSKeywordValue",
"CSSLayerBlockRule",
"CSSLayerStatementRule",
"CSSMarginRule",
"CSSMathClamp",
"CSSMathInvert",
"CSSMathMax",
"CSSMathMin",
"CSSMathNegate",
"CSSMathProduct",
"CSSMathSum",
"CSSMathValue",
"CSSMatrixComponent",
"CSSMediaRule",
"CSSNamespaceRule",
"CSSNestedDeclarations",
"CSSNumericArray",
"CSSNumericValue",
"CSSPageDescriptors",
"CSSPageRule",
"CSSPerspective",
"CSSPositionTryDescriptors",
"CSSPositionTryRule",
"CSSPositionValue",
"CSSPropertyRule",
"CSSRotate",
"CSSRule",
"CSSRuleList",
"CSSScale",
"CSSScopeRule",
"CSSSkew",
"CSSSkewX",
"CSSSkewY",
"CSSStartingStyleRule",
"CSSStyleDeclaration",
"CSSStyleRule",
"CSSStyleSheet",
"CSSStyleValue",
"CSSSupportsRule",
"CSSTransformComponent",
"CSSTransformValue",
"CSSTransition",
"CSSTranslate",
"CSSUnitValue",
"CSSUnparsedValue",
"CSSVariableReferenceValue",
"CSSViewTransitionRule",
"CustomElementRegistry",
"CustomEvent",
"CustomStateSet",
"DataTransfer",
"DataTransferItem",
"DataTransferItemList",
"DecompressionStream",
"DelayNode",
"DelegatedInkTrailPresenter",
"DeviceMotionEvent",
"DeviceMotionEventAcceleration",
"DeviceMotionEventRotationRate",
"DeviceOrientationEvent",
"DevicePosture",
"DisposableStack",
"Document",
"DocumentFragment",
"DocumentPictureInPicture",
"DocumentPictureInPictureEvent",
"DocumentTimeline",
"DocumentType",
"DOMError",
"DOMException",
"DOMImplementation",
"DOMMatrix",
"DOMMatrixReadOnly",
"DOMParser",
"DOMPoint",
"DOMPointReadOnly",
"DOMQuad",
"DOMRect",
"DOMRectList",
"DOMRectReadOnly",
"DOMStringList",
"DOMStringMap",
"DOMTokenList",
"DragEvent",
"DynamicsCompressorNode",
"EditContext",
"Element",
"ElementInternals",
"EncodedAudioChunk",
"EncodedVideoChunk",
"ErrorEvent",
"Event",
"EventCounts",
"EventSource",
"EventTarget",
"External",
"EyeDropper",
"FeaturePolicy",
"FederatedCredential",
"Fence",
"FencedFrameConfig",
"FetchLaterResult",
"File",
"FileList",
"FileReader",
"FileSystem",
"FileSystemDirectoryEntry",
"FileSystemDirectoryHandle",
"FileSystemDirectoryReader",
"FileSystemEntry",
"FileSystemFileEntry",
"FileSystemFileHandle",
"FileSystemHandle",
"FileSystemObserver",
"FileSystemWritableFileStream",
"FocusEvent",
"FontData",
"FontFace",
"FontFaceSet",
"FontFaceSetLoadEvent",
"FormData",
"FormDataEvent",
"FragmentDirective",
"GainNode",
"Gamepad",
"GamepadAxisMoveEvent",
"GamepadButton",
"GamepadButtonEvent",
"GamepadEvent",
"GamepadHapticActuator",
"GamepadPose",
"Geolocation",
"GeolocationCoordinates",
"GeolocationPosition",
"GeolocationPositionError",
"GPU",
"GPUAdapter",
"GPUAdapterInfo",
"GPUBindGroup",
"GPUBindGroupLayout",
"GPUBuffer",
"GPUBufferUsage",
"GPUCanvasContext",
"GPUColorWrite",
"GPUCommandBuffer",
"GPUCommandEncoder",
"GPUCompilationInfo",
"GPUCompilationMessage",
"GPUComputePassEncoder",
"GPUComputePipeline",
"GPUDevice",
"GPUDeviceLostInfo",
"GPUError",
"GPUExternalTexture",
"GPUInternalError",
"GPUMapMode",
"GPUOutOfMemoryError",
"GPUPipelineError",
"GPUPipelineLayout",
"GPUQuerySet",
"GPUQueue",
"GPURenderBundle",
"GPURenderBundleEncoder",
"GPURenderPassEncoder",
"GPURenderPipeline",
"GPUSampler",
"GPUShaderModule",
"GPUShaderStage",
"GPUSupportedFeatures",
"GPUSupportedLimits",
"GPUTexture",
"GPUTextureUsage",
"GPUTextureView",
"GPUUncapturedErrorEvent",
"GPUValidationError",
"GravitySensor",
"Gyroscope",
"HashChangeEvent",
"Headers",
"HID",
"HIDConnectionEvent",
"HIDDevice",
"HIDInputReportEvent",
"Highlight",
"HighlightRegistry",
"History",
"HTMLAllCollection",
"HTMLAnchorElement",
"HTMLAreaElement",
"HTMLAudioElement",
"HTMLBaseElement",
"HTMLBodyElement",
"HTMLBRElement",
"HTMLButtonElement",
"HTMLCanvasElement",
"HTMLCollection",
"HTMLDataElement",
"HTMLDataListElement",
"HTMLDetailsElement",
"HTMLDialogElement",
"HTMLDirectoryElement",
"HTMLDivElement",
"HTMLDListElement",
"HTMLDocument",
"HTMLElement",
"HTMLEmbedElement",
"HTMLFencedFrameElement",
"HTMLFieldSetElement",
"HTMLFontElement",
"HTMLFormControlsCollection",
"HTMLFormElement",
"HTMLFrameElement",
"HTMLFrameSetElement",
"HTMLHeadElement",
"HTMLHeadingElement",
"HTMLHRElement",
"HTMLHtmlElement",
"HTMLIFrameElement",
"HTMLImageElement",
"HTMLInputElement",
"HTMLLabelElement",
"HTMLLegendElement",
"HTMLLIElement",
"HTMLLinkElement",
"HTMLMapElement",
"HTMLMarqueeElement",
"HTMLMediaElement",
"HTMLMenuElement",
"HTMLMetaElement",
"HTMLMeterElement",
"HTMLModElement",
"HTMLObjectElement",
"HTMLOListElement",
"HTMLOptGroupElement",
"HTMLOptionElement",
"HTMLOptionsCollection",
"HTMLOutputElement",
"HTMLParagraphElement",
"HTMLParamElement",
"HTMLPictureElement",
"HTMLPreElement",
"HTMLProgressElement",
"HTMLQuoteElement",
"HTMLScriptElement",
"HTMLSelectedContentElement",
"HTMLSelectElement",
"HTMLSlotElement",
"HTMLSourceElement",
"HTMLSpanElement",
"HTMLStyleElement",
"HTMLTableCaptionElement",
"HTMLTableCellElement",
"HTMLTableColElement",
"HTMLTableElement",
"HTMLTableRowElement",
"HTMLTableSectionElement",
"HTMLTemplateElement",
"HTMLTextAreaElement",
"HTMLTimeElement",
"HTMLTitleElement",
"HTMLTrackElement",
"HTMLUListElement",
"HTMLUnknownElement",
"HTMLVideoElement",
"IDBCursor",
"IDBCursorWithValue",
"IDBDatabase",
"IDBFactory",
"IDBIndex",
"IDBKeyRange",
"IDBObjectStore",
"IDBOpenDBRequest",
"IDBRequest",
"IDBTransaction",
"IDBVersionChangeEvent",
"IdentityCredential",
"IdentityCredentialError",
"IdentityProvider",
"IdleDeadline",
"IdleDetector",
"IIRFilterNode",
"Image",
"ImageBitmap",
"ImageBitmapRenderingContext",
"ImageCapture",
"ImageData",
"ImageDecoder",
"ImageTrack",
"ImageTrackList",
"Ink",
"InputDeviceCapabilities",
"InputDeviceInfo",
"InputEvent",
"IntersectionObserver",
"IntersectionObserverEntry",
"Keyboard",
"KeyboardEvent",
"KeyboardLayoutMap",
"KeyframeEffect",
"LanguageDetector",
"LargestContentfulPaint",
"LaunchParams",
"LaunchQueue",
"LayoutShift",
"LayoutShiftAttribution",
"LinearAccelerationSensor",
"Location",
"Lock",
"LockManager",
"MathMLElement",
"MediaCapabilities",
"MediaCapabilitiesInfo",
"MediaDeviceInfo",
"MediaDevices",
"MediaElementAudioSourceNode",
"MediaEncryptedEvent",
"MediaError",
"MediaKeyError",
"MediaKeyMessageEvent",
"MediaKeys",
"MediaKeySession",
"MediaKeyStatusMap",
"MediaKeySystemAccess",
"MediaList",
"MediaMetadata",
"MediaQueryList",
"MediaQueryListEvent",
"MediaRecorder",
"MediaRecorderErrorEvent",
"MediaSession",
"MediaSource",
"MediaSourceHandle",
"MediaStream",
"MediaStreamAudioDestinationNode",
"MediaStreamAudioSourceNode",
"MediaStreamEvent",
"MediaStreamTrack",
"MediaStreamTrackAudioSourceNode",
"MediaStreamTrackAudioStats",
"MediaStreamTrackEvent",
"MediaStreamTrackGenerator",
"MediaStreamTrackProcessor",
"MediaStreamTrackVideoStats",
"MessageChannel",
"MessageEvent",
"MessagePort",
"MIDIAccess",
"MIDIConnectionEvent",
"MIDIInput",
"MIDIInputMap",
"MIDIMessageEvent",
"MIDIOutput",
"MIDIOutputMap",
"MIDIPort",
"MimeType",
"MimeTypeArray",
"ModelGenericSession",
"ModelManager",
"MouseEvent",
"MutationEvent",
"MutationObserver",
"MutationRecord",
"NamedNodeMap",
"NavigateEvent",
"Navigation",
"NavigationActivation",
"NavigationCurrentEntryChangeEvent",
"NavigationDestination",
"NavigationHistoryEntry",
"NavigationPreloadManager",
"NavigationTransition",
"Navigator",
"NavigatorLogin",
"NavigatorManagedData",
"NavigatorUAData",
"NetworkInformation",
"Node",
"NodeFilter",
"NodeIterator",
"NodeList",
"Notification",
"NotifyPaintEvent",
"NotRestoredReasonDetails",
"NotRestoredReasons",
"Observable",
"OfflineAudioCompletionEvent",
"OfflineAudioContext",
"OffscreenCanvas",
"OffscreenCanvasRenderingContext2D",
"Option",
"OrientationSensor",
"OscillatorNode",
"OTPCredential",
"OverconstrainedError",
"PageRevealEvent",
"PageSwapEvent",
"PageTransitionEvent",
"PannerNode",
"PasswordCredential",
"Path2D",
"PaymentAddress",
"PaymentManager",
"PaymentMethodChangeEvent",
"PaymentRequest",
"PaymentRequestUpdateEvent",
"PaymentResponse",
"Performance",
"PerformanceElementTiming",
"PerformanceEntry",
"PerformanceEventTiming",
"PerformanceLongAnimationFrameTiming",
"PerformanceLongTaskTiming",
"PerformanceMark",
"PerformanceMeasure",
"PerformanceNavigation",
"PerformanceNavigationTiming",
"PerformanceObserver",
"PerformanceObserverEntryList",
"PerformancePaintTiming",
"PerformanceResourceTiming",
"PerformanceScriptTiming",
"PerformanceServerTiming",
"PerformanceTiming",
"PeriodicSyncManager",
"PeriodicWave",
"Permissions",
"PermissionStatus",
"PERSISTENT",
"PictureInPictureEvent",
"PictureInPictureWindow",
"Plugin",
"PluginArray",
"PointerEvent",
"PopStateEvent",
"Presentation",
"PresentationAvailability",
"PresentationConnection",
"PresentationConnectionAvailableEvent",
"PresentationConnectionCloseEvent",
"PresentationConnectionList",
"PresentationReceiver",
"PresentationRequest",
"PressureObserver",
"PressureRecord",
"ProcessingInstruction",
"Profiler",
"ProgressEvent",
"PromiseRejectionEvent",
"ProtectedAudience",
"PublicKeyCredential",
"PushManager",
"PushSubscription",
"PushSubscriptionOptions",
"RadioNodeList",
"Range",
"ReadableByteStreamController",
"ReadableStream",
"ReadableStreamBYOBReader",
"ReadableStreamBYOBRequest",
"ReadableStreamDefaultController",
"ReadableStreamDefaultReader",
"RelativeOrientationSensor",
"RemotePlayback",
"ReportBody",
"ReportingObserver",
"Request",
"ResizeObserver",
"ResizeObserverEntry",
"ResizeObserverSize",
"Response",
"RestrictionTarget",
"RTCCertificate",
"RTCDataChannel",
"RTCDataChannelEvent",
"RTCDtlsTransport",
"RTCDTMFSender",
"RTCDTMFToneChangeEvent",
"RTCEncodedAudioFrame",
"RTCEncodedVideoFrame",
"RTCError",
"RTCErrorEvent",
"RTCIceCandidate",
"RTCIceTransport",
"RTCPeerConnection",
"RTCPeerConnectionIceErrorEvent",
"RTCPeerConnectionIceEvent",
"RTCRtpReceiver",
"RTCRtpScriptTransform",
"RTCRtpSender",
"RTCRtpTransceiver",
"RTCSctpTransport",
"RTCSessionDescription",
"RTCStatsReport",
"RTCTrackEvent",
"Scheduler",
"Scheduling",
"Screen",
"ScreenDetailed",
"ScreenDetails",
"ScreenOrientation",
"ScriptProcessorNode",
"ScrollTimeline",
"SecurityPolicyViolationEvent",
"Selection",
"Sensor",
"SensorErrorEvent",
"Serial",
"SerialPort",
"ServiceWorker",
"ServiceWorkerContainer",
"ServiceWorkerRegistration",
"ShadowRoot",
"SharedStorage",
"SharedStorageAppendMethod",
"SharedStorageClearMethod",
"SharedStorageDeleteMethod",
"SharedStorageModifierMethod",
"SharedStorageSetMethod",
"SharedStorageWorklet",
"SharedWorker",
"SnapEvent",
"SourceBuffer",
"SourceBufferList",
"SpeechSynthesis",
"SpeechSynthesisErrorEvent",
"SpeechSynthesisEvent",
"SpeechSynthesisUtterance",
"SpeechSynthesisVoice",
"StaticRange",
"StereoPannerNode",
"Storage",
"StorageBucket",
"StorageBucketManager",
"StorageEvent",
"StorageManager",
"StylePropertyMap",
"StylePropertyMapReadOnly",
"StyleSheet",
"StyleSheetList",
"SubmitEvent",
"Subscriber",
"SubtleCrypto",
"SuppressedError",
"SVGAElement",
"SVGAngle",
"SVGAnimatedAngle",
"SVGAnimatedBoolean",
"SVGAnimatedEnumeration",
"SVGAnimatedInteger",
"SVGAnimatedLength",
"SVGAnimatedLengthList",
"SVGAnimatedNumber",
"SVGAnimatedNumberList",
"SVGAnimatedPreserveAspectRatio",
"SVGAnimatedRect",
"SVGAnimatedString",
"SVGAnimatedTransformList",
"SVGAnimateElement",
"SVGAnimateMotionElement",
"SVGAnimateTransformElement",
"SVGAnimationElement",
"SVGCircleElement",
"SVGClipPathElement",
"SVGComponentTransferFunctionElement",
"SVGDefsElement",
"SVGDescElement",
"SVGElement",
"SVGEllipseElement",
"SVGFEBlendElement",
"SVGFEColorMatrixElement",
"SVGFEComponentTransferElement",
"SVGFECompositeElement",
"SVGFEConvolveMatrixElement",
"SVGFEDiffuseLightingElement",
"SVGFEDisplacementMapElement",
"SVGFEDistantLightElement",
"SVGFEDropShadowElement",
"SVGFEFloodElement",
"SVGFEFuncAElement",
"SVGFEFuncBElement",
"SVGFEFuncGElement",
"SVGFEFuncRElement",
"SVGFEGaussianBlurElement",
"SVGFEImageElement",
"SVGFEMergeElement",
"SVGFEMergeNodeElement",
"SVGFEMorphologyElement",
"SVGFEOffsetElement",
"SVGFEPointLightElement",
"SVGFESpecularLightingElement",
"SVGFESpotLightElement",
"SVGFETileElement",
"SVGFETurbulenceElement",
"SVGFilterElement",
"SVGForeignObjectElement",
"SVGGElement",
"SVGGeometryElement",
"SVGGradientElement",
"SVGGraphicsElement",
"SVGImageElement",
"SVGLength",
"SVGLengthList",
"SVGLinearGradientElement",
"SVGLineElement",
"SVGMarkerElement",
"SVGMaskElement",
"SVGMatrix",
"SVGMetadataElement",
"SVGMPathElement",
"SVGNumber",
"SVGNumberList",
"SVGPathElement",
"SVGPatternElement",
"SVGPoint",
"SVGPointList",
"SVGPolygonElement",
"SVGPolylineElement",
"SVGPreserveAspectRatio",
"SVGRadialGradientElement",
"SVGRect",
"SVGRectElement",
"SVGScriptElement",
"SVGSetElement",
"SVGStopElement",
"SVGStringList",
"SVGStyleElement",
"SVGSVGElement",
"SVGSwitchElement",
"SVGSymbolElement",
"SVGTextContentElement",
"SVGTextElement",
"SVGTextPathElement",
"SVGTextPositioningElement",
"SVGTitleElement",
"SVGTransform",
"SVGTransformList",
"SVGTSpanElement",
"SVGUnitTypes",
"SVGUseElement",
"SVGViewElement",
"SyncManager",
"TaskAttributionTiming",
"TaskController",
"TaskPriorityChangeEvent",
"TaskSignal",
"TEMPORARY",
"Text",
"TextDecoder",
"TextDecoderStream",
"TextEncoder",
"TextEncoderStream",
"TextEvent",
"TextFormat",
"TextFormatUpdateEvent",
"TextMetrics",
"TextTrack",
"TextTrackCue",
"TextTrackCueList",
"TextTrackList",
"TextUpdateEvent",
"TimeEvent",
"TimeRanges",
"ToggleEvent",
"Touch",
"TouchEvent",
"TouchList",
"TrackEvent",
"TransformStream",
"TransformStreamDefaultController",
"TransitionEvent",
"TreeWalker",
"TrustedHTML",
"TrustedScript",
"TrustedScriptURL",
"TrustedTypePolicy",
"TrustedTypePolicyFactory",
"UIEvent",
"URL",
"URLPattern",
"URLSearchParams",
"USB",
"USBAlternateInterface",
"USBConfiguration",
"USBConnectionEvent",
"USBDevice",
"USBEndpoint",
"USBInterface",
"USBInTransferResult",
"USBIsochronousInTransferPacket",
"USBIsochronousInTransferResult",
"USBIsochronousOutTransferPacket",
"USBIsochronousOutTransferResult",
"USBOutTransferResult",
"UserActivation",
"ValidityState",
"VideoColorSpace",
"VideoDecoder",
"VideoEncoder",
"VideoFrame",
"VideoPlaybackQuality",
"ViewTimeline",
"ViewTransition",
"ViewTransitionTypeSet",
"VirtualKeyboard",
"VirtualKeyboardGeometryChangeEvent",
"VisibilityStateEntry",
"VisualViewport",
"VTTCue",
"VTTRegion",
"WakeLock",
"WakeLockSentinel",
"WaveShaperNode",
"WebAssembly",
"WebGL2RenderingContext",
"WebGLActiveInfo",
"WebGLBuffer",
"WebGLContextEvent",
"WebGLFramebuffer",
"WebGLObject",
"WebGLProgram",
"WebGLQuery",
"WebGLRenderbuffer",
"WebGLRenderingContext",
"WebGLSampler",
"WebGLShader",
"WebGLShaderPrecisionFormat",
"WebGLSync",
"WebGLTexture",
"WebGLTransformFeedback",
"WebGLUniformLocation",
"WebGLVertexArrayObject",
"WebSocket",
"WebSocketError",
"WebSocketStream",
"WebTransport",
"WebTransportBidirectionalStream",
"WebTransportDatagramDuplexStream",
"WebTransportError",
"WebTransportReceiveStream",
"WebTransportSendStream",
"WGSLLanguageFeatures",
"WheelEvent",
"Window",
"WindowControlsOverlay",
"WindowControlsOverlayGeometryChangeEvent",
"Worker",
"Worklet",
"WorkletGlobalScope",
"WritableStream",
"WritableStreamDefaultController",
"WritableStreamDefaultWriter",
"XMLDocument",
"XMLHttpRequest",
"XMLHttpRequestEventTarget",
"XMLHttpRequestUpload",
"XMLSerializer",
"XPathEvaluator",
"XPathExpression",
"XPathResult",
"XRAnchor",
"XRAnchorSet",
"XRBoundedReferenceSpace",
"XRCamera",
"XRCPUDepthInformation",
"XRDepthInformation",
"XRDOMOverlayState",
"XRFrame",
"XRHand",
"XRHitTestResult",
"XRHitTestSource",
"XRInputSource",
"XRInputSourceArray",
"XRInputSourceEvent",
"XRInputSourcesChangeEvent",
"XRJointPose",
"XRJointSpace",
"XRLayer",
"XRLightEstimate",
"XRLightProbe",
"XRPose",
"XRRay",
"XRReferenceSpace",
"XRReferenceSpaceEvent",
"XRRenderState",
"XRRigidTransform",
"XRSession",
"XRSessionEvent",
"XRSpace",
"XRSystem",
"XRTransientInputHitTestResult",
"XRTransientInputHitTestSource",
"XRView",
"XRViewerPose",
"XRViewport",
"XRWebGLBinding",
"XRWebGLDepthInformation",
"XRWebGLLayer",
"XSLTProcessor"
]
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('reverse', require('../reverse'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,20 @@
{
"root": true,
"extends": "@ljharb",
"rules": {
"eqeqeq": [2, "allow-null"],
"id-length": 0,
"no-invalid-this": "off",
},
"overrides": [
{
"files": "test/**",
"rules": {
"max-lines-per-function": 0,
},
},
],
}
@@ -0,0 +1,40 @@
import { createConfigUtils } from './config-utils.mjs';
import { mergeClassList } from './merge-classlist.mjs';
import { twJoin } from './tw-join.mjs';
function createTailwindMerge() {
for (var _len = arguments.length, createConfig = new Array(_len), _key = 0; _key < _len; _key++) {
createConfig[_key] = arguments[_key];
}
var configUtils;
var cacheGet;
var cacheSet;
var functionToCall = initTailwindMerge;
function initTailwindMerge(classList) {
var firstCreateConfig = createConfig[0],
restCreateConfig = createConfig.slice(1);
var config = restCreateConfig.reduce(function (previousConfig, createConfigCurrent) {
return createConfigCurrent(previousConfig);
}, firstCreateConfig());
configUtils = createConfigUtils(config);
cacheGet = configUtils.cache.get;
cacheSet = configUtils.cache.set;
functionToCall = tailwindMerge;
return tailwindMerge(classList);
}
function tailwindMerge(classList) {
var cachedResult = cacheGet(classList);
if (cachedResult) {
return cachedResult;
}
var result = mergeClassList(classList, configUtils);
cacheSet(classList, result);
return result;
}
return function callTailwindMerge() {
return functionToCall(twJoin.apply(null, arguments));
};
}
export { createTailwindMerge };
//# sourceMappingURL=create-tailwind-merge.mjs.map
@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = isImmutable;
var _isType = require("./isType.js");
var _index = require("./generated/index.js");
function isImmutable(node) {
if ((0, _isType.default)(node.type, "Immutable")) return true;
if ((0, _index.isIdentifier)(node)) {
if (node.name === "undefined") {
return true;
} else {
return false;
}
}
return false;
}
//# sourceMappingURL=isImmutable.js.map
@@ -0,0 +1,733 @@
<p align="center">
<img alt="qs" src="./logos/banner_default.png" width="800" />
</p>
# qs <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/9058/badge)](https://bestpractices.coreinfrastructure.org/projects/9058)
[![npm badge][npm-badge-png]][package-url]
A querystring parsing and stringifying library with some added security.
Lead Maintainer: [Jordan Harband](https://github.com/ljharb)
The **qs** module was originally created and maintained by [TJ Holowaychuk](https://github.com/visionmedia/node-querystring).
## Usage
```javascript
var qs = require('qs');
var assert = require('assert');
var obj = qs.parse('a=c');
assert.deepEqual(obj, { a: 'c' });
var str = qs.stringify(obj);
assert.equal(str, 'a=c');
```
### Parsing Objects
[](#preventEval)
```javascript
qs.parse(string, [options]);
```
**qs** allows you to create nested objects within your query strings, by surrounding the name of sub-keys with square brackets `[]`.
For example, the string `'foo[bar]=baz'` converts to:
```javascript
assert.deepEqual(qs.parse('foo[bar]=baz'), {
foo: {
bar: 'baz'
}
});
```
When using the `plainObjects` option the parsed value is returned as a null object, created via `{ __proto__: null }` and as such you should be aware that prototype methods will not exist on it and a user may set those names to whatever value they like:
```javascript
var nullObject = qs.parse('a[hasOwnProperty]=b', { plainObjects: true });
assert.deepEqual(nullObject, { a: { hasOwnProperty: 'b' } });
```
By default parameters that would overwrite properties on the object prototype are ignored, if you wish to keep the data from those fields either use `plainObjects` as mentioned above, or set `allowPrototypes` to `true` which will allow user input to overwrite those properties.
*WARNING* It is generally a bad idea to enable this option as it can cause problems when attempting to use the properties that have been overwritten.
Always be careful with this option.
```javascript
var protoObject = qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true });
assert.deepEqual(protoObject, { a: { hasOwnProperty: 'b' } });
```
URI encoded strings work too:
```javascript
assert.deepEqual(qs.parse('a%5Bb%5D=c'), {
a: { b: 'c' }
});
```
You can also nest your objects, like `'foo[bar][baz]=foobarbaz'`:
```javascript
assert.deepEqual(qs.parse('foo[bar][baz]=foobarbaz'), {
foo: {
bar: {
baz: 'foobarbaz'
}
}
});
```
By default, when nesting objects **qs** will only parse up to 5 children deep.
This means if you attempt to parse a string like `'a[b][c][d][e][f][g][h][i]=j'` your resulting object will be:
```javascript
var expected = {
a: {
b: {
c: {
d: {
e: {
f: {
'[g][h][i]': 'j'
}
}
}
}
}
}
};
var string = 'a[b][c][d][e][f][g][h][i]=j';
assert.deepEqual(qs.parse(string), expected);
```
This depth can be overridden by passing a `depth` option to `qs.parse(string, [options])`:
```javascript
var deep = qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 });
assert.deepEqual(deep, { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } });
```
You can configure **qs** to throw an error when parsing nested input beyond this depth using the `strictDepth` option (defaulted to false):
```javascript
try {
qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1, strictDepth: true });
} catch (err) {
assert(err instanceof RangeError);
assert.strictEqual(err.message, 'Input depth exceeded depth option of 1 and strictDepth is true');
}
```
The depth limit helps mitigate abuse when **qs** is used to parse user input, and it is recommended to keep it a reasonably small number. The strictDepth option adds a layer of protection by throwing an error when the limit is exceeded, allowing you to catch and handle such cases.
For similar reasons, by default **qs** will only parse up to 1000 parameters. This can be overridden by passing a `parameterLimit` option:
```javascript
var limited = qs.parse('a=b&c=d', { parameterLimit: 1 });
assert.deepEqual(limited, { a: 'b' });
```
If you want an error to be thrown whenever the a limit is exceeded (eg, `parameterLimit`, `arrayLimit`), set the `throwOnLimitExceeded` option to `true`. This option will generate a descriptive error if the query string exceeds a configured limit.
```javascript
try {
qs.parse('a=1&b=2&c=3&d=4', { parameterLimit: 3, throwOnLimitExceeded: true });
} catch (err) {
assert(err instanceof Error);
assert.strictEqual(err.message, 'Parameter limit exceeded. Only 3 parameters allowed.');
}
```
When `throwOnLimitExceeded` is set to `false` (default), **qs** will parse up to the specified `parameterLimit` and ignore the rest without throwing an error.
To bypass the leading question mark, use `ignoreQueryPrefix`:
```javascript
var prefixed = qs.parse('?a=b&c=d', { ignoreQueryPrefix: true });
assert.deepEqual(prefixed, { a: 'b', c: 'd' });
```
An optional delimiter can also be passed:
```javascript
var delimited = qs.parse('a=b;c=d', { delimiter: ';' });
assert.deepEqual(delimited, { a: 'b', c: 'd' });
```
Delimiters can be a regular expression too:
```javascript
var regexed = qs.parse('a=b;c=d,e=f', { delimiter: /[;,]/ });
assert.deepEqual(regexed, { a: 'b', c: 'd', e: 'f' });
```
Option `allowDots` can be used to enable dot notation:
```javascript
var withDots = qs.parse('a.b=c', { allowDots: true });
assert.deepEqual(withDots, { a: { b: 'c' } });
```
Option `decodeDotInKeys` can be used to decode dots in keys
Note: it implies `allowDots`, so `parse` will error if you set `decodeDotInKeys` to `true`, and `allowDots` to `false`.
```javascript
var withDots = qs.parse('name%252Eobj.first=John&name%252Eobj.last=Doe', { decodeDotInKeys: true });
assert.deepEqual(withDots, { 'name.obj': { first: 'John', last: 'Doe' }});
```
Option `allowEmptyArrays` can be used to allowing empty array values in object
```javascript
var withEmptyArrays = qs.parse('foo[]&bar=baz', { allowEmptyArrays: true });
assert.deepEqual(withEmptyArrays, { foo: [], bar: 'baz' });
```
Option `duplicates` can be used to change the behavior when duplicate keys are encountered
```javascript
assert.deepEqual(qs.parse('foo=bar&foo=baz'), { foo: ['bar', 'baz'] });
assert.deepEqual(qs.parse('foo=bar&foo=baz', { duplicates: 'combine' }), { foo: ['bar', 'baz'] });
assert.deepEqual(qs.parse('foo=bar&foo=baz', { duplicates: 'first' }), { foo: 'bar' });
assert.deepEqual(qs.parse('foo=bar&foo=baz', { duplicates: 'last' }), { foo: 'baz' });
```
If you have to deal with legacy browsers or services, there's also support for decoding percent-encoded octets as iso-8859-1:
```javascript
var oldCharset = qs.parse('a=%A7', { charset: 'iso-8859-1' });
assert.deepEqual(oldCharset, { a: '§' });
```
Some services add an initial `utf8=✓` value to forms so that old Internet Explorer versions are more likely to submit the form as utf-8.
Additionally, the server can check the value against wrong encodings of the checkmark character and detect that a query string or `application/x-www-form-urlencoded` body was *not* sent as utf-8, eg. if the form had an `accept-charset` parameter or the containing page had a different character set.
**qs** supports this mechanism via the `charsetSentinel` option.
If specified, the `utf8` parameter will be omitted from the returned object.
It will be used to switch to `iso-8859-1`/`utf-8` mode depending on how the checkmark is encoded.
**Important**: When you specify both the `charset` option and the `charsetSentinel` option, the `charset` will be overridden when the request contains a `utf8` parameter from which the actual charset can be deduced.
In that sense the `charset` will behave as the default charset rather than the authoritative charset.
```javascript
var detectedAsUtf8 = qs.parse('utf8=%E2%9C%93&a=%C3%B8', {
charset: 'iso-8859-1',
charsetSentinel: true
});
assert.deepEqual(detectedAsUtf8, { a: 'ø' });
// Browsers encode the checkmark as &#10003; when submitting as iso-8859-1:
var detectedAsIso8859_1 = qs.parse('utf8=%26%2310003%3B&a=%F8', {
charset: 'utf-8',
charsetSentinel: true
});
assert.deepEqual(detectedAsIso8859_1, { a: 'ø' });
```
If you want to decode the `&#...;` syntax to the actual character, you can specify the `interpretNumericEntities` option as well:
```javascript
var detectedAsIso8859_1 = qs.parse('a=%26%239786%3B', {
charset: 'iso-8859-1',
interpretNumericEntities: true
});
assert.deepEqual(detectedAsIso8859_1, { a: '☺' });
```
It also works when the charset has been detected in `charsetSentinel` mode.
### Parsing Arrays
**qs** can also parse arrays using a similar `[]` notation:
```javascript
var withArray = qs.parse('a[]=b&a[]=c');
assert.deepEqual(withArray, { a: ['b', 'c'] });
```
You may specify an index as well:
```javascript
var withIndexes = qs.parse('a[1]=c&a[0]=b');
assert.deepEqual(withIndexes, { a: ['b', 'c'] });
```
Note that the only difference between an index in an array and a key in an object is that the value between the brackets must be a number to create an array.
When creating arrays with specific indices, **qs** will compact a sparse array to only the existing values preserving their order:
```javascript
var noSparse = qs.parse('a[1]=b&a[15]=c');
assert.deepEqual(noSparse, { a: ['b', 'c'] });
```
You may also use `allowSparse` option to parse sparse arrays:
```javascript
var sparseArray = qs.parse('a[1]=2&a[3]=5', { allowSparse: true });
assert.deepEqual(sparseArray, { a: [, '2', , '5'] });
```
Note that an empty string is also a value, and will be preserved:
```javascript
var withEmptyString = qs.parse('a[]=&a[]=b');
assert.deepEqual(withEmptyString, { a: ['', 'b'] });
var withIndexedEmptyString = qs.parse('a[0]=b&a[1]=&a[2]=c');
assert.deepEqual(withIndexedEmptyString, { a: ['b', '', 'c'] });
```
**qs** will also limit specifying indices in an array to a maximum index of `20`.
Any array members with an index of greater than `20` will instead be converted to an object with the index as the key.
This is needed to handle cases when someone sent, for example, `a[999999999]` and it will take significant time to iterate over this huge array.
```javascript
var withMaxIndex = qs.parse('a[100]=b');
assert.deepEqual(withMaxIndex, { a: { '100': 'b' } });
```
This limit can be overridden by passing an `arrayLimit` option:
```javascript
var withArrayLimit = qs.parse('a[1]=b', { arrayLimit: 0 });
assert.deepEqual(withArrayLimit, { a: { '1': 'b' } });
```
If you want to throw an error whenever the array limit is exceeded, set the `throwOnLimitExceeded` option to `true`. This option will generate a descriptive error if the query string exceeds a configured limit.
```javascript
try {
qs.parse('a[1]=b', { arrayLimit: 0, throwOnLimitExceeded: true });
} catch (err) {
assert(err instanceof Error);
assert.strictEqual(err.message, 'Array limit exceeded. Only 0 elements allowed in an array.');
}
```
When `throwOnLimitExceeded` is set to `false` (default), **qs** will parse up to the specified `arrayLimit` and if the limit is exceeded, the array will instead be converted to an object with the index as the key
To disable array parsing entirely, set `parseArrays` to `false`.
```javascript
var noParsingArrays = qs.parse('a[]=b', { parseArrays: false });
assert.deepEqual(noParsingArrays, { a: { '0': 'b' } });
```
If you mix notations, **qs** will merge the two items into an object:
```javascript
var mixedNotation = qs.parse('a[0]=b&a[b]=c');
assert.deepEqual(mixedNotation, { a: { '0': 'b', b: 'c' } });
```
You can also create arrays of objects:
```javascript
var arraysOfObjects = qs.parse('a[][b]=c');
assert.deepEqual(arraysOfObjects, { a: [{ b: 'c' }] });
```
Some people use comma to join array, **qs** can parse it:
```javascript
var arraysOfObjects = qs.parse('a=b,c', { comma: true })
assert.deepEqual(arraysOfObjects, { a: ['b', 'c'] })
```
(_this cannot convert nested objects, such as `a={b:1},{c:d}`_)
### Parsing primitive/scalar values (numbers, booleans, null, etc)
By default, all values are parsed as strings.
This behavior will not change and is explained in [issue #91](https://github.com/ljharb/qs/issues/91).
```javascript
var primitiveValues = qs.parse('a=15&b=true&c=null');
assert.deepEqual(primitiveValues, { a: '15', b: 'true', c: 'null' });
```
If you wish to auto-convert values which look like numbers, booleans, and other values into their primitive counterparts, you can use the [query-types Express JS middleware](https://github.com/xpepermint/query-types) which will auto-convert all request query parameters.
### Stringifying
[](#preventEval)
```javascript
qs.stringify(object, [options]);
```
When stringifying, **qs** by default URI encodes output. Objects are stringified as you would expect:
```javascript
assert.equal(qs.stringify({ a: 'b' }), 'a=b');
assert.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c');
```
This encoding can be disabled by setting the `encode` option to `false`:
```javascript
var unencoded = qs.stringify({ a: { b: 'c' } }, { encode: false });
assert.equal(unencoded, 'a[b]=c');
```
Encoding can be disabled for keys by setting the `encodeValuesOnly` option to `true`:
```javascript
var encodedValues = qs.stringify(
{ a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] },
{ encodeValuesOnly: true }
);
assert.equal(encodedValues,'a=b&c[0]=d&c[1]=e%3Df&f[0][0]=g&f[1][0]=h');
```
This encoding can also be replaced by a custom encoding method set as `encoder` option:
```javascript
var encoded = qs.stringify({ a: { b: 'c' } }, { encoder: function (str) {
// Passed in values `a`, `b`, `c`
return // Return encoded string
}})
```
_(Note: the `encoder` option does not apply if `encode` is `false`)_
Analogue to the `encoder` there is a `decoder` option for `parse` to override decoding of properties and values:
```javascript
var decoded = qs.parse('x=z', { decoder: function (str) {
// Passed in values `x`, `z`
return // Return decoded string
}})
```
You can encode keys and values using different logic by using the type argument provided to the encoder:
```javascript
var encoded = qs.stringify({ a: { b: 'c' } }, { encoder: function (str, defaultEncoder, charset, type) {
if (type === 'key') {
return // Encoded key
} else if (type === 'value') {
return // Encoded value
}
}})
```
The type argument is also provided to the decoder:
```javascript
var decoded = qs.parse('x=z', { decoder: function (str, defaultDecoder, charset, type) {
if (type === 'key') {
return // Decoded key
} else if (type === 'value') {
return // Decoded value
}
}})
```
Examples beyond this point will be shown as though the output is not URI encoded for clarity.
Please note that the return values in these cases *will* be URI encoded during real usage.
When arrays are stringified, they follow the `arrayFormat` option, which defaults to `indices`:
```javascript
qs.stringify({ a: ['b', 'c', 'd'] });
// 'a[0]=b&a[1]=c&a[2]=d'
```
You may override this by setting the `indices` option to `false`, or to be more explicit, the `arrayFormat` option to `repeat`:
```javascript
qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false });
// 'a=b&a=c&a=d'
```
You may use the `arrayFormat` option to specify the format of the output array:
```javascript
qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' })
// 'a[0]=b&a[1]=c'
qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' })
// 'a[]=b&a[]=c'
qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' })
// 'a=b&a=c'
qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'comma' })
// 'a=b,c'
```
Note: when using `arrayFormat` set to `'comma'`, you can also pass the `commaRoundTrip` option set to `true` or `false`, to append `[]` on single-item arrays, so that they can round trip through a parse.
When objects are stringified, by default they use bracket notation:
```javascript
qs.stringify({ a: { b: { c: 'd', e: 'f' } } });
// 'a[b][c]=d&a[b][e]=f'
```
You may override this to use dot notation by setting the `allowDots` option to `true`:
```javascript
qs.stringify({ a: { b: { c: 'd', e: 'f' } } }, { allowDots: true });
// 'a.b.c=d&a.b.e=f'
```
You may encode the dot notation in the keys of object with option `encodeDotInKeys` by setting it to `true`:
Note: it implies `allowDots`, so `stringify` will error if you set `decodeDotInKeys` to `true`, and `allowDots` to `false`.
Caveat: when `encodeValuesOnly` is `true` as well as `encodeDotInKeys`, only dots in keys and nothing else will be encoded.
```javascript
qs.stringify({ "name.obj": { "first": "John", "last": "Doe" } }, { allowDots: true, encodeDotInKeys: true })
// 'name%252Eobj.first=John&name%252Eobj.last=Doe'
```
You may allow empty array values by setting the `allowEmptyArrays` option to `true`:
```javascript
qs.stringify({ foo: [], bar: 'baz' }, { allowEmptyArrays: true });
// 'foo[]&bar=baz'
```
Empty strings and null values will omit the value, but the equals sign (=) remains in place:
```javascript
assert.equal(qs.stringify({ a: '' }), 'a=');
```
Key with no values (such as an empty object or array) will return nothing:
```javascript
assert.equal(qs.stringify({ a: [] }), '');
assert.equal(qs.stringify({ a: {} }), '');
assert.equal(qs.stringify({ a: [{}] }), '');
assert.equal(qs.stringify({ a: { b: []} }), '');
assert.equal(qs.stringify({ a: { b: {}} }), '');
```
Properties that are set to `undefined` will be omitted entirely:
```javascript
assert.equal(qs.stringify({ a: null, b: undefined }), 'a=');
```
The query string may optionally be prepended with a question mark:
```javascript
assert.equal(qs.stringify({ a: 'b', c: 'd' }, { addQueryPrefix: true }), '?a=b&c=d');
```
The delimiter may be overridden with stringify as well:
```javascript
assert.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d');
```
If you only want to override the serialization of `Date` objects, you can provide a `serializeDate` option:
```javascript
var date = new Date(7);
assert.equal(qs.stringify({ a: date }), 'a=1970-01-01T00:00:00.007Z'.replace(/:/g, '%3A'));
assert.equal(
qs.stringify({ a: date }, { serializeDate: function (d) { return d.getTime(); } }),
'a=7'
);
```
You may use the `sort` option to affect the order of parameter keys:
```javascript
function alphabeticalSort(a, b) {
return a.localeCompare(b);
}
assert.equal(qs.stringify({ a: 'c', z: 'y', b : 'f' }, { sort: alphabeticalSort }), 'a=c&b=f&z=y');
```
Finally, you can use the `filter` option to restrict which keys will be included in the stringified output.
If you pass a function, it will be called for each key to obtain the replacement value.
Otherwise, if you pass an array, it will be used to select properties and array indices for stringification:
```javascript
function filterFunc(prefix, value) {
if (prefix == 'b') {
// Return an `undefined` value to omit a property.
return;
}
if (prefix == 'e[f]') {
return value.getTime();
}
if (prefix == 'e[g][0]') {
return value * 2;
}
return value;
}
qs.stringify({ a: 'b', c: 'd', e: { f: new Date(123), g: [2] } }, { filter: filterFunc });
// 'a=b&c=d&e[f]=123&e[g][0]=4'
qs.stringify({ a: 'b', c: 'd', e: 'f' }, { filter: ['a', 'e'] });
// 'a=b&e=f'
qs.stringify({ a: ['b', 'c', 'd'], e: 'f' }, { filter: ['a', 0, 2] });
// 'a[0]=b&a[2]=d'
```
You could also use `filter` to inject custom serialization for user defined types.
Consider you're working with some api that expects query strings of the format for ranges:
```
https://domain.com/endpoint?range=30...70
```
For which you model as:
```javascript
class Range {
constructor(from, to) {
this.from = from;
this.to = to;
}
}
```
You could _inject_ a custom serializer to handle values of this type:
```javascript
qs.stringify(
{
range: new Range(30, 70),
},
{
filter: (prefix, value) => {
if (value instanceof Range) {
return `${value.from}...${value.to}`;
}
// serialize the usual way
return value;
},
}
);
// range=30...70
```
### Handling of `null` values
By default, `null` values are treated like empty strings:
```javascript
var withNull = qs.stringify({ a: null, b: '' });
assert.equal(withNull, 'a=&b=');
```
Parsing does not distinguish between parameters with and without equal signs.
Both are converted to empty strings.
```javascript
var equalsInsensitive = qs.parse('a&b=');
assert.deepEqual(equalsInsensitive, { a: '', b: '' });
```
To distinguish between `null` values and empty strings use the `strictNullHandling` flag. In the result string the `null`
values have no `=` sign:
```javascript
var strictNull = qs.stringify({ a: null, b: '' }, { strictNullHandling: true });
assert.equal(strictNull, 'a&b=');
```
To parse values without `=` back to `null` use the `strictNullHandling` flag:
```javascript
var parsedStrictNull = qs.parse('a&b=', { strictNullHandling: true });
assert.deepEqual(parsedStrictNull, { a: null, b: '' });
```
To completely skip rendering keys with `null` values, use the `skipNulls` flag:
```javascript
var nullsSkipped = qs.stringify({ a: 'b', c: null}, { skipNulls: true });
assert.equal(nullsSkipped, 'a=b');
```
If you're communicating with legacy systems, you can switch to `iso-8859-1` using the `charset` option:
```javascript
var iso = qs.stringify({ æ: 'æ' }, { charset: 'iso-8859-1' });
assert.equal(iso, '%E6=%E6');
```
Characters that don't exist in `iso-8859-1` will be converted to numeric entities, similar to what browsers do:
```javascript
var numeric = qs.stringify({ a: '☺' }, { charset: 'iso-8859-1' });
assert.equal(numeric, 'a=%26%239786%3B');
```
You can use the `charsetSentinel` option to announce the character by including an `utf8=✓` parameter with the proper encoding if the checkmark, similar to what Ruby on Rails and others do when submitting forms.
```javascript
var sentinel = qs.stringify({ a: '☺' }, { charsetSentinel: true });
assert.equal(sentinel, 'utf8=%E2%9C%93&a=%E2%98%BA');
var isoSentinel = qs.stringify({ a: 'æ' }, { charsetSentinel: true, charset: 'iso-8859-1' });
assert.equal(isoSentinel, 'utf8=%26%2310003%3B&a=%E6');
```
### Dealing with special character sets
By default the encoding and decoding of characters is done in `utf-8`, and `iso-8859-1` support is also built in via the `charset` parameter.
If you wish to encode querystrings to a different character set (i.e.
[Shift JIS](https://en.wikipedia.org/wiki/Shift_JIS)) you can use the
[`qs-iconv`](https://github.com/martinheidegger/qs-iconv) library:
```javascript
var encoder = require('qs-iconv/encoder')('shift_jis');
var shiftJISEncoded = qs.stringify({ a: 'こんにちは!' }, { encoder: encoder });
assert.equal(shiftJISEncoded, 'a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I');
```
This also works for decoding of query strings:
```javascript
var decoder = require('qs-iconv/decoder')('shift_jis');
var obj = qs.parse('a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I', { decoder: decoder });
assert.deepEqual(obj, { a: 'こんにちは!' });
```
### RFC 3986 and RFC 1738 space encoding
RFC3986 used as default option and encodes ' ' to *%20* which is backward compatible.
In the same time, output can be stringified as per RFC1738 with ' ' equal to '+'.
```
assert.equal(qs.stringify({ a: 'b c' }), 'a=b%20c');
assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC3986' }), 'a=b%20c');
assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC1738' }), 'a=b+c');
```
## Security
Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.
## qs for enterprise
Available as part of the Tidelift Subscription
The maintainers of qs and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications.
Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use.
[Learn more.](https://tidelift.com/subscription/pkg/npm-qs?utm_source=npm-qs&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
[package-url]: https://npmjs.org/package/qs
[npm-version-svg]: https://versionbadg.es/ljharb/qs.svg
[deps-svg]: https://david-dm.org/ljharb/qs.svg
[deps-url]: https://david-dm.org/ljharb/qs
[dev-deps-svg]: https://david-dm.org/ljharb/qs/dev-status.svg
[dev-deps-url]: https://david-dm.org/ljharb/qs#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/qs.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/qs.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/qs.svg
[downloads-url]: https://npm-stat.com/charts.html?package=qs
[codecov-image]: https://codecov.io/gh/ljharb/qs/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/ljharb/qs/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/qs
[actions-url]: https://github.com/ljharb/qs/actions
## Acknowledgements
qs logo by [NUMI](https://github.com/numi-hq/open-design):
[<img src="https://raw.githubusercontent.com/numi-hq/open-design/main/assets/numi-lockup.png" alt="NUMI Logo" style="width: 200px;"/>](https://numi.tech/?ref=qs)
@@ -0,0 +1,8 @@
import { b as MS_IN_MINUTE } from "./constants-BuFquuHl.mjs";
import addMilliseconds from "./addMilliseconds.mjs";
function addMinutes(date, minutes) {
return addMilliseconds(date, minutes * MS_IN_MINUTE);
}
export {
addMinutes as default
};
@@ -0,0 +1,37 @@
/**
* @fileoverview Rule to flag use of with statement
* @author Nicholas C. Zakas
*/
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "Disallow `with` statements",
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-with",
},
schema: [],
messages: {
unexpectedWith: "Unexpected use of 'with' statement.",
},
},
create(context) {
return {
WithStatement(node) {
context.report({ node, messageId: "unexpectedWith" });
},
};
},
};
@@ -0,0 +1,184 @@
# tsc-alias
Replace alias paths with relative paths after typescript compilation. You can add aliases that reference other projects outside your tsconfig.json project by providing a relative path to the baseUrl.
[![npm version](https://badge.fury.io/js/tsc-alias.svg)](https://badge.fury.io/js/tsc-alias)
[![License](https://img.shields.io/:license-mit-blue.svg)](http://doge.mit-license.org)
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/donate/?hosted_button_id=FPRE4VERGHZ3E)
## Comparison to [tsconfig-paths](https://github.com/dividab/tsconfig-paths)
\+ Compile time (no runtime dependencies)
## Getting Started
First, install tsc-alias as devDependency using npm.
```sh
npm install -g tsc-alias
```
```
npm install --save-dev tsc-alias
```
## Add it to your build scripts in package.json
```json
"scripts": {
"build": "tsc --project tsconfig.json && tsc-alias -p tsconfig.json",
}
```
or
```json
"scripts": {
"build": "tsc && tsc-alias",
"build:watch": "tsc && (concurrently \"tsc -w\" \"tsc-alias -w\")"
}
```
## Issues
If you have an issue, please create one. But, before:
- try to check the [FAQ.](https://github.com/justkey007/tsc-alias/discussions/110)
- try to check if there exits alike issues.
- try to run with `--debug` and check if config is correctly loaded and all sourcefiles are found.
## API
### Installation
```sh
npm install tsc-alias
```
### Usage
```typescript
import { replaceTscAliasPaths } from 'tsc-alias';
replaceTscAliasPaths(options?);
```
Here are all the available options:
<table>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
<th>Default Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>project, p</td>
<td>path to tsconfig.json</td>
<td><code>'tsconfig.json'</code></td>
</tr>
<tr>
<td>watch</td>
<td>Observe file changes</td>
<td><code>false</code></td>
</tr>
<tr>
<td>outDir</td>
<td>Run in a folder leaving the "outDir" of the tsconfig.json (relative path to tsconfig)</td>
<td><code>tsconfig.compilerOptions.outDir</code></td>
</tr>
<tr>
<td>declarationDir</td>
<td>Works the same as outDir but for declarationDir</td>
<td><code>tsconfig.compilerOptions.declarationDir</code></td>
</tr>
<tr>
<td>resolveFullPaths</td>
<td>Attempt to replace incomplete import paths (those not ending in <code>.js</code>) with fully resolved paths (for ECMAScript Modules compatibility)</td>
<td><code>false</code></td>
</tr>
<tr>
<td>resolveFullExtension</td>
<td>Allows you to specify the extension of incomplete import paths, works with <code>resolveFullPaths</code></td>
<td><code>'.js' | '.mjs' | '.cjs'</code></td>
</tr>
<tr>
<td>silent</td>
<td>Reduced terminal output. This is a deprecated option and no longer has any effect.</td>
<td><code>true</code></td>
</tr>
<tr>
<td>verbose</td>
<td>Additional information is output to the terminal</td>
<td><code>false</code></td>
</tr>
<tr>
<td>debug</td>
<td>Debug information is send to the terminal</td>
<td><code>false</code></td>
</tr>
<tr>
<td>replacers</td>
<td>Files to import as extra replacers <a href="https://github.com/justkey007/tsc-alias/discussions/73">More info</a></td>
<td><code>[]</code></td>
</tr>
<tr>
<td>output</td>
<td>The output object tsc-alias will send logs to.</td>
<td><code>new Output(options.verbose)</code></td>
</tr>
<tr>
<td>fileExtensions</td>
<td>Overwrite file extensions tsc-alias will use to scan and resolve files.</td>
<td><code>undefined</code></td>
</tr>
</tbody>
</table>
### Configuration via `tsconfig.json` Example
```json
{
"compilerOptions": {
...
},
"tsc-alias": {
"verbose": false,
"resolveFullPaths": true,
"replacers": {
"exampleReplacer": {
"enabled": true,
"file": "./exampleReplacer.js"
},
"otherReplacer": {
"enabled": true,
"file": "./otherReplacer.js"
}
},
"fileExtensions": {
"inputGlob": "{js,jsx,mjs}",
"outputCheck": ["js", "json", "jsx", "mjs"]
}
}
}
```
### Single file replacer
We can use tsc-alias in a single file, with a function that returns the modified contents.
We prepare the replacer with `prepareSingleFileReplaceTscAliasPaths()`, passing the same options that we would pass to `replaceTscAliasPaths()`. That will return a promise of a function that receives the file contents and path, and returns the transformed contents, synchronously.
```typescript
import { prepareSingleFileReplaceTscAliasPaths } from 'tsc-alias';
const runFile: SingleFileReplacer = await prepareSingleFileReplaceTscAliasPaths(options?);
function treatFile(filePath: string) {
const fileContents = fs.readFileSync(filePath, 'utf8');
const newContents = runFile({fileContents, filePath});
// do stuff with newContents
}
```
@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PickFromMappedKey = PickFromMappedKey;
const index_1 = require("../mapped/index");
const pick_1 = require("./pick");
const value_1 = require("../clone/value");
// prettier-ignore
function FromPropertyKey(type, key, options) {
return {
[key]: (0, pick_1.Pick)(type, [key], (0, value_1.Clone)(options))
};
}
// prettier-ignore
function FromPropertyKeys(type, propertyKeys, options) {
return propertyKeys.reduce((result, leftKey) => {
return { ...result, ...FromPropertyKey(type, leftKey, options) };
}, {});
}
// prettier-ignore
function FromMappedKey(type, mappedKey, options) {
return FromPropertyKeys(type, mappedKey.keys, options);
}
// prettier-ignore
function PickFromMappedKey(type, mappedKey, options) {
const properties = FromMappedKey(type, mappedKey, options);
return (0, index_1.MappedResult)(properties);
}
@@ -0,0 +1,33 @@
'use strict'
let Container = require('./container')
let LazyResult, Processor
class Document extends Container {
constructor(defaults) {
// type needs to be passed to super, otherwise child roots won't be normalized correctly
super({ type: 'document', ...defaults })
if (!this.nodes) {
this.nodes = []
}
}
toResult(opts = {}) {
let lazy = new LazyResult(new Processor(), this, opts)
return lazy.stringify()
}
}
Document.registerLazyResult = dependant => {
LazyResult = dependant
}
Document.registerProcessor = dependant => {
Processor = dependant
}
module.exports = Document
Document.default = Document
@@ -0,0 +1,82 @@
import { MutableRefObject } from 'react';
import { ReadyState } from './constants';
export interface QueryParams {
[key: string]: string | number;
}
export interface Options {
fromSocketIO?: boolean;
queryParams?: QueryParams;
protocols?: string | string[];
share?: boolean;
onOpen?: (event: WebSocketEventMap['open']) => void;
onClose?: (event: WebSocketEventMap['close']) => void;
onMessage?: (event: WebSocketEventMap['message']) => void;
onError?: (event: WebSocketEventMap['error']) => void;
onReconnectStop?: (numAttempts: number) => void;
shouldReconnect?: (event: WebSocketEventMap['close']) => boolean;
reconnectInterval?: number | ((lastAttemptNumber: number) => number);
reconnectAttempts?: number;
filter?: (message: WebSocketEventMap['message']) => boolean;
retryOnError?: boolean;
eventSourceOptions?: EventSourceOnly;
skipAssert?: boolean;
heartbeat?: boolean | HeartbeatOptions;
disableJson?: boolean;
}
export type EventSourceOnly = Omit<Options, 'eventSourceOptions'> & EventSourceInit;
export type HeartbeatOptions = {
message?: "ping" | "pong" | string | (() => string);
returnMessage?: "ping" | "pong" | string;
timeout?: number;
interval?: number;
};
export interface EventSourceEventHandlers {
[eventName: string]: (message: EventSourceEventMap['message']) => void;
}
export interface EventSourceOptions extends EventSourceOnly {
events?: EventSourceEventHandlers;
}
export type ReadyStateState = {
[url: string]: ReadyState,
}
export type WebSocketMessage = string | ArrayBuffer | SharedArrayBuffer | Blob | ArrayBufferView;
export type SendMessage = (message: WebSocketMessage, keep?: boolean) => void;
export type SendJsonMessage = <T = unknown>(jsonMessage: T, keep?: boolean) => void;
export type Subscriber<T = WebSocketEventMap['message']> = {
setLastMessage: (message: T) => void,
setReadyState: (readyState: ReadyState) => void,
optionsRef: MutableRefObject<Options>,
reconnectCount: MutableRefObject<number>,
lastMessageTime: MutableRefObject<number>,
reconnect: MutableRefObject<() => void>,
}
export type WebSocketHook<T = unknown, P = WebSocketEventMap['message'] | null> = {
sendMessage: SendMessage,
sendJsonMessage: SendJsonMessage,
lastMessage: P,
lastJsonMessage: T,
readyState: ReadyState,
getWebSocket: () => (WebSocketLike | null),
}
export type EventSourceHook = Omit<
WebSocketHook<EventSourceEventMap['message']>,
'sendMessage' | 'sendJsonMessage' | 'lastMessage' | 'lastJsonMessage' | 'getWebSocket'
> & {
lastEvent: EventSourceEventMap['message'] | null,
getEventSource: () => (WebSocketLike | null),
}
export type WebSocketLike = WebSocket | EventSource;
@@ -0,0 +1,426 @@
'use strict'
module.exports = Yallist
Yallist.Node = Node
Yallist.create = Yallist
function Yallist (list) {
var self = this
if (!(self instanceof Yallist)) {
self = new Yallist()
}
self.tail = null
self.head = null
self.length = 0
if (list && typeof list.forEach === 'function') {
list.forEach(function (item) {
self.push(item)
})
} else if (arguments.length > 0) {
for (var i = 0, l = arguments.length; i < l; i++) {
self.push(arguments[i])
}
}
return self
}
Yallist.prototype.removeNode = function (node) {
if (node.list !== this) {
throw new Error('removing node which does not belong to this list')
}
var next = node.next
var prev = node.prev
if (next) {
next.prev = prev
}
if (prev) {
prev.next = next
}
if (node === this.head) {
this.head = next
}
if (node === this.tail) {
this.tail = prev
}
node.list.length--
node.next = null
node.prev = null
node.list = null
return next
}
Yallist.prototype.unshiftNode = function (node) {
if (node === this.head) {
return
}
if (node.list) {
node.list.removeNode(node)
}
var head = this.head
node.list = this
node.next = head
if (head) {
head.prev = node
}
this.head = node
if (!this.tail) {
this.tail = node
}
this.length++
}
Yallist.prototype.pushNode = function (node) {
if (node === this.tail) {
return
}
if (node.list) {
node.list.removeNode(node)
}
var tail = this.tail
node.list = this
node.prev = tail
if (tail) {
tail.next = node
}
this.tail = node
if (!this.head) {
this.head = node
}
this.length++
}
Yallist.prototype.push = function () {
for (var i = 0, l = arguments.length; i < l; i++) {
push(this, arguments[i])
}
return this.length
}
Yallist.prototype.unshift = function () {
for (var i = 0, l = arguments.length; i < l; i++) {
unshift(this, arguments[i])
}
return this.length
}
Yallist.prototype.pop = function () {
if (!this.tail) {
return undefined
}
var res = this.tail.value
this.tail = this.tail.prev
if (this.tail) {
this.tail.next = null
} else {
this.head = null
}
this.length--
return res
}
Yallist.prototype.shift = function () {
if (!this.head) {
return undefined
}
var res = this.head.value
this.head = this.head.next
if (this.head) {
this.head.prev = null
} else {
this.tail = null
}
this.length--
return res
}
Yallist.prototype.forEach = function (fn, thisp) {
thisp = thisp || this
for (var walker = this.head, i = 0; walker !== null; i++) {
fn.call(thisp, walker.value, i, this)
walker = walker.next
}
}
Yallist.prototype.forEachReverse = function (fn, thisp) {
thisp = thisp || this
for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
fn.call(thisp, walker.value, i, this)
walker = walker.prev
}
}
Yallist.prototype.get = function (n) {
for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
// abort out of the list early if we hit a cycle
walker = walker.next
}
if (i === n && walker !== null) {
return walker.value
}
}
Yallist.prototype.getReverse = function (n) {
for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
// abort out of the list early if we hit a cycle
walker = walker.prev
}
if (i === n && walker !== null) {
return walker.value
}
}
Yallist.prototype.map = function (fn, thisp) {
thisp = thisp || this
var res = new Yallist()
for (var walker = this.head; walker !== null;) {
res.push(fn.call(thisp, walker.value, this))
walker = walker.next
}
return res
}
Yallist.prototype.mapReverse = function (fn, thisp) {
thisp = thisp || this
var res = new Yallist()
for (var walker = this.tail; walker !== null;) {
res.push(fn.call(thisp, walker.value, this))
walker = walker.prev
}
return res
}
Yallist.prototype.reduce = function (fn, initial) {
var acc
var walker = this.head
if (arguments.length > 1) {
acc = initial
} else if (this.head) {
walker = this.head.next
acc = this.head.value
} else {
throw new TypeError('Reduce of empty list with no initial value')
}
for (var i = 0; walker !== null; i++) {
acc = fn(acc, walker.value, i)
walker = walker.next
}
return acc
}
Yallist.prototype.reduceReverse = function (fn, initial) {
var acc
var walker = this.tail
if (arguments.length > 1) {
acc = initial
} else if (this.tail) {
walker = this.tail.prev
acc = this.tail.value
} else {
throw new TypeError('Reduce of empty list with no initial value')
}
for (var i = this.length - 1; walker !== null; i--) {
acc = fn(acc, walker.value, i)
walker = walker.prev
}
return acc
}
Yallist.prototype.toArray = function () {
var arr = new Array(this.length)
for (var i = 0, walker = this.head; walker !== null; i++) {
arr[i] = walker.value
walker = walker.next
}
return arr
}
Yallist.prototype.toArrayReverse = function () {
var arr = new Array(this.length)
for (var i = 0, walker = this.tail; walker !== null; i++) {
arr[i] = walker.value
walker = walker.prev
}
return arr
}
Yallist.prototype.slice = function (from, to) {
to = to || this.length
if (to < 0) {
to += this.length
}
from = from || 0
if (from < 0) {
from += this.length
}
var ret = new Yallist()
if (to < from || to < 0) {
return ret
}
if (from < 0) {
from = 0
}
if (to > this.length) {
to = this.length
}
for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
walker = walker.next
}
for (; walker !== null && i < to; i++, walker = walker.next) {
ret.push(walker.value)
}
return ret
}
Yallist.prototype.sliceReverse = function (from, to) {
to = to || this.length
if (to < 0) {
to += this.length
}
from = from || 0
if (from < 0) {
from += this.length
}
var ret = new Yallist()
if (to < from || to < 0) {
return ret
}
if (from < 0) {
from = 0
}
if (to > this.length) {
to = this.length
}
for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
walker = walker.prev
}
for (; walker !== null && i > from; i--, walker = walker.prev) {
ret.push(walker.value)
}
return ret
}
Yallist.prototype.splice = function (start, deleteCount, ...nodes) {
if (start > this.length) {
start = this.length - 1
}
if (start < 0) {
start = this.length + start;
}
for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
walker = walker.next
}
var ret = []
for (var i = 0; walker && i < deleteCount; i++) {
ret.push(walker.value)
walker = this.removeNode(walker)
}
if (walker === null) {
walker = this.tail
}
if (walker !== this.head && walker !== this.tail) {
walker = walker.prev
}
for (var i = 0; i < nodes.length; i++) {
walker = insert(this, walker, nodes[i])
}
return ret;
}
Yallist.prototype.reverse = function () {
var head = this.head
var tail = this.tail
for (var walker = head; walker !== null; walker = walker.prev) {
var p = walker.prev
walker.prev = walker.next
walker.next = p
}
this.head = tail
this.tail = head
return this
}
function insert (self, node, value) {
var inserted = node === self.head ?
new Node(value, null, node, self) :
new Node(value, node, node.next, self)
if (inserted.next === null) {
self.tail = inserted
}
if (inserted.prev === null) {
self.head = inserted
}
self.length++
return inserted
}
function push (self, item) {
self.tail = new Node(item, self.tail, null, self)
if (!self.head) {
self.head = self.tail
}
self.length++
}
function unshift (self, item) {
self.head = new Node(item, null, self.head, self)
if (!self.tail) {
self.tail = self.head
}
self.length++
}
function Node (value, prev, next, list) {
if (!(this instanceof Node)) {
return new Node(value, prev, next, list)
}
this.list = list
this.value = value
if (prev) {
prev.next = this
this.prev = prev
} else {
this.prev = null
}
if (next) {
next.prev = this
this.next = next
} else {
this.next = null
}
}
try {
// add if support for Symbol.iterator is present
require('./iterator.js')(Yallist)
} catch (er) {}
@@ -0,0 +1,7 @@
import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
/**
* Recommended rules for code correctness that you can drop in without additional configuration.
* @see {@link https://typescript-eslint.io/users/configs#recommended}
*/
declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray;
export default _default;
@@ -0,0 +1,43 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ, ReferenceTracker } = require("eslint-utils")
module.exports = {
meta: {
docs: {
description: "disallow the `Object.getOwnPropertySymbols` method.",
category: "ES2015",
recommended: false,
url:
"http://mysticatea.github.io/eslint-plugin-es/rules/no-object-getownpropertysymbols.html",
},
fixable: null,
messages: {
forbidden: "ES2015 '{{name}}' method is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Program:exit"() {
const tracker = new ReferenceTracker(context.getScope())
for (const { node, path } of tracker.iterateGlobalReferences({
Object: {
getOwnPropertySymbols: { [READ]: true },
},
})) {
context.report({
node,
messageId: "forbidden",
data: { name: path.join(".") },
})
}
},
}
},
}
@@ -0,0 +1,20 @@
Copyright (c) 2014 Fractal <contact@wearefractal.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G N O"},C:{"1":"0 1 2 3 4 5 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"xC TC 0C 1C","8":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B"},D:{"1":"0 1 2 3 4 5 dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"J ZB","8":"K D E","132":"6 7 8 F A B C L M G N O P aB","260":"9 AB BB CB DB EB FB bB cB"},E:{"1":"QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F A B C L 2C ZC 3C 4C 5C 6C aC NC OC 7C","516":"M G 8C 9C bC cC PC AD"},F:{"1":"0 1 2 3 4 5 6 7 8 9 aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"F FD GD HD","8":"B ID","132":"NC uC JD","260":"C G N O P OC"},G:{"1":"bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD"},H:{"1":"hD"},I:{"1":"I vC mD nD","2":"TC iD jD kD","132":"J lD"},J:{"2":"D A"},K:{"1":"C H NC uC OC","2":"A","132":"B"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"2D","8":"1D"}},B:6,C:"WebP image format",D:true};
@@ -0,0 +1,43 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _jsxAstUtils = require("jsx-ast-utils");
var _schemas = require("../util/schemas");
/**
* @fileoverview Enforce no accesskey attribute on element.
* @author Ethan Cohen
*/
// ----------------------------------------------------------------------------
// Rule Definition
// ----------------------------------------------------------------------------
var errorMessage = 'No access key attribute allowed. Inconsistencies between keyboard shortcuts and keyboard commands used by screen readers and keyboard-only users create a11y complications.';
var schema = (0, _schemas.generateObjSchema)();
var _default = exports["default"] = {
meta: {
docs: {
url: 'https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-access-key.md',
description: 'Enforce that the `accessKey` prop is not used on any element to avoid complications with keyboard commands used by a screen reader.'
},
schema: [schema]
},
create: function create(context) {
return {
JSXOpeningElement: function JSXOpeningElement(node) {
var accessKey = (0, _jsxAstUtils.getProp)(node.attributes, 'accesskey');
var accessKeyValue = (0, _jsxAstUtils.getPropValue)(accessKey);
if (accessKey && accessKeyValue) {
context.report({
node,
message: errorMessage
});
}
}
};
}
};
module.exports = exports.default;
@@ -0,0 +1,69 @@
/*
* Copyright 2021 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import {getOwnerWindow} from '@react-aria/utils';
function isStyleVisible(element: Element) {
const windowObject = getOwnerWindow(element);
if (!(element instanceof windowObject.HTMLElement) && !(element instanceof windowObject.SVGElement)) {
return false;
}
let {display, visibility} = element.style;
let isVisible = (
display !== 'none' &&
visibility !== 'hidden' &&
visibility !== 'collapse'
);
if (isVisible) {
const {getComputedStyle} = element.ownerDocument.defaultView as unknown as Window;
let {display: computedDisplay, visibility: computedVisibility} = getComputedStyle(element);
isVisible = (
computedDisplay !== 'none' &&
computedVisibility !== 'hidden' &&
computedVisibility !== 'collapse'
);
}
return isVisible;
}
function isAttributeVisible(element: Element, childElement?: Element) {
return (
!element.hasAttribute('hidden') &&
// Ignore HiddenSelect when tree walking.
!element.hasAttribute('data-react-aria-prevent-focus') &&
(element.nodeName === 'DETAILS' &&
childElement &&
childElement.nodeName !== 'SUMMARY'
? element.hasAttribute('open')
: true)
);
}
/**
* Adapted from https://github.com/testing-library/jest-dom and
* https://github.com/vuejs/vue-test-utils-next/.
* Licensed under the MIT License.
* @param element - Element to evaluate for display or visibility.
*/
export function isElementVisible(element: Element, childElement?: Element) {
return (
element.nodeName !== '#comment' &&
isStyleVisible(element) &&
isAttributeVisible(element, childElement) &&
(!element.parentElement || isElementVisible(element.parentElement, element))
);
}
@@ -0,0 +1,4 @@
export declare const isObjectType: (value: unknown) => value is object;
declare const _default: <T extends object>(value: unknown) => value is T;
export default _default;
//# sourceMappingURL=isObject.d.ts.map
@@ -0,0 +1,16 @@
require('thenify-all').withCallback(
require('dns'),
exports, [
'lookup',
'resolve',
'resolve4',
'resolve6',
'resolveCname',
'resolveMx',
'resolveNs',
'resolveSrv',
'resolveTxt',
'reverse'
]
)
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;AAWM,MAAM,4CAA+D,CAAA,GAAA,sCAAI,EAAE,aAAa,CAAyB;IAAC,UAAU,KAAO;AAAC;AAC3I,0CAAsB,WAAW,GAAG","sources":["packages/@react-aria/interactions/src/context.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusableElement} from '@react-types/shared';\nimport {PressProps} from './usePress';\nimport React, {MutableRefObject} from 'react';\n\ninterface IPressResponderContext extends PressProps {\n register(): void,\n ref?: MutableRefObject<FocusableElement>\n}\n\nexport const PressResponderContext: React.Context<IPressResponderContext> = React.createContext<IPressResponderContext>({register: () => {}});\nPressResponderContext.displayName = 'PressResponderContext';\n"],"names":[],"version":3,"file":"context.main.js.map"}
@@ -0,0 +1,64 @@
{
"name": "@heroui/dropdown",
"version": "2.3.10",
"description": "A dropdown displays a list of actions or options that a user can choose.",
"keywords": [
"dropdown"
],
"author": "Junior Garcia <jrgarciadev@gmail.com>",
"homepage": "https://heroui.com",
"license": "MIT",
"main": "dist/index.js",
"sideEffects": false,
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/heroui-inc/heroui.git",
"directory": "packages/components/dropdown"
},
"bugs": {
"url": "https://github.com/heroui-inc/heroui/issues"
},
"peerDependencies": {
"@heroui/system": ">=2.4.0",
"@heroui/theme": ">=2.4.0",
"framer-motion": ">=11.5.6 || >=12.0.0-alpha.1",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0"
},
"dependencies": {
"@react-aria/focus": "3.19.0",
"@react-aria/menu": "3.16.0",
"@react-aria/utils": "3.26.0",
"@react-stately/menu": "3.9.0",
"@react-types/menu": "3.9.13",
"@heroui/aria-utils": "2.2.8",
"@heroui/menu": "2.2.10",
"@heroui/popover": "2.3.10",
"@heroui/react-utils": "2.1.4",
"@heroui/shared-utils": "2.1.3"
},
"clean-package": "../../../clean-package.config.json",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json"
},
"scripts": {
"build": "tsup src --dts",
"build:fast": "tsup src",
"dev": "pnpm build:fast --watch",
"clean": "rimraf dist .turbo",
"typecheck": "tsc --noEmit"
}
}
@@ -0,0 +1,44 @@
import { PluginFunc, UnitType, ConfigType } from 'dayjs'
declare const plugin: PluginFunc
export = plugin
declare module 'dayjs' {
interface Dayjs {
years(): number
years(value: number): Dayjs
months(): number
months(value: number): Dayjs
dates(): number
dates(value: number): Dayjs
weeks(): number
weeks(value: number): Dayjs
days(): number
days(value: number): Dayjs
hours(): number
hours(value: number): Dayjs
minutes(): number
minutes(value: number): Dayjs
seconds(): number
seconds(value: number): Dayjs
milliseconds(): number
milliseconds(value: number): Dayjs
}
}
@@ -0,0 +1,12 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2023_collection = void 0;
const base_config_1 = require("./base-config");
exports.es2023_collection = {
libs: [],
variables: [['WeakKeyTypes', base_config_1.TYPE]],
};
@@ -0,0 +1,14 @@
module.exports = {
prefix(prop) {
let match = prop.match(/^(-\w+-)/)
if (match) {
return match[0]
}
return ''
},
unprefixed(prop) {
return prop.replace(/^-\w+-/, '')
}
}
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
# Check whatever is staged for issues
yarn lint-staged
@@ -0,0 +1,45 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _reject2 = require('./internal/reject.js');
var _reject3 = _interopRequireDefault(_reject2);
var _eachOfLimit = require('./internal/eachOfLimit.js');
var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`reject`]{@link module:Collections.reject} but runs a maximum of `limit` async operations at a
* time.
*
* @name rejectLimit
* @static
* @memberOf module:Collections
* @method
* @see [async.reject]{@link module:Collections.reject}
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {Function} iteratee - An async truth test to apply to each item in
* `coll`.
* The should complete with a boolean value as its `result`.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Invoked with (err, results).
* @returns {Promise} a promise, if no callback is passed
*/
function rejectLimit(coll, limit, iteratee, callback) {
return (0, _reject3.default)((0, _eachOfLimit2.default)(limit), coll, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(rejectLimit, 4);
module.exports = exports.default;
@@ -0,0 +1,18 @@
var baseSlice = require('./_baseSlice');
/**
* Casts `array` to a slice if it's needed.
*
* @private
* @param {Array} array The array to inspect.
* @param {number} start The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns the cast slice.
*/
function castSlice(array, start, end) {
var length = array.length;
end = end === undefined ? length : end;
return (!start && end >= length) ? array : baseSlice(array, start, end);
}
module.exports = castSlice;
@@ -0,0 +1,33 @@
import {I18nProvider as $18f2051aff69b9bf$export$a54013f0d02a8f82, useLocale as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7} from "./context.mjs";
import {useMessageFormatter as $321bc95feeb923dd$export$ec23bf898b1eed85} from "./useMessageFormatter.mjs";
import {useLocalizedStringDictionary as $fca6afa0e843324b$export$87b761675e8eaa10, useLocalizedStringFormatter as $fca6afa0e843324b$export$f12b703ca79dfbb1} from "./useLocalizedStringFormatter.mjs";
import {useListFormatter as $33bf17300c498528$export$a2f47a3d2973640} from "./useListFormatter.mjs";
import {useDateFormatter as $896ba0a80a8f4d36$export$85fd5fdf27bacc79} from "./useDateFormatter.mjs";
import {useNumberFormatter as $a916eb452884faea$export$b7a616150fdb9f44} from "./useNumberFormatter.mjs";
import {useCollator as $325a3faab7a68acd$export$a16aca283550c30d} from "./useCollator.mjs";
import {useFilter as $bb77f239b46e8c72$export$3274cf84b703fff} from "./useFilter.mjs";
import {isRTL as $148a7a147e38ea7f$export$702d680b21cbd764} from "./utils.mjs";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
export {$18f2051aff69b9bf$export$a54013f0d02a8f82 as I18nProvider, $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 as useLocale, $321bc95feeb923dd$export$ec23bf898b1eed85 as useMessageFormatter, $fca6afa0e843324b$export$f12b703ca79dfbb1 as useLocalizedStringFormatter, $fca6afa0e843324b$export$87b761675e8eaa10 as useLocalizedStringDictionary, $33bf17300c498528$export$a2f47a3d2973640 as useListFormatter, $896ba0a80a8f4d36$export$85fd5fdf27bacc79 as useDateFormatter, $a916eb452884faea$export$b7a616150fdb9f44 as useNumberFormatter, $325a3faab7a68acd$export$a16aca283550c30d as useCollator, $bb77f239b46e8c72$export$3274cf84b703fff as useFilter, $148a7a147e38ea7f$export$702d680b21cbd764 as isRTL};
//# sourceMappingURL=module.js.map
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = getImplicitRoleForMeter;
/**
* Returns the implicit role for a meter tag.
*/
function getImplicitRoleForMeter() {
return 'progressbar';
}
module.exports = exports.default;
@@ -0,0 +1 @@
{"name":"concat-stream","version":"2.0.0","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532103412,"integrity":"sha512-fchmlEBjrEp30g3SpNA9XtLT0ew3En3nmfIYPsSarfb4eivZEAMkNi/JymlQF+/w6wzKCEbyECW0AnO36+oBBg==","mode":420,"size":1187},"index.js":{"checkedAt":1794532103413,"integrity":"sha512-hjMQtUCTmJlXRjqX5oCd8qI/cVbzc52gEnVQDQpYfOCsnV4Qx9Ls/2nmmy5ND7914T9NL3b+9dlU26Q1URkLGw==","mode":420,"size":3775},"LICENSE":{"checkedAt":1794532103413,"integrity":"sha512-XOvyq85oc/o9HgnaEbo3xvQkjPb9HT1af5GalL1qNVUID6BC+c7qlXPTPWibQuPqVmYBS46odeyk0LyjDaDmiA==","mode":420,"size":1084},"readme.md":{"checkedAt":1794532103413,"integrity":"sha512-I5DOZhoEsSetcLFNPkG9ebaE6vm9RFE9uuc9ZvZymgadoWQWL+dubi0yD5UzqZmua0/wtpTblVIBftFnNgZ4Ag==","mode":420,"size":3510}}}
@@ -0,0 +1,93 @@
/* eslint-env jest */
import getProp from '../src/getProp';
const nodeVersion = parseInt(process.version.match(/^v(\d+)\./)[1], 10);
export const fallbackToBabylon = nodeVersion < 6;
let parserName;
const babelParser = fallbackToBabylon ? require('babylon') : require('@babel/parser');
const flowParser = require('flow-parser');
const defaultPlugins = [
'jsx',
'functionBind',
'estree',
'objectRestSpread',
'optionalChaining',
// 'nullishCoalescing', // TODO: update to babel 7
];
let plugins = [...defaultPlugins];
let isESM = false;
export function setParserName(name) {
parserName = name;
}
export function changePlugins(pluginOrFn) {
if (Array.isArray(pluginOrFn)) {
plugins = pluginOrFn;
} else if (typeof pluginOrFn === 'function') {
plugins = pluginOrFn(plugins);
} else {
throw new Error('changePlugins argument should be either an array or a function');
}
}
export function setIsESM() {
isESM = true;
}
beforeEach(() => {
plugins = [...defaultPlugins];
isESM = false;
});
function parse(code) {
if (parserName === undefined) {
throw new Error('No parser specified');
}
if (parserName === 'babel') {
try {
return babelParser.parse(code, { plugins, sourceFilename: 'test.js', ...(isESM && { sourceType: 'module' }) });
} catch (_) {
// eslint-disable-next-line no-console
console.warn(`Failed to parse with ${fallbackToBabylon ? 'babylon' : 'Babel'} parser.`);
}
}
if (parserName === 'flow') {
try {
return flowParser.parse(code, { plugins });
} catch (_) {
// eslint-disable-next-line no-console
console.warn('Failed to parse with the Flow parser');
}
}
throw new Error(`The parser ${parserName} is not yet supported for testing.`);
}
export function getOpeningElement(code) {
const parsedCode = parse(code);
let body;
if (parsedCode.program) {
// eslint-disable-next-line prefer-destructuring
body = parsedCode.program.body;
} else {
// eslint-disable-next-line prefer-destructuring
body = parsedCode.body;
}
if (Array.isArray(body) && body[0] != null) {
const [{ expression }] = body;
return expression.type === 'JSXFragment' ? expression.openingFragment : expression.openingElement;
}
return null;
}
export function extractProp(code, prop = 'foo') {
const node = getOpeningElement(code);
const { attributes: props } = node;
return getProp(props, prop);
}
export const describeIfNotBabylon = fallbackToBabylon ? describe.skip : describe;
@@ -0,0 +1,43 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ, ReferenceTracker } = require("eslint-utils")
module.exports = {
meta: {
docs: {
description: "disallow the `Array.isArray` method.",
category: "ES5",
recommended: false,
url:
"http://mysticatea.github.io/eslint-plugin-es/rules/no-array-isarray.html",
},
fixable: null,
messages: {
forbidden: "ES5 '{{name}}' method is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Program:exit"() {
const tracker = new ReferenceTracker(context.getScope())
for (const { node, path } of tracker.iterateGlobalReferences({
Array: {
isArray: { [READ]: true },
},
})) {
context.report({
node,
messageId: "forbidden",
data: { name: path.join(".") },
})
}
},
}
},
}
@@ -0,0 +1,128 @@
# foreground-child
Run a child as if it's the foreground process. Give it stdio. Exit
when it exits.
Mostly this module is here to support some use cases around
wrapping child processes for test coverage and such. But it's
also generally useful any time you want one program to execute
another as if it's the "main" process, for example, if a program
takes a `--cmd` argument to execute in some way.
## USAGE
```js
import { foregroundChild } from 'foreground-child'
// hybrid module, this also works:
// const { foregroundChild } = require('foreground-child')
// cats out this file
const child = foregroundChild('cat', [__filename])
// At this point, it's best to just do nothing else.
// return or whatever.
// If the child gets a signal, or just exits, then this
// parent process will exit in the same way.
```
You can provide custom spawn options by passing an object after
the program and arguments:
```js
const child = foregroundChild(`cat ${__filename}`, { shell: true })
```
A callback can optionally be provided, if you want to perform an
action before your foreground-child exits:
```js
const child = foregroundChild('cat', [__filename], spawnOptions, () => {
doSomeActions()
})
```
The callback can return a Promise in order to perform
asynchronous actions. If the callback does not return a promise,
then it must complete its actions within a single JavaScript
tick.
```js
const child = foregroundChild('cat', [__filename], async () => {
await doSomeAsyncActions()
})
```
If the callback throws or rejects, then it will be unhandled, and
node will exit in error.
If the callback returns a string value, then that will be used as
the signal to exit the parent process. If it returns a number,
then that number will be used as the parent exit status code. If
it returns boolean `false`, then the parent process will not be
terminated. If it returns `undefined`, then it will exit with the
same signal/code as the child process.
## Caveats
The "normal" standard IO file descriptors (0, 1, and 2 for stdin,
stdout, and stderr respectively) are shared with the child process.
Additionally, if there is an IPC channel set up in the parent, then
messages are proxied to the child on file descriptor 3.
In Node, it's possible to also map arbitrary file descriptors
into a child process. In these cases, foreground-child will not
map the file descriptors into the child. If file descriptors 0,
1, or 2 are used for the IPC channel, then strange behavior may
happen (like printing IPC messages to stderr, for example).
Note that a SIGKILL will always kill the parent process, but
will not proxy the signal to the child process, because SIGKILL
cannot be caught. In order to address this, a special "watchdog"
child process is spawned which will send a SIGKILL to the child
process if it does not terminate within half a second after the
watchdog receives a SIGHUP due to its parent terminating.
On Windows, issuing a `process.kill(process.pid, signal)` with a
fatal termination signal may cause the process to exit with a `1`
status code rather than reporting the signal properly. This
module tries to do the right thing, but on Windows systems, you
may see that incorrect result. There is as far as I'm aware no
workaround for this.
## util: `foreground-child/proxy-signals`
If you just want to proxy the signals to a child process that the
main process receives, you can use the `proxy-signals` export
from this package.
```js
import { proxySignals } from 'foreground-child/proxy-signals'
const childProcess = spawn('command', ['some', 'args'])
proxySignals(childProcess)
```
Now, any fatal signal received by the current process will be
proxied to the child process.
It doesn't go in the other direction; ie, signals sent to the
child process will not affect the parent. For that, listen to the
child `exit` or `close` events, and handle them appropriately.
## util: `foreground-child/watchdog`
If you are spawning a child process, and want to ensure that it
isn't left dangling if the parent process exits, you can use the
watchdog utility exported by this module.
```js
import { watchdog } from 'foreground-child/watchdog'
const childProcess = spawn('command', ['some', 'args'])
const watchdogProcess = watchdog(childProcess)
// watchdogProcess is a reference to the process monitoring the
// parent and child. There's usually no reason to do anything
// with it, as it's silent and will terminate
// automatically when it's no longer needed.
```
@@ -0,0 +1,3 @@
declare const _exports: import('eslint').Rule.RuleModule;
export = _exports;
//# sourceMappingURL=require-default-props.d.ts.map
@@ -0,0 +1,229 @@
/**
* Copyright (c) 2019 The xterm.js authors. All rights reserved.
* @license MIT
*/
import { IParams, ParamsArray } from 'common/parser/Types';
// max value supported for a single param/subparam (clamped to positive int32 range)
const MAX_VALUE = 0x7FFFFFFF;
// max allowed subparams for a single sequence (hardcoded limitation)
const MAX_SUBPARAMS = 256;
/**
* Params storage class.
* This type is used by the parser to accumulate sequence parameters and sub parameters
* and transmit them to the input handler actions.
*
* NOTES:
* - params object for action handlers is borrowed, use `.toArray` or `.clone` to get a copy
* - never read beyond `params.length - 1` (likely to contain arbitrary data)
* - `.getSubParams` returns a borrowed typed array, use `.getSubParamsAll` for cloned sub params
* - hardcoded limitations:
* - max. value for a single (sub) param is 2^31 - 1 (greater values are clamped to that)
* - max. 256 sub params possible
* - negative values are not allowed beside -1 (placeholder for default value)
*
* About ZDM (Zero Default Mode):
* ZDM is not orchestrated by this class. If the parser is in ZDM,
* it should add 0 for empty params, otherwise -1. This does not apply
* to subparams, empty subparams should always be added with -1.
*/
export class Params implements IParams {
// params store and length
public params: Int32Array;
public length: number;
// sub params store and length
protected _subParams: Int32Array;
protected _subParamsLength: number;
// sub params offsets from param: param idx --> [start, end] offset
private _subParamsIdx: Uint16Array;
private _rejectDigits: boolean;
private _rejectSubDigits: boolean;
private _digitIsSub: boolean;
/**
* Create a `Params` type from JS array representation.
*/
public static fromArray(values: ParamsArray): Params {
const params = new Params();
if (!values.length) {
return params;
}
// skip leading sub params
for (let i = (Array.isArray(values[0])) ? 1 : 0; i < values.length; ++i) {
const value = values[i];
if (Array.isArray(value)) {
for (let k = 0; k < value.length; ++k) {
params.addSubParam(value[k]);
}
} else {
params.addParam(value);
}
}
return params;
}
/**
* @param maxLength max length of storable parameters
* @param maxSubParamsLength max length of storable sub parameters
*/
constructor(public maxLength: number = 32, public maxSubParamsLength: number = 32) {
if (maxSubParamsLength > MAX_SUBPARAMS) {
throw new Error('maxSubParamsLength must not be greater than 256');
}
this.params = new Int32Array(maxLength);
this.length = 0;
this._subParams = new Int32Array(maxSubParamsLength);
this._subParamsLength = 0;
this._subParamsIdx = new Uint16Array(maxLength);
this._rejectDigits = false;
this._rejectSubDigits = false;
this._digitIsSub = false;
}
/**
* Clone object.
*/
public clone(): Params {
const newParams = new Params(this.maxLength, this.maxSubParamsLength);
newParams.params.set(this.params);
newParams.length = this.length;
newParams._subParams.set(this._subParams);
newParams._subParamsLength = this._subParamsLength;
newParams._subParamsIdx.set(this._subParamsIdx);
newParams._rejectDigits = this._rejectDigits;
newParams._rejectSubDigits = this._rejectSubDigits;
newParams._digitIsSub = this._digitIsSub;
return newParams;
}
/**
* Get a JS array representation of the current parameters and sub parameters.
* The array is structured as follows:
* sequence: "1;2:3:4;5::6"
* array : [1, 2, [3, 4], 5, [-1, 6]]
*/
public toArray(): ParamsArray {
const res: ParamsArray = [];
for (let i = 0; i < this.length; ++i) {
res.push(this.params[i]);
const start = this._subParamsIdx[i] >> 8;
const end = this._subParamsIdx[i] & 0xFF;
if (end - start > 0) {
res.push(Array.prototype.slice.call(this._subParams, start, end));
}
}
return res;
}
/**
* Reset to initial empty state.
*/
public reset(): void {
this.length = 0;
this._subParamsLength = 0;
this._rejectDigits = false;
this._rejectSubDigits = false;
this._digitIsSub = false;
}
/**
* Add a parameter value.
* `Params` only stores up to `maxLength` parameters, any later
* parameter will be ignored.
* Note: VT devices only stored up to 16 values, xterm seems to
* store up to 30.
*/
public addParam(value: number): void {
this._digitIsSub = false;
if (this.length >= this.maxLength) {
this._rejectDigits = true;
return;
}
if (value < -1) {
throw new Error('values lesser than -1 are not allowed');
}
this._subParamsIdx[this.length] = this._subParamsLength << 8 | this._subParamsLength;
this.params[this.length++] = value > MAX_VALUE ? MAX_VALUE : value;
}
/**
* Add a sub parameter value.
* The sub parameter is automatically associated with the last parameter value.
* Thus it is not possible to add a subparameter without any parameter added yet.
* `Params` only stores up to `subParamsLength` sub parameters, any later
* sub parameter will be ignored.
*/
public addSubParam(value: number): void {
this._digitIsSub = true;
if (!this.length) {
return;
}
if (this._rejectDigits || this._subParamsLength >= this.maxSubParamsLength) {
this._rejectSubDigits = true;
return;
}
if (value < -1) {
throw new Error('values lesser than -1 are not allowed');
}
this._subParams[this._subParamsLength++] = value > MAX_VALUE ? MAX_VALUE : value;
this._subParamsIdx[this.length - 1]++;
}
/**
* Whether parameter at index `idx` has sub parameters.
*/
public hasSubParams(idx: number): boolean {
return ((this._subParamsIdx[idx] & 0xFF) - (this._subParamsIdx[idx] >> 8) > 0);
}
/**
* Return sub parameters for parameter at index `idx`.
* Note: The values are borrowed, thus you need to copy
* the values if you need to hold them in nonlocal scope.
*/
public getSubParams(idx: number): Int32Array | null {
const start = this._subParamsIdx[idx] >> 8;
const end = this._subParamsIdx[idx] & 0xFF;
if (end - start > 0) {
return this._subParams.subarray(start, end);
}
return null;
}
/**
* Return all sub parameters as {idx: subparams} mapping.
* Note: The values are not borrowed.
*/
public getSubParamsAll(): {[idx: number]: Int32Array} {
const result: {[idx: number]: Int32Array} = {};
for (let i = 0; i < this.length; ++i) {
const start = this._subParamsIdx[i] >> 8;
const end = this._subParamsIdx[i] & 0xFF;
if (end - start > 0) {
result[i] = this._subParams.slice(start, end);
}
}
return result;
}
/**
* Add a single digit value to current parameter.
* This is used by the parser to account digits on a char by char basis.
*/
public addDigit(value: number): void {
let length;
if (this._rejectDigits
|| !(length = this._digitIsSub ? this._subParamsLength : this.length)
|| (this._digitIsSub && this._rejectSubDigits)
) {
return;
}
const store = this._digitIsSub ? this._subParams : this.params;
const cur = store[length - 1];
store[length - 1] = ~cur ? Math.min(cur * 10 + value, MAX_VALUE) : value;
}
}
@@ -0,0 +1,133 @@
var test = require('tape')
var spec = require('stream-spec')
var through = require('../')
/*
I'm using these two functions, and not streams and pipe
so there is less to break. if this test fails it must be
the implementation of _through_
*/
function write(array, stream) {
array = array.slice()
function next() {
while(array.length)
if(stream.write(array.shift()) === false)
return stream.once('drain', next)
stream.end()
}
next()
}
function read(stream, callback) {
var actual = []
stream.on('data', function (data) {
actual.push(data)
})
stream.once('end', function () {
callback(null, actual)
})
stream.once('error', function (err) {
callback(err)
})
}
test('simple defaults', function(assert) {
var l = 1000
, expected = []
while(l--) expected.push(l * Math.random())
var t = through()
var s = spec(t).through().pausable()
read(t, function (err, actual) {
assert.ifError(err)
assert.deepEqual(actual, expected)
assert.end()
})
t.on('close', s.validate)
write(expected, t)
});
test('simple functions', function(assert) {
var l = 1000
, expected = []
while(l--) expected.push(l * Math.random())
var t = through(function (data) {
this.emit('data', data*2)
})
var s = spec(t).through().pausable()
read(t, function (err, actual) {
assert.ifError(err)
assert.deepEqual(actual, expected.map(function (data) {
return data*2
}))
assert.end()
})
t.on('close', s.validate)
write(expected, t)
})
test('pauses', function(assert) {
var l = 1000
, expected = []
while(l--) expected.push(l) //Math.random())
var t = through()
var s = spec(t)
.through()
.pausable()
t.on('data', function () {
if(Math.random() > 0.1) return
t.pause()
process.nextTick(function () {
t.resume()
})
})
read(t, function (err, actual) {
assert.ifError(err)
assert.deepEqual(actual, expected)
})
t.on('close', function () {
s.validate()
assert.end()
})
write(expected, t)
})
test('does not soft-end on `undefined`', function(assert) {
var stream = through()
, count = 0
stream.on('data', function (data) {
count++
})
stream.write(undefined)
stream.write(undefined)
assert.equal(count, 2)
assert.end()
})
@@ -0,0 +1,20 @@
'use strict';
var fs = require('graceful-fs');
function readLink(file, optResolver, onRead) {
fs.readlink(file.path, onReadlink);
function onReadlink(readErr, target) {
if (readErr) {
return onRead(readErr);
}
// Store the link target path
file.symlink = target;
onRead();
}
}
module.exports = readLink;
@@ -0,0 +1,15 @@
module.exports = {
"deselectedItem": (args)=>`\u{672A}\u{9078}\u{53D6}\u{300C}${args.item}\u{300D}\u{3002}`,
"longPressToSelect": `\u{9577}\u{6309}\u{4EE5}\u{9032}\u{5165}\u{9078}\u{64C7}\u{6A21}\u{5F0F}\u{3002}`,
"select": `\u{9078}\u{53D6}`,
"selectedAll": `\u{5DF2}\u{9078}\u{53D6}\u{6240}\u{6709}\u{9805}\u{76EE}\u{3002}`,
"selectedCount": (args, formatter)=>`${formatter.plural(args.count, {
"=0": `\u{672A}\u{9078}\u{53D6}\u{4EFB}\u{4F55}\u{9805}\u{76EE}`,
one: ()=>`\u{5DF2}\u{9078}\u{53D6} ${formatter.number(args.count)} \u{500B}\u{9805}\u{76EE}`,
other: ()=>`\u{5DF2}\u{9078}\u{53D6} ${formatter.number(args.count)} \u{500B}\u{9805}\u{76EE}`
})}\u{3002}`,
"selectedItem": (args)=>`\u{5DF2}\u{9078}\u{53D6}\u{300C}${args.item}\u{300D}\u{3002}`
};
//# sourceMappingURL=zh-TW.main.js.map
@@ -0,0 +1,41 @@
// English (New Zealand) [en-nz]
import dayjs from '../index';
var locale = {
name: 'en-nz',
weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
weekStart: 1,
weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
ordinal: function ordinal(n) {
var s = ['th', 'st', 'nd', 'rd'];
var v = n % 100;
return "[" + n + (s[(v - 20) % 10] || s[v] || s[0]) + "]";
},
formats: {
LT: 'h:mm A',
LTS: 'h:mm:ss A',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY h:mm A',
LLLL: 'dddd, D MMMM YYYY h:mm A'
},
relativeTime: {
future: 'in %s',
past: '%s ago',
s: 'a few seconds',
m: 'a minute',
mm: '%d minutes',
h: 'an hour',
hh: '%d hours',
d: 'a day',
dd: '%d days',
M: 'a month',
MM: '%d months',
y: 'a year',
yy: '%d years'
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1 @@
module.exports={C:{"115":0.19889,"141":0.01047,"143":0.35591,"144":0.37685,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 142 145 146 147 3.5 3.6"},D:{"39":0.03664,"40":0.02617,"41":0.02094,"42":0.02617,"43":0.0157,"44":0.02617,"45":0.02617,"46":0.02094,"47":0.0157,"48":0.0157,"49":0.01047,"50":0.01047,"51":0.0157,"52":0.02094,"53":0.0157,"54":0.0157,"55":0.01047,"56":0.0157,"57":0.0157,"58":0.01047,"59":0.02094,"60":0.02094,"79":0.01047,"83":0.00523,"87":0.0157,"91":0.00523,"93":0.01047,"97":0.21983,"102":0.00523,"103":0.64902,"109":0.05234,"114":0.02094,"116":0.0157,"117":0.00523,"119":0.00523,"120":0.01047,"122":0.04187,"124":0.00523,"125":12.0539,"126":0.01047,"127":0.00523,"128":0.35591,"130":0.01047,"131":0.0314,"132":0.0314,"133":0.0157,"134":0.12562,"135":0.00523,"136":0.01047,"137":0.56004,"138":0.12562,"139":0.46059,"140":4.62686,"141":11.52003,"142":0.0157,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 84 85 86 88 89 90 92 94 95 96 98 99 100 101 104 105 106 107 108 110 111 112 113 115 118 121 123 129 143 144 145"},F:{"120":0.04187,"121":0.05757,"122":2.24015,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"18":0.00523,"103":0.00523,"109":0.00523,"114":0.0157,"127":0.01047,"128":0.01047,"131":0.01047,"134":0.50246,"136":0.02094,"138":0.11515,"139":0.02617,"140":1.44982,"141":5.16072,_:"12 13 14 15 16 17 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 104 105 106 107 108 110 111 112 113 115 116 117 118 119 120 121 122 123 124 125 126 129 130 132 133 135 137 142"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.1 15.2-15.3 15.5 16.0 16.3 16.4 16.5 17.0 17.2 17.3 18.1 18.2 26.2","13.1":0.06804,"14.1":0.01047,"15.4":0.00523,"15.6":0.02094,"16.1":0.00523,"16.2":0.00523,"16.6":0.03664,"17.1":0.03664,"17.4":0.11515,"17.5":0.0314,"17.6":0.08898,"18.0":0.00523,"18.3":0.00523,"18.4":0.01047,"18.5-18.6":0.08374,"26.0":0.25647,"26.1":0.12562},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.0012,"5.0-5.1":0,"6.0-6.1":0.00479,"7.0-7.1":0.00359,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.01078,"10.0-10.2":0.0012,"10.3":0.02037,"11.0-11.2":0.30194,"11.3-11.4":0.00719,"12.0-12.1":0.0024,"12.2-12.5":0.05871,"13.0-13.1":0,"13.2":0.00599,"13.3":0.0024,"13.4-13.7":0.00959,"14.0-14.4":0.02037,"14.5-14.8":0.02157,"15.0-15.1":0.02037,"15.2-15.3":0.01558,"15.4":0.01797,"15.5":0.02037,"15.6-15.8":0.26599,"16.0":0.03595,"16.1":0.0671,"16.2":0.03475,"16.3":0.0623,"16.4":0.01558,"16.5":0.02756,"16.6-16.7":0.35586,"17.0":0.02516,"17.1":0.03834,"17.2":0.02756,"17.3":0.04074,"17.4":0.07189,"17.5":0.12341,"17.6-17.7":0.31152,"18.0":0.07069,"18.1":0.14618,"18.2":0.07908,"18.3":0.25401,"18.4":0.1306,"18.5-18.6":6.65944,"26.0":0.82314,"26.1":0.02995},P:{"20":0.01089,"22":0.03267,"23":0.01089,"24":0.17426,"25":0.04357,"26":0.02178,"27":0.05446,"28":2.6684,"29":0.11981,_:"4 21 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 17.0 18.0 19.0","7.2-7.4":0.08713,"16.0":0.02178},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0},K:{"0":0.94843,_:"10 11 12 11.1 11.5 12.1"},A:{_:"6 7 8 9 10 11 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.2383},Q:{_:"14.9"},O:{"0":0.00477},H:{"0":0},L:{"0":33.86527}};
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,oBAAoB,CAAC,gGAA8E,CAAC;AACxH","sources":["packages/@react-aria/menu/intl/sl-SI.json"],"sourcesContent":["{\n \"longPressMessage\": \"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol\"\n}\n"],"names":[],"version":3,"file":"sl-SI.main.js.map"}
@@ -0,0 +1,46 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
const { getSourceCode } = require("eslint-compat-utils")
module.exports = {
meta: {
docs: {
description: "disallow the `String.raw` method.",
category: "ES2015",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-string-raw.html",
},
fixable: null,
messages: {
forbidden: "ES2015 '{{name}}' method is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Program:exit"(program) {
const sourceCode = getSourceCode(context)
const tracker = new ReferenceTracker(
sourceCode.getScope(program),
)
for (const { node, path } of tracker.iterateGlobalReferences({
String: {
raw: { [READ]: true },
},
})) {
context.report({
node,
messageId: "forbidden",
data: { name: path.join(".") },
})
}
},
}
},
}
@@ -0,0 +1,18 @@
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max,
nativeMin = Math.min;
/**
* The base implementation of `_.inRange` which doesn't coerce arguments.
*
* @private
* @param {number} number The number to check.
* @param {number} start The start of the range.
* @param {number} end The end of the range.
* @returns {boolean} Returns `true` if `number` is in the range, else `false`.
*/
function baseInRange(number, start, end) {
return number >= nativeMin(start, end) && number < nativeMax(start, end);
}
module.exports = baseInRange;
@@ -0,0 +1,354 @@
// THIS FILE IS AUTO GENERATED
import type { IconType } from '../lib/index'
export declare const TfiAgenda: IconType;
export declare const TfiAlarmClock: IconType;
export declare const TfiAlert: IconType;
export declare const TfiAlignCenter: IconType;
export declare const TfiAlignJustify: IconType;
export declare const TfiAlignLeft: IconType;
export declare const TfiAlignRight: IconType;
export declare const TfiAnchor: IconType;
export declare const TfiAndroid: IconType;
export declare const TfiAngleDoubleDown: IconType;
export declare const TfiAngleDoubleLeft: IconType;
export declare const TfiAngleDoubleRight: IconType;
export declare const TfiAngleDoubleUp: IconType;
export declare const TfiAngleDown: IconType;
export declare const TfiAngleLeft: IconType;
export declare const TfiAngleRight: IconType;
export declare const TfiAngleUp: IconType;
export declare const TfiAnnouncement: IconType;
export declare const TfiApple: IconType;
export declare const TfiArchive: IconType;
export declare const TfiArrowCircleDown: IconType;
export declare const TfiArrowCircleLeft: IconType;
export declare const TfiArrowCircleRight: IconType;
export declare const TfiArrowCircleUp: IconType;
export declare const TfiArrowDown: IconType;
export declare const TfiArrowLeft: IconType;
export declare const TfiArrowRight: IconType;
export declare const TfiArrowTopLeft: IconType;
export declare const TfiArrowTopRight: IconType;
export declare const TfiArrowUp: IconType;
export declare const TfiArrow: IconType;
export declare const TfiArrowsCorner: IconType;
export declare const TfiArrowsHorizontal: IconType;
export declare const TfiArrowsVertical: IconType;
export declare const TfiBackLeft: IconType;
export declare const TfiBackRight: IconType;
export declare const TfiBag: IconType;
export declare const TfiBarChartAlt: IconType;
export declare const TfiBarChart: IconType;
export declare const TfiBasketball: IconType;
export declare const TfiBell: IconType;
export declare const TfiBlackboard: IconType;
export declare const TfiBoltAlt: IconType;
export declare const TfiBolt: IconType;
export declare const TfiBook: IconType;
export declare const TfiBookmarkAlt: IconType;
export declare const TfiBookmark: IconType;
export declare const TfiBriefcase: IconType;
export declare const TfiBrushAlt: IconType;
export declare const TfiBrush: IconType;
export declare const TfiCalendar: IconType;
export declare const TfiCamera: IconType;
export declare const TfiCar: IconType;
export declare const TfiCheckBox: IconType;
export declare const TfiCheck: IconType;
export declare const TfiClip: IconType;
export declare const TfiClipboard: IconType;
export declare const TfiClose: IconType;
export declare const TfiCloudDown: IconType;
export declare const TfiCloudUp: IconType;
export declare const TfiCloud: IconType;
export declare const TfiCommentAlt: IconType;
export declare const TfiComment: IconType;
export declare const TfiCommentsSmiley: IconType;
export declare const TfiComments: IconType;
export declare const TfiControlBackward: IconType;
export declare const TfiControlEject: IconType;
export declare const TfiControlForward: IconType;
export declare const TfiControlPause: IconType;
export declare const TfiControlPlay: IconType;
export declare const TfiControlRecord: IconType;
export declare const TfiControlShuffle: IconType;
export declare const TfiControlSkipBackward: IconType;
export declare const TfiControlSkipForward: IconType;
export declare const TfiControlStop: IconType;
export declare const TfiCreditCard: IconType;
export declare const TfiCrown: IconType;
export declare const TfiCss3: IconType;
export declare const TfiCup: IconType;
export declare const TfiCut: IconType;
export declare const TfiDashboard: IconType;
export declare const TfiDesktop: IconType;
export declare const TfiDirectionAlt: IconType;
export declare const TfiDirection: IconType;
export declare const TfiDownload: IconType;
export declare const TfiDribbble: IconType;
export declare const TfiDropboxAlt: IconType;
export declare const TfiDropbox: IconType;
export declare const TfiDrupal: IconType;
export declare const TfiEmail: IconType;
export declare const TfiEnvelope: IconType;
export declare const TfiEraser: IconType;
export declare const TfiExchangeVertical: IconType;
export declare const TfiExport: IconType;
export declare const TfiEye: IconType;
export declare const TfiFaceSad: IconType;
export declare const TfiFaceSmile: IconType;
export declare const TfiFacebook: IconType;
export declare const TfiFile: IconType;
export declare const TfiFiles: IconType;
export declare const TfiFilter: IconType;
export declare const TfiFlagAlt2: IconType;
export declare const TfiFlagAlt: IconType;
export declare const TfiFlag: IconType;
export declare const TfiFlickrAlt: IconType;
export declare const TfiFlickr: IconType;
export declare const TfiFolder: IconType;
export declare const TfiFullscreen: IconType;
export declare const TfiGallery: IconType;
export declare const TfiGame: IconType;
export declare const TfiGift: IconType;
export declare const TfiGithub: IconType;
export declare const TfiGoogle: IconType;
export declare const TfiHandDrag: IconType;
export declare const TfiHandOpen: IconType;
export declare const TfiHandPointDown: IconType;
export declare const TfiHandPointLeft: IconType;
export declare const TfiHandPointRight: IconType;
export declare const TfiHandPointUp: IconType;
export declare const TfiHandStop: IconType;
export declare const TfiHarddrive: IconType;
export declare const TfiHarddrives: IconType;
export declare const TfiHeadphoneAlt: IconType;
export declare const TfiHeadphone: IconType;
export declare const TfiHeartBroken: IconType;
export declare const TfiHeart: IconType;
export declare const TfiHelpAlt: IconType;
export declare const TfiHelp: IconType;
export declare const TfiHome: IconType;
export declare const TfiHtml5: IconType;
export declare const TfiHummer: IconType;
export declare const TfiIdBadge: IconType;
export declare const TfiImage: IconType;
export declare const TfiImport: IconType;
export declare const TfiInfinite: IconType;
export declare const TfiInfoAlt: IconType;
export declare const TfiInfo: IconType;
export declare const TfiInkPen: IconType;
export declare const TfiInstagram: IconType;
export declare const TfiItalic: IconType;
export declare const TfiJoomla: IconType;
export declare const TfiJsfiddle: IconType;
export declare const TfiKey: IconType;
export declare const TfiLayersAlt: IconType;
export declare const TfiLayers: IconType;
export declare const TfiLayoutAccordionList: IconType;
export declare const TfiLayoutAccordionMerged: IconType;
export declare const TfiLayoutAccordionSeparated: IconType;
export declare const TfiLayoutColumn2Alt: IconType;
export declare const TfiLayoutColumn2: IconType;
export declare const TfiLayoutColumn3Alt: IconType;
export declare const TfiLayoutColumn3: IconType;
export declare const TfiLayoutColumn4Alt: IconType;
export declare const TfiLayoutColumn4: IconType;
export declare const TfiLayoutCtaBtnLeft: IconType;
export declare const TfiLayoutCtaBtnRight: IconType;
export declare const TfiLayoutCtaCenter: IconType;
export declare const TfiLayoutCtaLeft: IconType;
export declare const TfiLayoutCtaRight: IconType;
export declare const TfiLayoutGrid2Alt: IconType;
export declare const TfiLayoutGrid2Thumb: IconType;
export declare const TfiLayoutGrid2: IconType;
export declare const TfiLayoutGrid3Alt: IconType;
export declare const TfiLayoutGrid3: IconType;
export declare const TfiLayoutGrid4Alt: IconType;
export declare const TfiLayoutGrid4: IconType;
export declare const TfiLayoutLineSolid: IconType;
export declare const TfiLayoutListLargeImage: IconType;
export declare const TfiLayoutListPost: IconType;
export declare const TfiLayoutListThumbAlt: IconType;
export declare const TfiLayoutListThumb: IconType;
export declare const TfiLayoutMediaCenterAlt: IconType;
export declare const TfiLayoutMediaCenter: IconType;
export declare const TfiLayoutMediaLeftAlt: IconType;
export declare const TfiLayoutMediaLeft: IconType;
export declare const TfiLayoutMediaOverlayAlt2: IconType;
export declare const TfiLayoutMediaOverlayAlt: IconType;
export declare const TfiLayoutMediaOverlay: IconType;
export declare const TfiLayoutMediaRightAlt: IconType;
export declare const TfiLayoutMediaRight: IconType;
export declare const TfiLayoutMenuFull: IconType;
export declare const TfiLayoutMenuSeparated: IconType;
export declare const TfiLayoutMenuV: IconType;
export declare const TfiLayoutMenu: IconType;
export declare const TfiLayoutPlaceholder: IconType;
export declare const TfiLayoutSidebar2: IconType;
export declare const TfiLayoutSidebarLeft: IconType;
export declare const TfiLayoutSidebarNone: IconType;
export declare const TfiLayoutSidebarRight: IconType;
export declare const TfiLayoutSliderAlt: IconType;
export declare const TfiLayoutSlider: IconType;
export declare const TfiLayoutTabMin: IconType;
export declare const TfiLayoutTabV: IconType;
export declare const TfiLayoutTabWindow: IconType;
export declare const TfiLayoutTab: IconType;
export declare const TfiLayoutWidthDefaultAlt: IconType;
export declare const TfiLayoutWidthDefault: IconType;
export declare const TfiLayoutWidthFull: IconType;
export declare const TfiLayout: IconType;
export declare const TfiLightBulb: IconType;
export declare const TfiLineDashed: IconType;
export declare const TfiLineDotted: IconType;
export declare const TfiLineDouble: IconType;
export declare const TfiLink: IconType;
export declare const TfiLinkedin: IconType;
export declare const TfiLinux: IconType;
export declare const TfiListOl: IconType;
export declare const TfiList: IconType;
export declare const TfiLocationArrow: IconType;
export declare const TfiLocationPin: IconType;
export declare const TfiLock: IconType;
export declare const TfiLoop: IconType;
export declare const TfiMagnet: IconType;
export declare const TfiMapAlt: IconType;
export declare const TfiMap: IconType;
export declare const TfiMarkerAlt: IconType;
export declare const TfiMarker: IconType;
export declare const TfiMedallAlt: IconType;
export declare const TfiMedall: IconType;
export declare const TfiMenuAlt: IconType;
export declare const TfiMenu: IconType;
export declare const TfiMicrophoneAlt: IconType;
export declare const TfiMicrophone: IconType;
export declare const TfiMicrosoftAlt: IconType;
export declare const TfiMicrosoft: IconType;
export declare const TfiMinus: IconType;
export declare const TfiMobile: IconType;
export declare const TfiMoney: IconType;
export declare const TfiMoreAlt: IconType;
export declare const TfiMore: IconType;
export declare const TfiMouseAlt: IconType;
export declare const TfiMouse: IconType;
export declare const TfiMusicAlt: IconType;
export declare const TfiMusic: IconType;
export declare const TfiNa: IconType;
export declare const TfiNewWindow: IconType;
export declare const TfiNotepad: IconType;
export declare const TfiPackage: IconType;
export declare const TfiPaintBucket: IconType;
export declare const TfiPaintRoller: IconType;
export declare const TfiPalette: IconType;
export declare const TfiPanel: IconType;
export declare const TfiParagraph: IconType;
export declare const TfiPencilAlt: IconType;
export declare const TfiPencilAlt2: IconType;
export declare const TfiPencil: IconType;
export declare const TfiPieChart: IconType;
export declare const TfiPinAlt: IconType;
export declare const TfiPin: IconType;
export declare const TfiPin2: IconType;
export declare const TfiPinterestAlt: IconType;
export declare const TfiPinterest: IconType;
export declare const TfiPlug: IconType;
export declare const TfiPlus: IconType;
export declare const TfiPowerOff: IconType;
export declare const TfiPrinter: IconType;
export declare const TfiPulse: IconType;
export declare const TfiQuoteLeft: IconType;
export declare const TfiQuoteRight: IconType;
export declare const TfiReceipt: IconType;
export declare const TfiReddit: IconType;
export declare const TfiReload: IconType;
export declare const TfiRocket: IconType;
export declare const TfiRssAlt: IconType;
export declare const TfiRss: IconType;
export declare const TfiRulerAlt2: IconType;
export declare const TfiRulerAlt: IconType;
export declare const TfiRulerPencil: IconType;
export declare const TfiRuler: IconType;
export declare const TfiSaveAlt: IconType;
export declare const TfiSave: IconType;
export declare const TfiSearch: IconType;
export declare const TfiServer: IconType;
export declare const TfiSettings: IconType;
export declare const TfiShareAlt: IconType;
export declare const TfiShare: IconType;
export declare const TfiSharethisAlt: IconType;
export declare const TfiSharethis: IconType;
export declare const TfiShield: IconType;
export declare const TfiShiftLeftAlt: IconType;
export declare const TfiShiftLeft: IconType;
export declare const TfiShiftRightAlt: IconType;
export declare const TfiShiftRight: IconType;
export declare const TfiShine: IconType;
export declare const TfiShoppingCartFull: IconType;
export declare const TfiShoppingCart: IconType;
export declare const TfiShortcode: IconType;
export declare const TfiSignal: IconType;
export declare const TfiSkype: IconType;
export declare const TfiSlice: IconType;
export declare const TfiSmallcap: IconType;
export declare const TfiSoundcloud: IconType;
export declare const TfiSplitH: IconType;
export declare const TfiSplitVAlt: IconType;
export declare const TfiSplitV: IconType;
export declare const TfiSpray: IconType;
export declare const TfiStackOverflow: IconType;
export declare const TfiStamp: IconType;
export declare const TfiStar: IconType;
export declare const TfiStatsDown: IconType;
export declare const TfiStatsUp: IconType;
export declare const TfiSupport: IconType;
export declare const TfiTablet: IconType;
export declare const TfiTag: IconType;
export declare const TfiTarget: IconType;
export declare const TfiText: IconType;
export declare const TfiThemifyFaviconAlt: IconType;
export declare const TfiThemifyFavicon: IconType;
export declare const TfiThemifyLogo: IconType;
export declare const TfiThought: IconType;
export declare const TfiThumbDown: IconType;
export declare const TfiThumbUp: IconType;
export declare const TfiTicket: IconType;
export declare const TfiTime: IconType;
export declare const TfiTimer: IconType;
export declare const TfiTrash: IconType;
export declare const TfiTrello: IconType;
export declare const TfiTruck: IconType;
export declare const TfiTumblrAlt: IconType;
export declare const TfiTumblr: IconType;
export declare const TfiTwitterAlt: IconType;
export declare const TfiTwitter: IconType;
export declare const TfiUnderline: IconType;
export declare const TfiUnlink: IconType;
export declare const TfiUnlock: IconType;
export declare const TfiUpload: IconType;
export declare const TfiUppercase: IconType;
export declare const TfiUser: IconType;
export declare const TfiVector: IconType;
export declare const TfiVideoCamera: IconType;
export declare const TfiVideoClapper: IconType;
export declare const TfiViewGrid: IconType;
export declare const TfiViewListAlt: IconType;
export declare const TfiViewList: IconType;
export declare const TfiVimeoAlt: IconType;
export declare const TfiVimeo: IconType;
export declare const TfiVolume: IconType;
export declare const TfiWallet: IconType;
export declare const TfiWand: IconType;
export declare const TfiWheelchair: IconType;
export declare const TfiWidgetAlt: IconType;
export declare const TfiWidget: IconType;
export declare const TfiWidgetized: IconType;
export declare const TfiWindow: IconType;
export declare const TfiWordpress: IconType;
export declare const TfiWorld: IconType;
export declare const TfiWrite: IconType;
export declare const TfiYahoo: IconType;
export declare const TfiYoutube: IconType;
export declare const TfiZip: IconType;
export declare const TfiZoomIn: IconType;
export declare const TfiZoomOut: IconType;
@@ -0,0 +1,28 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
export type {TableColumnResizeState, TableColumnResizeStateProps} from './useTableColumnResizeState';
export type {TableState, CollectionBuilderContext, TableStateProps} from './useTableState';
export type {TableHeaderProps, TableBodyProps, ColumnProps, RowProps, CellProps} from '@react-types/table';
export type {TreeGridState, TreeGridStateProps} from './useTreeGridState';
export {useTableColumnResizeState} from './useTableColumnResizeState';
export {useTableState, UNSTABLE_useFilteredTableState} from './useTableState';
export {TableHeader} from './TableHeader';
export {TableBody} from './TableBody';
export {Column} from './Column';
export {Row} from './Row';
export {Cell} from './Cell';
export {Section} from '@react-stately/collections';
export {TableCollection, buildHeaderRows} from './TableCollection';
export {TableColumnLayout} from './TableColumnLayout';
export {UNSTABLE_useTreeGridState} from './useTreeGridState';
@@ -0,0 +1,38 @@
import path from 'node:path';
import { isAbsolute, createRule, moduleVisitor, makeOptionsSchema, } from '../utils/index.js';
export default createRule({
name: 'no-absolute-path',
meta: {
type: 'suggestion',
docs: {
category: 'Static analysis',
description: 'Forbid import of modules using absolute paths.',
},
fixable: 'code',
schema: [makeOptionsSchema()],
messages: {
absolute: 'Do not import modules using an absolute path',
},
},
defaultOptions: [],
create(context) {
const options = { esmodule: true, commonjs: true, ...context.options[0] };
return moduleVisitor(source => {
if (!isAbsolute(source.value)) {
return;
}
context.report({
node: source,
messageId: 'absolute',
fix(fixer) {
let relativePath = path.posix.relative(path.dirname(context.physicalFilename), source.value);
if (!relativePath.startsWith('.')) {
relativePath = `./${relativePath}`;
}
return fixer.replaceText(source, JSON.stringify(relativePath));
},
});
}, options);
},
});
//# sourceMappingURL=no-absolute-path.js.map
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isDisposable = void 0;
function isDisposable(value) {
if (typeof value.dispose !== "function")
return false;
const disposeFun = value.dispose;
if (disposeFun.length > 0) {
return false;
}
return true;
}
exports.isDisposable = isDisposable;
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
const fs = require("fs");
exports.FILE_SYSTEM_ADAPTER = {
lstat: fs.lstat,
stat: fs.stat,
lstatSync: fs.lstatSync,
statSync: fs.statSync
};
function createFileSystemAdapter(fsMethods) {
if (fsMethods === undefined) {
return exports.FILE_SYSTEM_ADAPTER;
}
return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
}
exports.createFileSystemAdapter = createFileSystemAdapter;
@@ -0,0 +1,24 @@
/**
* The base implementation of `_.sum` and `_.sumBy` without support for
* iteratee shorthands.
*
* @private
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {number} Returns the sum.
*/
function baseSum(array, iteratee) {
var result,
index = -1,
length = array.length;
while (++index < length) {
var current = iteratee(array[index]);
if (current !== undefined) {
result = result === undefined ? current : (result + current);
}
}
return result;
}
export default baseSum;
@@ -0,0 +1,27 @@
import { WebStreamReader } from './WebStreamReader.js';
/**
* Read from a WebStream using a BYOB reader
* Reference: https://nodejs.org/api/webstreams.html#class-readablestreambyobreader
*/
export class WebStreamByobReader extends WebStreamReader {
/**
* Read from stream
* @param buffer - Target Uint8Array (or Buffer) to store data read from stream in
* @param mayBeLess - If true, may fill the buffer partially
* @protected Bytes read
*/
async readFromStream(buffer, mayBeLess) {
if (buffer.length === 0)
return 0;
// @ts-ignore
const result = await this.reader.read(new Uint8Array(buffer.length), { min: mayBeLess ? undefined : buffer.length });
if (result.done) {
this.endOfStream = result.done;
}
if (result.value) {
buffer.set(result.value);
return result.value.length;
}
return 0;
}
}
@@ -0,0 +1,264 @@
import { parser } from '@lezer/css';
import { syntaxTree, LRLanguage, indentNodeProp, continuedIndent, foldNodeProp, foldInside, LanguageSupport } from '@codemirror/language';
import { NodeWeakMap, IterMode } from '@lezer/common';
let _properties = null;
function properties() {
if (!_properties && typeof document == "object" && document.body) {
let { style } = document.body, names = [], seen = new Set;
for (let prop in style)
if (prop != "cssText" && prop != "cssFloat") {
if (typeof style[prop] == "string") {
if (/[A-Z]/.test(prop))
prop = prop.replace(/[A-Z]/g, ch => "-" + ch.toLowerCase());
if (!seen.has(prop)) {
names.push(prop);
seen.add(prop);
}
}
}
_properties = names.sort().map(name => ({ type: "property", label: name, apply: name + ": " }));
}
return _properties || [];
}
const pseudoClasses = /*@__PURE__*/[
"active", "after", "any-link", "autofill", "backdrop", "before",
"checked", "cue", "default", "defined", "disabled", "empty",
"enabled", "file-selector-button", "first", "first-child",
"first-letter", "first-line", "first-of-type", "focus",
"focus-visible", "focus-within", "fullscreen", "has", "host",
"host-context", "hover", "in-range", "indeterminate", "invalid",
"is", "lang", "last-child", "last-of-type", "left", "link", "marker",
"modal", "not", "nth-child", "nth-last-child", "nth-last-of-type",
"nth-of-type", "only-child", "only-of-type", "optional", "out-of-range",
"part", "placeholder", "placeholder-shown", "read-only", "read-write",
"required", "right", "root", "scope", "selection", "slotted", "target",
"target-text", "valid", "visited", "where"
].map(name => ({ type: "class", label: name }));
const values = /*@__PURE__*/[
"above", "absolute", "activeborder", "additive", "activecaption", "after-white-space",
"ahead", "alias", "all", "all-scroll", "alphabetic", "alternate", "always",
"antialiased", "appworkspace", "asterisks", "attr", "auto", "auto-flow", "avoid", "avoid-column",
"avoid-page", "avoid-region", "axis-pan", "background", "backwards", "baseline", "below",
"bidi-override", "blink", "block", "block-axis", "bold", "bolder", "border", "border-box",
"both", "bottom", "break", "break-all", "break-word", "bullets", "button", "button-bevel",
"buttonface", "buttonhighlight", "buttonshadow", "buttontext", "calc", "capitalize",
"caps-lock-indicator", "caption", "captiontext", "caret", "cell", "center", "checkbox", "circle",
"cjk-decimal", "clear", "clip", "close-quote", "col-resize", "collapse", "color", "color-burn",
"color-dodge", "column", "column-reverse", "compact", "condensed", "contain", "content",
"contents", "content-box", "context-menu", "continuous", "copy", "counter", "counters", "cover",
"crop", "cross", "crosshair", "currentcolor", "cursive", "cyclic", "darken", "dashed", "decimal",
"decimal-leading-zero", "default", "default-button", "dense", "destination-atop", "destination-in",
"destination-out", "destination-over", "difference", "disc", "discard", "disclosure-closed",
"disclosure-open", "document", "dot-dash", "dot-dot-dash", "dotted", "double", "down", "e-resize",
"ease", "ease-in", "ease-in-out", "ease-out", "element", "ellipse", "ellipsis", "embed", "end",
"ethiopic-abegede-gez", "ethiopic-halehame-aa-er", "ethiopic-halehame-gez", "ew-resize", "exclusion",
"expanded", "extends", "extra-condensed", "extra-expanded", "fantasy", "fast", "fill", "fill-box",
"fixed", "flat", "flex", "flex-end", "flex-start", "footnotes", "forwards", "from",
"geometricPrecision", "graytext", "grid", "groove", "hand", "hard-light", "help", "hidden", "hide",
"higher", "highlight", "highlighttext", "horizontal", "hsl", "hsla", "hue", "icon", "ignore",
"inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite", "infobackground", "infotext",
"inherit", "initial", "inline", "inline-axis", "inline-block", "inline-flex", "inline-grid",
"inline-table", "inset", "inside", "intrinsic", "invert", "italic", "justify", "keep-all",
"landscape", "large", "larger", "left", "level", "lighter", "lighten", "line-through", "linear",
"linear-gradient", "lines", "list-item", "listbox", "listitem", "local", "logical", "loud", "lower",
"lower-hexadecimal", "lower-latin", "lower-norwegian", "lowercase", "ltr", "luminosity", "manipulation",
"match", "matrix", "matrix3d", "medium", "menu", "menutext", "message-box", "middle", "min-intrinsic",
"mix", "monospace", "move", "multiple", "multiple_mask_images", "multiply", "n-resize", "narrower",
"ne-resize", "nesw-resize", "no-close-quote", "no-drop", "no-open-quote", "no-repeat", "none",
"normal", "not-allowed", "nowrap", "ns-resize", "numbers", "numeric", "nw-resize", "nwse-resize",
"oblique", "opacity", "open-quote", "optimizeLegibility", "optimizeSpeed", "outset", "outside",
"outside-shape", "overlay", "overline", "padding", "padding-box", "painted", "page", "paused",
"perspective", "pinch-zoom", "plus-darker", "plus-lighter", "pointer", "polygon", "portrait",
"pre", "pre-line", "pre-wrap", "preserve-3d", "progress", "push-button", "radial-gradient", "radio",
"read-only", "read-write", "read-write-plaintext-only", "rectangle", "region", "relative", "repeat",
"repeating-linear-gradient", "repeating-radial-gradient", "repeat-x", "repeat-y", "reset", "reverse",
"rgb", "rgba", "ridge", "right", "rotate", "rotate3d", "rotateX", "rotateY", "rotateZ", "round",
"row", "row-resize", "row-reverse", "rtl", "run-in", "running", "s-resize", "sans-serif", "saturation",
"scale", "scale3d", "scaleX", "scaleY", "scaleZ", "screen", "scroll", "scrollbar", "scroll-position",
"se-resize", "self-start", "self-end", "semi-condensed", "semi-expanded", "separate", "serif", "show",
"single", "skew", "skewX", "skewY", "skip-white-space", "slide", "slider-horizontal",
"slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow", "small", "small-caps",
"small-caption", "smaller", "soft-light", "solid", "source-atop", "source-in", "source-out",
"source-over", "space", "space-around", "space-between", "space-evenly", "spell-out", "square", "start",
"static", "status-bar", "stretch", "stroke", "stroke-box", "sub", "subpixel-antialiased", "svg_masks",
"super", "sw-resize", "symbolic", "symbols", "system-ui", "table", "table-caption", "table-cell",
"table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row",
"table-row-group", "text", "text-bottom", "text-top", "textarea", "textfield", "thick", "thin",
"threeddarkshadow", "threedface", "threedhighlight", "threedlightshadow", "threedshadow", "to", "top",
"transform", "translate", "translate3d", "translateX", "translateY", "translateZ", "transparent",
"ultra-condensed", "ultra-expanded", "underline", "unidirectional-pan", "unset", "up", "upper-latin",
"uppercase", "url", "var", "vertical", "vertical-text", "view-box", "visible", "visibleFill",
"visiblePainted", "visibleStroke", "visual", "w-resize", "wait", "wave", "wider", "window", "windowframe",
"windowtext", "words", "wrap", "wrap-reverse", "x-large", "x-small", "xor", "xx-large", "xx-small"
].map(name => ({ type: "keyword", label: name })).concat(/*@__PURE__*/[
"aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige",
"bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown",
"burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue",
"cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod",
"darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen",
"darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen",
"darkslateblue", "darkslategray", "darkturquoise", "darkviolet",
"deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick",
"floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite",
"gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew",
"hotpink", "indianred", "indigo", "ivory", "khaki", "lavender",
"lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral",
"lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightpink",
"lightsalmon", "lightseagreen", "lightskyblue", "lightslategray",
"lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta",
"maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple",
"mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise",
"mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin",
"navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered",
"orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred",
"papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue",
"purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown",
"salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue",
"slateblue", "slategray", "snow", "springgreen", "steelblue", "tan",
"teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white",
"whitesmoke", "yellow", "yellowgreen"
].map(name => ({ type: "constant", label: name })));
const tags = /*@__PURE__*/[
"a", "abbr", "address", "article", "aside", "b", "bdi", "bdo", "blockquote", "body",
"br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "dd", "del",
"details", "dfn", "dialog", "div", "dl", "dt", "em", "figcaption", "figure", "footer",
"form", "header", "hgroup", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "html", "i", "iframe",
"img", "input", "ins", "kbd", "label", "legend", "li", "main", "meter", "nav", "ol", "output",
"p", "pre", "ruby", "section", "select", "small", "source", "span", "strong", "sub", "summary",
"sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "tr", "u", "ul"
].map(name => ({ type: "type", label: name }));
const atRules = /*@__PURE__*/[
"@charset", "@color-profile", "@container", "@counter-style", "@font-face", "@font-feature-values",
"@font-palette-values", "@import", "@keyframes", "@layer", "@media", "@namespace", "@page",
"@position-try", "@property", "@scope", "@starting-style", "@supports", "@view-transition"
].map(label => ({ type: "keyword", label }));
const identifier = /^(\w[\w-]*|-\w[\w-]*|)$/, variable = /^-(-[\w-]*)?$/;
function isVarArg(node, doc) {
var _a;
if (node.name == "(" || node.type.isError)
node = node.parent || node;
if (node.name != "ArgList")
return false;
let callee = (_a = node.parent) === null || _a === void 0 ? void 0 : _a.firstChild;
if ((callee === null || callee === void 0 ? void 0 : callee.name) != "Callee")
return false;
return doc.sliceString(callee.from, callee.to) == "var";
}
const VariablesByNode = /*@__PURE__*/new NodeWeakMap();
const declSelector = ["Declaration"];
function astTop(node) {
for (let cur = node;;) {
if (cur.type.isTop)
return cur;
if (!(cur = cur.parent))
return node;
}
}
function variableNames(doc, node, isVariable) {
if (node.to - node.from > 4096) {
let known = VariablesByNode.get(node);
if (known)
return known;
let result = [], seen = new Set, cursor = node.cursor(IterMode.IncludeAnonymous);
if (cursor.firstChild())
do {
for (let option of variableNames(doc, cursor.node, isVariable))
if (!seen.has(option.label)) {
seen.add(option.label);
result.push(option);
}
} while (cursor.nextSibling());
VariablesByNode.set(node, result);
return result;
}
else {
let result = [], seen = new Set;
node.cursor().iterate(node => {
var _a;
if (isVariable(node) && node.matchContext(declSelector) && ((_a = node.node.nextSibling) === null || _a === void 0 ? void 0 : _a.name) == ":") {
let name = doc.sliceString(node.from, node.to);
if (!seen.has(name)) {
seen.add(name);
result.push({ label: name, type: "variable" });
}
}
});
return result;
}
}
/**
Create a completion source for a CSS dialect, providing a
predicate for determining what kind of syntax node can act as a
completable variable. This is used by language modes like Sass and
Less to reuse this package's completion logic.
*/
const defineCSSCompletionSource = (isVariable) => context => {
let { state, pos } = context, node = syntaxTree(state).resolveInner(pos, -1);
let isDash = node.type.isError && node.from == node.to - 1 && state.doc.sliceString(node.from, node.to) == "-";
if (node.name == "PropertyName" ||
(isDash || node.name == "TagName") && /^(Block|Styles)$/.test(node.resolve(node.to).name))
return { from: node.from, options: properties(), validFor: identifier };
if (node.name == "ValueName")
return { from: node.from, options: values, validFor: identifier };
if (node.name == "PseudoClassName")
return { from: node.from, options: pseudoClasses, validFor: identifier };
if (isVariable(node) || (context.explicit || isDash) && isVarArg(node, state.doc))
return { from: isVariable(node) || isDash ? node.from : pos,
options: variableNames(state.doc, astTop(node), isVariable),
validFor: variable };
if (node.name == "TagName") {
for (let { parent } = node; parent; parent = parent.parent)
if (parent.name == "Block")
return { from: node.from, options: properties(), validFor: identifier };
return { from: node.from, options: tags, validFor: identifier };
}
if (node.name == "AtKeyword")
return { from: node.from, options: atRules, validFor: identifier };
if (!context.explicit)
return null;
let above = node.resolve(pos), before = above.childBefore(pos);
if (before && before.name == ":" && above.name == "PseudoClassSelector")
return { from: pos, options: pseudoClasses, validFor: identifier };
if (before && before.name == ":" && above.name == "Declaration" || above.name == "ArgList")
return { from: pos, options: values, validFor: identifier };
if (above.name == "Block" || above.name == "Styles")
return { from: pos, options: properties(), validFor: identifier };
return null;
};
/**
CSS property, variable, and value keyword completion source.
*/
const cssCompletionSource = /*@__PURE__*/defineCSSCompletionSource(n => n.name == "VariableName");
/**
A language provider based on the [Lezer CSS
parser](https://github.com/lezer-parser/css), extended with
highlighting and indentation information.
*/
const cssLanguage = /*@__PURE__*/LRLanguage.define({
name: "css",
parser: /*@__PURE__*/parser.configure({
props: [
/*@__PURE__*/indentNodeProp.add({
Declaration: /*@__PURE__*/continuedIndent()
}),
/*@__PURE__*/foldNodeProp.add({
"Block KeyframeList": foldInside
})
]
}),
languageData: {
commentTokens: { block: { open: "/*", close: "*/" } },
indentOnInput: /^\s*\}$/,
wordChars: "-"
}
});
/**
Language support for CSS.
*/
function css() {
return new LanguageSupport(cssLanguage, cssLanguage.data.of({ autocomplete: cssCompletionSource }));
}
export { css, cssCompletionSource, cssLanguage, defineCSSCompletionSource };
@@ -0,0 +1,14 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
const agent_1 = __importDefault(require("./agent"));
function createHttpsProxyAgent(opts) {
return new agent_1.default(opts);
}
(function (createHttpsProxyAgent) {
createHttpsProxyAgent.HttpsProxyAgent = agent_1.default;
createHttpsProxyAgent.prototype = agent_1.default.prototype;
})(createHttpsProxyAgent || (createHttpsProxyAgent = {}));
module.exports = createHttpsProxyAgent;
//# sourceMappingURL=index.js.map
@@ -0,0 +1,34 @@
import baseValues from './_baseValues.js';
import keys from './keys.js';
/**
* Creates an array of the own enumerable string keyed property values of `object`.
*
* **Note:** Non-object values are coerced to objects.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property values.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.values(new Foo);
* // => [1, 2] (iteration order is not guaranteed)
*
* _.values('hi');
* // => ['h', 'i']
*/
function values(object) {
return object == null ? [] : baseValues(object, keys(object));
}
export default values;
@@ -0,0 +1,28 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _domTarget = require("../utils/domTarget");
var _useDeepCompareWithTarget = _interopRequireDefault(require("../utils/useDeepCompareWithTarget"));
var _useLatest = _interopRequireDefault(require("../useLatest"));
var useMutationObserver = function useMutationObserver(callback, target, options) {
if (options === void 0) {
options = {};
}
var callbackRef = (0, _useLatest["default"])(callback);
(0, _useDeepCompareWithTarget["default"])(function () {
var element = (0, _domTarget.getTargetElement)(target);
if (!element) {
return;
}
var observer = new MutationObserver(callbackRef.current);
observer.observe(element, options);
return function () {
observer === null || observer === void 0 ? void 0 : observer.disconnect();
};
}, [options], target);
};
var _default = exports["default"] = useMutationObserver;
@@ -0,0 +1,3 @@
import { BindingConstraints, MetadataTag } from '@inversifyjs/core';
export declare function isNotParentBindingConstraintsWithTag(tag: MetadataTag, value: unknown): (constraints: BindingConstraints) => boolean;
//# sourceMappingURL=isNotParentBindingConstraintsWithTag.d.ts.map
@@ -0,0 +1,16 @@
import type { TSchema, SchemaOptions } from '../schema/index.mjs';
import { Kind } from '../symbols/index.mjs';
export interface IntegerOptions extends SchemaOptions {
exclusiveMaximum?: number;
exclusiveMinimum?: number;
maximum?: number;
minimum?: number;
multipleOf?: number;
}
export interface TInteger extends TSchema, IntegerOptions {
[Kind]: 'Integer';
static: number;
type: 'integer';
}
/** `[Json]` Creates an Integer type */
export declare function Integer(options?: IntegerOptions): TInteger;
@@ -0,0 +1,75 @@
import {willOpenKeyboard as $21f1aa98acb08317$export$c57958e35f31ed73} from "./keyboard.mjs";
import {useState as $fuDHA$useState, useEffect as $fuDHA$useEffect} from "react";
import {useIsSSR as $fuDHA$useIsSSR} from "@react-aria/ssr";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
let $5df64b3807dc15ee$var$visualViewport = typeof document !== 'undefined' && window.visualViewport;
function $5df64b3807dc15ee$export$d699905dd57c73ca() {
let isSSR = (0, $fuDHA$useIsSSR)();
let [size, setSize] = (0, $fuDHA$useState)(()=>isSSR ? {
width: 0,
height: 0
} : $5df64b3807dc15ee$var$getViewportSize());
(0, $fuDHA$useEffect)(()=>{
// Use visualViewport api to track available height even on iOS virtual keyboard opening
let onResize = ()=>{
// Ignore updates when zoomed.
if ($5df64b3807dc15ee$var$visualViewport && $5df64b3807dc15ee$var$visualViewport.scale > 1) return;
setSize((size)=>{
let newSize = $5df64b3807dc15ee$var$getViewportSize();
if (newSize.width === size.width && newSize.height === size.height) return size;
return newSize;
});
};
// When closing the keyboard, iOS does not fire the visual viewport resize event until the animation is complete.
// We can anticipate this and resize early by handling the blur event and using the layout size.
let frame;
let onBlur = (e)=>{
if ($5df64b3807dc15ee$var$visualViewport && $5df64b3807dc15ee$var$visualViewport.scale > 1) return;
if ((0, $21f1aa98acb08317$export$c57958e35f31ed73)(e.target)) // Wait one frame to see if a new element gets focused.
frame = requestAnimationFrame(()=>{
if (!document.activeElement || !(0, $21f1aa98acb08317$export$c57958e35f31ed73)(document.activeElement)) setSize((size)=>{
let newSize = {
width: window.innerWidth,
height: window.innerHeight
};
if (newSize.width === size.width && newSize.height === size.height) return size;
return newSize;
});
});
};
window.addEventListener('blur', onBlur, true);
if (!$5df64b3807dc15ee$var$visualViewport) window.addEventListener('resize', onResize);
else $5df64b3807dc15ee$var$visualViewport.addEventListener('resize', onResize);
return ()=>{
cancelAnimationFrame(frame);
window.removeEventListener('blur', onBlur, true);
if (!$5df64b3807dc15ee$var$visualViewport) window.removeEventListener('resize', onResize);
else $5df64b3807dc15ee$var$visualViewport.removeEventListener('resize', onResize);
};
}, []);
return size;
}
function $5df64b3807dc15ee$var$getViewportSize() {
return {
// Multiply by the visualViewport scale to get the "natural" size, unaffected by pinch zooming.
width: $5df64b3807dc15ee$var$visualViewport ? $5df64b3807dc15ee$var$visualViewport.width * $5df64b3807dc15ee$var$visualViewport.scale : window.innerWidth,
height: $5df64b3807dc15ee$var$visualViewport ? $5df64b3807dc15ee$var$visualViewport.height * $5df64b3807dc15ee$var$visualViewport.scale : window.innerHeight
};
}
export {$5df64b3807dc15ee$export$d699905dd57c73ca as useViewportSize};
//# sourceMappingURL=useViewportSize.module.js.map
@@ -0,0 +1,122 @@
import * as util from "../core/util.js";
const error = () => {
const Sizable = {
string: { unit: "کاراکتر", verb: "داشته باشد" },
file: { unit: "بایت", verb: "داشته باشد" },
array: { unit: "آیتم", verb: "داشته باشد" },
set: { unit: "آیتم", verb: "داشته باشد" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "عدد";
}
case "object": {
if (Array.isArray(data)) {
return "آرایه";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "ورودی",
email: "آدرس ایمیل",
url: "URL",
emoji: "ایموجی",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "تاریخ و زمان ایزو",
date: "تاریخ ایزو",
time: "زمان ایزو",
duration: "مدت زمان ایزو",
ipv4: "IPv4 آدرس",
ipv6: "IPv6 آدرس",
cidrv4: "IPv4 دامنه",
cidrv6: "IPv6 دامنه",
base64: "base64-encoded رشته",
base64url: "base64url-encoded رشته",
json_string: "JSON رشته",
e164: "E.164 عدد",
jwt: "JWT",
template_literal: "ورودی",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `ورودی نامعتبر: می‌بایست ${issue.expected} می‌بود، ${parsedType(issue.input)} دریافت شد`;
case "invalid_value":
if (issue.values.length === 1) {
return `ورودی نامعتبر: می‌بایست ${util.stringifyPrimitive(issue.values[0])} می‌بود`;
}
return `گزینه نامعتبر: می‌بایست یکی از ${util.joinValues(issue.values, "|")} می‌بود`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing) {
return `خیلی بزرگ: ${issue.origin ?? "مقدار"} باید ${adj}${issue.maximum.toString()} ${sizing.unit ?? "عنصر"} باشد`;
}
return `خیلی بزرگ: ${issue.origin ?? "مقدار"} باید ${adj}${issue.maximum.toString()} باشد`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `خیلی کوچک: ${issue.origin} باید ${adj}${issue.minimum.toString()} ${sizing.unit} باشد`;
}
return `خیلی کوچک: ${issue.origin} باید ${adj}${issue.minimum.toString()} باشد`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with") {
return `رشته نامعتبر: باید با "${_issue.prefix}" شروع شود`;
}
if (_issue.format === "ends_with") {
return `رشته نامعتبر: باید با "${_issue.suffix}" تمام شود`;
}
if (_issue.format === "includes") {
return `رشته نامعتبر: باید شامل "${_issue.includes}" باشد`;
}
if (_issue.format === "regex") {
return `رشته نامعتبر: باید با الگوی ${_issue.pattern} مطابقت داشته باشد`;
}
return `${Nouns[_issue.format] ?? issue.format} نامعتبر`;
}
case "not_multiple_of":
return `عدد نامعتبر: باید مضرب ${issue.divisor} باشد`;
case "unrecognized_keys":
return `کلید${issue.keys.length > 1 ? "های" : ""} ناشناس: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `کلید ناشناس در ${issue.origin}`;
case "invalid_union":
return `ورودی نامعتبر`;
case "invalid_element":
return `مقدار نامعتبر در ${issue.origin}`;
default:
return `ورودی نامعتبر`;
}
};
};
export default function () {
return {
localeError: error(),
};
}
@@ -0,0 +1,31 @@
'use strict';var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}
module.exports = {
meta: {
type: 'suggestion',
docs: {
category: 'Style guide',
description: 'Forbid named default exports.',
url: (0, _docsUrl2['default'])('no-named-default') },
schema: [] },
create: function () {function create(context) {
return {
ImportDeclaration: function () {function ImportDeclaration(node) {
node.specifiers.forEach(function (im) {
if (im.importKind === 'type' || im.importKind === 'typeof') {
return;
}
if (im.type === 'ImportSpecifier' && (im.imported.name || im.imported.value) === 'default') {
context.report({
node: im.local,
message: 'Use default import syntax to import \'' + String(im.local.name) + '\'.' });
}
});
}return ImportDeclaration;}() };
}return create;}() };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1uYW1lZC1kZWZhdWx0LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwidHlwZSIsImRvY3MiLCJjYXRlZ29yeSIsImRlc2NyaXB0aW9uIiwidXJsIiwic2NoZW1hIiwiY3JlYXRlIiwiY29udGV4dCIsIkltcG9ydERlY2xhcmF0aW9uIiwibm9kZSIsInNwZWNpZmllcnMiLCJmb3JFYWNoIiwiaW0iLCJpbXBvcnRLaW5kIiwiaW1wb3J0ZWQiLCJuYW1lIiwidmFsdWUiLCJyZXBvcnQiLCJsb2NhbCIsIm1lc3NhZ2UiXSwibWFwcGluZ3MiOiJhQUFBLHFDOztBQUVBQSxPQUFPQyxPQUFQLEdBQWlCO0FBQ2ZDLFFBQU07QUFDSkMsVUFBTSxZQURGO0FBRUpDLFVBQU07QUFDSkMsZ0JBQVUsYUFETjtBQUVKQyxtQkFBYSwrQkFGVDtBQUdKQyxXQUFLLDBCQUFRLGtCQUFSLENBSEQsRUFGRjs7QUFPSkMsWUFBUSxFQVBKLEVBRFM7OztBQVdmQyxRQVhlLCtCQVdSQyxPQVhRLEVBV0M7QUFDZCxhQUFPO0FBQ0xDLHlCQURLLDBDQUNhQyxJQURiLEVBQ21CO0FBQ3RCQSxpQkFBS0MsVUFBTCxDQUFnQkMsT0FBaEIsQ0FBd0IsVUFBVUMsRUFBVixFQUFjO0FBQ3BDLGtCQUFJQSxHQUFHQyxVQUFILEtBQWtCLE1BQWxCLElBQTRCRCxHQUFHQyxVQUFILEtBQWtCLFFBQWxELEVBQTREO0FBQzFEO0FBQ0Q7O0FBRUQsa0JBQUlELEdBQUdaLElBQUgsS0FBWSxpQkFBWixJQUFpQyxDQUFDWSxHQUFHRSxRQUFILENBQVlDLElBQVosSUFBb0JILEdBQUdFLFFBQUgsQ0FBWUUsS0FBakMsTUFBNEMsU0FBakYsRUFBNEY7QUFDMUZULHdCQUFRVSxNQUFSLENBQWU7QUFDYlIsd0JBQU1HLEdBQUdNLEtBREk7QUFFYkMsNkVBQWlEUCxHQUFHTSxLQUFILENBQVNILElBQTFELFNBRmEsRUFBZjtBQUdEO0FBQ0YsYUFWRDtBQVdELFdBYkksOEJBQVA7O0FBZUQsS0EzQmMsbUJBQWpCIiwiZmlsZSI6Im5vLW5hbWVkLWRlZmF1bHQuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgZG9jc1VybCBmcm9tICcuLi9kb2NzVXJsJztcblxubW9kdWxlLmV4cG9ydHMgPSB7XG4gIG1ldGE6IHtcbiAgICB0eXBlOiAnc3VnZ2VzdGlvbicsXG4gICAgZG9jczoge1xuICAgICAgY2F0ZWdvcnk6ICdTdHlsZSBndWlkZScsXG4gICAgICBkZXNjcmlwdGlvbjogJ0ZvcmJpZCBuYW1lZCBkZWZhdWx0IGV4cG9ydHMuJyxcbiAgICAgIHVybDogZG9jc1VybCgnbm8tbmFtZWQtZGVmYXVsdCcpLFxuICAgIH0sXG4gICAgc2NoZW1hOiBbXSxcbiAgfSxcblxuICBjcmVhdGUoY29udGV4dCkge1xuICAgIHJldHVybiB7XG4gICAgICBJbXBvcnREZWNsYXJhdGlvbihub2RlKSB7XG4gICAgICAgIG5vZGUuc3BlY2lmaWVycy5mb3JFYWNoKGZ1bmN0aW9uIChpbSkge1xuICAgICAgICAgIGlmIChpbS5pbXBvcnRLaW5kID09PSAndHlwZScgfHwgaW0uaW1wb3J0S2luZCA9PT0gJ3R5cGVvZicpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoaW0udHlwZSA9PT0gJ0ltcG9ydFNwZWNpZmllcicgJiYgKGltLmltcG9ydGVkLm5hbWUgfHwgaW0uaW1wb3J0ZWQudmFsdWUpID09PSAnZGVmYXVsdCcpIHtcbiAgICAgICAgICAgIGNvbnRleHQucmVwb3J0KHtcbiAgICAgICAgICAgICAgbm9kZTogaW0ubG9jYWwsXG4gICAgICAgICAgICAgIG1lc3NhZ2U6IGBVc2UgZGVmYXVsdCBpbXBvcnQgc3ludGF4IHRvIGltcG9ydCAnJHtpbS5sb2NhbC5uYW1lfScuYCB9KTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgfSxcbiAgICB9O1xuICB9LFxufTtcbiJdfQ==
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L"},C:{"1":"0 1 2 3 4 5 lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB 0C 1C","1025":"kB","1218":"fB gB hB iB jB"},D:{"1":"0 1 2 3 4 5 nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB","260":"lB","772":"mB"},E:{"1":"B C L M G aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F A 2C ZC 3C 4C 5C 6C"},F:{"1":"0 1 2 3 4 5 FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"6 7 8 9 F B C G N O P aB AB BB CB FD GD HD ID NC uC JD OC","260":"DB","772":"EB"},G:{"1":"SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD PD QD RD"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:1,C:"Fetch",D:true};
@@ -0,0 +1,9 @@
export function stringify(obj: any, options?: StringifyOptions): string;
export function stripBom(content: string): string;
export interface StringifyOptions {
EOL?: string | undefined;
finalEOL?: boolean | undefined;
replacer?: ((key: string, value: any) => any) | undefined;
spaces?: string | number | undefined;
}
@@ -0,0 +1,184 @@
import { R as RouteModule, f as LinkDescriptor, L as Location, F as Func, g as Pretty, h as MetaDescriptor, G as GetLoaderData, i as ServerDataFunctionArgs, j as MiddlewareNextFunction, k as ClientDataFunctionArgs, D as DataStrategyResult, l as ServerDataFrom, N as Normalize, m as GetActionData } from '../../instrumentation-iAqbU5Q4.js';
import { R as RouteFiles, P as Pages } from '../../register-c-dooqKE.js';
import 'react';
type MaybePromise<T> = T | Promise<T>;
type Props = {
params: unknown;
loaderData: unknown;
actionData: unknown;
};
type RouteInfo = Props & {
module: RouteModule;
matches: Array<MatchInfo>;
};
type MatchInfo = {
id: string;
module: RouteModule;
};
type MetaMatch<T extends MatchInfo> = Pretty<{
id: T["id"];
params: Record<string, string | undefined>;
pathname: string;
meta: MetaDescriptor[];
/** @deprecated Use `MetaMatch.loaderData` instead */
data: GetLoaderData<T["module"]>;
loaderData: GetLoaderData<T["module"]>;
handle?: unknown;
error?: unknown;
}>;
type MetaMatches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<MatchInfo> | undefined>;
type HasErrorBoundary<T extends RouteInfo> = T["module"] extends {
ErrorBoundary: Func;
} ? true : false;
type CreateMetaArgs<T extends RouteInfo> = {
/** This is the current router `Location` object. This is useful for generating tags for routes at specific paths or query parameters. */
location: Location;
/** {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route. */
params: T["params"];
/**
* The return value for this route's server loader function
*
* @deprecated Use `Route.MetaArgs.loaderData` instead
*/
data: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
/** The return value for this route's server loader function */
loaderData: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
/** Thrown errors that trigger error boundaries will be passed to the meta function. This is useful for generating metadata for error pages. */
error?: unknown;
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
matches: MetaMatches<T["matches"]>;
};
type MetaDescriptors = MetaDescriptor[];
type HeadersArgs = {
loaderHeaders: Headers;
parentHeaders: Headers;
actionHeaders: Headers;
errorHeaders: Headers | undefined;
};
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T["params"]>, next: MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T["params"]>, next: MiddlewareNextFunction<Record<string, DataStrategyResult>>) => MaybePromise<Record<string, DataStrategyResult> | void>;
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
/** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
};
type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
/** This is an asynchronous function that makes the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server action for this route. */
serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
};
type IsServerFirstRoute<T extends RouteInfo, RSCEnabled extends boolean> = RSCEnabled extends true ? T["module"] extends {
ServerComponent: Func;
} ? true : false : false;
type CreateHydrateFallbackProps<T extends RouteInfo, RSCEnabled extends boolean> = {
params: T["params"];
} & (IsServerFirstRoute<T, RSCEnabled> extends true ? {
/** The data returned from the `loader` */
loaderData?: ServerDataFrom<T["module"]["loader"]>;
/** The data returned from the `action` following an action submission. */
actionData?: ServerDataFrom<T["module"]["action"]>;
} : {
/** The data returned from the `loader` or `clientLoader` */
loaderData?: T["loaderData"];
/** The data returned from the `action` or `clientAction` following an action submission. */
actionData?: T["actionData"];
});
type Match<T extends MatchInfo> = Pretty<{
id: T["id"];
params: Record<string, string | undefined>;
pathname: string;
/** @deprecated Use `Match.loaderData` instead */
data: GetLoaderData<T["module"]>;
loaderData: GetLoaderData<T["module"]>;
handle: unknown;
}>;
type Matches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [Match<F>, ...Matches<R>] : Array<Match<MatchInfo> | undefined>;
type CreateComponentProps<T extends RouteInfo, RSCEnabled extends boolean> = {
/**
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
* @example
* // app/routes.ts
* route("teams/:teamId", "./team.tsx"),
*
* // app/team.tsx
* export default function Component({
* params,
* }: Route.ComponentProps) {
* params.teamId;
* // ^ string
* }
**/
params: T["params"];
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
matches: Matches<T["matches"]>;
} & (IsServerFirstRoute<T, RSCEnabled> extends true ? {
/** The data returned from the `loader` */
loaderData: ServerDataFrom<T["module"]["loader"]>;
/** The data returned from the `action` following an action submission. */
actionData?: ServerDataFrom<T["module"]["action"]>;
} : {
/** The data returned from the `loader` or `clientLoader` */
loaderData: T["loaderData"];
/** The data returned from the `action` or `clientAction` following an action submission. */
actionData?: T["actionData"];
});
type CreateErrorBoundaryProps<T extends RouteInfo, RSCEnabled extends boolean> = {
/**
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
* @example
* // app/routes.ts
* route("teams/:teamId", "./team.tsx"),
*
* // app/team.tsx
* export function ErrorBoundary({
* params,
* }: Route.ErrorBoundaryProps) {
* params.teamId;
* // ^ string
* }
**/
params: T["params"];
error: unknown;
} & (IsServerFirstRoute<T, RSCEnabled> extends true ? {
/** The data returned from the `loader` */
loaderData?: ServerDataFrom<T["module"]["loader"]>;
/** The data returned from the `action` following an action submission. */
actionData?: ServerDataFrom<T["module"]["action"]>;
} : {
/** The data returned from the `loader` or `clientLoader` */
loaderData?: T["loaderData"];
/** The data returned from the `action` or `clientAction` following an action submission. */
actionData?: T["actionData"];
});
type GetAnnotations<Info extends RouteInfo, RSCEnabled extends boolean> = {
LinkDescriptors: LinkDescriptor[];
LinksFunction: () => LinkDescriptor[];
MetaArgs: CreateMetaArgs<Info>;
MetaDescriptors: MetaDescriptors;
MetaFunction: (args: CreateMetaArgs<Info>) => MetaDescriptors;
HeadersArgs: HeadersArgs;
HeadersFunction: (args: HeadersArgs) => Headers | HeadersInit;
MiddlewareFunction: CreateServerMiddlewareFunction<Info>;
ClientMiddlewareFunction: CreateClientMiddlewareFunction<Info>;
LoaderArgs: CreateServerLoaderArgs<Info>;
ClientLoaderArgs: CreateClientLoaderArgs<Info>;
ActionArgs: CreateServerActionArgs<Info>;
ClientActionArgs: CreateClientActionArgs<Info>;
HydrateFallbackProps: CreateHydrateFallbackProps<Info, RSCEnabled>;
ComponentProps: CreateComponentProps<Info, RSCEnabled>;
ErrorBoundaryProps: CreateErrorBoundaryProps<Info, RSCEnabled>;
};
type Params<RouteFile extends keyof RouteFiles> = Normalize<Pages[RouteFiles[RouteFile]["page"]]["params"]>;
type GetInfo<T extends {
file: keyof RouteFiles;
module: RouteModule;
}> = {
params: Params<T["file"]>;
loaderData: GetLoaderData<T["module"]>;
actionData: GetActionData<T["module"]>;
};
export type { GetAnnotations, GetInfo };
@@ -0,0 +1,179 @@
import {
colorVariants
} from "./chunk-GQT3YUX3.mjs";
import {
tv
} from "./chunk-UWE6H66T.mjs";
import {
dataFocusVisibleClasses
} from "./chunk-GH5E4FQB.mjs";
// src/components/popover.ts
var popover = tv({
slots: {
base: [
"z-0",
"relative",
"bg-transparent",
"before:content-['']",
"before:hidden",
"before:z-[-1]",
"before:absolute",
"before:rotate-45",
"before:w-2.5",
"before:h-2.5",
"before:rounded-sm",
"data-[arrow=true]:before:block",
"data-[placement=top]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]",
"data-[placement=top]:before:left-1/2",
"data-[placement=top]:before:-translate-x-1/2",
"data-[placement=top-start]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]",
"data-[placement=top-start]:before:left-3",
"data-[placement=top-end]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]",
"data-[placement=top-end]:before:right-3",
"data-[placement=bottom]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]",
"data-[placement=bottom]:before:left-1/2",
"data-[placement=bottom]:before:-translate-x-1/2",
"data-[placement=bottom-start]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]",
"data-[placement=bottom-start]:before:left-3",
"data-[placement=bottom-end]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]",
"data-[placement=bottom-end]:before:right-3",
"data-[placement=left]:before:-right-[calc(theme(spacing.5)/4_-_2px)]",
"data-[placement=left]:before:top-1/2",
"data-[placement=left]:before:-translate-y-1/2",
"data-[placement=left-start]:before:-right-[calc(theme(spacing.5)/4_-_3px)]",
"data-[placement=left-start]:before:top-1/4",
"data-[placement=left-end]:before:-right-[calc(theme(spacing.5)/4_-_3px)]",
"data-[placement=left-end]:before:bottom-1/4",
"data-[placement=right]:before:-left-[calc(theme(spacing.5)/4_-_2px)]",
"data-[placement=right]:before:top-1/2",
"data-[placement=right]:before:-translate-y-1/2",
"data-[placement=right-start]:before:-left-[calc(theme(spacing.5)/4_-_3px)]",
"data-[placement=right-start]:before:top-1/4",
"data-[placement=right-end]:before:-left-[calc(theme(spacing.5)/4_-_3px)]",
"data-[placement=right-end]:before:bottom-1/4",
...dataFocusVisibleClasses
],
content: [
"z-10",
"px-2.5",
"py-1",
"w-full",
"inline-flex",
"flex-col",
"items-center",
"justify-center",
"box-border",
"subpixel-antialiased",
"outline-none",
"box-border"
],
trigger: ["z-10"],
backdrop: ["hidden"],
arrow: []
},
variants: {
size: {
sm: { content: "text-tiny" },
md: { content: "text-small" },
lg: { content: "text-medium" }
},
color: {
default: {
base: "before:bg-content1 before:shadow-small",
content: "bg-content1"
},
foreground: {
base: "before:bg-foreground",
content: colorVariants.solid.foreground
},
primary: {
base: "before:bg-primary",
content: colorVariants.solid.primary
},
secondary: {
base: "before:bg-secondary",
content: colorVariants.solid.secondary
},
success: {
base: "before:bg-success",
content: colorVariants.solid.success
},
warning: {
base: "before:bg-warning",
content: colorVariants.solid.warning
},
danger: {
base: "before:bg-danger",
content: colorVariants.solid.danger
}
},
radius: {
none: { content: "rounded-none" },
sm: { content: "rounded-small" },
md: { content: "rounded-medium" },
lg: { content: "rounded-large" },
full: { content: "rounded-full" }
},
shadow: {
none: {
content: "shadow-none"
},
sm: {
content: "shadow-small"
},
md: {
content: "shadow-medium"
},
lg: {
content: "shadow-large"
}
},
backdrop: {
transparent: {},
opaque: {
backdrop: "bg-overlay/50 backdrop-opacity-disabled"
},
blur: {
backdrop: "backdrop-blur-sm backdrop-saturate-150 bg-overlay/30"
}
},
triggerScaleOnOpen: {
true: {
trigger: ["aria-expanded:scale-[0.97]", "aria-expanded:opacity-70", "subpixel-antialiased"]
},
false: {}
},
disableAnimation: {
true: {
base: "animate-none"
}
},
isTriggerDisabled: {
true: {
trigger: "opacity-disabled pointer-events-none"
},
false: {}
}
},
defaultVariants: {
color: "default",
radius: "lg",
size: "md",
shadow: "md",
backdrop: "transparent",
triggerScaleOnOpen: true
},
compoundVariants: [
{
backdrop: ["opaque", "blur"],
class: {
backdrop: "block w-full h-full fixed inset-0 -z-30"
}
}
]
});
export {
popover
};
@@ -0,0 +1 @@
{"name":"language-tags","version":"1.0.9","requiresBuild":false,"files":{"lib/index.js":{"checkedAt":1794532118132,"integrity":"sha512-WlXh9p1pA29ueWDWGkT5cSLQOMAuJrhZT+Ax788TzwaaNys/lvpM4iIXfjd4EvZKC2ZjWZb/fQ4AaWyL55IGbA==","mode":420,"size":3349},"lib/Subtag.js":{"checkedAt":1794532118132,"integrity":"sha512-GEEk+aYyxQMP/mD2jm7pBcx3qAKptJ2pftuFemCMQhWZWHRQk1El0vWuHXztFs8UIZw/oanZhtp6+Qnc++vgJg==","mode":420,"size":5142},"lib/Tag.js":{"checkedAt":1794532118132,"integrity":"sha512-kg+10y8y3In/hr70FodaZlh84lUKzaMGHQ3XjmKWqghj5ZoP7KdHsuP1P4JnI/hnlWi5Z/xXRERaIGJ/2poijA==","mode":420,"size":13637},"package.json":{"checkedAt":1794532118132,"integrity":"sha512-weCAldq2KmVxLagxx8HtXmoez0awdRL19F1XVjqD5dPK/L+cDMTAeoSAk4+5Kp7+0nupiOIXfqZRX6su8r2w/Q==","mode":420,"size":1475},"README.md":{"checkedAt":1794532118132,"integrity":"sha512-TSiBieMvJASBiAo5E8e0uHkkNxKfYqu/B3k5/BbUw75ckSk9KzjzMm0IEAaRGr3c0+ZA0hiQAtDZuw6iapYU3w==","mode":420,"size":8444}}}
@@ -0,0 +1 @@
{"name":"minipass-sized","version":"1.0.3","requiresBuild":false,"files":{".gitignore":{"checkedAt":1794532122194,"integrity":"sha512-aeDEmHtcovvziajxTgE9oJFyhGIUlyJJXu+3LnY78mfCMPcG1j9HtJA8nVF8CaFzMZxkO9OUKXHhdATkGGSDUA==","mode":420,"size":264},"LICENSE":{"checkedAt":1794532122194,"integrity":"sha512-P6dI5Z+zrwxSk1MIRPqpYG2ScYNkidLIATQXd50QzBgBh/XmcEd/nsd9NB4O9k6rfc+4dsY5DwJ7xvhpoS0PRg==","mode":420,"size":765},"test/basic.js":{"checkedAt":1794532122194,"integrity":"sha512-QwAjIXrXhDZYEIgz5wofblvFv3bl7hqtIkHTq1kAv3fQoQtwaTfihNPQR2Ag8dkVO9gZjNsBGszPCziFAE6s6A==","mode":420,"size":2259},"index.js":{"checkedAt":1794532122195,"integrity":"sha512-FPSGKI0b6tHkIFejHguKdjKkBSxJ4PiIIAupqy1Ekb/zF3skRQ9sDvHSowWphloird7wCJ3oY9ipz7dmUlQZiQ==","mode":420,"size":1785},"package-lock.json":{"checkedAt":1794532122195,"integrity":"sha512-Uax1Vloittzf+1pv8vwQpOYT01qVn/K2tod8XMqn9H8GNXtyc8maHoN+yqi5ON0C1R3sb1HjObGECcWuHFfuTA==","mode":420,"size":117102},"package.json":{"checkedAt":1794532122195,"integrity":"sha512-cRNSdrWKRIL2RhXv1XdVD5sg8l8NiAY6EZ8qK0J1eAbDGPQkzG/78XAxkzQriXHARuuYL67UPskH42IziSqC+Q==","mode":420,"size":831},"README.md":{"checkedAt":1794532122195,"integrity":"sha512-Gb89vTjeiqZYdEKV+zcXKa9W/9673DM23+nd5s6Y1pQW/ImV69RjFK4rxbn+fBUov2lj5rj4OsxO6VncWi9oxA==","mode":420,"size":859}}}
@@ -0,0 +1,50 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = mayContainChildComponent;
var _jsxAstUtils = require("jsx-ast-utils");
var _minimatch = _interopRequireDefault(require("minimatch"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
* Returns true if it can positively determine that the element lacks an
* accessible label. If no determination is possible, it returns false. Treat
* false as an unknown value. The element might still have an accessible label,
* but this module cannot determine it positively.
*
*
*/
function mayContainChildComponent(root, componentName) {
var maxDepth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
var elementType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _jsxAstUtils.elementType;
function traverseChildren(node, depth) {
// Bail when maxDepth is exceeded.
if (depth > maxDepth) {
return false;
}
if (node.children) {
/* $FlowFixMe */
for (var i = 0; i < node.children.length; i += 1) {
/* $FlowFixMe */
var childNode = node.children[i];
// Assume an expression container renders a label. It is the best we can
// do in this case.
if (childNode.type === 'JSXExpressionContainer') {
return true;
}
// Check for components with the provided name.
if (childNode.type === 'JSXElement' && childNode.openingElement && (0, _minimatch["default"])(elementType(childNode.openingElement), componentName)) {
return true;
}
if (traverseChildren(childNode, depth + 1)) {
return true;
}
}
}
return false;
}
return traverseChildren(root, 1);
}
module.exports = exports.default;
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('flatMap', require('../flatMap'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAkBM,SAAS,wCAAkC,KAA6B;QAIvD,2BAAA;IAHtB,IAAI,QAAQ,CAAA,GAAA,gDAAuB,EAAK;QACtC,GAAG,KAAK;QACR,0BAA0B;QAC1B,oBAAoB,CAAA,OAAA,CAAA,4BAAA,MAAM,kBAAkB,cAAxB,uCAAA,4BAA4B,6CAAuB,MAAM,UAAU,EAAE,MAAM,YAAY,GAAG,IAAI,IAAI,MAAM,YAAY,IAAI,IAAI,oBAA5H,kBAAA,OAAsI;IAC5J;IAEA,IAAI,oBACF,gBAAgB,cAChB,UAAU,EACV,aAAa,kBAAkB,EAChC,GAAG;IAEJ,IAAI,kBAAkB,CAAA,GAAA,mBAAK,EAAE;IAC7B,CAAA,GAAA,sBAAQ,EAAE;QACR,0HAA0H;QAC1H,IAAI,cAAc;QAClB,IAAI,iBAAiB,OAAO,IAAI,eAAe,QAAQ,CAAC,WAAW,OAAO,CAAC,cAAc;YACvF,cAAc,6CAAuB,YAAY,MAAM,YAAY;YACnE,IAAI,eAAe,MACjB,uFAAuF;YACvF,iBAAiB,eAAe,CAAC;gBAAC;aAAY;QAElD;QAEA,2JAA2J;QAC3J,IAAI,eAAe,QAAQ,iBAAiB,UAAU,IAAI,QAAS,CAAC,iBAAiB,SAAS,IAAI,gBAAgB,gBAAgB,OAAO,EACvI,iBAAiB,aAAa,CAAC;QAEjC,gBAAgB,OAAO,GAAG;IAC5B;IAEA,OAAO;QACL,GAAG,KAAK;QACR,YAAY,MAAM,UAAU,IAAI;IAClC;AACF;AAEA,SAAS,6CAA0B,UAA2C,EAAE,YAAsB;IACpG,IAAI,cAA0B;IAC9B,IAAI,YAAY;YAGkD,2BAAA,qBAIH,4BAAA;QAN7D,cAAc,WAAW,WAAW;QACpC,uEAAuE;QACvE,MAAO,eAAe,QAAS,CAAA,aAAa,GAAG,CAAC,kBAAgB,sBAAA,WAAW,OAAO,CAAC,0BAAnB,2CAAA,4BAAA,oBAAiC,KAAK,cAAtC,gDAAA,0BAAwC,UAAU,CAAD,KAAM,gBAAgB,WAAW,UAAU,GAC1J,cAAc,WAAW,WAAW,CAAC;QAEvC,oHAAoH;QACpH,IAAI,eAAe,QAAS,CAAA,aAAa,GAAG,CAAC,kBAAgB,uBAAA,WAAW,OAAO,CAAC,0BAAnB,4CAAA,6BAAA,qBAAiC,KAAK,cAAtC,iDAAA,2BAAwC,UAAU,CAAD,KAAM,gBAAgB,WAAW,UAAU,IACvJ,cAAc,WAAW,WAAW;IAExC;IAEA,OAAO;AACT","sources":["packages/@react-stately/tabs/src/useTabListState.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Collection, CollectionStateBase, Key, Node} from '@react-types/shared';\nimport {SingleSelectListState, useSingleSelectListState} from '@react-stately/list';\nimport {TabListProps} from '@react-types/tabs';\nimport {useEffect, useRef} from 'react';\n\nexport interface TabListStateOptions<T> extends Omit<TabListProps<T>, 'children'>, CollectionStateBase<T> {}\n\nexport interface TabListState<T> extends SingleSelectListState<T> {\n /** Whether the tab list is disabled. */\n isDisabled: boolean\n}\n\n/**\n * Provides state management for a Tabs component. Tabs include a TabList which tracks\n * which tab is currently selected and displays the content associated with that Tab in a TabPanel.\n */\nexport function useTabListState<T extends object>(props: TabListStateOptions<T>): TabListState<T> {\n let state = useSingleSelectListState<T>({\n ...props,\n suppressTextValueWarning: true,\n defaultSelectedKey: props.defaultSelectedKey ?? findDefaultSelectedKey(props.collection, props.disabledKeys ? new Set(props.disabledKeys) : new Set()) ?? undefined\n });\n\n let {\n selectionManager,\n collection,\n selectedKey: currentSelectedKey\n } = state;\n\n let lastSelectedKey = useRef(currentSelectedKey);\n useEffect(() => {\n // Ensure a tab is always selected (in case no selected key was specified or if selected item was deleted from collection)\n let selectedKey = currentSelectedKey;\n if (selectionManager.isEmpty || selectedKey == null || !collection.getItem(selectedKey)) {\n selectedKey = findDefaultSelectedKey(collection, state.disabledKeys);\n if (selectedKey != null) {\n // directly set selection because replace/toggle selection won't consider disabled keys\n selectionManager.setSelectedKeys([selectedKey]);\n }\n }\n\n // If the tablist doesn't have focus and the selected key changes or if there isn't a focused key yet, change focused key to the selected key if it exists.\n if (selectedKey != null && selectionManager.focusedKey == null || (!selectionManager.isFocused && selectedKey !== lastSelectedKey.current)) {\n selectionManager.setFocusedKey(selectedKey);\n }\n lastSelectedKey.current = selectedKey;\n });\n\n return {\n ...state,\n isDisabled: props.isDisabled || false\n };\n}\n\nfunction findDefaultSelectedKey<T>(collection: Collection<Node<T>> | undefined, disabledKeys: Set<Key>) {\n let selectedKey: Key | null = null;\n if (collection) {\n selectedKey = collection.getFirstKey();\n // loop over tabs until we find one that isn't disabled and select that\n while (selectedKey != null && (disabledKeys.has(selectedKey) || collection.getItem(selectedKey)?.props?.isDisabled) && selectedKey !== collection.getLastKey()) {\n selectedKey = collection.getKeyAfter(selectedKey);\n }\n // if this check is true, then every item is disabled, it makes more sense to default to the firsLine truncated
@@ -0,0 +1,9 @@
import { NapCatCore } from '../../napcat-core';
import { NapCatOneBot11Adapter } from '../index';
import { OB11ProfileLikeEvent } from '../event/notice/OB11ProfileLikeEvent';
export declare class OneBotUserApi {
obContext: NapCatOneBot11Adapter;
core: NapCatCore;
constructor(obContext: NapCatOneBot11Adapter, core: NapCatCore);
parseLikeEvent(wrappedBody: Uint8Array): Promise<OB11ProfileLikeEvent | undefined>;
}
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more